var t_DiglogX=0;
var t_DiglogY=0;
var t_DiglogW=0;
var t_DiglogH=0;
var xmlHttp="";
/****************************去全角、半角空格*********************************/
/**
*去除头部和尾部空格*obj参数：含有string的对象*返回值:去除了空格后的对象*/
function trimspace(obj)
{
	String.prototype.Trim = function()
	{
		return this.replace(/(^\s*)|(\s*$)/g, "");
	}			
	obj.value = obj.value.Trim();
}
/****************************测字符串的长度*********************************/
/**
*去除头部和尾部空格*obj参数：strValue，要测试的字符串；len，最大长度,msg出错信息
*返回值:大于最大值，返回false；负责返回true。*/
function checkStrLen(strValue,len,msg)
{
    var newvalue = strValue.replace(/[^\x00-\xff]/g, "**");  
    var length = newvalue.length;
    if(msg==null)
    {
     msg="您";
    }
    if(length>len)
    {
        alert(msg+"输入太长了。");
        return false;
    } 
    else
    {
        return true;
    }
}

function showxieyi(id){
	 if($$(id).style.display==''){
		 $$(id).style.display='none';}
	 else{$$(id).style.display='';}
}
function itMouse()
{
	var layerid=document.getElementById("city-pop");
	if(layerid.style.display=="none")
	{
		layerid.style.display="block";
	}
	else{
		layerid.style.display="none";	
	}
}
function chongaddpay(o){
	if(o.shu.value==""){
		alert("对不起,您正确输入!");
		o.shu.focus();
		return false;
	}
	if(o.kindid.value=="1"){
		document.Form1.action="../alipay/default.aspx";	
	}
	else if(o.kindid.value=="2"){
		document.Form1.action="../chinabank/send.aspx";		
	}
	else{
		document.Form1.action="?action=consumesave";		
	}
}
function judgeString(str){
 	var len = str.length;
	var tt=0;
    for(var i=0;i<len;i++){
       var txt = str.charCodeAt(i);
       if(txt>128){     //ascii码大于128的是汉字
          tt= tt+2;
       } else{
          tt= tt+1;
       }
    }
 	return tt;
}
function isRightEmail(email) {
   var re="^[\s]*[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\.[a-zA-Z0-9]{2,4}[\s]*$";
   if(email.match(re)==null)
       return false;
   else
       return true;
}
function isRightPW(pwd) {
   var re= "^[a-zA-Z0-9_]*$";
   if (pwd.match(re) == null)
      return false;
   else
     return true;
}
function CheckUserName(namet){
	var lent=judgeString(namet);
	if(lent < 3 || lent > 16)
		return false;
	else
		return true;
}
function CheckUserPwd(namet){
	var lent=judgeString(namet);
	if(lent < 6 || lent > 32)
		return false;
	else
		return true;
}
function showlogin(url)
{
	var  Digital=new  Date();
	Digital=Digital+40000;
	url=url+"&k="+Digital;
	xmlHttp=GetXmlHttpObject(requestischecklogintttt)
	xmlHttp.open("get", url , true)
	xmlHttp.send(null);
}
function requestischecklogintttt()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			var output=xmlHttp.responseText;
			//alert(document.getElementById("islogin"));
			document.getElementById("islogin").innerHTML = output;
		}
	}
}
function copyToClipBoard(){
    var clipBoardContent="";
    clipBoardContent+=document.title;
    clipBoardContent+="";
    clipBoardContent+=window.location.href;
    window.clipboardData.setData("Text",clipBoardContent);
    alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
}

function copyTo(val,tt){
	window.clipboardData.setData("Text",val);
	if(tt=="")
		tt="QQ/MSN";
    alert("复制成功，请粘贴到你的"+tt+"上推荐给你的好友");
}

﻿/****************************通过ID号取得对象***********************************/
function $$(id){
  return document.getElementById(id);
}
function getCookie(name)
{
	 var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;
}
function setCookie(name,value)
{
  var Days = 30; //此 cookie 将被保存 30 天
  var exp  = new Date();    //new Date("December 31, 9998");
  exp.setTime(exp.getTime() + Days*24*60*60*1000);
  document.cookie = name + "="+ escape(value) +";expires="+ exp.toGMTString()+";path=/" ;
}
function delCookie(name)
{
  var exp = new Date();
  exp.setTime(exp.getTime() - 1);
  var cval=getCookie(name);
  if(cval!=null) document.cookie=name +"="+cval+";expires="+exp.toGMTString();
}
function loadss(){
	if(getCookie("themeIndexTom")){
		setTtCss(getCookie("themeIndexTom"))
	}
}
function setTtCss(index){
	if(window.location.href.indexOf("learn")!=-1){
		if(window.location.href.indexOf("learn/index.html")!=-1){
			document.getElementById('themecss').href = "template/default/skin/theme/theme" + index + ".css";	
		}
		else{
			document.getElementById('themecss').href = "../template/default/skin/theme/theme" + index + ".css";		
		}
	}
	else{
		document.getElementById('themecss').href = "/template/default/skin/theme/theme" + index + ".css";	
	}
}
function GetXmlHttpObject(handler)
{ 
	var objXmlHttp;
	//开始初始化XMLHttpRequest对象
	if(window.XMLHttpRequest) { //Mozilla 浏览器
			objXmlHttp = new XMLHttpRequest();
			if (objXmlHttp.overrideMimeType) {//设置MiME类别
				objXmlHttp.overrideMimeType("text/xml");
			}
	}
	else if (window.ActiveXObject) { // IE浏览器
			try {
				objXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
	}
	if (!objXmlHttp) { // 异常，创建对象实例失败
			window.alert("不能创建XMLHttpRequest对象实例.");
			return false;
	}
	objXmlHttp.onreadystatechange = handler;
	return objXmlHttp
}




function createxmlhttp()
{
	var xmlhttp=false;
	try	{
  		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 	} 
	catch (e) {
  		try {
   			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  		} 
		catch (e) {
   			xmlhttp = false;
 		}
 	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  		xmlhttp = new window.XMLHttpRequest();
		if (xmlhttp.overrideMimeType) {//设置MiME类别
			xmlhttp.overrideMimeType('text/xml');
		}
	}	
	return xmlhttp;	
}

function setarticle(tt,id){
	var xmlhttp=createxmlhttp();
	if(!xmlhttp)
	{
		alert("你的浏览器不支持XMLHTTP！！");
		return;
	}
	var url="../request.aspx?action=ding&tt="+tt+"&id="+id;
	var  Digital=new  Date();
	Digital=Digital+40000;
	url=url+"&k="+Digital;
	xmlhttp.onreadystatechange=requestdatasetarticle;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	return false;
	function requestdatasetarticle()
	{
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status==200)
			{
				if(xmlhttp.responseText=="1"){
					alert("恭喜您,表态成功!");
					window.location.href= window.location.href;
				}
				else
					alert(xmlhttp.responseText);	
			}
		}
	}
}

function checklogin(tt,o){
	if(o.chrnamet){
		if(!CheckUserName(o.chrnamet.value)){
			alert("对不起,用户名长度必须是3到6位!");
			o.chrnamet.focus();
			return false;
		}
	}
	if(o.chrpwdt){
		if(!CheckUserPwd(o.chrpwdt.value)){
			alert("对不起,密码至少是是6到32位!");
			o.chrpwdt.focus();
			return false;
		}
	}
	var str3="false";
	//if(o.chrcodet){
		//str3 = "true";
	//}
	var url=tt+"request.aspx?action=login&str1="+escape(o.chrnamet.value)+"&str2="+escape(o.chrpwdt.value)+"&str3="+str3;
	var  Digital=new  Date();
	Digital=Digital+40000;
	url=url+"&k="+Digital;
	var xmlhttp=createxmlhttp();
	if(!xmlhttp)
	{
		alert("你的浏览器不支持XMLHTTP！！");
		return;
	}
	xmlhttp.onreadystatechange=requestdatalogin;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	return false;
	function requestdatalogin()
	{
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status==200)
			{
				if(xmlhttp.responseText=="1")
				{
					var   f=document.createElement("IFRAME")   
					f.height=0;   
					f.width=0   
					f.src="../other.aspx?action=login"   
					document.body.appendChild(f) ;
					setTimeout("alert(\"恭喜您,登陆成功!\");window.location.href= window.location.href;",2500);
				}
				else
				{
					alert(xmlhttp.responseText);	
				}
			}
		}
	}
}
function checkservice(o){
	if($$("chrmark").value==""){
		alert("对不起,请输入留言内容!");
		$$("chrmark").focus();
		return false;
	}
	if($$("chrmark").value.length>300){
		alert("对不起,留言内容不得大于300字!");
		$$("chrmark").select();
		return false;
	}
	if($$("chrname")){
		if(!CheckUserName($$("chrname").value)){
			alert("对不起,用户名长度必须是3到6位!");
			$$("chrname").focus();
			return false;
		}
	}
	if($$("chrpwd")){
		if(!CheckUserPwd($$("chrpwd").value)){
			alert("对不起,密码至少是是6到32位!");
			$$("chrpwd").focus();
			return false;
		}
	}
	if($$("chrcode").value.length!=5){
		alert("对不起,请正确输入验证码!");
		$$("chrcode").focus();
		return false;
	}
	var chrname="";
	if($$("chrname")){
		chrname=$$("chrname").value;
	}
	var chrpwd="";
	if($$("chrpwd")){
		chrpwd=$$("chrpwd").value;
	}
	addcomment(chrname,chrpwd,$$("chrcode").value,$$("chrmark").value);
	return false;
}
function addcomment(chrname,chrpwd,chrcode,chrmark){
	var url="../request.aspx?action=addcomment&chrname="+escape(chrname)+"&chrpwd="+escape(chrpwd)+"&chrcode="+escape(chrcode)+"&chrmark="+escape(chrmark);
	var  Digital=new  Date();
	Digital=Digital+40000;
	url=url+"&k="+Digital;
	xmlHttp=GetXmlHttpObject(requestaddshopcomment)
	xmlHttp.open("get", url , true)
	xmlHttp.send(null)
}

function requestaddshopcomment()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText==1)
			{
				alert("恭喜您，发布成功，请等待管理员审核！");	
				window.location.href=window.location.href;
			}
			else if(xmlHttp.responseText==2)
			{
				alert("恭喜您，发布成功！");	
				window.location.href=window.location.href;
			}
			else{
				alert(xmlHttp.responseText);
			}
		}
	}
}

function checkshopcomment(){
	if($$("chrname")){
		trimspace($$("chrname"))
		if($$("chrname").value==""){
			$$("chrname").focus();
			setmsg('checkshop','shopcomment_error_name');
			return false;
		}	
	}
	if($$("chrpwd")){
		trimspace($$("chrpwd"))
		if($$("chrpwd").value==""){
			$$("chrpwd").focus();
			setmsg('checkshop','shopcomment_error_pwd');
			return false;
		}	
	}
	if($$("code")){
		trimspace($$("code"))
		if($$("code").value==""){
			$$("code").focus();
			setmsg('checkshop','shopcomment_error_code');
			return false;
		}	
	}
	trimspace($$("chrmark"))
	if($$("chrmark").value==""){
		$$("chrmark").focus();
		setmsg('checkshop','shopcomment_error_chrmark');
		return false;
	}
	if($$("chrmark").value.length>300){
		$$("chrmark").select();
		setmsg('checkshop','shopcomment_error_chrmark1');
		return false;
	}
	var chrname="";
	if($$("chrname")){
		chrname=$$("chrname").value;
	}
	var chrpwd="";
	if($$("chrpwd")){
		chrpwd=$$("chrpwd").value;
	}	
	var agan="0";
	if($$("agan")){
		agan="1";	
	}
	addshopcomment(chrname,chrpwd,$$("code").value,$$("chrmark").value,$$("shopid").value,agan);
	return false;
}

function addshopcomment(chrname,chrpwd,code,chrmark,shopid,agan)
{
      	var url="../request.aspx?action=addshopcomment&chrname="+escape(chrname);
		url =url+"&chrpwd="+escape(chrpwd)+"&code="+escape(code)+"&chrmark="+escape(chrmark)+"&shopid="+escape(shopid)+"&agan="+escape(agan);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestaddshopcomment)
		xmlHttp.open("get", url , true)
		xmlHttp.send(null)
}

function showduihuan(val){
	$$("mask").style.display='';
	Demo_login('<div align=center><iframe src="duihuan.aspx?id='+val+'" scrolling="no" frameBorder=0 width=935 height=550></iframe></div>',935,550,935,550)
}
function Demo_login(string,ow,oh,w,h){
	 ShowDiv=string;
	 DialogShow(ShowDiv,ow,oh,w,h);	
	 var objDialog = document.getElementById("DialogMove");
	  var lstd = document.getElementById("lstd");
	 
}
function DialogShow(showdata,ow,oh,w,h){
	 var objDialog = document.getElementById("DialogMove");
	 if (!objDialog) 
	 objDialog = document.createElement("div");
	 t_DiglogW = ow;
	 t_DiglogH = oh;
	 DialogLoc();
	 objDialog.id = "DialogMove";
	 var oS = objDialog.style;
	 oS.display = "block";
	 oS.top = t_DiglogY + "px";	
	 oS.left = t_DiglogX + "px"; 
	 oS.margin = "0px";
	 oS.padding = "0px";
	 oS.width = w + "px";
	 oS.height = h + "px";
	 oS.position = "absolute";
	 oS.zIndex = "5";
	 oS.background = "#FFF";
	 oS.border = "solid #1A5189 1px";
	 objDialog.innerHTML = showdata;
	 document.body.appendChild(objDialog);
	 delselect();
}
function DialogLoc(){
	 var dde = document.documentElement;
	 if (window.innerWidth){
	 	var ww = window.innerWidth;
		var wh = window.innerHeight;
		var bgX = window.pageXOffset;
		var bgY = window.pageYOffset;	
	 }else{	 	
		var ww = dde.offsetWidth;
		var wh = dde.offsetHeight;
		var bgX = dde.scrollLeft;
		var bgY = dde.scrollTop;	  
	 }
	 t_DiglogX = (bgX + ((ww - t_DiglogW)/2));
	 t_DiglogY = (bgY + ((wh - t_DiglogH)/2));
}
function LoginHide()
{
	ScreenClean();
	var objDialog = document.getElementById("DialogMove");
	 if (objDialog)
	 {
		 objDialog.style.display = "none";
		 $$("mask").style.display='none';
	 }
}

function ScreenClean(){
	 var objScreen = document.getElementById("ScreenOver");
	 if (objScreen)
	 objScreen.style.display = "none";
	 var allselect = document.getElementsByTagName("select");
	 for (var i=0; i<allselect.length; i++) 
	 allselect[i].style.visibility = "visible";
}

function delselect(){
	var allselect = document.getElementsByTagName("select");
	 for (var i=0; i<allselect.length; i++) 
	 allselect[i].style.visibility = "hidden";	
}
function showselect(){
	var allselect = document.getElementsByTagName("select");
	 for (var i=0; i<allselect.length; i++) 
	 allselect[i].style.visibility = "visible";	
}
function ScreenConvert(str){
	 var browser = new Browser();
	 var objScreen = document.getElementById("ScreenOver");
	 if(!objScreen) 
	 var objScreen = document.createElement("div");
	 var oS = objScreen.style;
	 objScreen.id = "ScreenOver";
	 oS.display = "block";
	 oS.top = oS.left = oS.margin = oS.padding = "0px";
	 if (document.body.scrollHeight)	{
	 	if(document.body.scrollHeight>document.body.clientHeight){
	 		var wh = document.body.scrollHeight + "px";	
	 	}else{
	 		var wh = document.body.clientHeight + "px";
	 	}	 
	 }else if (window.innerHeight){
	 var wh = window.innerHeight + "px";
	 }else{
	 var wh = "100%";
	 }
	 oS.width = "100%";	 
	 oS.height = wh;
	 oS.position = "absolute";
	 oS.zIndex = "3";
	 if ((!browser.isSF) && (!browser.isOP)){
	 oS.background = "black";
	 }else{
	 oS.background = "black";
	 }
	 oS.filter = "alpha(opacity=50)";
	 oS.opacity = 40/100;
	 oS.MozOpacity = 40/100;
	 document.body.appendChild(objScreen);
	 var allselect = document.getElementsByTagName("select");
	 for (var i=0; i<allselect.length; i++) 
	 allselect[i].style.visibility = "hidden";
}
var Set;
var IsRoll = false;
var DefaultRoll = false;//程序根据ChannelType输出默认是否循环
var CookieValue = getCookie('myRollCookie');
if(CookieValue==null)
	CookieValue=0;
if (CookieValue==0){
	IsRoll = DefaultRoll;
}else{
	if (CookieValue.toString() == '1'){
		IsRoll = true;
	}else{
		IsRoll = false;
	}
}

function NextPage(){
	var NextImgUrl=document.getElementById('nextone').value;
	if (IsRoll){
        var mytime = 5;
		Set = setInterval("window.location.href='"+NextImgUrl+"'",mytime*1000);
	}
}
function stop(){
		IsRoll=false;
		setCookie('myRollCookie','0');
		clearInterval(Set);
		document.getElementById('huangdeng').innerHTML = '<a href="javascript:play();" class="a_3" >幻灯片</a>';
}
function play(){
	IsRoll = true;
	var NextImgUrl=document.getElementById('nextone').value;
		document.getElementById('huangdeng').innerHTML = '<a href="javascript:stop();" class="a_3" >停止播放</a>';
	if (IsRoll){
		setCookie('myRollCookie','1');
		time = 5;	
		SetRoll(false);
		IsRoll = true;
		NextPage();
    }else{
		clearInterval(Set);
		setCookie('myRollCookie','0');
		SetRoll(true);
		IsRoll = false;
	}
}

function SetRoll(cRoll){
	
}

function checkcompanycomment(){
	if($$("chrname")){
		trimspace($$("chrname"))
		if($$("chrname").value==""){
			$$("chrname").focus();
			setmsg('checkcompany','shopcomment_error_name');
			return false;
		}	
	}
	if($$("chrpwd")){
		trimspace($$("chrpwd"))
		if($$("chrpwd").value==""){
			$$("chrpwd").focus();
			setmsg('checkcompany','shopcomment_error_pwd');
			return false;
		}	
	}
	if($$("code")){
		trimspace($$("code"))
		if($$("code").value==""){
			$$("code").focus();
			setmsg('checkcompany','shopcomment_error_code');
			return false;
		}	
	}
	trimspace($$("chrmark"))
	if($$("chrmark").value==""){
		$$("chrmark").focus();
		setmsg('checkcompany','shopcomment_error_chrmark');
		return false;
	}
	if($$("chrmark").value.length>300){
		$$("chrmark").select();
		setmsg('checkcompany','shopcomment_error_chrmark1');
		return false;
	}
	var chrname="";
	if($$("chrname")){
		chrname=$$("chrname").value;
	}
	var chrpwd="";
	if($$("chrpwd")){
		chrpwd=$$("chrpwd").value;
	}	
	addcompanycomment(chrname,chrpwd,$$("code").value,$$("chrmark").value,$$("shopid").value,$$("total_score").value);
	return false;
}

function addcompanycomment(chrname,chrpwd,code,chrmark,shopid,score)
{
      	var url="../request.aspx?action=addcommpanycomment&chrname="+escape(chrname);
		url =url+"&chrpwd="+escape(chrpwd)+"&code="+escape(code)+"&chrmark="+escape(chrmark)+"&shopid="+escape(shopid)+"&score="+escape(score);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestaddshopcomment)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
}
function echo(obj,html)
{
	$$(obj).innerHTML=html;
}
function fopen(obj)
{
	$$(obj).style.display="";
}
function fclose(obj)
{
	$$(obj).style.display="none";
}
function getdata(url,obj1,obj2)
{
		var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlhttp.onreadystatechange=requestdata;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdata()
		{
				fopen(obj1);
				echo(obj1,"正在加载数据，请稍等......");
				if(xmlhttp.readyState==4)
				{
					if(xmlhttp.status==200)
					{
						if(obj1!=obj2){fclose(obj1);};
						echo(obj2,xmlhttp.responseText);
					}
				}
			
		}
}

function showwybaoming(val){
	var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=checklogin&k="+Digital;
		xmlhttp.onreadystatechange=requestdata;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdata()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					if(xmlhttp.responseText=="1"){
						delCookie("aganparent");
						setCookie("aganparent","1");
						delCookie("nextcookie");
						$$("mask").style.display='';
						setCookie("nextcookie","2,"+val+"");
						Demo_login('<div align=center><iframe src="../member/register.html?login=login" scrolling="no" frameBorder=0 width=695 height=510></iframe></div>',695,510,695,510)
					}
					else{
						$$("mask").style.display='';
						Demo_login('<div align=center><iframe src="../baoming.aspx?activeid='+val+'" scrolling="no" frameBorder=0 width=935 height=570></iframe></div>',935,570,935,570)	
					}
				}
			}
		}
}

function showorder(val){
	var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=checklogin&k="+Digital;
		xmlhttp.onreadystatechange=requestdata;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdata()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					
					if(xmlhttp.responseText=="1"){
						delCookie("aganparent");
						setCookie("aganparent","1");
						delCookie("nextcookie");
						setCookie("nextcookie","1,"+val+"");
						$$("mask").style.display='';
						Demo_login('<div align=center><iframe src="../member/register.html?login=login" scrolling="no" frameBorder=0 width=695 height=510></iframe></div>',695,510,695,510)
					}
					else{
						$$("mask").style.display='';
						Demo_login('<div align=center><iframe src="../woyaoorder.html?id='+val+'" scrolling="no" frameBorder=0 width=935 height=621></iframe></div>',935,621,935,621)	
					}
				}
			}
		}
}


function delorder(id)
{
    if ( confirm("该操作将不可逆！\n您确定要取消订单吗？"))
    {
      	var url="../request.aspx?action=delorder&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestdelordert)
		xmlHttp.open("get", url , true)
		xmlHttp.send(null)
    }
}

function requestdelordert()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("订单取消成功！");
				window.location.href="myorder.aspx";
			}
						
		}
	}
}
function delbudan(id)
{
    if ( confirm("该操作将不可逆！\n您确定要删除此补单吗？"))
    {
      	var url="../request.aspx?action=delbudan&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		//window.open(url);
		xmlHttp=GetXmlHttpObject(requestdelbudan)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}

function requestdelbudan()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("补单删除成功！");
				window.location.href="myorder.aspx?action=bu";
			}
						
		}
	}
}

function delduihuan(id)
{
    if ( confirm("该操作将不可逆！\n您确定要取消此礼品兑换订单吗？"))
    {
      	var url="../request.aspx?action=delduihuan&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		//window.open(url);
		xmlHttp=GetXmlHttpObject(requestdelduihuan)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}
function requestdelduihuan()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("礼品兑换订单删除成功！");
				window.location.href="myduihuan.aspx";
			}
						
		}
	}
}



function checkbudan(o){
	trimspace(o.chrshop);
	if(o.chrshop.value==""){
		alert("对不起,请填写消费商家！");
		o.chrshop.focus();
		return false;
	}
	if(o.xiaofeidate.value==""){
		alert("对不起,请选择消费时间！");
		o.xiaofeidate.focus();
		return false;
	}
	trimspace(o.username);
	if(o.username.value==""){
		alert("对不起,请填写消费人！");
		o.username.focus();
		return false;
	}
	trimspace(o.chrtel);
	if(o.chrtel.value==""){
		alert("对不起,请填写您的电话！");
		o.chrtel.focus();
		return false;
	}
	trimspace(o.xiaofei);
	if(o.xiaofei.value==""){
		alert("对不起,请填写消费金额！");
		o.xiaofei.focus();
		return false;
	}
	trimspace(o.chrmark);
	if(o.chrmark.value.length>200){
		alert("对不起,其他反馈限定200字！");
		o.chrmark.select();
		return false;
	}
	var url="../request.aspx?action=company&str1="+escape(o.chrshop.value);
	var  Digital=new  Date();
	Digital=Digital+40000;
	url=url+"&k="+Digital;
	xmlHttp=GetXmlHttpObject(requestcompany)
	xmlHttp.open("POST", url , true)
	xmlHttp.send(null)
	return false;
}

function requestcompany()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText.length>10)
			{
				alert(xmlHttp.responseText);	
				document.getElementById("chrshop").select();
			}else{
				document.getElementById("shopid").value=xmlHttp.responseText;
				document.form1.submit();
			}
			
		}
	}
}


function delbaoming(id)
{
    if ( confirm("该操作将不可逆！\n您确定要取消此次报名吗？"))
    {
      	var url="../request.aspx?action=delbao&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestdelbaoming)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}

function requestdelbaoming()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("报名取消成功！");
				window.location.href="myactive.aspx";
			}
						
		}
	}
}


function checkbaoming(o){
	trimspace(o.truename);
	if(o.truename.value==""){
		alert("对不起,请输入您的真实姓名！");
		o.truename.focus();
		return false;
	}
	trimspace(o.chrtel);
	if(o.chrtel.value==""){
		alert("对不起,请输入您的联系电话！");
		o.chrtel.focus();
		return false;
	}
	trimspace(o.num);
	if(o.num.value==""){
		alert("对不起,请输入参加人数！");
		o.num.focus();
		return false;
	}
	if(o.categoryid.value==""){
		alert("对不起,请选择您所在区域！");
		o.categoryid.focus();
		return false;
	}
	trimspace(o.chrmark);
	if(o.chrmark.value.length>200){
		alert("对不起,简短附言限定200字！");
		o.chrmark.select();
		return false;
	}
}

function delrevert(id)
{
    if ( confirm("该操作将不可逆！\n您确定要删除此条点评吗？"))
    {
      	var url="../request.aspx?action=delrevert&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestdeldelrevertg)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}

function requestdeldelrevertg()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("删除点评成功！");
				window.location.href="myrevert.aspx";
			}
						
		}
	}
}


function delactive(id)
{
    if ( confirm("该操作将不可逆！\n您确定要删除此条自发活动吗？"))
    {
      	var url="../request.aspx?action=delactive&str1="+escape(id);
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestdelactive)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}

function requestdelactive()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText!=1)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("删除自发活动成功！");
				window.location.href="myactive.aspx?action=my";
			}
						
		}
	}
}

//调整图片大小
var imageObject;
function ResizeImage(obj,MaxW,MaxH,flag)
{
    if(obj!=null) imageObject=obj;
    var state=imageObject.readyState;
    if(state!='complete')
    {
        setTimeout("ResizeImage(null,"+MaxW+","+MaxH+")",50);
        return;
    }
    var oldImage=new Image();
    oldImage.src=imageObject.src;
    var dW=oldImage.width;
    var dH=oldImage.height;
    if(dW>MaxW||dH>MaxH)
    {
        a=dW/MaxW;
        b=dH/MaxH;
        if(b>a)a=b;dW=dW/a;dH=dH/a;
    }
    if(dW>0&&dH>0)
    {
        imageObject.width=dW;
        imageObject.height=dH;
    }
    var dtop=MaxH/2-dH;
    if(dH!=MaxH && flag)
    {
        imageObject.style.marginTop=(MaxH/2-dH/2)+'px';
    }
}

function checkmyactive(o){
	trimspace(o.activenum);
	if(o.activenum.value==""){
		alert("请输入活动编号!");
		o.activenum.focus();
		return false;
	}
	trimspace(o.chrtitle);
	if(o.chrtitle.value==""){
		alert("请输入活动名称!");
		o.chrtitle.focus();
		return false;
	}
	if(o.categoryid.value==""){
		alert("请选择活动分类!");
		o.categoryid.focus();
		return false;
	}
	if(o.quyu.value==""){
		alert("请选择所在区域!");
		o.quyu.focus();
		return false;
	}
	trimspace(o.jihe);
	if(o.jihe.value==""){
		alert("请输入集合时间!");
		o.jihe.focus();
		return false;
	}
	trimspace(o.chraddress);
	if(o.chraddress.value==""){
		alert("请输入活动地点!");
		o.chraddress.focus();
		return false;
	}
	if(o.enddate.value==""){
		alert("请选择结束时间!");
		o.enddate.focus();
		return false;
	}
	trimspace(o.chrtruename);
	if(o.chrtruename.value==""){
		alert("请输入您的真实姓名!");
		o.chrtruename.focus();
		return false;
	}
	trimspace(o.chrmancode);
	if(o.chrmancode.value==""){
		alert("请输入身份证号!");
		o.chrmancode.focus();
		return false;
	}
	trimspace(o.chrtel);
	if(o.chrtel.value==""){
		alert("请输入联系电话!");
		o.chrtel.focus();
		return false;
	}
	trimspace(o.chrguanxi);
	if(o.chrguanxi.value==""){
		alert("请输入与此次活动的商家关系!");
		o.chrguanxi.focus();
		return false;
	}
	document.all.btn.style.display='none';
   document.all.submit1.innerHTML="<span style='font-weight:bold; font-size::15px;'>&nbsp;正在提交数据，请稍等......</span>";
}


/**
* 客户端预览图片
* 页面中必须包含<div id="previewImage"></div>的标签
*/
function preview(id)
{
    var pic = document.getElementById(id);
    if(!pic || !pic.value)
    {
        document.getElementById('previewImage').innerHTML = '没有图片';
        return;
    }
    var patn = /\.jpg$|\.jpeg$|\.bmp$|\.png$|\.gif$/i;
    if(patn.test(pic.value.toLowerCase()))
    {
        document.getElementById('previewImage').innerHTML = '<img src=\''+pic.value+'\' width=100 height=100  onload=\'ResizeImage(this, 100, 100,true);\' align=absmiddle>';
    }
    else
    {    
        alert("对不起，图片格式不正确，请重新浏览选择！"); 
        pic.outerHTML=pic.outerHTML;
        pic.value='';
    }
}

//选中表单复选框的所有的值
function CheckAll(form)
{
    for (var i=0;i<form.elements.length;i++)
    {
        var e = form.elements[i];
        if (e.type=="checkbox" && e.id != 'chkall') e.checked = form.chkall.checked;
    }
}

function confirmAlert(o,title){
	var flag=false;
	for (var i=0;i<o.elements.length;i++)
    {
        var e = o.elements[i];
        if (e.type=="checkbox" && e.id != 'chkall' && e.checked)
		{
			flag=true;	
		}
    }
	if(!flag){
		alert("对不起,请先选择!");
		return false;
	}	
	//delother(title);
	//return false;
}


function delother(title)
{
    if ( confirm("该操作将不可逆！\n"+title+"？"))
    {
      	var url="../request.aspx?action=other";
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlHttp=GetXmlHttpObject(requestdelactive)
		xmlHttp.open("POST", url , true)
		xmlHttp.send(null)
    }
}

function requestdelactive()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
			if(xmlHttp.responseText.length>8)
			{
				alert(xmlHttp.responseText);	
			}else{
				alert("操作成功！");
				window.location.href="myactive.aspx?action=bao&id="+xmlHttp.responseText;
			}
						
		}
	}
}


var aganoutput="1";
function showloginagan(val,tt){
	var xmlhttp=createxmlhttp();
	if(!xmlhttp)
	{
		alert("你的浏览器不支持XMLHTTP！！");
		return;
	}
	var  Digital=new  Date();
	Digital=Digital+90000;
	url=val+"request.aspx?action=checklogin&k="+Digital;
	xmlhttp.onreadystatechange=requestdata;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	function requestdata()
	{
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status==200)
			{
				if(xmlhttp.responseText=="1"){
					aganoutput="1";
					delCookie("aganparent");
					setCookie("aganparent","1");
					$$("mask").style.display='';
					Demo_login('<div align=center><iframe src="'+val+'request.aspx?action=loginother" scrolling="no" frameBorder=0 width=297 height=250></iframe></div>',298,250,298,250)
					return false;
				}
				else{
					aganoutput="0";
					delCookie("aganparent");
					setCookie("aganparent","0");	
				}
				if(tt!="0"){
					checkaddlive(document.form1);
				}
			}
		}
	}
}

function fontkeyup(aa,bb,obj){
	if(aa.value.length>bb){
		window.event.returnValue = false;
	}
	else{
		$$(obj).innerHTML=bb-(aa.value.length)	
	}
}

function checkaddlive(o){
	if(aganoutput=="1"){
		showloginagan("../","1");
	}
	if(aganoutput=="1"){
		return false;
	}
	trimspace($$("chrtitle"));
	if($$("chrtitle").value==""){
		alert("对不起,请输入信息标题!");
		$$("chrtitle").focus();
		return false;
	}
	if($$("areaid").value=="0" || $$("areaid").value==""){
		alert("对不起,请选择地区!");
		$$("areaid").focus();
		return false;
	}
	if($$("chrmark")){
		if($$("chrmark").value==""){
			alert("对不起,请输入内容描述!");
			$$("chrmark").focus();
			return false;
		}
	}
	if($$("f_jiage")){
		if($$("f_jiage").value==""){
			alert("对不起,请输入价格!");
			$$("f_jiage").focus();
			return false;
		}
	}
	trimspace($$("f_mianji"));
	if($$("f_mianji")){
		if($$("f_mianji").value==""){
			alert("对不起,请输入面积!");
			$$("f_mianji").focus();
			return false;
		}
	}
	if($$("jiage")){
		trimspace($$("jiage"));
		if($$("jiage").value==""){
			alert("对不起,请输入价格!");
			$$("jiage").focus();
			return false;
		}
	}
	if($$("chrname")){
		trimspace($$("chrname"));
		if($$("chrname").value==""){
			alert("对不起,请输入联系人!");
			$$("chrname").focus();
			return false;
		}
	}
	if($$("t_huodong")){
		trimspace($$("t_huodong"));
		if($$("t_huodong").value==""){
			alert("对不起,请输入活动地点!");
			$$("t_huodong").focus();
			return false;
		}
	}
	if($$("t_xiaofei")){
		trimspace($$("t_xiaofei"));
		if($$("t_xiaofei").value==""){
			alert("对不起,请输入人均消费!");
			$$("t_xiaofei").focus();
			return false;
		}
	}
	if($$("t_renshu")){
		trimspace($$("t_renshu"));
		if($$("t_renshu").value==""){
			alert("对不起,请输入活动人数!");
			$$("t_renshu").focus();
			return false;
		}
	}
	if($$("j_huji")){
		trimspace($$("j_huji"));
		if($$("j_huji").value==""){
			alert("对不起,请输入我的户籍!");
			$$("j_huji").focus();
			return false;
		}
	}
	trimspace($$("chrtel"));
	trimspace($$("chrmobile"));
	trimspace($$("chrqq"));
	if($$("chrtel").value=="" && $$("chrmobile").value==""  && $$("chrqq").value==""){
		alert("对不起,联系手机,联系电话,联系QQ必填一项!");
		$$("chrtel").focus();
		return false;
	}
	if($$("chrmobile").value!=""){
		if($$("chrmobile").value.length!=11){
			alert("对不起,联系手机必须是11位!");
			$$("chrmobile").focus();
			return false;
		}	
	}
}

function addlivefile(tt,aa){
	var count=parseInt($$("count").value);
	if(count<parseInt(tt)){
		if($$("showfile").innerHTML!=""){
			$$("showfile").innerHTML+="<br>";
		}
		$$("count").value=count+1;
		$$("showfile").innerHTML=	$$("showfile").innerHTML+'<input type="file" class="'+aa+'" size="50" name="file" />';
	}
	else{
		alert("对不起,目前最多可上传八张图片!");
	}
}

function BuildSel_tt(str,sel,val)
{
	//先清空原来的数据.
	sel.options.length=0;
	var arrstr = new Array();
	arrstr = str.split(",");
	//开始构建新的Select.
	sel.options.add(new Option( val,"")); 
	if(str.length>0)   
	{
		for(var i=0;i<arrstr.length-1;i++)
		{
			//分割字符串
			var subarrstr=new Array
			subarrstr=arrstr[i].split("|")
			//生成下级菜单
			sel.options.add(new Option(subarrstr[1],subarrstr[0])); 
		}
		sel.options[0].selected=true
	}
}

function showtoujianli(val){
		var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=checklogin&k="+Digital;
		xmlhttp.onreadystatechange=requestdatashowtoujianli;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdatashowtoujianli()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					
					if(xmlhttp.responseText=="1"){
						delCookie("aganparent");
						setCookie("aganparent","1");
						$$("mask").style.display='';
						delCookie("nextcookie");
						setCookie("nextcookie","3,"+val+"");
						Demo_login('<div align=center><iframe src="../member/register.html?login=login" scrolling="no" frameBorder=0 width=695 height=510></iframe></div>',695,510,695,510)
					}
					else{
						
						showtoujianliresult(val);
					}
				}
			}
		}
}

function showtoujianliresult(val){
	var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=toujianli&id="+val+"&k="+Digital;
		xmlhttp.onreadystatechange=requestdatashowtoujianliresult;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdatashowtoujianliresult()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					if(xmlhttp.responseText=="1"){
						alert("对不起,您没有登陆或者登录超时,请重新登录!");
						showtoujianli(val);
					}
					else if(xmlhttp.responseText=="0"){
						alert("您已经成功向该职位投出简历!");
					}
					else if(xmlhttp.responseText=="2"){
						alert("对不起,您还没有完善简历,请先完善!");
						window.location.href='../member/myjianli.aspx';
					}
					else{
						alert(xmlhttp.responseText);
					}
				}
			}
		}
}


function mianshiyqing(val){
		var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=checklogin&k="+Digital;
		xmlhttp.onreadystatechange=requestdatamianshiyqing;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdatamianshiyqing()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					
					if(xmlhttp.responseText=="1"){
						delCookie("aganparent");
						setCookie("aganparent","1");
						$$("mask").style.display='';
						Demo_login('<div align=center><iframe src="../member/register.html?login=login" scrolling="no" frameBorder=0 width=695 height=510></iframe></div>',695,510,695,510)
					}
					else{
						
						showmianshiyaoqing(val);
					}
				}
			}
		}
}

function showmianshiyaoqing(val){
	$$("mask").style.display='';
	Demo_login('<div align=center><iframe src="msyq_'+val+'.html" scrolling="no" frameBorder=0 width=685 height=382></iframe></div>',685,382,685,382)
}

function checkmsyq(o){
	trimspace(o.chraddress)
	if(o.chraddress.value==""){
		//setmsg('checkchraddress','mysq_error_chraddress');
		alert("对不起,请输入面试地点!");
		o.chraddress.focus();
		return false;
	}
	trimspace(o.chrdate)
	if(o.chrdate.value==""){
		alert("对不起,请输入面试时间!");
		o.chrdate.focus();
		return false;
	}
	trimspace(o.zhiweiid)
	if(o.zhiweiid.value=="" || o.zhiweiid.value=="0"){
		alert("对不起,请选择面试职位!");
		o.zhiweiid.focus();
		return false;
	}
	trimspace(o.chrman)
	if(o.chrman.value==""){
		alert("对不起,请输入联系人!");
		o.chrman.focus();
		return false;
	}
	trimspace(o.chrtel)
	if(o.chrtel.value==""){
		alert("对不起,请输入联系电话!");
		o.chrtel.focus();
		return false;
	}
	msyqresult(o.rencaiid.value,o.chraddress.value,o.chrdate.value,o.zhiweiid.value,o.chrman.value,o.chrtel.value,o.chrmark.value);
	return false;
}


function msyqresult(rencaiid,chraddress,chrdate,zhiweiid,chrman,chrtel,chrmark){
	var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		url="../request.aspx?action=mysq&rencaiid="+escape(rencaiid)+"&chraddress="+escape(chraddress)+"&chrdate="+escape(chrdate)+"&zhiweiid="+escape(zhiweiid)+"&chrman="+escape(chrman)+"&chrtel="+escape(chrtel)+"&chrmark="+escape(chrmark)+"&k="+Digital;
		xmlhttp.onreadystatechange=requestdatamsyqresult;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdatamsyqresult()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					if(xmlhttp.responseText=="1"){
						alert("对不起,您没有登陆或者登录超时,请重新登录!");
					}
					else if(xmlhttp.responseText=="0"){
						alert("面试邀请成功,请等待回复!");
						parent.LoginHide();
					}
					else{
						alert(xmlhttp.responseText);
					}
				}
			}
		}
}

function showhangyecategory(str)
{ 
	if (str.length > 0)
	{ 
		var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var url="../request.aspx?action=quyu&id="+str;
		var  Digital=new  Date();
		Digital=Digital+40000;
		url=url+"&k="+Digital;
		xmlhttp.onreadystatechange=requestdataquyu;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdataquyu()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					BuildSel(xmlhttp.responseText ,document.getElementById("categoryid"))
				}
			}
		}
	} 
	
} 


function checkaddrencaiform(o){
	if(o.chrname.value==""){
		alert("对不起,请输入姓名!");
		o.chrname.focus();
		return false;
	}
	if(o.chusheng.value==""){
		alert("对不起,请输入出生年月!");
		o.chusheng.focus();
		return false;
	}
	if(o.jiguan.value==""){
		alert("对不起,请输入籍贯!");
		o.jiguan.focus();
		return false;
	}
	if(o.mingzu.value==""){
		alert("对不起,请输入民族!");
		o.mingzu.focus();
		return false;
	}
	if(o.shenggao.value==""){
		alert("对不起,请输入身高!");
		o.shenggao.focus();
		return false;
	}
	if(o.tizhong.value==""){
		alert("对不起,请输入体重!");
		o.tizhong.focus();
		return false;
	}
	if(o.xueli.value==""){
		alert("对不起,请选择学历!");
		o.xueli.focus();
		return false;
	}
	if(o.biyexuexiao.value==""){
		alert("对不起,请输入毕业学校!");
		o.biyexuexiao.focus();
		return false;
	}
	if(o.hangyecategory.value==""){
		alert("对不起,请选择希望行业分类!");
		o.hangyecategory.focus();
		return false;
	}
	if(o.categoryid.value==""){
		alert("对不起,请选择希望岗位!");
		o.categoryid.focus();
		return false;
	}
}

function checkaddzhiweiform(o){
	if(o.zhiweiname.value==""){
		alert("请输入职位名称!");
		o.zhiweiname.focus();
		return false;
	}
	if(o.zhiweixinzhi.value==""){
		alert("请选择职位性质!");
		o.zhiweixinzhi.focus();
		return false;
	}
	if(o.hangyecategory.value==""){
		alert("请选择行业分类!");
		o.hangyecategory.focus();
		return false;
	}
	if(o.categoryid.value==""){
		alert("请选择岗位分类!");
		o.categoryid.focus();
		return false;
	}
	if(o.renshu.value==""){
		alert("请输入招聘人数！");
		o.renshu.focus();
		return false;
	}
	if(o.youxiao.value==""){
		alert("请选择有效时间！");
		o.youxiao.focus();
		return false;
	}
	if(o.chrmark.value==""){
		alert("请输入职位描述！");
		o.chrmark.focus();
		return false;
	}
}

function showorderwan(val){
	$$("mask").style.display='';
	Demo_login('<div align=center><iframe src="../woyaoorder.html?action=wan&chrorder='+val+'" scrolling="no" frameBorder=0 width=935 height=250></iframe></div>',935,250,935,250)		
}
function showwytg(val){
	window.location.href="../tuangou/zftg.html?a="+escape(val);	
	return false;
}


function showeather(){
	var xmlhttp=createxmlhttp();
		if(!xmlhttp)
		{
			alert("你的浏览器不支持XMLHTTP！！");
			return;
		}
		var  Digital=new  Date();
		Digital=Digital+40000;
		var url="http://pfpip.sina.com/ip.js&k="+Digital;
		xmlhttp.onreadystatechange=requestdatamsyqresult;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
		function requestdatamsyqresult()
		{
			if(xmlhttp.readyState==4)
			{
				if(xmlhttp.status==200)
				{
					alert(xmlhttp.responseText);
				}
			}
		}
}