function showhidebottom(obj,obj1,obj3,obj4)
{//"bottom","switchPoint","cen","bot"
   if(document.all(obj1).innerText==6)
   {
      document.all(obj1).innerText=5;
      document.all(obj).style.display="none";
	  document.all(obj3).style.height="98%";
      document.all(obj4).style.height="0";
   }
   else
   {
      document.all(obj1).innerText=6;
      document.all(obj).style.display="";
	  document.all(obj3).style.height="92%";
      document.all(obj4).style.height="6%";
   }
}
//
function showhideleft(classes,obj1,obj2,obj3,obj4,obj5)
{//"show","left","menu","tt","r","center"
   if(classes=="show")
   {
	  document.all(obj5).style.width="100%";
	  document.all(obj2).style.width=0;
      document.all(obj1).style.width=0;
      document.all(obj3).style.display="none";
      document.all(obj4).style.display="";
   }
   if(classes=="hide")
   {
	  document.all(obj5).style.width="83%";
      document.all(obj4).style.display="none";
      document.all(obj3).style.display="";
	  document.all(obj2).style.width="100%";
      document.all(obj1).style.width="17%";
   }
}
//DataGrid '全选
function checkall(cid,length)
{
  if (cid.checked)
  {
  for (var i=3; i<=length+2; i++) 
  {document.all("DataGrid1__ctl"+i+"_Checkone",0).checked = true;}
  }
  else
  {
  for (var i=3; i<length+3; i++) 
  {document.all("DataGrid1__ctl"+i+"_Checkone",0).checked = false;}
  }
}

//无刷新的DropdownList联动效果
function show_sub_items(hidden_lable_id,small_id,big_id) 
{
var str = document.getElementById(hidden_lable_id).innerText;
document.all(small_id).length=0
arr=str.split(",");
a=arr.length
ar=new Array()
for (i=0;i<a;i++)
{
ar[i]=arr[i].split("-");
}
onecount=ar.length;
lid=document.all(big_id).value;  
document.getElementById(small_id).options.add(new Option("",""));      
for  (i=0;i<onecount;i++)  
{ 
if  (ar[i][0]  ==  lid) 
{
document.all(small_id).options.add(new Option(ar[i][2],  ar[i][1]));    
}    
}   
} 

//listbox添加子项
function add_sub_items(parent_item_id,sub_item_id,hidden_lable_id) 
{
if (document.all(parent_item_id).selectedIndex != -1) 
{

for (i=0;i<document.all(parent_item_id).options.length;i++)
{
if (document.all(parent_item_id).options[i].selected == true)
{

var the_same = false;
for (ii=0;ii<document.all(sub_item_id).options.length;ii++)
{
if (document.all(sub_item_id).options[ii].value == document.all(parent_item_id).options[i].value)
//if ((document.all(sub_item_id).options[ii].value == document.all(parent_item_id).options[i].value)||(document.all(sub_item_id).options[ii].text == document.all(parent_item_id).options[i].text))
{
the_same = true;
}
}
if (document.all(parent_item_id).options[i].text == "")
{
the_same = false;
}
if (the_same == false)
{
document.all(sub_item_id).options.add(new Option(document.all(parent_item_id).options[i].text,document.all(parent_item_id).options[i].value));
}
}
}

get_sub_items(hidden_lable_id,sub_item_id) 
}
}

//listbox移除子项
function remove_sub_items(sub_item_id,hidden_lable_id) 
{
if (document.all(sub_item_id).selectedIndex > 0)  
{
for (i=0;i<document.all(sub_item_id).options.length;i++)
{
if (document.all(sub_item_id).options[i].selected == true)
{
 document.all(sub_item_id).options.remove(i);
}
}
get_sub_items(hidden_lable_id,sub_item_id) 
}
}

//获取listbox子项的值
function get_sub_items(hidden_lable_id,sub_item_id) 
{
var a = document.all(sub_item_id).length
var b = ""
if (a != 0)
{
for (i=1;i<a;i++)
{
b += document.getElementById(sub_item_id).options(i).value + ",";  
}
document.all(hidden_lable_id).innerText = b;
} 
}

function SelectItem(selectobj,textbox)
{
textbox.value=document.all(selectobj).options[selectobj.selectedIndex].text;
} 

//显示某元素
function ShowItem(item_id)
{
document.all(item_id).style.visibility = "visible";
}

//显示隐藏主菜单
function ShowHideSubMenu(objid,countstr)
{
menu_id_array = menu_id.split(",");
a=menu_id_array.length
for (i=1;i<a;i++)
{
var menu_id_one = menu_id_array[i]
if(menu_id_one.substring(menu_id_one.length-1).valueOf()>=countstr)
{
document.all(menu_id_one).style.display = "none";
}
if(menu_id_one==objid)
{
document.all(objid).style.display = "block";
}
}
}
//27,468,29,30,31,32,33,34,35,36,37,120,90,287,617,119,38,41,288,42,44,45,46,47,49,50,121,123,122,124,125,43,126,48,51,54,55,145,130,150,146,147,149,127,72,73,74,16,12,8,9,517,10,137,133,139,140,138,141,142,143,289,7,144,155,291,156,157,158,159,160,161,162,154,167,17,18,19,176,169,170,171,173,172,174,175,166,294,23,183,22,20,21,24,25,293,180,186,184,185,187,188,189,190,179,181,182,194,193,195,196,197,198,199,205,209,208,213,214,210,215,211,219,222,218,84,221,226,225,227,228,230,231,232,233,234,87,39,134,52,98,99,229,580,258,259,249,250,260,261,251,252,262,263,253,254,264,265,255,256,266,257,302,236,168,238,239,301,83,447,499,500,449,531,532,450,533,534,535,536,537,538,448,274,275,336,272,337,338,296,299,298,297,303,307,308,

function zero(str,classes)
{
if(classes=="")
{
if(str=="0")
{
document.write("面议")
}
else
{
document.write(str)
}
}
}

function replace_str(str,str1,str2)
{
str=str.replace(/(&lt;)/g,"<");//这里正则表达式的写法有几种，比如：“/[<]/g”或者“/\</g”或者“/</g”都可以实现。
str=str.replace(/(&gt;)/g,">");//这里正则表达式的写法有几种，比如：“/[<]/g”或者“/\</g”或者“/</g”都可以实现。
str=str.replace(/(&amp;)/g,"&");//这里正则表达式的写法有几种，比如：“/[<]/g”或者“/\</g”或者“/</g”都可以实现。
//var aa=str.split(str1);
//var aaa=""
//for(i=0;i<aa.length;i++)
//{
//aaa+=aa[i]+str2
//}
return str;
}

function replace_br(str)
{
//replace_br=replace_str(str.toLowerCase(),"&lt;br&gt;","<BR>")
//replace_br=replace_str(replace_br,"&amp;nbsp;","&nbsp;")

//document.write(str)
document.write(replace_str(str,"",""))
}

function return_replace_br(str)
{
return_replace_br=replace_str(str.toLowerCase(),"&amp;","&")
//return_replace_br=replace_str(replace_br,"&amp;nbsp;","&nbsp;")
return_replace_br=return_replace_br.substring(0,return_replace_br.length)
return return_replace_br;
}
//<body onload='document.getElementById("TextBox1").value=opener.document.body.innerHTML'>'这句获取弹出源窗口的html源文件，并把它赋值给服务器端控件TextBox，以备调用
//<html>
//<head>
//<title>1</title>
//<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
//</head>
//<body>
//<form>
//<iframe id="a" width="300" height="600"></iframe><input type="radio" id="aaa" name="aaa" onclick='document.all("a").src="../person/p_info_content_root_for_job.aspx?p_resume_id=36004";'>
//<input type="radio" id="aaaa" name="aaa" onclick='document.all("a").src="../person/p_info_content_root_for_job.aspx?p_resume_id=36003";' VALUE="Radio1"> 
//<TEXTAREA id="aa" name="aa" style="WIDTH: 300px; HEIGHT: 600px"></TEXTAREA>
//<input type="submit" onclick='document.getElementById("aa").value=parent.frames("a").document.body.innerHTML;return false;'>
//</form>
//</body>
//</html>

function alert_window(id,message)
{
if(document.all(id).value=="")
{
alert(message+"不能为空！");
document.all(id).focus();
return false;
}
}
var currentpos,timer; //双击滚屏单击停止
function initialize() 
{ 
timer=setInterval("scrollwindow()",1);
} 
function sc(){
clearInterval(timer); 
}
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc();
} 
//document.onmousedown=sc
//document.ondblclick=initialize
