<!--
function openw(toURL) {
	window.open(toURL,'','width=400,height=300');
}
function cutstr(str,length)
{
	
	if(length<=3) return str;
	if(str.length>length)
		return str.substr(0,length-3)+"...";
	else 
		return str
}

function getCookieVal(offset)
{
var iEndStr=document.cookie.indexOf(";",offset);
if(iEndStr==-1)
iEndStr=document.cookie.length;
return unescape(document.cookie.substring(offset,iEndStr));
}


function getCookie(name)//读cookies
{
var strArg=name+"=";
var iArgLength=strArg.length;
var iCookieLength=document.cookie.length;
var iIndex=0;
while(iIndex<iCookieLength)
{
var kIndex=iIndex+iArgLength;
if(document.cookie.substring(iIndex,kIndex)==strArg)
return getCookieVal(kIndex);
iIndex=document.cookie.indexOf(" ",iIndex)+1;
if(iIndex==0)
break;
}
return null;
}


function setCookie(name,value)//写cookies
{
var strArgValue=setCookie.arguments;
var iArgLength=setCookie.arguments.length;
var expires=(2<iArgLength)?strArgValue[2]:null;
var path=(3<iArgLength)?strArgValue[3]:null;
var domain=(4<iArgLength)?strArgValue[4]:null;
var secure=(5<iArgLength)?strArgValue[5]:false;
document.cookie=name+"="+escape(value)+((expires==null)?"":(";expires="+expires.toGMTString()))+
((path==null)?"":(";path="+path))+((domain==null)?"":(";domain="+domain))+
((secure==true)?";secure":"");
}


function MemLogout() {
	setCookie("login_name","");
	setCookie("nick_name","");
	setCookie("member_number","");
	DelCookie("login_name");	
	DelCookie("nick_name");	
	DelCookie("member_number");	
	return true;
}

/*
	clearCookie(name)
	参数:name
			name为欲清空cookie的名字
	功能:清除名字为name的cookie
*/
function clearCookie(name) {
	document.cookie=name+"=; " + "domain=localhost; path=/; "; 
	//bites = document.cookie.split("; ");
	//setCookie(name,"");	
} 

function DelCookie(name)
{
  
  var expLogout=new Date();
　expLogout.setTime(expLogout.getTime()+(-1)*60*1000);
　document.cookie=name+"=;  expires="+expLogout.toGMTString()+" ; path=/";

}


function print_mem_head(type)
{
document.write("<!--导航 begin-->"
+ "<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>"
+ "<TBODY>"
+ "<TR>"
+ "<TD width=25></TD>"
+ "<TD width=205>&nbsp;</TD>"
+ "<TD vAlign=bottom align=right>"
+ "<TABLE height=24 cellSpacing=0 cellPadding=0 border=0>"
+ "<TBODY>"
+ "");
		var login = getCookie( "nick_name" );
		var login_nickname;		
		
		if ( login != "" && login != "null" && login != null && login != "undefined" )
		{
			login_nickname=login;
		}
		
	document.write(" <tr height=22> ");
	document.write("    <td width=2 ></td> ");
	if(type==1)
	{
		if ( login_nickname != "" && login_nickname != "null" && login_nickname != null && login_nickname != "undefined" )
		{
			document.write(" <td>&nbsp;&nbsp;登陆&nbsp;|&nbsp;<a href=\"reg.htm\" >注册</a>&nbsp;|&nbsp;<a href=\"getpass.aspx\">找回密码</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>" + login_nickname + "</font>&nbsp;&nbsp;<a href=\"#\" onClick=\"javascript:MemLogout();window.location='http://member.365huadong.com';\">安全退出</a>&nbsp;&nbsp;</td> ");
			document.write(" 	<td width=2 ></td> ");
			document.write(" </tr> ");
		}else{
			document.write(" 	<td>&nbsp;&nbsp;登陆&nbsp;|&nbsp;<a href=\"reg.htm\" >注册</a>&nbsp;|&nbsp;<a href=\"getpass.aspx\" >找回密码</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ");
			document.write(" 	<td width=2 ></td> ");
			document.write(" </tr> ");
		}
	}
	else if(type==2)
	{
		if ( login_nickname != "" && login_nickname != "null" && login_nickname != null && login_nickname != "undefined" )
		{
			document.write(" <td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\" >登陆</a>&nbsp;|&nbsp;注册&nbsp;|&nbsp;<a href=\"getpass.aspx\">找回密码</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>" + login_nickname + "</font>&nbsp;&nbsp;<a href=\"#\" onClick=\"javascript:MemLogout();window.location='http://member.365huadong.com';\">安全退出</a>&nbsp;&nbsp;</td> ");
			document.write(" 	<td width=2 ></td> ");
			document.write(" </tr> ");
		}else{
			document.write(" 	<td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\" >登陆</a>&nbsp;|&nbsp;注册&nbsp;|&nbsp;<a href=\"getpass.aspx\" >找回密码</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ");
			document.write(" 	<td width=2 ></td> ");
			document.write(" </tr> ");
		}
	}
	else if(type==3)
	{
		if ( login_nickname != "" && login_nickname != "null" && login_nickname != null && login_nickname != "undefined" )
		{
			document.write(" <td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\">登陆</a>&nbsp;|&nbsp;<a href=\"reg.htm\" >注册</a>&nbsp;|&nbsp;找回密码&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>" + login_nickname + "</font>&nbsp;&nbsp;<a href=\"#\" onClick=\"javascript:MemLogout();window.location='http://member.365huadong.com';\">安全退出</a>&nbsp;&nbsp;</td> ");
			document.write(" 	<td width=2></td> ");
			document.write(" </tr> ");
		}else{
			document.write(" 	<td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\">登陆</a>&nbsp;|&nbsp;<a href=\"reg.htm\" >注册</a>&nbsp;|&nbsp;找回密码&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ");
			document.write(" 	<td width=2 ></td> ");
			document.write(" </tr> ");
		}
	}
	else if(type==4)
	{
		if ( login_nickname != "" && login_nickname != "null" && login_nickname != null && login_nickname != "undefined" )
		{
			document.write(" <td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\">会员中心</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;</td> ");
			document.write(" <td align=center><input type=image src=images/001B.gif width=65 height=19 onClick=\"javascript:MemLogout();window.location='http://member.365huadong.com';\"></td>");
			document.write(" </tr> ");
		}else{
			document.write(" 	<td>&nbsp;&nbsp;<a href=\"http://member.365huadong.com/\">会员中心</a>&nbsp;|&nbsp;<a href=\"http://www.365huadong.com/\" target=_blank>华东旅游网首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ");
			document.write(" <td align=center><input type=image src=images/001A.gif width=65 height=19 onClick=\"javascript:window.location='http://member.365huadong.com';\"></td>");
			document.write(" </tr> ");
		}
	}
document.write("</TBODY></TABLE></TD>"
+"<TD align=left width=20></TD></TR></TBODY></TABLE>"
+ "<!--导航 end-->");
}


//---------------------------------------------
function w(s){
	document.write(s);
}
function print_stand_mem_head()
{
	//var pp= Math.round((Math.random()) * 100000000);
	var g = ""

	+'	<table width=250 border=0 cellpadding=0 cellspacing=0>'
	+'	<tr><td colspan=3>'
	+'		<table width=250 height=23 border=0 cellpadding=0 cellspacing=0>'
	+'		<tr><td height=7 colspan=3></td></tr> '
	+'		<tr><td style=padding-left:50px colspan=3><img src=images/txzim03.gif width=112 height=16></td></tr>'
	+'		<tr><td height=2 colspan=3></td></tr> '
	+'		<tr height=1><td width=12></td> '
	+'		<td class=bg02 width=226></td>'
	+'		<td width=12></td></tr> '
	+'		<tr><td height=8 colspan=3></td></tr> '
	+'		</table>	'
	+'	</td></tr>'
	+'  <form name=\"unipro_head_login_form\" method=\"post\" action=\"Login.aspx\">'
	+'	<tr><td align=right width=50>登录名</td>'
	+'	<td align=left width=125>&nbsp;&nbsp;<input type=text name=\"userid\" size=14 tabindex=1></td> '
	+'	<td rowspan=3><input type=\"image\" src=images/txzim05.gif width=58 height=69 onClick=\"return unipro_checkdata();\" tabindex=4></td></tr> '
	+'	<tr><td></td> '
	+'	<td style=padding-top:4px>&nbsp;'
	+'		<select name=usertype style=\"width:95px;\" tabindex=2>'
	+'		<option selected value=1>会员名</option> '		
	+'		</select></td></tr> '
	+'	<tr><td align=right width=50 style=padding-top:6px>密&nbsp;&nbsp;码</td>'
	+'	<td style=padding-top:4px>&nbsp;&nbsp;<input type=password name=\"passcode\" size=14 tabindex=3></td></tr> '
	+'	<tr><td></td> '
	+'	<td style=\"padding-left:2px;\">&nbsp;<input type=checkbox name=\"saveck\" onClick=\"if(this.checked){alert(\'请不要在公用电脑或网吧选择该功能，以免您的帐户、密码被盗。\');}\">记住我的身份</td></tr> '
	+'	<tr><td colspan=3>'
	+'		<table width=250 border=0 cellpadding=0 cellspacing=0>'
	+'		<tr><td style=padding-top:4px;padding-left:20px><input name=submit1 type=button style=\"background-image:url(images/txzim04.jpg);border-width:0px;width:80px;height:23px;padding-top:2px;color:#\" onclick=\"window.open(\'reg.htm\',\'_blank\')\" value=\"申请通行证\"></td>'
	+'		<td style=padding-top:4px;><a href=getpass.aspx target=_blank>找回密码</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr> '
	+'		<tr><td colspan=2 height=3></td></tr> '
	+'		</table>'
	+'	</td></tr>'
	+'  </form>'
	+'	</table>';
	w(g);
	b=0;
}

//------------------------------------------------
function print_stand_mem_welcome()
{
	var unipro_login_nickname = getCookie( "nick_name" );

	if ( unipro_login_nickname != "" && unipro_login_nickname != "null" && unipro_login_nickname != null && unipro_login_nickname != "undefined" )
	{
		print_stand_unipro_welcome_huadong();
	}
	else 
	{
		alert("未取到cookie值");
		print_stand_mem_head();
		//return false;
	}
}

function print_stand_unipro_welcome_huadong()
{
	var unipro_login_name = getCookie( "login_name" );
	var unipro_login_nick = getCookie( "nick_name" );	
	var unipro_login_uniqueid = getCookie( "member_number" );		
	
	document.write("<table width=100% border=0 cellpadding=0 cellspacing=5>");
	document.write("  <tr> ");
	document.write(" 	<td colspan=3>");
	document.write(" 	   <table width=100% border=0 cellpadding=0 cellspacing=0>");
	document.write(" 		 <tr height=20 valign=bottom> ");	
	document.write(" 		   <td width=60 align=right>登录名：</td> ");
	if ( unipro_login_name!="" && unipro_login_name!="null" && unipro_login_name!=null && unipro_login_name!="undefined" ) 
	{
		document.write(" 		<td align=left>"+unipro_login_name+"</td>");
	}else{
		document.write(" 		<td align=left>未知</td>");
	}
	document.write("  		 </tr>");
	document.write("  		 <tr height=17 valign=bottom> ");	
	document.write(" 			<td width=60 align=right>会员编号：</td>  ");
	if ( unipro_login_uniqueid!="" && unipro_login_uniqueid!="null" && unipro_login_uniqueid!=null && unipro_login_uniqueid!="undefined" ) 
	{
		document.write("		<td align=left>"+unipro_login_uniqueid+"</td>");
	}else{
		document.write(" 		<td align=left>未知</td>");
	}
	document.write("  		</tr>");
	document.write(" 	</table>");
	document.write("  </td>  ");
	document.write("  </tr>");
	document.write("  <tr> ");	
	document.write(" 	<td width=60 align=right>昵称：</td>");
	if ( unipro_login_nick!="" && unipro_login_nick!="null" && unipro_login_nick!=null && unipro_login_nick!="undefined" ) 
	{
		document.write(" <td align=left>"+unipro_login_nick+"</td>");
	}else{
		document.write(" <td align=left>"+unipro_login_nick+"</td>");
	}
	document.write(" 	<td align=center width=70><a href=chginfo_nk.htm target=_blank class=a05>修改</a></td>");
	document.write(" 	<td></td>");
	document.write("  </tr>");

	document.write("  <tr> ");
	document.write(" 	<td width=60 align=right>基本信息：</td>  ");
	document.write(" 	<td align=left></td> ");
	document.write(" 	<td align=center width=70><a href=chginfo_dt.htm target=_blank class=a05>登记</a></td>");
	document.write(" 	<td></td>");
	document.write("  </tr>");
	
	/*
	 *联系邮箱：联系方式：暂时不显示
	 *
	document.write("<tr><td width=60 align=right>联系邮箱：</td>  ");
	document.write("<td align=left><font color=red>未登记</font></td>");
	document.write("<td align=center width=70><a href= target=_blank class=a05>登记</a></td> ");
	document.write("<td></td></tr>  ");
	document.write("<tr><td width=60 align=right>联系方式：</td>  ");
	document.write("<td align=left><font color=red>未登记</font></td>");
	document.write("<td align=center width=70><a href= target=_blank class=a05>登记</a></td> ");
	document.write("<td></td></tr>  ");
	*/
	
	document.write("  <tr> ");
	document.write(" 	<td colspan=3 align=center><a href=chginfo_pw.htm target=_blank class=a05>修改密码</a>");

	/*
	 *修改提示问题 密码保护
	 *
	document.write("<a href=\"\" target=_blank class=a05>修改提示问题</a>  <a href= target=_blank class=a05>密码保护</a> ");
	*/
	document.write(" 	</td> ");
	document.write("  </tr>");
	document.write("</table>  ");
	document.write("<table width=100% border=0 cellpadding=0 cellspacing=5>");
	document.write("  <tr> ");
	document.write(" 	<td colspan=3 height=1 class=bg02></td>");
	document.write("  </tr>");


	
	document.write("  <tr> ");
	document.write(" 	<td align=right>&nbsp;&nbsp;</td> ");
	document.write(" 	<td align=left>");
	document.write("	 &nbsp;&nbsp;在线："+OnlineUserCount+"</td>  ");
	document.write("  </tr>");
	document.write("  ");

	document.write("  <tr> ");
	document.write(" <td colspan=3 height=1 class=bg02></td>");
	document.write("  </tr>");
	document.write("  <tr> ");
	document.write(" <td colspan=3  align=center valign=top>&nbsp;&nbsp;&nbsp;&nbsp;");
	document.write("  <input name=Submit1 type=button style=\"background-image:url(images/txzim04.jpg);width:80px;height:23px;padding-top:2px;\" onclick=\"javascript:MemLogout();window.location=\'http://member.365huadong.com\';\" value=\"安全退出\"></td>");
	document.write("  </tr>");
	document.write("</table>  ");
	b=1;
}


function unipro_checkdata()
{
	//form.action="Login.aspx";
	if ( document.unipro_head_login_form.userid.value == "" || document.unipro_head_login_form.userid.value == "null" || document.unipro_head_login_form.userid.value == null || document.unipro_head_login_form.userid.value == "undefined" )
	{
		alert("用户名不可以为空");
        return false;
	}
	if ( document.unipro_head_login_form.passcode.value == "" || document.unipro_head_login_form.passcode.value == "null" || document.unipro_head_login_form.passcode.value == null || document.unipro_head_login_form.passcode.value == "undefined" )
	{
		alert("密码不可以为空");
        return false;
	}
	if (b == 1){
		if ( document.unipro_head_login_form.confcode.value == "" || document.unipro_head_login_form.confcode.value == "null" || document.unipro_head_login_form.confcode.value == null || document.unipro_head_login_form.confcode.value == "undefined" || document.unipro_head_login_form.confcode.value == "请输入以上数字")
		{
			alert("验证码不可以为空");
			return false;
		}
	}
	return true;
}



/*
	print_mem_head2()
	功能:输出提示登录信息,横条,正在使用,用于会员中心。
*/
function print_mem_head2()
{
	document.write("<table width=750 height=60 border=0 cellpadding=0 cellspacing=0>");
	document.write("	<tr>");
	document.write("	  <td valign=bottom></td>");
	document.write("	  <td align=right valign=bottom>");
	document.write("	    <table width=100%  border=0 cellspacing=3 cellpadding=0>");
	document.write("	      <tr>");
	document.write("	        <td align=right valign=bottom><a class=a00 href=http://member.365huadong.com target=_blank>会员中心</a>|<a class=a00 href=http://www.365huadong.com target=_blank>华东网首页</a></td>");
	document.write("	        <td align=center><a href=http://member.365huadong.com/><img src=images/001A.gif width=65 height=19 border=0></a></td>");
	document.write("	      </tr>");
	document.write("	    </table>");
	document.write("	  </td>");
	document.write("	</tr>");
	document.write("</table>");
}


/**********************************/
/******       截取空格       ******/
/**********************************/ 
function trim(str){
    	var i = 0;
        while ((i < str.length)&&((str.charAt(i) == " ")||(str.charAt(i) == "　"))){i++;}
    	var j = str.length-1;
    	while ((j >= 0)&&((str.charAt(j) == " ")||(str.charAt(j) == "　"))){j--;}
    	if( i > j ) 
    		return "";
    	else
    		return str.substring(i,j+1);
}

function isNum(str){
	var reg=/^\d+$/;
	return reg.test(str);
}
//-->

