//-----------------------------
var oba;
var obb="";
function djxs(obj)
{
var obj;
oba = document.getElementById(obj);
if(obb!=""){
obb.style.color="#000000";
}
oba.style.color="#ff0000";
obb=oba;
}
//-------------------------
var ssid=new Array();
var ssname=new Array();
//-------------------------
var ss=new Array();//所有打开列表
ss.push("99");
function checkform(idd,who,lb,ur)
{
var obj = document.getElementById(who);
if(ss.join("-").indexOf(who)==-1)//未在列表中
{
ss.push(who);//增加进列表 
obj.style.display="";
//-------------------------
obj.innerHTML="";
var URL="get22.aspx?menu=js&id="+idd+"&lb="+lb;
if (window.ActiveXObject) {	var x = new ActiveXObject("Microsoft.XMLHTTP");}else if (window.XMLHttpRequest) {var x = new XMLHttpRequest();}var FormName=false;var ID = obj;x.open("POST",URL);x.setRequestHeader("REFERER", location.href);
x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");x.onreadystatechange = function(){if(x.readyState == 4 && x.status == 200 && ID){	
var stt=x.responseText;var b=stt.indexOf("<wwww>");var c=stt.indexOf("</wwww>");var oooo=stt.substring(b+6,c);
ID.innerHTML=oooo;
}
}
var encodedData="";
x.send(encodedData);
}
//-------------------------
else
{
arrayRemove(who,ss);
obj.style.display="none";
}
try{
parent.document.yb.location=ur+idd;
//parent.document.yb.location="mwj.aspx?lb="+idd;
 }catch(exp){}
//document.getElementById('g1').innerHTML=ss;
}
//function dq(){var hh = document.getElementById('lb');hh.style.left=(document.body.scrollWidth-776)/2+380;hh.style.display='';}
function arrayRemove(ys,array)
{
//检测要删除的元素(删除元素值为：7name)
 for(var i=0; i<array.length; i++)
 {
  if(array[i] == ys)
  {
   array = removeElement(i,array);//删除方法
   i=array.length;//只删同名第一个。
  }
 }
// for(var i=0; i<array.length; i++)
//{
 //alert(array[i]);
//}
}

function removeElement(index,array)
{
 if(index>=0&&index<array.length)
 {
  for(var i=index; i<array.length; i++)
  {
   array[i] = array[i+1];
  }
  array.length = array.length-1;
 }
 return array;
}
//================================
function qk()
{
 var b1=ssid.join("`").split("`");
 
 for(var cc=0;cc<b1.length;cc++){
 try{
 window.frames['hr'].document.getElementById('div'+b1[cc]).style.background=''; 
 }catch(exp){}
 }
 
 removeElement2(ssid);
 removeElement2(ssname); 
 
 document.getElementById('g1').innerHTML=ssid;
 document.getElementById('g2').innerHTML=ssname;
}
//----------------------
function removeElement2(array)
{
  array[0] ="";
  array.length =0;
  return array;
}
//----------------------
function qx()
{
 removeElement2(ssid);
 removeElement2(ssname); 
 
 var b1=window.frames['hr'].a1.split("`");
 var b2=window.frames['hr'].a2.split("`"); 
 
 for(var cc=0;cc<b1.length;cc++){
 ssid.push(b1[cc]);
 ssname.push(b2[cc]); 
 try{
 window.frames['hr'].document.getElementById('div'+b1[cc]).style.background='#6BAaaa'; 
 }catch(exp){}
 }
 
document.getElementById('g1').innerHTML=ssid;
document.getElementById('g2').innerHTML=ssname.join("<br>");

}
