var dialogW = 474;
var dialogH = 145;
//Ó¦Æ¸Ö°Î»
function applyJobs(comId,posId)
{
	var url="/Public/Common.asp?url=PersonAddToReceive&comId="+comId+"&posId="+posId;
	showApplyDialog(url,dialogW,dialogH,false);
    //window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
}

//Ó¦Æ¸Ñ¡ÖÐËùÓÐÖ°Î»
function applyAllJobs()
{
    
	var m=document.queryForm;
	var comId = "";
	var posId = "";
    if(isCheck(m.selID))
	{
        var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			comId += ","+comIDs[0];
			posId += ","+comIDs[1];
		}
		var url="/Public/Common.asp?url=PersonAddToReceive&comId="+comId.substring(1)+"&posId="+posId.substring(1);
		showApplyDialog(url,dialogW,dialogH,false);
	    //window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
	}
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡",null,false);
	}
}


//¸øÆóÒµÁôÑÔ
function msgToCom(comId,posId)
{
   var url="/Public/Common.asp?url=EmailExchangesEvent&opt=personaddByPosView&comId="+comId+"&posId="+posId;
	showApplyDialog(url,500,440,false);
}

//ÍøÓÑÌô´í
function feedBackComInfo(comId){
	var url = "/Public/Common.asp?url=PersonFeedBack&operate=FeedBackComInfo&comid="+comId;
	showApplyDialog(url,500,440,false);
}

//ÊÕ²ØÖ°Î»
function collectionJobs(comId,posId,frombh)
{
	var url="/Public/Common.asp?url=PersonAddToFavouriate&comId="+comId+"&posId="+posId+"&frombh="+frombh;
    showApplyDialog(url,dialogW,dialogH,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
}

//ÊÕ²ØÑ¡ÖÐËùÓÐÖ°Î»
function collectionAllJobs()
{
	var m=document.queryForm;
	var comId = "";
	var posId = "";
	var frombh = "";
    if(isCheck(m.selID))
	{
        var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			comId += ","+comIDs[0];
			posId += ","+comIDs[1];
			frombh += ","+comIDs[2];
		}
		var url="/Public/Common.asp?url=PersonAddToFavouriate&comId="+comId.substring(1)+"&posId="+posId.substring(1)+"&frombh="+frombh.substring(1);
        showApplyDialog(url,dialogW,dialogH,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
    }
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»!");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡",null,false);
	}
}

//°ÑÖ°Î»ÍÆ¼ö¸øºÃÓÑ
function commendToFriend(comId,posId,flag)
{
    
    url = "/Public/Common.asp?comId="+comId+"&posId="+posId;
    showApplyDialog(url,474,312,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=600,resizable=yes,status=yes,scrollbars=yes");
}

//°ÑÑ¡ÖÐËùÓÐÖ°Î»ÍÆ¼ö¸øºÃÓÑ
function commendAllToFriend()
{
	var m=document.queryForm;
	var comId = "";
	var posId = "";
    if(isCheck(m.selID))
	{
        var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			comId += ","+comIDs[0];
			posId += ","+comIDs[1];
		}
		var url="/Public/Common.asp?comId="+comId.substring(1)+"&posId="+posId.substring(1);
        showApplyDialog(url,474,312,false);
    }
	else
	{
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡",null,false);
	}
}


//²é¿´Ñ¡ÔñµÄËùÓÐÖ°Î»
function LookAllPosition()
{
	var m=document.queryForm;
	var posId = "";
    if(isCheck(m.selID))
	{
		var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			posId += ","+comIDs[1];
		}
       // var url="/Browse.asp?url=LookSelPosition&flag=all";
		var url="/Job/Browse/"
		m.Posid.value=posId.substring(1);
		m.target="_blank";
		m.action = url;		
		m.submit();
		m.target="_self";
		m.action="";
	}
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»!");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡",null,false);
	}
}
//°ÑÎÄÕÂÍÆ¼ö¸øºÃÓÑ
function commendArtileToFriend(title,id)
{
    var url="/Public/Common.asp?url=RecommendMagazine&title="+title+"&id="+id;
    showApplyDialog(url,474,312,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=600,resizable=yes,status=yes,scrollbars=yes");
}

//ÔÄ¶ÁÃæÊÔÍ¨Öª
function MsgFromComRead(Posid)
{
	var url = "/Public/Common.asp?url=ShowInviteMsg&Posid="+Posid;
	showApplyDialog(url,474,600,false);

}


//ÐÞ¸Ä¸öÈËÕÊºÅ
function updateUserName()
{
    var url="/process/person/updateUserName.jsp?1=1";
    //showApplyDialog(url,400,250,true);
	window.open (url,"companysend","left=80,top=80,width=400,height=250,resizable=yes,status=yes,scrollbars=yes");
}

//ÐÞ¸Ä¸öÈËÃÜÂë
function updatePassword()
{
    var url="/process/person/updatePassword.jsp?1=1";
    //showApplyDialog(url,400,250,true);
	window.open (url,"companysend","left=80,top=80,width=400,height=250,resizable=yes,status=yes,scrollbars=yes");
}

//É¾³ýÑ¡ÔñµÄËùÓÐÖ°Î»
function DeletePosidAll() {
	var m=document.queryForm;
	var posId = "";
	if(isCheck(m.selID))
	{
		if (confirm('È·ÈÏÉ¾³ýÑ¡ÔñµÄ¼ÇÂ¼£¿'))
		{
		
		var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			posId += ","+comIDs[1];
		}
		//var url="Job_Invite.asp";
		m.Posid.value=posId.substring(1);
		m.EVENTTARGET.value = "PosId:Delete";
		m.target="_self";
		//m.action = url;	
		m.submit();
		m.target="_blank";
		m.action="";
		m.Posid.value="";
		m.EVENTTARGET.value = "";
		}
	}
	else
	{
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»£¡",null,false);
	}
}

//É¾³ýÑ¡ÔñµÄÖ°Î»
function DeletePosid(id) {
	var m=document.queryForm;
	var posId = "";
	if (confirm('È·ÈÏÉ¾³ý±¾Ìõ¼ÇÂ¼£¿'))
	{
		//var url="Job_Invite.asp";
		m.Posid.value=id;
		m.EVENTTARGET.value = "PosId:Delete";
		m.target="_self";
		//m.action = url;	
		m.submit();
		m.target="_blank";
		m.action="";
		m.Posid.value="";
		m.EVENTTARGET.value = "";
	}
}

//É¾³ýÑ¡ÔñµÄËùÓÐÈË²ÅÊÕ²Ø
function DeletePerIdAll() {
	var m=document.queryForm;
	var posId = "";
	if(isCheck(m.selID))
	{
		if (confirm('È·ÈÏÉ¾³ýÑ¡ÔñµÄ¼ÇÂ¼£¿'))
		{
		
		var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			posId += ","+comIDs[1];
		}
		//var url="Job_Invite.asp";
		m.Posid.value=posId.substring(1);
		m.EVENTTARGET.value = "PerId:Delete";
		m.target="_self";
		//m.action = url;	
		m.submit();
		m.target="_blank";
		m.action="";
		m.Posid.value="";
		m.EVENTTARGET.value = "";
		}
	}
	else
	{
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»Ìõ¼ÇÂ¼£¡",null,false);
	}
}

//É¾³ýÓ¦Æ¸¼òÀú
function DeleteReusmeAccept(posId,perId)
{
	var m=document.queryForm;
	if (confirm('È·ÈÏÉ¾³ý±¾Ìõ¼ÇÂ¼£¿'))
	{
		m.Posid.value=posId;
		m.Perid.value=perId;
		m.EVENTTARGET.value = "PerId:Delete";
		m.target="_self";
		m.submit();
		m.target="_blank";
		m.action="";
		m.Posid.value="";
		m.Perid.value=""
		m.EVENTTARGET.value = "";
	}
}

//É¾³ýÑ¡ÔñµÄËùÓÐÓ¦Æ¸¼òÀú
function DeleteAllReusmeAccept()
{
	var m=document.queryForm;
	var posId = "";
	var perId = "";
    if(isCheck(m.selID))
	{
		if (confirm('È·ÈÏÉ¾³ýÑ¡ÔñµÄ¼ÇÂ¼£¿'))
		{
		
		var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			posId += ","+comIDs[0];
			perId += ","+comIDs[1];
			}
		//var url="Job_Invite.asp";
		m.Posid.value=posId.substring(1);
		m.Perid.value=perId.substring(1);
		m.EVENTTARGET.value = "PerId:Delete";
		m.target="_self";
		//m.action = url;	
		m.submit();
		m.target="_blank";
		m.action="";
		m.Posid.value="";
		m.Perid.value=""
		m.EVENTTARGET.value = "";
		}
	}
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»Ìõ¼ÇÂ¼!");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»Ìõ¼ÇÂ¼£¡",null,false);
	}
}

//ÑûÇëÃæÊÔ
function InvitePerson(posId,perId)
{
	var url="/Enterprise/Comm.asp?url=InvitePerson&posId="+posId+"&perId="+perId;
	showApplyDialog(url,dialogW,dialogH,false);
    //window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
}

//ÑûÇëÑ¡ÔñµÄËùÓÐÈËÔ±ÃæÊÔ
function InviteAllPerson()
{
	var m=document.queryForm;
	var posId = "";
	var perId = "";
    if(isCheck(m.selID))
	{
		var ids = getCheckboxValue(m.selID);
		var allId = ids.split(",");
		for(var i=0;i<allId.length;i++){
			var comIDs = allId[i].split(":");
			posId += ","+comIDs[0];
			perId += ","+comIDs[1];
		}
	var url="/Enterprise/Comm.asp?url=InviteAllPerson&posId="+posId.substring(1)+"&perId="+perId.substring(1);
        showApplyDialog(url,dialogW,dialogH,false);
	}
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»Ìõ¼ÇÂ¼!");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»Ìõ¼ÇÂ¼£¡",null,false);
	}
}

//ÊÕ²ØÈË²Å
function collectionPerson(perId)
{
	var url="/Enterprise/Comm.asp?url=PersonAddToFavouriate&perId="+perId;
    showApplyDialog(url,dialogW,dialogH,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
}

//ÊÕ²ØÑ¡ÖÐËùÓÐÈË²Å
function collectionAllPerson()
{
	var m=document.queryForm;
	var comId = "";
	var posId = "";
	var frombh = "";
    if(isCheck(m.selID))
	{
        var perId = getCheckboxValue(m.selID);
		var url="/Enterprise/Comm.asp?url=PersonAddToFavouriate&perId="+perId;
        showApplyDialog(url,dialogW,dialogH,false);
	//window.open (url,"companysend","left=80,top=80,width=600,height=480,resizable=yes,status=yes,scrollbars=yes");
    }
	else
	{
		//alert("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÖ°Î»!");
		showtzrcTipDialog("ÇëÖÁÉÙÑ¡ÖÐÒ»¸öÓ¦Æ¸Õß£¡",null,false);
	}
}




//Í¼Æ¬×Ô¶¯¸üÐÂ´óÐ¡
function CheckImg(ImgD) 
{ 
	var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>0 && image.height>0){
	   if(image.width>300){
			ImgD.width=300;
	   }else{ 
			ImgD.width=image.width;
	   }
	}
}

function openBigImg(img) 
{ 
	window.open(img.src);
}

//<img src="images/toplogo.gif" onload="javascript:DrawImage(this,100,100)">
function DrawImage(ImgD,iwidth,iheight){
    //²ÎÊý(Í¼Æ¬,ÔÊÐíµÄ¿í¶È,ÔÊÐíµÄ¸ß¶È)
    var image=new Image();
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= iwidth/iheight){
        if(image.width>iwidth){  
        ImgD.width=iwidth;
        ImgD.height=(image.height*iwidth)/image.width;
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"¡Á"+image.height;
        }
    else{
        if(image.height>iheight){  
        ImgD.height=iheight;
        ImgD.width=(image.width*iheight)/image.height;        
        }else{
        ImgD.width=image.width;  
        ImgD.height=image.height;
        }
        ImgD.alt=image.width+"¡Á"+image.height;
        }
    }
} 

/* ²ãµÄµ­Èëµ­³öÐ§¹û
var intDelay=50; //ÉèÖÃ²Ëµ¥ÏÔÊ¾ËÙ¶È£¬Ô½´óÔ½Âý£¬²»³¬¹ý100ÎªºÃ 
var intInterval=5; //Ã¿´Î¸ü¸ÄµÄÍ¸Ã÷¶È£¬×îºÃÐ¡ÓÚ10
function GradientShow() //ÊµÏÖµ­ÈëµÄº¯Êý 
{
	systemDialogApply.filters.alpha.opacity+=intInterval;
	if(systemDialogApply.filters.alpha.opacity<100)
	{
		setTimeout("GradientShow()",intDelay);
	}
}

function GradientClose() //ÊµÏÖµ­³öµÄº¯Êý 
{ 
	systemDialogApply.filters.alpha.opacity-=intInterval; 
	if (systemDialogApply.filters.alpha.opacity>0) { 
		setTimeout("GradientClose()",intDelay); 
	} 
	else { 
		systemDialogApply.style.visibility="hidden"; //µ±¿´²»µ½²Ëµ¥²ãºó»¹ÐèÒª°ÑÕâ¸ö²ãÒþ²ØÆðÀ´ 
	} 
}
*/

//¸ÄÓÃ²ã·½Ê½
var layerContents = "";
	layerContents +="<div id=\"screenFrontDivApply\" style=\"position:absolute;visibility:hidden;width:100%;height:100%;background: #efefef;filter:alpha(opacity=50);opacity:0.50\"></div>";
	layerContents +="<div id='systemDialogApply'  style=\"position:absolute;visibility:hidden;\"><iframe scrolling=\"no\" width=\"474\" frameborder=\"0\" name=\"dialogframeApply\" src=\"\" id=\"dialogframeApply\"></iframe></div>";

document.write(layerContents);

function getObjs(objname){
	var obj;
	if (document.layers){
		obj = document.layers[objname];
    }
    else if (document.all){
		obj = document.all[objname];
    }
    else if (document.getElementById){
        obj = document.getElementById(objname);
    }
	return obj;
}

function showApplyDialog(url,w,h,needScreenDiv){
	url = url + "&winFlag=true&math="+Math.random();
	try{
		if(needScreenDiv==false){
			var disFrontObj = getObjs("screenFrontDivApply");
			disFrontObj.style.left=0;
			disFrontObj.style.top=0;
			disFrontObj.style.height=document.body.scrollHeight;
			disFrontObj.style.width=document.body.scrollWidth;
			disFrontObj.style.visibility="visible";
		}

		var disObj = getObjs("systemDialogApply");
		disObj.innerHTML = "";
		var x = document.body.scrollLeft;	
	    var y = document.body.scrollTop;
        
         //»ñÈ¡ÆÁÄ»¿í¶È
		 //availWidth = parseInt(window.screen.availWidth);
	     //availHeight = parseInt(window.screen.availHeight);

         //»ñÈ¡¿É¼ûÇøÓò ¿í¶È ¸ß¶È
		 availWidth = parseInt(document.body.clientWidth);
	     availHeight = parseInt(document.body.clientHeight);

		  y = y + availHeight/4;
	      x = (availWidth - w)/2;

		//disObj.style.left=x+"px";
		//disObj.style.top=y+"px";
		GetCenterXY_ForLayer(disObj);

		disObj.innerHTML = "<iframe scrolling=\"no\" onload=\"this.height=dialogframeApply.document.body.scrollHeight\"  width=\"474\" frameborder=\"0\" name=\"dialogframeApply\" src=\"\" id=\"dialogframeApply\"></iframe>";
		var frameObj = getObjs("dialogframeApply");
		frameObj.width=w;
		//frameObj.height=h;
		//frameObj.height = window.frames["dialogframeApply"].document.body.scrollHeight+"px";
		frameObj.src=url;
		disObj.style.visibility="visible";
		/*²ãµÄµ­Èëµ­³öÐ§¹û
		if(disObj.style.visibility=="visible") 
		{ 
			disObj.style.visibility="hidden"; 
		} 
		else{ 
			disObj.filters.alpha.opacity=0; 
			disObj.style.visibility="visible"; 
			GradientShow(); //µ­Èëµ­³ö
		}
		*/

		//dialogW = w;
        //dialogH = h;

	}catch(e){
		url = url + "&winFlag=false&math="+Math.random();
        window.open (url,"companysend","left=80,top=80,width="+w+",height="+h+",resizable=yes,status=yes,scrollbars=yes");
	}
}

//ÖØÉè²ãµÄ´óÐ¡ºÍÎ»ÖÃ
function applyDialogReSize()
{
   try{
		var disFrontObj = getObjs("screenFrontDivApply");
		disFrontObj.style.left=0;
		disFrontObj.style.top=0;
		disFrontObj.style.height=document.body.scrollHeight;
		disFrontObj.style.width=document.body.scrollWidth;

		var disObj = getObjs("systemDialogApply");
		var x = document.body.scrollLeft;
	    var y = document.body.scrollTop;
        
         //»ñÈ¡ÆÁÄ»¿í¶È
		 //availWidth = parseInt(window.screen.availWidth);
	     //availHeight = parseInt(window.screen.availHeight);

         //»ñÈ¡¿É¼ûÇøÓò ¿í¶È ¸ß¶È
		 availWidth = parseInt(document.body.clientWidth);
	     availHeight = parseInt(document.body.clientHeight);

		  y = y + (availHeight-dialogH)/2;
	      x = (availWidth - dialogW)/2;

		//disObj.style.left=x+"px";
		//disObj.style.top=y+"px";

		GetCenterXY_ForLayer(disObj);

	}catch(e){
	}
}

function openCtSecurity()
{
	var sUrl = "/process/magazine/error_07.html";
	window.open(sUrl,'Ì¨ÖÝÈË²Å','left=100,top=80,height=615,width=690,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no');
}

//½«Ðü¸¡²ãµÄÎ»ÖÃ¶¨Î»ÔÚbody¿É¼ûÇøÓòÖÐÑë
function GetCenterXY_ForLayer(objdiv){
	var objTop;
	var objLeft;
	if (document.documentElement  && document.documentElement.clientHeight)
	{ 
		var styleWidth=objdiv.style.width.substring(0,objdiv.style.width.length-2);
		var clientHeight=objdiv.clientHeight;
		styleWidth = 350;
		objLeft = parseInt(document.documentElement.scrollLeft+(document.documentElement.clientWidth - styleWidth)/2)+'px';
		var relTop=(document.documentElement.clientHeight-clientHeight)/2 > 0 ? (document.documentElement.clientHeight-clientHeight)/2:0;
		objTop = parseInt(document.documentElement.scrollTop+relTop)+'px';
	} 
	else if (document.body) 
	{ 
		var x = document.body.scrollLeft;	
	    var   y = document.body.scrollTop;
        //»ñÈ¡¿É¼ûÇøÓò ¿í¶È ¸ß¶È
		 availWidth = parseInt(document.body.clientWidth);
	     availHeight = parseInt(document.body.clientHeight);
	     tblWidth = 350;   
		 objTop = y + availHeight/4;
	     objLeft = (availWidth - tblWidth)/2;
	} 
	objdiv.style.top = objTop;
	objdiv.style.left = objLeft;
	return objdiv;
}
/**
 * ÅÐ¶ÏÒ»×écheckboxÊÇ·ñÓÐÑ¡ÖÐ(true:ÖÁÉÙÑ¡ÖÐÁËÒ»¸ö;false:Ò»¸ö¶¼Ã»ÓÐÑ¡ÖÐ)
 */
function isCheck(obj)
{
	var flag=false;
	if(obj!=null)
	{		
	        if(obj[0])
	        {
	            for(var i = 0; i < obj.length; i++)
	            {
	                if(obj[i].checked)	//Ö»ÒªÓÐÑ¡ÖÐÒ»¸ö¾Í·µ»Øtrue
	                {
	                    flag = true;
	                    break;
	                }
	            }
	        }
	        else 
	        {
	            if(obj.checked)
	            {
	                flag = true;
	            }
	        }
	}	
	return flag;
}

/**
 * ÅÐ¶ÏÒ»×écheckboxÖÐ,Ö»ÓÐÒ»¸ö±»Ñ¡ÖÐÊ±,´ËÊ±µÄÖµ
 */
function isCheckOneValue(obj)
{
	var flag="";
	if(obj!=null)
	{		
	        if(obj[0])
	        {
	            for(var i = 0; i < obj.length; i++)
	            {
	                if(obj[i].checked)	//Ö»ÒªÓÐÑ¡ÖÐÒ»¸ö¾Í·µ»Øtrue
	                {
	                    flag = obj[i].value;
	                    break;
	                }
	            }
	        }
	        else 
	        {
	            if(obj.checked)
	            {
					flag = obj.value;
	            }
	        }
	}	
	return flag;
}
/**·µ»ØÒ»×écheckboxÖÐÑ¡ÖÐµÄcheckbox¸öÊý*/
function chkNum(obj)
{
	var num=0;
	if(obj!=null)
	{
		if(obj[0])
		{
			for(var i = 0; i < obj.length; i++)
			{
				if(obj[i].checked)	
					num++;
			}
		}
		else 
		{
			if(obj.checked)
				num=1;
		}
	}	
	return num;
}

/**´íÎóÌáÊ¾**/
function comCode(msg)
{
	var value = "<table border='0' cellpadding='0' cellspacing='0'><tr><td valign='middle'><img src='/process/online/images/error_g_2.gif' border='0'></td><td valign='bottom'><font color='red'>"+msg+"</font></td></tr></table>"
	return value;
}
/**Çå³ýÌáÊ¾**/
function clearMsg(id)
{
	id.innerHTML="";
}
/**µÃµ½µ±Ç°checkboxÑ¡ÖÐµÄÖµ*/
function getCheckboxValue(objString){
	var rstring="";
	var obj = eval(objString);
	if(obj.length!=null){
		var rLen=obj.length;
		for(var i=0;i<rLen;i++)
		{
			if(obj[i].checked){
				rstring +=","+obj[i].value;
			}
		}	
	}else{
		if(obj.checked){
			rstring = ","+obj.value;
		}
	}

	if(rstring!=""){
		return rstring.substring(1);	
	}else{
		return rstring;
	}
}
/**
 * ·µ»ØÒ»×é »ò Ò»¸ö checkbox µÄ checked ÊôÐÔ Îª true µÄvalue£¬ÖÐ¼äÓÃ","·Ö¸ô
 */
function getCheckboxValues(obj){
    var s = "";
    if(obj != null){
        if(obj[0]){
            for(var i = 0; i < obj.length; i++){
                if(obj[i].checked){
                    s += obj[i].value +  ",";
                }
            }
        }else {
            if(obj.checked){
                s += obj.value + ",";
            }
        }
    }
    if(s != "") s = s.substring(0, s.length-1);
}