var Loadimg1="..";
var Loadimg2="<img src=\"/Lib/Images/loading/Loading2.gif\" align=\"absmiddle\" />";
var Loadimg3="<img src=\"/Lib/Images/loading/Loading3.gif\" align=\"absmiddle\" />";
var failpic="<img src=\"/Lib/Images/loading/fail.gif\" align=\"absmiddle\" />";
var truepic="<img src=\"/Lib/Images/loading/true.gif\" align=\"absmiddle\" />";
var uLoginOutMsg="对不起，您未登录会员平台，或登录超时退出，系统在5秒内转入登录页面.......!</br>你也可以手动点击<a href=\"/login.shtml\" title=\"会员登录\">直接进入</a>登录页面！";
var num_ListTime=10;//页面载入廷时时间设置
var num_MsgTime=3000;//错误信息提示页面跳转信息等
var num_OtherTime=10;//其它小功能。。。
var numTime1=1;var numTime2=0.1;var numTime3=5;

function getFckVal(objName)
{
//var oEditor=FCKeditorAPI.GetInstance(objName) ;
//return oEditor.GetXHTML( true ); // "true" means you want it formatted.获取fck编辑器的值的方法
if($('#'+objName).is(":hidden")){
	return GetContents(objName);
}else{return $('#'+objName).val();}
}


function FomatTrade(str,outID){
	var arrData=str.split(",");	var aa=new Array('','','','');
	if($.trim(str)!=''&&str!=undefined){
		if (outID==1){for(var i = 0; i < arrData.length; i++){var arrPdata = arrData[i ].split("|");aa[i]=arrPdata[1]}}
		else{for(var i = 0; i < arrData.length; i++){var arrPdata = arrData[i ].split("|");aa[i]=arrPdata[0]}
		}
	}
return aa;

}
function getCollegeInfo(mParentID,getType,tagobj){//获取院系
	$.ajax({
		type: "POST",
		url: "/Param/?subaction=getCollegeInfo",
		data: "mParentID="+ encodeURIComponent(mParentID)+"&getType="+encodeURIComponent(getType),
		cache:false,//设置同步
		async:false,
		timeout: 5000,
        error: function(msg){
			alert("数据提取出错");
			return false;
			},
		error: function(msg){
			alert("数据提取超时");
			return false;
			},
		success: function(msg){
			$(tagobj).empty();
			if(msg != '0'){
				var arrMaMsg=unescape(msg);
				var arrMa=arrMaMsg.split(",");

				for(var i = 0; i < arrMa.length; i++)
				{
					var arrMavt = arrMa[i ].split("&");

					$("<option value=\""+arrMavt[0]+"\">"+arrMavt[1]+"</option>").appendTo(tagobj)//添加下拉框的option
				}
			}
			return true;
		}
	});
}
function getBPartInfoSelect(tagobj){
	$.ajax({
		type: "POST",
		url: "/Lib/Buser/?subaction=partInfoSelect",
		data: "ReadGO=1",
		cache:false,//设置同步
		async:false,
		timeout: 5000,
        error: function(msg){
			alert("数据提取出错");
			return false;
			},
		timeout: function(msg){
			alert("数据提取超时");
			//alert("服务器超时");
			return false;
			},
		success: function(msg){
			$(tagobj).empty();
			if(msg != '0'){
				var arrMajor=unescape(msg);
				var arrMa=arrMajor.split(",");

				for(var i = 0; i < arrMa.length; i++)
				{
					var arrMavt = arrMa[i ].split("&");

					$("<option value=\""+arrMavt[0]+"\">"+arrMavt[1]+"</option>").appendTo(tagobj)
				}

			}
			return true;
		}
	});
}

//mParentName职位名称，getType级别类型[getRoot,getChild],tagobj菜单对像，msgobj提示语信息对像（转圈圈的）
//mProvinceName职位类型
function getJobTypeInfo(mParentName,mJobTypeName,getType,tagobj,nParamTxt){//获取地区
	$.ajax({
		type: "POST",
		url: "/Param/?subaction=getJobTypeInfo",
		data: "mParentName="+ escape(mParentName)+"&getType="+escape(getType)+"&mJobTypeName="+escape(mJobTypeName)+"&nParamTxt="+escape(nParamTxt),
		cache:false,//设置同步
		async:false,
		timeout: 3000,
		success: function(msg){
			$(tagobj).empty();
			if(msg != '0'&&jQuery.trim(msg)!=''){
				var JobData=unescape(msg);
				var arrJobT=JobData.split(",");

				for(var i = 0; i < arrJobT.length; i++)
				{
					var arrJobPc = arrJobT[i ].split("&");

					$("<option value=\""+arrJobPc[0]+"\">"+arrJobPc[1]+"</option>").appendTo(tagobj)//添加下拉框的option
				}
			}
			return true;
		}
	});
}

function GetTrainCourseClass(tagobj){//获取地区
	$.ajax({
		type: "POST",
		url: "/Param/?subaction=GetTrainCourseClass",
		data: "ReadGO=ok",
		timeout: 5000,
		async:false,
		cache:true,
		success: function(msg){
			$(tagobj).empty();
			if(msg != '0'){
				var arrTra=unescape(msg);
				var arrMa=arrTra.split(",");
				for(var i = 0; i < arrMa.length; i++)
				{
					var arrMavt = arrMa[i ].split("&");
					$("<option value=\""+arrMavt[0]+"\">"+arrMavt[1]+"</option>").appendTo(tagobj)//添加下拉框的option
				}
			}
			return true;
		}
	});
}


function isChinese(str){
	var badChar ="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	badChar += "abcdefghijklmnopqrstuvwxyz";
	badChar += "0123456789";
	badChar += " "+"　";//半角与全角空格
	badChar += "`~!@#$%^&()-_=+]\\|:;\"\\'<,>?/";//不包含*或.的英文符号
	if(""==str){
		return false;
	}
	for(var i=0;i<badChar.length;i++)//字符串str中的字符
	{
		var c = str.charAt(badChar[i]);
		if(badChar.indexOf(c) > -1){
			return false;
		}
	}
	return true;
}

function getObjValue(elementId){	//获取指定id的form组件的值
	if($(elementId).val()!=undefined)

		return jQuery.trim($(elementId).val());
	else
		return "";

}
function checkIdcard(idcard){
var Errors=new Array(
        "验证通过!",
        "身份证号码位数不对!",
        "身份证号码出生日期超出范围或含有非法字符!",
        "身份证号码校验错误!",
        "身份证地区非法!"
    );
    var area={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}
    var idcard,Y,JYM;
    var S,M;
    var idcard_array = new Array();
    idcard_array = idcard.split("");
    //地区检验
    if(area[parseInt(idcard.substr(0,2))]==null) return Errors[4];
    //身份号码位数及格式检验
    switch(idcard.length){
        case 15:
        if ( (parseInt(idcard.substr(6,2))+1900) % 4 == 0 || ((parseInt(idcard.substr(6,2))+1900) % 100 == 0 && (parseInt(idcard.substr(6,2))+1900) % 4 == 0 )){
            ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/;//测试出生日期的合法性
        } else {
            ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/;//测试出生日期的合法性
        }
        if(ereg.test(idcard)){
            return Errors[0];
        }else{
            return Errors[2];
        }
        break;
        case 18:
        //18位身份号码检测
        //出生日期的合法性检查
        //闰年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))
        //平年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))
        if ( parseInt(idcard.substr(6,4)) % 4 == 0 || (parseInt(idcard.substr(6,4)) % 100 == 0 && parseInt(idcard.substr(6,4))%4 == 0 )){
            ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/;//闰年出生日期的合法性正则表达式
        } else {
            ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/;//平年出生日期的合法性正则表达式
        }
        if(ereg.test(idcard)){//测试出生日期的合法性
            //计算校验位
            S = (parseInt(idcard_array[0]) + parseInt(idcard_array[10])) * 7
            + (parseInt(idcard_array[1]) + parseInt(idcard_array[11])) * 9
            + (parseInt(idcard_array[2]) + parseInt(idcard_array[12])) * 10
            + (parseInt(idcard_array[3]) + parseInt(idcard_array[13])) * 5
            + (parseInt(idcard_array[4]) + parseInt(idcard_array[14])) * 8
            + (parseInt(idcard_array[5]) + parseInt(idcard_array[15])) * 4
            + (parseInt(idcard_array[6]) + parseInt(idcard_array[16])) * 2
            + parseInt(idcard_array[7]) * 1
            + parseInt(idcard_array[8]) * 6
            + parseInt(idcard_array[9]) * 3 ;
            Y = S % 11;
            M = "F";
            JYM = "10X98765432";
            M = JYM.substr(Y,1);//判断校验位
            if(M == idcard_array[17]){
                return Errors[0]; //检测ID的校验位
            }else{
                return Errors[3];
            }
        }else{
            return Errors[2];
        }
        break;
        default:
        return Errors[1];
        break;
    }

}

function clearForm()
{
	var coll = document.getElementsByTagName('input')
	if(!coll) return;
	if(coll.length){
		for(var i = 0;i < coll.length;i++){
			if (coll.item(i).type == 'text'||coll.item(i).type == 'password') coll.item(i).value = '';
			if (coll.item(i).type == 'checkbox') coll.item(i).checked='';
		}
	}
	var coll = document.getElementsByTagName('select')
	if(!coll) return;
	if(coll.length){
		for(var i = 0;i < coll.length;i++){
			if (coll.item(i).value != '') coll.item(i).value = '';
		}
	}
	var coll = document.getElementsByTagName('textarea')
	if(!coll) return;
	if(coll.length){
		for(var i = 0;i < coll.length;i++){
			if (coll.item(i).value != '') coll.item(i).value = '';
		}
	}
}
//单选取值
function getRadioVal(name){
	if(!document.getElementsByTagName(name)) return;
	return $('input:radio[name='+name+'][checked]').val();
	}
//给单选框赋值
function selectRadio(name,value) {
    var radioObject = document.getElementsByName(name);
    if(value == ""){radioObject[0].checked = true;  return;  }
    for (var i = 0; i < radioObject.length; i++){
        if(radioObject[i].value == value) {  radioObject[i].checked = true;  break;   }
    }
}


function checkIsNull(obj,obj2){
	var inputval = $(obj).val();
	if(jQuery.trim(inputval)==""){
		$(obj2).attr("class","hint warning");
		$(obj2).html(failpic+"&nbsp;&nbsp;此项不能为空");
		return false;
	}else{
		$(obj2).attr("class","hint ok");
		$(obj2).html(truepic+"&nbsp;&nbsp;正确");
		return true;
		}
}
function openFloat(actionval,id,tagobj,paramurl) {
if (paramurl!=''){paramurl="&"+paramurl;}
		createFullDiv("FullScreenContDiv");
		juecomajax(Loadimg3,"/Param/?subaction="+actionval,"POST","ReadGO=ok&floatid="+id+"&tagobj="+tagobj+paramurl,false,false,"#"+id);
		document.getElementById("outboxlist").style.width = '80%';
		document.getElementById("outboxlist").style.margin = '0px auto 0px auto';
		document.getElementById('outboxlist').style.top = document.documentElement.scrollTop +'px'; //add by 阿聪 2009-4-19
		var trueHeight = document.documentElement.scrollTop + document.getElementById('outboxlist').scrollHeight; //add by 阿聪 2009-4-19
		document.getElementById('FullScreenDiv').style.backgroundColor ='#eee';
		document.getElementById('FullScreenDiv').style.opacity = 0.80;
		document.getElementById('FullScreenDiv').style.filter = 'Alpha(opacity=80)';
		if (trueHeight > document.body.scrollHeight) document.getElementById('FullScreenDiv').style.height = (trueHeight + 40) +'px';
}
//edit by :danny 09-4-23修改适用于有权限目录
function openFloat2(actionval,id,tagobj,paramData,Isasync) {
if (paramData!=''){paramData="&"+paramData;}
		createFullDiv(id);
		juecomajax(Loadimg3,actionval,"POST","ReadGO=ok&floatid="+id+"&tagobj="+tagobj+paramData,Isasync,false,"#"+id);
		document.getElementById("outboxlist").style.width = '80%';
		document.getElementById("outboxlist").style.margin = '0px auto 0px auto';
		document.getElementById('outboxlist').style.top = document.documentElement.scrollTop +'px'; //add by 阿聪 2009-4-19
		var trueHeight = document.documentElement.scrollTop + document.getElementById('outboxlist').scrollHeight; //add by 阿聪 2009-4-19
		if (trueHeight > document.body.scrollHeight) document.getElementById('FullScreenDiv').style.height = (trueHeight + 40) +'px'; //add by 阿聪 2009-4-19
}
function closeOpenFloat(tag) {
	if (document.getElementById(tag)) document.getElementById(tag).style.display = 'none';
}
function juecomajax(statePic,postUrl,postType,dataStr,asyncTF,cacheTF,tagObj){
	$.ajax({
		type: postType,
		url: postUrl+"&r="+Math.random(),
		data: dataStr,
		cache:cacheTF,
		async:asyncTF,
		timeout: 5000,
		beforeSend: function(XMLHttpRequest){
			$(tagObj).html(statePic+"&nbsp;&nbsp;数据加载中..");
		},
        error: function(msg){
			alert("公共数据调取超时，请与客服联系");
			return false;
			},
		error: function(msg){
			alert("公共数据调取超时,请与客服联系");
			return false;
			},
		success: function(msg){
				if(unescape(msg)=='False'){LoginForm();return false;}
				//最好加上过滤SQL执行错显示
				$(tagObj).html(unescape(msg));
			return true;
		}
	});
	}
	//TotalNum总条数：PageSize分页条数：CurrentPage当前页数：LinkURL页面地址除页数外：listNumStyle显示页面的个数：tagobj显示的DIV
function getPageList(TotalNum,PageSize,CurrentPage,LinkURL,listNumStyle,tagobj){
	if(parseInt(CurrentPage)==0)CurrentPage=1;
	var CountPageNum=0;
	var PageNum=0;
	var j=0;
	var TempStr="";
	if (listNumStyle==""||parseInt(listNumStyle)>10) listNumStyle=10;
	if (listNumStyle%2!=0){
		listNumStyle+=1;
	}
	if(TotalNum=="") {return false;	}
	if ((TotalNum%PageSize)==0 ){PageNum=TotalNum/PageSize;	}
	else{PageNum=parseInt(TotalNum/PageSize)+1;}
	if(CurrentPage>PageNum){CurrentPage=PageNum}
	TempStr="<div class=\"pageList_nav\"> <div class=\"pageList_l\">第 <b class=\"ho12\">"+CurrentPage+"</b> / <span class=\"hei12\">"+PageNum+"</span> 页  每页 <b class=\"hei12\">"+PageSize+"</b> 条  共 <b class=\"hei12\">"+TotalNum+"</b> 条</div><div class=\"pageList_r\">";

	if (CurrentPage==1) {
		TempStr+= "<a class=\"nor\">首页</a> ";
		TempStr+= "<a class=\"nor\">上页</a>";
	}else if (CurrentPage ==2) {
		TempStr+= "<a href=\""+LinkURL+"\" class=\"nor\" title=\"首页\">首页</a> ";
		TempStr+= "<a href=\""+LinkURL+"\" class=\"nor\" title=\"上一页\">上页</a>";
	}else{
		TempStr+= "<a href=\""+LinkURL+"\" class=\"nor\" title=\"首页\">首页</a> ";
		TempStr+= "<a href=\"" + LinkURL +"&page="+ parseInt(CurrentPage-1) + "\" class=\"nor\" title=\"上一页\">上页</a> ";
	}
	var g=0;
	//PageNum 页面数 CurrentPage 当前页码
	if (PageNum > listNumStyle) {
		if (CurrentPage > parseInt(listNumStyle/2)) {
			if (parseInt(PageNum - CurrentPage) < parseInt(listNumStyle/2)) {CountPageNum = parseInt(PageNum - parseInt(listNumStyle-1));}else{CountPageNum = parseInt(CurrentPage - parseInt(listNumStyle/2));}
		}else{CountPageNum = 1;	}
	}else{CountPageNum = 1;}
	for(j=CountPageNum;j<=PageNum;j++){
		if (j==CurrentPage) {TempStr+= "<a class=\"act\" >"+ j +"</a>";}
		else{TempStr+= "<a href=\"" + LinkURL +"&page="+ j  + "\" class=\"nor\">" + j + "</a> ";}
		g+=1;
		if ((g%listNumStyle)== 0 ){ break;}
	}
	if (CurrentPage==PageNum) {
		TempStr+= "<a class=\"nor\">下页</a>";
		TempStr+= "<a class=\"nor\">末页</a>";
	}else{
		TempStr+= "<a href=\"" + LinkURL +"&page="+ parseInt(CurrentPage+1) + "\" class=\"nor\" title=\"下一页\">下页</a> ";
		TempStr+= "<a href=\"" + LinkURL +"&page="+PageNum + "\" class=\"nor\" title=\"最后一页\">末页</a> ";
	}
	TempStr=TempStr+"</div></div>";
	$(tagobj).html(TempStr);
}

function getTopPageList(TotalNum,PageSize,CurrentPage,LinkURL,listNumStyle,tagobj){
	if(parseInt(CurrentPage)==0)CurrentPage=1;
	var CountPageNum=0;
	var PageNum=0;
	var j=0;
	var TempStr="";
	if (listNumStyle==""||parseInt(listNumStyle)>10) listNumStyle=10;
	if (listNumStyle%2!=0){
		listNumStyle+=1;
	}
	if(TotalNum=="") {return false;	}
	if ((TotalNum%PageSize)==0 ){PageNum=TotalNum/PageSize;	}
	else{PageNum=parseInt(TotalNum/PageSize)+1;}
	if(CurrentPage>PageNum){CurrentPage=PageNum}

	TempStr='<div class="pageList">';
	TempStr+='<a href="' + LinkURL +'" class="page_nor" title="最后一页">首页</a>';
	var g=0;
	//PageNum 页面数 CurrentPage 当前页码
	if (PageNum > listNumStyle) {
		if (CurrentPage > parseInt(listNumStyle/2)) {
			if (parseInt(PageNum - CurrentPage) < parseInt(listNumStyle/2)) {CountPageNum = parseInt(PageNum - parseInt(listNumStyle-1));}else{CountPageNum = parseInt(CurrentPage - parseInt(listNumStyle/2));}
		}else{CountPageNum = 1;	}
	}else{CountPageNum = 1;}
	for(j=CountPageNum;j<=PageNum;j++){
		if (j==CurrentPage) {TempStr+='<a class="page_sor" >['+ j +']</a>';}
		else{TempStr+= '<a href="' + LinkURL +'&page='+ j  + '" class="page_nor">['+ j + ']</a>';}
		g+=1;
		if ((g%listNumStyle)== 0 ){ break;}
	}
	TempStr+= '<a href="' + LinkURL +'&page='+PageNum + '" class="page_nor" title="最后一页">末页</a>';
	TempStr+='</div>';
	$(tagobj).html(TempStr);
}


function getallboxval(objname){

	var str="";
	$("input:checkbox[name='"+objname+"'][checked]").each(function(){
    str+=$(this).val()+",";

	 });
	if (str!=""){return str.substr(0,str.length-1);}else{return ""}

	}
function boxcheckall(obj){

if ($(obj).attr('checked')==true){$(":checkbox").attr("checked", true);}else{$(":checkbox").attr("checked", false);}
}

function dateDiff(startTime,endTime){
//默认格式为"2003-03-03",根据自己需要改格式和方法
	startTime=startTime.replace(/-/g,""); //g代表gobal，全局替换。
	startTime=startTime.replace(/\\/g,"");
	startTime=startTime.replace(/\./g,"");
	endTime=endTime.replace(/-/g,""); //g代表gobal，全局替换。
	endTime=endTime.replace(/\\/g,"");
	endTime=endTime.replace(/\./g,"");
	var year1 =  startTime.substr(0,4);
	var year2 =  endTime.substr(0,4);
	var month1 = startTime.substr(4,2);
	var month2 = endTime.substr(4,2);
	var day1 = startTime.substr(6,2);
	var day2 = endTime.substr(6,2);
	temp1 = year1+"/"+month1+"/"+day1;
	temp2 = year2+"/"+month2+"/"+day2;
	var dateaa= new Date(temp1);
	var datebb = new Date(temp2);
	var date = datebb.getTime() - dateaa.getTime();
	var time = Math.floor(date / (1000 * 60 * 60 * 24));
	return time;

}
//计算两个时间差并返回提示
function IsValidTwoDate(startTime,endTime,obj){
	var time1=jQuery.trim($(startTime).val());
	var time2=jQuery.trim($(endTime).val());
	if (dateDiff(time1,time2)>0){$(obj).html("");$(obj).attr("class","hint ok");return true;}
	else{$(obj).html("结束时间必须大于开始时间，请您正确选择！");	$(obj).attr("class","hint warning");return false;}
	}
//获取指定的COOKIE值
function getCookieName(tagName){
	$.ajax({
		type: "POST",
		url: "/Param/?subaction=getCookieName",
		data: "ReadGO=1&tagName="+escape(tagName),
		cache:false,//设置同步
		async:false,
		timeout: 5000,
        error: function(msg){
			//alert("数据提取出错");
			return "";
			},
		timeout: function(msg){
			//alert("数据提取超时");
			//alert("服务器超时");
			return "";
			},
		success: function(msg){
			if(unescape(msg) != '0'){
				return unescape(msg);

			}
			else
			{
				return "";
				}

		}
	});
}
//用于onmouseout时触发
function tagout_checkbv(obj,checkobj){
	//alert($("#"+checkobj).attr('checked'));
	if($("#"+checkobj).attr('checked')==false||$("#"+checkobj).attr('checked')==undefined){$(obj).css({"background":""});}

}
//用于onmouseover时触发
function tagoverColor(obj){
	$(obj).css({"background":"#ffffcc"});

	}
function tagoutColor(obj){
	$(obj).css({"background":""});

	}
	//点击复选框时
function changecolor(tagbr,obj){
//$("#"+tagbr).attr("checked",false);
	tagbr.checked=!tagbr.checked;
	//if($(tagbr).attr('checked')==false){$("#"+tagbr).attr("checked",true);}else{$("#"+tagbr).attr("checked",false);}
	if($(tagbr).attr('checked')==false){$(obj).css({"background":""}); }else{$(obj).css({"background":"#ffffcc"});}

	}
	//整行单击时
function tagclick_changeboxv(obj){

	if($("#"+obj).attr('checked')==false){$("#"+obj).attr("checked",true);}else{$("#"+obj).attr("checked",false);}

	}

	//获取会员留言最新
	//1表个人会员2表企业
function getMsgCount(getType,tagobj){

	if (getType==1){sendurl="/Lib/user/?subaction=getMsgCount";}else{sendurl="/Lib/buser/?subaction=getMsgCount"}
	$.ajax({
		type: "POST",
		url: sendurl,
		data: "getType=getpagecount",
		timeout: 5000,
		async:false,
		beforeSend: function(XMLHttpRequest){
			$(tagobj).html(Loadimg1);
		},
		success: function(msg){
			if(unescape(msg)=='False'){LoginForm();return false;}

			$(tagobj).html(unescape(msg));

			return true;

		},
		cache:false,
		error:function(msg){

			$(tagobj).html("");
			return false;
		},
		timeout:function(msg){

			$(tagobj).html("");
			return false;
		}
	});
}
//获取单位左边菜单
function getUserMenu(tagobj){
	$(tagobj).html("<div align=\"center\" style=\"margin-top:150px;\">"+Loadimg1+"菜单加载中</div>");
	$(tagobj).show();
	//$("#b_Menu").hide();$("#s_Menu").hide();$("#p_Menu").hide();

	$.ajax({
		type: "POST",
		url: "/Lib/buser/?subaction=getUserMenu",
		data: "getType=ok",
		timeout: 5000,
		async:false,
		beforeSend: function(XMLHttpRequest){
			$(tagobj).html("<div align=\"center\" style=\"margin-top:150px;\">"+Loadimg1+"菜单加载中</div>");
		},
		success: function(msg){
			if(unescape(msg)=='False'){LoginForm();return false;}
			if(unescape(msg)=='nullusertype'){LoginForm();return false;}
			//switch (unescape(msg)){
//				case "commonUser":
//					//$("#b_Menu").show();
//					$(tagobj).load("/Html/Flag/5QSDKA058I17F5XK4COV.shtml","POST","");
//					//$(tagobj).load("/Html/Flag/5QSDKA058I17F5XK4COV.shtml",false);
//					break;
//				case "trainUser":
//					$(tagobj).load("/Html/Flag/2XX5D006089C6XI06173.shtml","POST","");
//					break;
//				case "schoolUser":
//					$(tagobj).load("/Html/Flag/560O3SR485TS567MGA36.shtml","POST","");
//					break;
//				  default:
//				  $("#msg_text").html(uLoginOutMsg);setTimeout("location.href='/login.shtml'",num_MsgTime);
//				  //不存在的会员类型直接踢出
//				  break;
//
//			}

			$(tagobj).html(unescape(msg));
			//$(tagobj).hide();
//			$(tagobj).html("");

			return true;

		},
		cache:true,
		error:function(msg){
			$(tagobj).html("");
			return false;
		},
		timeout:function(msg){

			$(tagobj).html("");
			return false;
		}
	});
}

function getnLearnTime(obj){
	var myDate=new Date()
	var myDateStr=myDate.getFullYear();
	var startyear=myDateStr-30;
	//var endyear=myDateStr+5
	for(var i=myDateStr;i>startyear;i--)
		{
			$("<option value=\""+i+"\">--"+i+" 届--</option>").appendTo(obj)//添加下拉框的option
//$("#select").empty();//清空下拉框//$("#select").html('');
		}
	}
function showRandCode(Codew,Codeh,Tag) {
	$.ajax({
		type: "POST",
		url: "/Param/?subaction=showRandCode&r="+Math.random(),
		data: "Codew="+encodeURIComponent(Codew)+"&Codeh="+encodeURIComponent(Codeh),
		beforeSend: function(XMLHttpRequest){
			$(Tag).html(Loadimg2+"&nbsp;&nbsp;loading..");
		},
		timeout: 50000,
        error: function(msg){
			$(Tag).html(failpic+"&nbsp;&nbsp;读取失败");
			return false;
			},
		success: function(msg){
			$(Tag).html("<img src=\""+unescape(msg)+"\" onclick=\"showRandCode('"+Codew+"','"+Codeh+"','"+Tag+"');\" alt=\"看不清楚？点击一下换一个\" style=\"cursor:pointer;\" class=\"picMiddle\" />");
			return true;
		}
	});
}
function checkRandCode(obj,obj2){
	var inputval = $(obj).val();
	if(jQuery.trim(inputval).length <1){
		$(obj2).attr("class","hint warning");
		$(obj2).html(failpic+"&nbsp;&nbsp;验证码不能空");
		return false;
		}
	else{
		$(obj2).attr("class","hint ok");
		$(obj2).html(truepic+"&nbsp;&nbsp;正确");
		return true;
		}
}
function getOperaPath(){
	var arrpath="";var opera_path
	var domainurl = document.location.href.match(/^http:\/\/(.+?)\//i)[0].toLowerCase();
	var file_path = document.location.href.substring(0,document.location.href.lastIndexOf("/")+1).toLowerCase();
	if(domainurl!=''&&file_path!=''){opera_path=file_path.replace(domainurl,'');arrpath=opera_path.split("/");}
	return arrpath[0];



}
function validatorUser(getType,obj){
	var p=getOperaPath();
	var postUrl;var dataStr;
	switch(getType){
		case "s":
			postUrl="/lib/buser/?subaction=validatoruser";
			dataStr="getType=s&p="+p;
			break;
		case "b":
			postUrl="/lib/buser/?subaction=validatoruser";
			dataStr="getType=b&p="+p;
			break;
		case "p":
			postUrl="/lib/buser/?subaction=validatoruser";
			dataStr="getType=p&p="+p;
			break;
		case "u":
			postUrl="/lib/user/common/?subaction=validatoruser";
			dataStr="getType=u&p="+p;
			break;
		}
	GetvalidatorUser(postUrl,dataStr,false,false,"#user_status")
	return true;
	}
function GetvalidatorUser(postUrl,dataStr,asyncTF,cacheTF,tagObj){
	//postUrl="/lib/buser/?subaction=validatoruser";
	$.ajax({
		type: "POST",
		url: postUrl+"&r="+Math.random(),
		data: dataStr,
		cache:false,
		async:false,
		timeout: 5000,
		success: function(msg){
			//alert(msg);
			if(unescape(msg)=='False'){location.href='/login.shtml';return false;}else if(unescape(msg)=='isb'){location.href='/buser';return false;}
			else if(unescape(msg)=='iss'){location.href='/school';return false;}
			else if(unescape(msg)=='ist'){location.href='/train';return false;}
			else if(unescape(msg)=='isp'){location.href='/partuser';return false;}
			else if(unescape(msg)=='isu'){location.href='/user';return false;}
			else if(unescape(msg)=='1'){$(tagObj).html('');return true;}
			else{$(tagObj).html('');return true;}
			},
        error: function(msg){//alert(msg);
		$(tagObj).html('');return false;}

	});
}
function ajxcomon(statePic,postUrl,postType,dataStr,asyncTF,tagObj,UserTF){
	$.ajax({
		type: postType,
		url: postUrl+"&r="+Math.random(),
		data: dataStr,
		cache:false,
		async:asyncTF,
		timeout: 5000,
		beforeSend: function(XMLHttpRequest){
			$(tagObj).html(statePic);
		},
        error: function(msg){$(tagObj).html('');return false;},
		success: function(msg){
			if(UserTF==1&&unescape(msg)=='False'){alert("请登录您的会员帐号");LoginForm();return false;}
			if(tagObj!='undefinded'&&tagObj!=''){$(tagObj).html(unescape(msg));return true;}else{return(unescape(msg));}
			}
	});
}
function ajaxcomon(statePic,postUrl,postType,dataStr,asyncTF,tagObj,tagType){
	$.ajax({
		type: postType,
		url: postUrl+"&r="+Math.random(),
		data: dataStr,
		cache:false,
		async:asyncTF,
		timeout: 5000,
        error: function(msg){return false;},
		success: function(msg){
			if(unescape(msg)=='False'){LoginForm();return false;}
			if($(tagObj).length>0){
				switch(tagType){
					case 0:
					$(tagObj).html(unescape(msg));break;
					case 1:
					$(tagObj).attr('value',unescape(msg));break;
					default:
					$(tagObj).html(unescape(msg));break;
				}
				return true;
			}
		}
	});
}
function userUpfile(usertype,filetype,ty,NewsID,tagname,tagtype){

	if(tagname==''||filetype==''){return false;}
	var posturl='user';
	if (usertype=='3'){posturl='buser';}
	$.ajax({
			type: "POST",
			url: "/Lib/"+posturl+"/?subaction=upfile&r="+Math.random(),
			data: "tagname="+escape(tagname)+"&filetype="+escape(filetype)+"&ty="+escape(ty)+"&NewsID="+escape(NewsID)+"&tagtype="+escape(tagtype),
			cache:false,
			async:false,
			timeout: 5000,
			error: function(msg){return false;},
			success: function(msg){
				if(unescape(msg)=='False'){LoginForm();return false;}
				if(unescape(msg)!=''){

					createlayer('',450,10);
					$('#out_Title').html('图片上传');
					$('#out_Main').html(unescape(msg));
					$('#out_Foot').html('文件类型：jpg|gif|jpeg为提高浏览速度,上传的图片请不要超过500K ');
					return true;
					}else{return false;}
			}
		});

}
function returnUpFilePath(errorNumber,val,ty,NewsID,tag,tagtype){

	var tmp = '';
	var tmp2 = '';
	switch ( errorNumber ) {
		case 0 :
			if(ty==''&&NewsID==''){
				$('#'+unescape(tag)).attr('value',unescape(val));
				if($('#Picview').length>0){$('#Picview').html('<img src="/Lib/?action=outputsmallpic&width=120&height=90&url='+val+'"/>');}

			}else{
				switch(ty){
					case 'course':
						$('#trid_'+NewsID+' .viewpic').html('<div class="picbox"><img src="/Lib/?action=outputsmallpic&width=50&height=50&url='+unescape(val)+'"  style="display:block" /></div>\
	<div class="picbtn"><input name="bntok1" type="button"  value="删除图片" class="btn69" title="删除后可以重传" onclick="DelPic(\''+NewsID+'\',this)"/></div>');
						//showData("GetCourseList","#cont_main","#msg_text",Loadimg3,"/Lib/buser/?subaction=GetCourseList","page="+CurrentPage+"&PageSize="+PageSize+"&ReadGo=ok","POST",false,false);
						break;
					}
				}
			alert('上传成功！');
			closeActMsg();
			break ;
		case 1 :
			alert('系统暂于未开放上传功能');closeActMsg();
			break ;
		case 10 :
			alert('不支持的文件格式');closeActMsg();
			break ;
		case 200 :
			alert('超出文件大小限制');closeActMsg();
			break ;
		case 202 :
			alert('不支持的文件格式！或者超出文件大小限制');closeActMsg();
			break ;
		case 321 :
			alert('请选择文件后再上传');closeActMsg();
			break ;
		case 203 :
			alert('您没有足够的权限上传文件，请检查服务器权限设置');closeActMsg();
			break ;
		default :
			alert('无法完成上传，错误代码: ' + errorNumber);closeActMsg();
			break ;
	}
}

function showRightMenu(e,uid,getType) {
	var posturl="";var t;
	if (getType=="1"){posturl="/lib/user/?subaction=GetBUserCallingCard";}else{posturl="/lib/buser/?subaction=GetUserCallingCard";}
	if($('#showRightMenuDiv').length==0){createDiv(e,'showRightMenuDiv','');}
	else {
		$("#showRightMenuDiv").show();
		if ((returnXY(e,'x') + document.getElementById('showRightMenuDiv').scrollWidth) > document.documentElement.scrollWidth)							 			{document.getElementById('showRightMenuDiv').style.left = (document.documentElement.scrollWidth - document.getElementById('showRightMenuDiv').scrollWidth) - 20 +'px';
		}
		else {document.getElementById('showRightMenuDiv').style.left = returnXY(e,'x') +'px';}
		if ((returnXY(e,'y') + document.getElementById('showRightMenuDiv').scrollHeight) > document.documentElement.scrollHeight) {document.getElementById('showRightMenuDiv').style.top = (document.documentElement.scrollHeight - document.getElementById('showRightMenuDiv').scrollHeight) - 20 +'px';}
		else {document.getElementById('showRightMenuDiv').style.top = (returnXY(e,'y') + 6) +'px';}
	}
	document.getElementById('showRightMenuDiv').style.opacity = 0.95;
	document.getElementById('showRightMenuDiv').style.filter = 'Alpha(opacity=95)';
	ajxcomon(Loadimg2+'正在获取名片信息，请稍后……',posturl,"POST","uid="+ uid,false,"#showRightMenuDiv",0);

	if($('#showRightMenuDiv').length>0){
		$("#showRightMenuDiv").hover(
		function(){clearTimeout(t);$("#showRightMenuDiv").show();	},
		function(){t=setTimeout(function(){closehelp('showRightMenuDiv');},1000);}
		);
	}
}
//获取四级联动下拉菜单的值
function getTradeVal(){
	var temp='';
	temp=$(arguments[3]).val();
	if(temp=='')temp=$(arguments[2]).val();
	if(temp=='')temp=$(arguments[1]).val();
	if(temp=='')temp=$(arguments[0]).val();
	return temp;
}
//获取行业选中的文本项
function getTradeTxt(){
	var temp='';
	temp=getTradeObjTxt(arguments[3]);
	if(temp=='')temp=getTradeObjTxt(arguments[2]);
	if(temp=='')temp=getTradeObjTxt(arguments[1]);
	if(temp=='')temp=getTradeObjTxt(arguments[0]);
	return temp;
}
//获取下拉框选中广本值，并去除开头字母+：号
function getTradeObjTxt(obj){
	var val='';
	if($(obj).length>0){val=$(obj+' option:selected').text();}
	if (val != null && val.length > 2 && val.match(/^(([A-Z.0-9]){1})+\:/)){var arrVal=val.split(":");return arrVal[1].split('(')[0];}else{return '';}
}

//获取四级联动下拉菜单的值
function getTagLastVal(){
	var temp='';
	temp=$(arguments[3]).val();
	if(temp==''||temp==undefined)temp=$(arguments[2]).val();
	if(temp==''||temp==undefined)temp=$(arguments[1]).val();
	if(temp==''||temp==undefined)temp=$(arguments[0]).val();
	return temp;
}
//获取行业选中的文本项
function getTagLastTxt(){
	var temp='';
	temp=FilterLetter(arguments[3]);
	if(temp==''||temp==undefined)temp=FilterLetter(arguments[2]);
	if(temp==''||temp==undefined)temp=FilterLetter(arguments[1]);
	if(temp==''||temp==undefined)temp=FilterLetter(arguments[0]);
	return temp;
}
//获取下拉框选中广本值，并去除开头字母+：号
function FilterLetter(obj){
	var val='';
	if($(obj).length>0){val=$(obj+' option:selected').text();}
	if (val != null && val.length > 2 && val.match(/^(([A-Z.0-9]){1})+\:/)){var arrVal=val.split(":");return arrVal[1].split('(')[0];}else{return '';}
}
function showHoverObj(nTag,nShowTag,n){
	var i=0;
	$('#'+nTag+' li').each(function(){
		var classname=n==i?"cur":"nor";
		$(this).attr('class',classname);
		i==n?$('#'+nShowTag+i).show():$('#'+nShowTag+i).hide();
		i++;
	});
}
//浮动层/////////////////////////////
function closeActMsg(){
	if($('#FullScreenDiv').length>0&&$('#Msg_Info').length>0){
		hiddenSelect('show');$('#FullScreenDiv').hide();$('#Msg_Info').hide();}
	}

function createLockDiv(id){
	hiddenSelect('hidden');
	if (!document.getElementById(id)) {
	var cDiv = document.createElement("div");
	cDiv.id = id;
	cDiv.style.position = 'absolute';
	cDiv.style.zIndex = 8888;
	cDiv.style.left = '0px';
	cDiv.style.top = '0px';
	cDiv.style.width = '100%';
	var sh=document.documentElement.scrollHeight;
	var ch=document.documentElement.clientHeight
	var pageHeight=(sh-ch)>0?sh:ch;
	cDiv.style.height = pageHeight + 50 +'px';
	cDiv.style.backgroundColor = '#000';
	cDiv.style.opacity = 0.90;
	cDiv.style.filter = 'Alpha(opacity=90)';
	document.body.appendChild(cDiv);
	}else {$('#'+id).show();	document.getElementById(id).style.height = document.documentElement.scrollHeight + 50 +'px';	}
}

function createlayer(newsID,formWidth,AlphaNum){
	createLockDiv('FullScreenDiv');
	if(newsID==''||newsID==undefined)newsID="Msg_Info";
	if (AlphaNum==""){AlphaNum=80;}
	if (formWidth==""){formWidth=452;}
	if (!document.getElementById(newsID)){
		var cDiv = document.createElement("div");
		document.body.appendChild(cDiv);
		cDiv.id = newsID;
		cDiv.className = newsID;
		cDiv.style.position = 'absolute';
		cDiv.style.zIndex = 88888;
		cDiv.style.left = (document.documentElement.scrollWidth / 2 - 190) +'px';
		cDiv.style.backgroundColor = '#fff';
	}else{$('#FullScreenDiv').show();document.getElementById(newsID).style.display = '';	}


	var tempTop='<div class="out_Top" id="out_Top" title="单击鼠标移动">\
				<div class="out_Title" id="out_Title">信息提示</div>\
				<div class="out_Close" onclick="javascript: closeActMsg();"></div>\
			  </div>';
	var tempMain=' <div class="out_Main" id="out_Main"></div>';
	var tempFoot='<div class="out_Foot" id="out_Foot">\
					<input name="bntok" type="button" id="bntok" value="确定" class="btn45"/>\
				  </div>';
	var tempAll='<div class="out_Div" id="out_Div">\
				<div class="out_Box">\
				'+tempTop+'\
				'+tempMain+'\
				'+tempFoot+'\
				 </div>\
			  </div>';
	document.getElementById(newsID).innerHTML = tempAll;
	document.getElementById('FullScreenDiv').style.opacity = AlphaNum/100;
	document.getElementById('FullScreenDiv').style.filter = 'Alpha(opacity='+AlphaNum+')';
	document.getElementById(newsID).style.position = 'absolute';
	document.getElementById(newsID).style.width=formWidth+'px';
	var floatdiv=document.getElementById(newsID);
	var range=getRange();
	floatdiv.ox=(range.width-formWidth)/2;
	floatdiv.oy=(range.height-200)/2;
	floatdiv.style.top=(range.top+floatdiv.oy) - 150 +"px";
	floatdiv.style.left=(range.left+floatdiv.ox) +"px";
	//托动

	clearInterval(prox);
	var o = document.getElementById(newsID);
	o.style.display = "block";
	o.style.opacity = 0;
	o.style.filter = 'Alpha(opacity=0)';
	prox = setInterval(function(){showlayer(newsID)},10);
	moveactive(newsID,formWidth);
	//end
	}
function showlayer(tagobj){
	var o= document.getElementById(tagobj);
	var opacityNum=parseInt($("#"+tagobj).css("opacity")*100);
	if(opacityNum<100){
		o.style.opacity =(opacityNum+25)/100;
		o.style.filter = 'Alpha(opacity='+(opacityNum+25)+')';

	}else{clearInterval(prox)}
}
/*-------------------------鼠标拖动---------------------*/
function moveactive(boxobj,formWidth){
	if($('#out_Top').length>0)$('#out_Top').css({"cursor":"move"});
	var od = document.getElementById(boxobj);
	var tod = document.getElementById("out_Top");
	var bod = document.getElementById("out_Foot");
	var dx,dy,mx,my,mouseD;
	var odrag;
	var marclientW;
	var marclientH;
	var isIE = document.all ? true : false;
	document.onmousedown = function(e){
		var e = e ? e : event;
		if(e.button == (document.all ? 1 : 0)){mouseD = true; }
	}
	document.onmouseup = function(){
		mouseD = false;
		odrag = "";
		if(isIE){
			od.releaseCapture();
			od.filters.alpha.opacity = 100;
		}else{
		window.releaseEvents(od.MOUSEMOVE);
		od.style.opacity = 1;
		}
	}
	//function readyMove(e){
	// 顶层托
	tod.onmousedown = function(e){
	//	tod.style.cursor='move';
		odrag = this;
		var e = e ? e : event;
		if(e.button == (document.all ? 1 : 0)){
			mx = e.clientX;
			my = e.clientY;
			od.style.left = od.offsetLeft + "px";
			od.style.top = od.offsetTop + "px";
			if(isIE){
				od.setCapture();
				od.filters.alpha.opacity = 50;
			}else{
				window.captureEvents(Event.MOUSEMOVE);
				od.style.opacity = 0.5;
			}
		}
	}
	//底层托
	bod.onmousedown = function(e){

		odrag = this;
		var e = e ? e : event;
		if(e.button == (document.all ? 1 : 0)){
			mx = e.clientX;
			my = e.clientY;
			od.style.left = od.offsetLeft + "px";
			od.style.top = od.offsetTop + "px";
			if(isIE){
				od.setCapture();
				od.filters.alpha.opacity = 80;
			}else{
				window.captureEvents(Event.MOUSEMOVE);
				od.style.opacity = 0.8;
			}
		}
	}
	document.onmousemove = function(e){
		var marclientW= parseInt(document.documentElement.clientWidth-formWidth-20);
		var sh=document.documentElement.scrollHeight;
		var ch=document.documentElement.clientHeight
		var pageHeight=(sh-ch)>0?sh:ch;
		var marclientH=pageHeight-200;
		var e = e ? e : event;
		if(mouseD==true && odrag){
		var mrx = e.clientX - mx;
		var mry = e.clientY - my;
		var odw= parseInt(od.style.left) +mrx;
		var odh= parseInt(od.style.top) + mry
		odw=odw>marclientW?marclientW:odw;
		odw=odw<0?0:odw;
		odh=odh>marclientH?marclientH:odh;
		odh=odh<0?0:odh;
		od.style.left = odw + "px";
		od.style.top = odh + "px";
		mx = e.clientX;
		my = e.clientY;
		}
	}
}
function getRange() {
		var top     = document.documentElement.scrollTop;
		var left    = document.documentElement.scrollLeft;
		var height  = document.documentElement.clientHeight;
		var width   = document.documentElement.clientWidth;
      	if (top==0 && left==0 && height==0 && width==0) {
			top     = document.body.scrollTop;
			left    = document.body.scrollLeft;
			height  = document.body.clientHeight;
			width   = document.body.clientWidth;
     	 }
      return  {top:top  ,left:left ,height:height ,width:width };
}
function LoginForm(){
	createlayer('',400,85);
	$('#out_Main').html('');
	$(document).ready(function(){if($('#UserName').length>0||$('#UserPwd').length>0){location.href='/login.shtml';}});
	$('#out_Title').html('<span class="fontLarge">如果您已拥有海都招聘账号，请登录</span>');
	$('#out_Main').html('<div class="LockDiv" id="LockDiv" style="display:none;"></div><div id="FloatLogin" class="FloatLogin">\
	  <p>\
		<label for="usn">账号：</label>\
		<input type="text" id="UserName" size="27" onblur="checkUserName();" onkeydown="javascript: if(event.keyCode == 13) document.getElementById(\'loginButton\').click();" class="logininput" />\
	   <br> <span class="hint" id="UserName_info">请输入海都招聘网通行证</span> </p>\
	  <p>\
		<label for="psw">密码：</label>\
		<input type="password" id="UserPwd" size="27" onblur="checkPasswords();" onkeydown="javascript: if(event.keyCode == 13) document.getElementById(\'loginButton\').click();" class="logininput"/>\
		<br><span class="hint" id="password_info"></span> </p>\
	  <p class="displayNone" id="showcooksave">\
	  <label for="save">保存</label>\
		<input type="checkbox" id="save" value="1"/>\
		<span class="hint">保存登录状态，下次直接登录。</span>\
	  </p>\
	  <p style="text-align:left; padding-left:50px;">\
		<input name="bntok" type="button" id="loginButton" value="登 录" class="btn69" onclick="javascript: login(\'LockDiv\');$(this).blur();"/>\
		<a href="/login.shtml?act=getvcod" target="_blank">补发认证码</a>&nbsp;&nbsp;&nbsp;\
		<a href="/login.shtml?act=findpwd" target="_blank">找回密码" </a>\
	  </p>\
	  <p class="fontLarge fontBold">您还没有海都招聘账号？</p>\
	  <p class="textAlignCenter" style="width:100%;"> <a href="/Reg/UserReg.shtml" target="_blank">注册成为海都招聘个人会员</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/Reg/BUserReg.shtml" target="_blank">注册成为海都招聘企业会员</a> </p>\
	</div>');
	$('#out_Foot').hide();
	}
//登录页面特订//
function checkUserName(){var input = $("#UserName").val();if (input==null || jQuery.trim(input)==""){$("#UserName_info").attr("class","hint warning");$("#UserName_info").html(failpic+"&nbsp;&nbsp;用户名不能为空");return false;}if(input.indexOf("@")!=-1){$("#showcooksave").show();if (input.length > 4 && input.match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/)){$("#UserName_info").html("");return true;}else{$("#showcooksave").hide();$("#UserName_info").attr("class","hint warning");$("#UserName_info").html(failpic+"&nbsp;&nbsp;您输入的用户名格式不符号！如果您是个人员员请输入您的E-MAIL；如果您是企业会员请输正常用户名（非邮箱）。");}}else if(input.length >=8&& input.match(/^(913)|(2010)+([0-9]{4,7})+$/)){$("#UserName_info").html("");return true;}else{$("#showcooksave").hide();if(jQuery.trim(input).length <4 || jQuery.trim(input).length >20){$("#UserName_info").attr("class","hint warning");$("#UserName_info").html(failpic+"&nbsp;&nbsp;对不起,您的企业会员号格式不正确");return false;}else{$("#UserName_info").attr("class","hint ok");$("#UserName_info").html("");return true;}}}function getUserType(){var tempstr="0";var input = $("#UserName").val();if (input==null || jQuery.trim(input)==""){$("#UserName_info").attr("class","hint warning");$("#UserName_info").html(failpic+"&nbsp;&nbsp;用户名不能为空");return false;}if (input.length > 4 && input.match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/)){$("#showcooksave").show();tempstr="2";}else if(input.length >=8&& input.match(/^(913)|(2010)+([0-9]{4,7})+$/)){tempstr="4";}else{$("#save").hide();tempstr="3";}return tempstr;}function checkPasswords(){var input1 = $('#UserPwd');if (input1.val().length < 6 || input1.val().length > 16){$("#password_info").attr("class","hint warning");$("#password_info").html(failpic+"&nbsp;&nbsp;密码请使用6-16个字符");return false;}$("#password_info").html("");return true;}
//end//

//浮动层结束

// 获取积分提示文字
// 8.27 lanlan
// score:积分,type:1[增加] 0[减少] 默认为1
function getScoreTip(score, type){
	if(score == "0" || isNaN(score)) return "";
	var scoreTip = "";
	type = type == null && 1;
	
	if(type) scoreTip = '获得<span style="color:green;font-weight:bold;"> '+score +' </span>积分';
	else scoreTip = '失去<span style="color:red;font-weight:bold;"> '+/\d+/.exec(score)+' </span>积分';
	return scoreTip;
}