
//滚动标题板
function scroll_pad(id,w,n)
{
	var box=document.getElementById(id),can=true,w=w||1500,fq=fq||10,n=n==-1?-1:1;
	box.innerHTML+=box.innerHTML;
	box.onmouseover=function(){can=false};
	box.onmouseout=function(){can=true};
	var max=parseInt(box.scrollHeight/2);
	new function (){
		var stop=box.scrollTop%30==0&&!can;
		if(!stop){
			var set=n>0?[max,0]:[0,max];
			box.scrollTop==set[0]?box.scrollTop=set[1]:box.scrollTop+=n;
		};
		setTimeout(arguments.callee,box.scrollTop%30?fq:w);
	};
};

function go_to(tid,hx,box,pr){
 var hxs=document.getElementById(tid).getElementsByTagName(hx);
 var boxs=document.getElementById(tid).getElementsByTagName(box);
 for(var i=0;i<hxs.length;i++){
  if(!hxs[i].tmpClass){
   hxs[i].tmpClass=hxs[i].className+" pr1984_com";
   boxs[i].tmpClass=boxs[i].className+" pr1984_com";
  }
  if(pr-1==i){
   hxs[i].className=hxs[i].tmpClass+" up";
   boxs[i].className=boxs[i].tmpClass+" up";
  }
  else {
   hxs[i].className=hxs[i].tmpClass;
   boxs[i].className=boxs[i].tmpClass;
  }
 }
}

function flash_out(var1,var2,var3)
{document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+var2+"' height='"+var3+"' ID='Object1' VIEWASTEXT><param name='movie' value='./upload/swf/"+var1+"'><param name='quality' value='high'><embed src='./upload/swf/"+var1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+var2+"' height='"+var3+"'></embed></object>");}

function yd_checkdata()				//预定验证
{if(form1.yd_xl_from_date.value=="") {alert("对不起，请输入出行日期！");	document.form1.yd_xl_from_date.focus();return false;}
 if(form1.yd_renshu.value==""){alert("对不起，请输入预定人数！");					document.form1.yd_renshu.focus();return false;}
 if(form1.yd_xm.value==""){alert("对不起，请输入您的姓名！");							document.form1.yd_xm.focus();return false;	}
 if(form1.yd_xb.value==""){alert("对不起，请输入您的性别！");							document.form1.yd_xb.focus();return false;	}
 if(form1.yd_email.value==""){alert("对不起，请输入您的电子邮箱！");			document.form1.yd_email.focus();return false;}	
 if(form1.yd_tel.value==""){alert("对不起，请输入您的联系方式！");				document.form1.yd_tel.focus();return false;	}
 if(form1.yd_mtel.value==""){alert("对不起，请输入您的移动电话！");				document.form1.yd_mtel.focus();return false;}
}

function ly_checkdata()				//留言验证
{if(form1.ly_xm.value=="") {alert("对不起，请输入您的姓名！");					document.form1.ly_xm.focus();return false;}
 if(form1.ly_content.value==""){alert("对不起，请输入您的咨询内容！");	document.form1.ly_content.focus();return false;}	
}

function header_lx_search()
{var v=document.getElementById("keyword").value;
 if(v!=""){location.assign("./xlsearch.php?search_v="+v);}
}

function TagChange(tagNum,tagId,imgurl,imgid)
{	var vfile;
	var dfile;
	var obj;
	for(i=1;i<=tagNum;i++)
	{	if(i==tagId)
		{document.getElementById("div_"+i).style.display="block";
		 if(document.getElementById("d"+imgid+"_nav_"+i)!=null){document.getElementById("d"+imgid+"_nav_"+i).style.background="url("+imgurl+"title_"+imgid+"_"+i+"_1.gif)";}
		}
		else
		{document.getElementById("div_"+i).style.display="none";
		 if(document.getElementById("d"+imgid+"_nav_"+i)!=null){document.getElementById("d"+imgid+"_nav_"+i).style.background="url("+imgurl+"title_"+imgid+"_"+i+"_0.gif)";}
		}
	}
}

function OpenUrl(controlId)
{
	var selectUrl=document.getElementById(controlId);
	var url=selectUrl.value;
	if(url=="0")
		return;
	if(url.indexOf("http://")<0)
	{
		url="http://"+url;
	}
	window.open(url);
}
