window.onerror = function(){return true;}
Number.prototype.formatE = function(){
	var s = this + "";
	var a = s.match(/^(\+|-)?(\d[^\.]+)(\.\d+)?$/), b = a[2], c="";

	for (var i=b.length-3; i>-3; i=i-3) 
	{
		c = ","+ b.substring(i, i+3) + c;
	}

	return(a[1] + c.substr(1) + a[3]).replace("undefined","").replace("undefined","");
}
function wRank(rank){
	var c
	for (var i = rank.length-3; i>-3; i=i-3) 
	{
		c = ","+ b.substring(i, i+3) + c;
	}	
}

//by duhu 14:51 2005-12-19
function imgPlayer(w,h,th){
	if (w == null){this.width  = 195;}else{this.width  = w;}
	if (h == null){this.height  = 140;}else{this.height  = h;}
	if (th == null){this.theight  = 16;}else{this.theight  = th;}
	this.pics	= null;
	this.links	= null;
	this.texts	= null;
	this.player	= "/images/playswf.swf";
	this.play = function(){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ this.width +'" height="'+ parseInt(this.height + this.theight) +'">');
		document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+this.player+'"><param name=wmode value=transparent><param name="quality" value="high">');
		document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
		document.write('<param name="FlashVars" value="pics='+this.pics+'&links='+this.links+'&texts='+this.texts+'&borderwidth='+this.width+'&borderheight='+this.height+'&textheight='+this.theight+'">');
		document.write('<embed src="'+this.player+'" wmode="opaque" FlashVars="pics='+this.pics+'&links='+this.links+'&texts='+this.texts+'&borderwidth='+this.width+'&borderheight='+this.height+'&textheight='+this.theight+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ this.width +'" height="'+ parseInt(this.height + this.theight) +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}

function wFlash(Path,Width,Height,Transparent){
	 var Temp,T=""
	 Temp='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="FlashH" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+Width+'" height="'+Height+'">'
	 Temp+='<param name="movie" value="'+Path+'"/>'
	 Temp+='<param name="quality" value="High"/>'
	 Temp+='<param name="scale" value="ExactFit"/>'
	 if (Transparent) {Temp+=' <param name="wmode" value="transparent"/>';T='wmode="transparent"'}
	 Temp+='<embed src="'+Path+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="FlashH" width="'+Width+'" height="'+Height+'" quality="High"'+T+' scale="ExactFit"/>'
	 Temp+='</object>'
	 document.write(Temp);
}
function wDate(){
	var d = new Date();
	var w = "日一二三四五六"
	var ld = d.getFullYear() + "年" + parseInt(d.getMonth() + 1) + "月" + d.getDate() + "日 星期" + w.split("")[d.getDay()];
	document.write(ld);
}

function execScript(t){
	eval(t.responseText);
}

function showCon(msg){
	if (!confirm(msg)) return false;
}

//*******我要加入*********************//
function showJion(){
	var b = $C("DIV");
	b.id = "_jionBox";
	with(b.style){
		width		= "390px"
		height		= "260px"
		position	= "absolute"
		zIndex		= "100"
		top		= "130px"
		left		= "550px"
		backgroundColor	= "#FFF"
		border		= "3px solid #FF9F00"
		padding		= "10px 5px"
		textAlign	= "left"
		fontSize	= "14px"
	}
	$("nav").appendChild(b);
	var tdata = "";
	tdata += "<table border='0' width='100%'><form method='post' action='' style='padding:0px;margin:0px' id='jionForm'>"
	tdata += "<tr><td colspan='2'><p>提交网站信息之后请在贵站首页添加本站链接 链接代码如下：<br />&lt;a href=&quot;http://www.lywzz.com/&quot; title=&quot;旅游网址站&quot;&gt;旅游网址站&lt;/a&gt;<br />我们会尽快处理贵站所提交的信息，感谢您对<a href='http://www.lywzz.com'>旅游网址站</a>的支持！</p></td></tr>"
	tdata += "<tr><td>网站名称：</td><td><input type='text' size='25' value='' dataType='Require' msg='网站名称必须填写' name='siteName' /></td></tr>";
	tdata += "<tr><td>网站域名：</td><td><input type='text' size='25' value='http://' dataType='Require' msg='域名填写错误,请不要在域名前面加“http://' name='siteUrl' /></td></tr>";
	tdata += "<tr><td>站长邮箱：</td><td><input type='text' size='25' value='' name='siteEmail' dataType='Email' msg='电子邮件地址填写错误' /></td></tr>";
	tdata += "<tr><td>网站介绍：</td><td><textarea name='siteSummary' style='width:280px;height:70px;'></textarea></td></tr>";
	tdata += "<tr><td colspan='2' align='center'><input type='button' value='加入' onclick='jion()' /> &nbsp;  &nbsp; <input type='button' value='取消' onclick='hideJion();' /></td></tr>";
	tdata += "</form></table>"
	b.innerHTML = tdata;
	//b.innerHTML = "<iframe src='/jion.asp' width='100%' height='100%' frameborder='0'></iframe>";
}
function hideJion(){
	Element.remove("_jionBox");
}
function jion(){
	if (Validator.Validate($('jionForm'),2)){
		var url = "/jion_save.asp";
		var pars = 'action=jion&siteName='+encodeURIComponent($F("siteName"))+'&siteUrl='+$F("siteUrl")+'&siteEmail='+$F("siteEmail")+'&siteSummary='+encodeURIComponent($F("siteSummary"))+'&s='+Math.random();
		var myLogin = new Ajax.Request(
		    url,
		    {method: 'post', parameters: pars, onComplete: execScript}
		);
	}
}
//**********************************//