jQuery(document).ready(function(){
	$("#navbox .linav").hover(function(){  
		$(this).addClass("anavclick");
		$(this).find($(".category-box")).show();
	},function(){
		$(".category-box").hide();
		$(this).removeClass("anavclick");
	});

	$("#DivFloatServer .s-close").click(function(){  
		$("#DivFloatServer").hide();
		$("#DivFloatServerClose").show();
	});
	$("#DivFloatServerClose").click(function(){  
		$("#DivFloatServer").show();
		$("#DivFloatServerClose").hide();
	});

});	

function jsUrlRedirect(Url){
	if (Url!=''){$("#jsEtaoSubmit").html("<a href='"+Url+"' class='submitetao vwhite'>立即购买</a>");	
	}else{$("#jsEtaoSubmit").html("Error");}
}

function jsBuyCount(Count){
	var buyCount = parseInt($("#BuyCount").val());
	buyCount = buyCount+parseInt(Count);
	if (buyCount<=0){buyCount=1}
	$("#BuyCount").val(buyCount);
	
}

function jsBuyStep(ActiveID){
	if (ActiveID=="next"){
	$("#jsBuyStep1").hide();
	$("#jsBuyStep2").show();
	}
	if (ActiveID=="pre"){
	$("#jsBuyStep1").show();
	$("#jsBuyStep2").hide();
	}


}
function jsQuickbox_open(){

	 var jsLeftpx = (document.body.clientWidth-900)/2;
	 var jsToppx = (document.body.clientHeight-520)/2;
	 $("#Quickbox").show();
	 $("#Quickbox #QuickFaqbox").css("left",jsLeftpx+"px");
	 $("#Quickbox #QuickFaqbox").css("top",jsToppx+"px");

}

function jsQuickbox_close(){
	 $("#Quickbox").hide();
}

function jsInfoFileClick(FileID){

	$.post("/active/FileClick.asp",{
		FileID:FileID
		} ,function(data,status){

			$("#jsClickCount").html( data );

		});	
	
	
}

function PictureGuendong(){
	var speed=30;
	var tab=document.getElementById("demo");
	var tab1=document.getElementById("demo1");
	var tab2=document.getElementById("demo2");
	tab2.innerHTML=tab1.innerHTML;
	function Marquee(){
	if(tab2.offsetWidth-tab.scrollLeft<=0)
	tab.scrollLeft-=tab1.offsetWidth
	else{tab.scrollLeft++;
	}}
	var MyMar=setInterval(Marquee,speed);
	tab.onmouseover=function() {clearInterval(MyMar)};
	tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};	
}


function Tourbook_Person(Value,num){
	if (num==1 && Value>=10000){
		$('#js_personCR').html("<input name='PersonCR' type='text' id='PersonCR' size='6' maxlength='3' />");
	}
	if (num==2 && Value>=10000){
		$('#js_personXH').html("<input name='PersonXH' type='text' id='PersonXH' size='6' maxlength='3' value='0' />");
	}	
}

function js_TourlinebookCheck_1(){
	PersonCR=$('#tourbookform #PersonCR').val();
	if (PersonCR=="") { alert("请输入人数字");document.tourbookform.PersonCR.focus();return false;}
}

