// JavaScript Document



jQuery(function(){

var fz=jQuery("#vid").val(); //Scenery
var cz=jQuery("#cid").val(); //Product
tiwendl();
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/wenda.asp",
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"wd="+cz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#Quiz .title").html(msg);
					}
			});
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/User.asp",
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"",
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#pSummary .names").html(msg);
					}
			});


/*综合打分AJAX开始*/
jQuery("#pingjia").html("正在加载...");
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/xingji.asp",
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"df="+fz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#pingjia").html(msg);
					}
			});
/*综合打分AJAX结束*/

/*分类打分AJAX开始*/
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/flxingji.asp",
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"fldf="+fz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#flpingjia").html(msg);
					}
			});
/*分类打分AJAX结束*/


/*评论AJAX 开始*/
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/Commentnumber.asp",
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"qq="+fz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#pinglun").prepend(msg);
					}
			});
/*评论AJAX 结束*/

/*留言AJAX开始*/
jQuery("#quzizhu").html("正在加载...")
jQuery(".dataselect").datepicker();
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/liuyan.asp",
		type:"POST",
		datatype:"html",
		timeout:20000,
		data:"PageNo="+1+"&cid="+cz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#quzizhu").html(msg);
jQuery("#more").mouseover(function(){jQuery("#more span").removeClass("more_tag");
									jQuery("#more span").addClass("more_tag_show");							  
																	  });
jQuery("#more1").mouseover(function(){jQuery("#more1 span").removeClass("more_tag");
									jQuery("#more1 span").addClass("more_tag_show");							  
																	  });
jQuery(".more_tag").mouseout(function(){jQuery(this).removeClass("more_tag_show");
											jQuery(this).addClass("more_tag");		 
																	 });
					}});
/*留言AJAX结束*/

jQuery("#pingjia").mouseover(function(){
									  jQuery("select").css("visibility","hidden");
									  jQuery("#flpingjia").css("visibility","visible");
																 });
jQuery("#pingjia").mouseout(function(){setTimeout("gb()",1000);});
jQuery("#flpingjia").mouseover(function(){jQuery("select").css("visibility","hidden");});
jQuery("#flpingjia").mouseover(function(){jQuery(this).css("visibility","visible")})
jQuery("#flpingjia").mouseout(function(){
										   jQuery(this).css("visibility","hidden");
										   jQuery("select").css("visibility","visible");
										   });

jQuery("#goumai").mouseover(function(){jQuery(".now_shop").css("background-position","0px -962px")})
.mouseout(function(){jQuery(".now_shop").css("background-position","0px -848px")});
jQuery("#goumai1").mouseover(function(){jQuery(".now_shop1").css("background-position","0px -679px")})
.mouseout(function(){jQuery(".now_shop1").css("background-position","0px -596px")});


jQuery("#tiwen_input").keyup(function(){
								var inz=jQuery(this).val();
								if(inz!=""){
								jQuery("#tiwen").attr("disabled","");
								jQuery(".yanzhengma").css("display","block");
								}else{
								jQuery("#tiwen").attr("disabled","false");
									}});
jQuery("#goumai").click(function(){
	var wenttime=jQuery("input[@name=wenttime]").val();
	var Went_Name=jQuery("input[@name=Went_Name]").val();
	var Went_Mobile=jQuery("input[@name=Went_Mobile]").val();
	var WM=Went_Mobile.match(/^0*(13|15|18)\d{9}$/);
	var WN=Went_Name.match(/[^\x00-\xff]/ig);
	if(wenttime=="")
	{
		alert("请填写到达时间！");
		jQuery("input[@name=wenttime]").focus();
		return false;
	}
	if(Went_Name=="")
	{
		alert("请填写订票姓名！");
		jQuery("input[@name=Went_Name]").focus();
		return false;
	}
	if(Went_Name.length<2)
	{
		alert("订票姓名必须大于2个字符！");
		jQuery("input[@name=Went_Name]").focus();
		return false;
	}
	if(!WN)
	{
		alert("订票姓名必须是中文！");
		jQuery("input[@name=Went_Name]").focus();
		return false;
	}
	if(!WM)
	{
		alert("手机号码输入有误！");
		jQuery("input[@name=Went_Mobile]").focus();
		return false;
	}
	document.buy.submit();
	//alert("OK");
});
jQuery("#tiwen").click(function(){
				var zhizhi=jQuery("#tiwen_input").val();
				var yzmzhi=jQuery("input[@name=Verify]").val();
				jQuery.ajax({
				url:"http://www.wuyoyo.com/Product/Send.asp",
				type:"get",
				datatype:"html",
				timeout:20000,
				data:"Cid="+cz+"&Vid="+fz+"&TextS="+escape(zhizhi)+"&yz="+yzmzhi,
				error:function(){
					alert("发表失败！")
					},
				success:function(msg){
					if(msg==1){
				jQuery("#YZimg").attr("src","http://www.wuyoyo.com/Verify/Product.asp?"+Math.random()+"");
				jQuery("#quzizhu").html("正在加载...")
									jQuery.ajax({
				url:"http://www.wuyoyo.com/Product/liuyan.asp",
				type:"get",
				datatype:"html",
				timeout:20000,
				data:"PageNo="+1+"&cid="+cz,
				error:function(){
					alert("传输错误！")
					},
				success:function(msg){
				jQuery("#tiwen_input").val("");
				jQuery("input[@name=Verify]").val("");
				jQuery("#quzizhu").html(msg);
jQuery("#more").mouseover(function(){jQuery("#more span").removeClass("more_tag");
									jQuery("#more span").addClass("more_tag_show");							  
																	  });
jQuery("#more1").mouseover(function(){jQuery("#more1 span").removeClass("more_tag");
									jQuery("#more1 span").addClass("more_tag_show");							  
																	  });
jQuery(".more_tag").mouseout(function(){jQuery(this).removeClass("more_tag_show");
											jQuery(this).addClass("more_tag");		 
																	 });
				}
				});
						}else{
							alert(msg);
							};

					
					}});
								});

});

function gb(){
	jQuery("#flpingjia").mouseover(function(){jQuery("select").css("visibility","hidden");});
	jQuery("#flpingjia").mouseover(function(){jQuery(this).css("visibility","visible")})
	jQuery("#flpingjia").mouseout(function(){
										   jQuery(this).css("visibility","hidden");
										   jQuery("select").css("visibility","visible");
										   });
	}
	
function getweblist(page){
	var cz=jQuery("#cid").val(); 
jQuery("#quzizhu").html("正在加载...");
jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/liuyan.asp",
		type:"Get",
		datatype:"html",
		timeout:20000,
		data:"PageNo="+page+"&cid="+cz,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery("#quzizhu").html(msg);
jQuery("#more").mouseover(function(){jQuery("#more span").removeClass("more_tag");
									jQuery("#more span").addClass("more_tag_show");							  
																	  });
jQuery("#more1").mouseover(function(){jQuery("#more1 span").removeClass("more_tag");
									jQuery("#more1 span").addClass("more_tag_show");							  
																	  });
jQuery(".more_tag").mouseout(function(){jQuery(this).removeClass("more_tag_show");
											jQuery(this).addClass("more_tag");		 
																	 });

					}});
	}
	

function tiwendl(){
	jQuery.ajax({
		url:"http://www.wuyoyo.com/Product/tiwen_login.asp",   //提问登陆检测
		type:"get",
		datatype:"html",
		timeout:20000,
		data:"p="+1,
		error:function(){
				alert("传输错误！")
					},
		success:function(msg){
				jQuery(".login_tip").html(msg);
					}
			});
	
	}