// JavaScript Document


function checkClick(msg){
	if(confirm(msg)){
		return event.returnValue=true;
	}else{
        return event.returnValue=false;
	}
}

// li内容切换
function switchLiCnt(obja,objb){
	$('#' + obja).children().mouseover(function(){
		if($(this).attr("class") != "on"){
			$('#' + obja).children().removeClass('on');
			$(this).addClass("on");
			key = $('#' + obja).children().index($(this));
			$('#' + objb).children().removeClass('on');
			$('#' + objb).children().eq(key).addClass("on");
		}
	})
}

function addfavorite(){//加入收藏   
   if (document.all){   
      window.external.addFavorite("http://"+document.location.host+"/",document.title);   
   }else if (window.sidebar){   
      window.sidebar.addPanel(document.title,"http://"+document.location.host+"/", "");   
   }   
}   
function clearInput(a,val){
	if($("#"+a).val()==''){
		$("#"+a).val(val);
	}
	$("#"+a).focus(function(){
		if($(this).val()==val){
			$(this).val('');
		}
	})
	$("#"+a).blur(function(){
		if($(this).val()==''){
			$(this).val(val);
		}
	})
}





