// JavaScript Document
function ConfirmDel()
{
   if(confirm("确定要删除吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;	 
}

function DLS(id) 
{ 
window.open("dls_show.asp?id="+id,"","height=420,width=470,left=300,top=100,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function jobaccept(id) 
{ 
window.open("jobaccept_show.asp?id="+id,"","height=600,width=470,left=300,top=100,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function announce(id) 
{ 
window.open("announce_show.asp?id="+id,"","height=340,width=470,left=300,top=100,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function setbgcolor(obj){
	var objChildCheck = document.all ? obj.children[0].children[0] : obj.childNodes[1].childNodes[1];
	if(objChildCheck.checked){
	obj.style.backgroundColor = '#E6E6E6';
	}	
	else{
	obj.style.backgroundColor = '';
	}
	return true;
}
function anyCheck(form,aa) { //多选了就提示-选择时就检察
var total = 0;
var max = document.getElementsByName("ID").length;

for (var idx = 0; idx < max; idx++) {
if (eval("form.ID[" + idx + "].checked") == true) {
    total += 1;
   }
}
if(aa=='xuanze') {
if (total>5){
alert("最多只能选择 5 项")
return false; }
	}
 return true;
} 

function anyCheck2(form,aa) {//少选了就提示-最快也只有当点击对比时检察
var total = 0;
var max = document.getElementsByName("ID").length;

for (var idx = 0; idx < max; idx++) {
if (eval("form.ID[" + idx + "].checked") == true) {
    total += 1;
   }
}
if (total==0){
alert("\请先选择要对比的信息！")
return false;
}

if(aa=='duibi') {
if (total==1){
alert("至少选择 2 项才能进行比较")
return false; }
}
 return true;
} 

function showfilter(obj2) {
	if (obj2.style.visibility == "visible") {
        obj2.style.visibility = "hidden";
    }
    else {
		obj2.filters[0].apply();
        obj2.style.visibility = "visible";
		obj2.filters[0].play();
    }   
}
 
function doClick(o,items,num){
	 o.className="current";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=num;i++){
	   id =items+i;
	   j = document.getElementById(id);
	   e = document.getElementById(items+"_con"+i);
	   if(id != o.id){
	   	 j.className="";
	   	 e.style.display = "none";
	   }else{
		e.style.display = "block";
	   }
	 }
	 }


function doClick_E(o){
	 o.className="current2";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=3;i++){
	   id ="E"+i;
	   j = document.getElementById(id);
	   e = document.getElementById("E_con"+i);
	   if(id != o.id){
	   	 j.className="";
	   	 e.style.display = "none";
	   }else{
		e.style.display = "block";
	   }
	 }
	 }

	function CheckUserForm()
	{
		if(document.UserLogin.username.value=="")
		{
			alert("请输入用户名！");
			document.UserLogin.username.focus();
			return false;
		}
		if(document.UserLogin.password.value == "")
		{
			alert("请输入密码！");
			document.UserLogin.password.focus();
			return false;
		}
		/*if(document.UserLogin.codestr.value == "")
		{
			alert("请输验证码！");
			document.UserLogin.codestr.focus();
			return false;
		}*/
	}
	
function fSetBg(obj){
	obj.style.backgroundColor = '#E6E6E6';
}
function fReBg(obj){
	var objChildCheck = document.all ? obj.children[0].children[0] : obj.childNodes[1].childNodes[1];
	if(objChildCheck.checked){
		return false;
	}
	obj.style.backgroundColor = '';
}

function PSetBg(obj){
	obj.style.backgroundColor = '#FFFFFF';
}
function PReBg(obj){
	
	obj.style.backgroundColor = '';
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
  }

function  pass(myform){   
      myform.action="?action=pass";   
      //myform.target="_blank";     //指向什么帧名，你自己定，我这是新开一页   
      //myform.submit();   
      } 
function  del(myform){   
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="?action=del";  
	else		
	return false;     
      }  
function  delzs(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=zs";  
	else		
	return false;     
      } 
function  deldl(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=dl";  
	else		
	return false;     
      } 
function  delbaojia(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=baojia";  
	else		
	return false;     
      }
function  delzh(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=zh";  
	else		
	return false;     
      } 

function  delzx(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=zx";  
	else		
	return false; 
	 }
function  deljob(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=job";  
	else		
	return false; 
	 }
function  dellicence(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=licence";  
	else		
	return false; 	    
      } 
function  delztliuyan(myform){ 
	if(confirm("确定要删除选中的信息吗？"))
    myform.action="del.asp?channel=ztliuyan";  
	else		
	return false;     
      } 
function  resizeWidth(obj,width,height) 
{ 
      var  w,h,B1,B2,retWidth; 
      w=obj.width; 
      h=obj.height; 
      B1=w/width; 
      B2=h/height; 
      if(w>width||h> height){ 
              if(B1>=B2){ 
                      retWidth=width; 
              }else{ 
                      retWidth=w/B2; 
              } 
      }else{ 
              retWidth=w; 
      } 
      return   retWidth; 
} 	  
