// JavaScript Document
function gotoUrl(Url)	
{
    window.location=Url;
}
	function showhide_obj(obj,icon)
{
obj=document.getElementById(obj);
icon=document.getElementById(icon);
 if (obj.style.display=="none") 
  { 
  
    //div_list = document.all.tags("div"); //指定文档中的对象为div,仅适用于IE;   
    div_list = document.getElementsByTagName("ul");
    for (i=0; i< div_list.length; i ++) {
     
      
      thisDiv = div_list[i];
     thisDiv.src = 'images/iconDrawerDown2.gif';
   if(thisDiv.id.indexOf("subTree_")!=-1)//当文档div中的id含有list时,与charAt类似;
   { 
   thisDiv.style.display="none";//循环吧所有<img src="http://www.51youcai.com/img/sqmendnode.gif"/><a href="http://www.51youcai.com/" target="mainFrame">菜单链接都隐藏起来
   thisDiv.src = 'images/iconDrawerDown2.gif';
   }
 }
    myfont=document.getElementsByTagName("a");
   for(i=0;i<myfont.length;i++)
    {
    thisfont = myfont[i];
    if(thisfont.id.indexOf("subCtrl_")!=-1 && icon.id!=icon)
    {   
     }
   }
    obj.style.display=""; //只显示当前链接
    obj.src = 'images/iconDrawerDown.gif'
}
 else
  {
   obj.style.display="none";
   obj.src = 'images/iconDrawerDown2.gif'
   }
 }
 
 function show_this(obj)
{
obj=document.getElementById(obj);
if (obj.id==obj.id) 
 {
 //alert(obj.id)
   //blinkicon=document.all.tags("font"); 
   blinkicon=document.getElementsByTagName("li");
   for(x=0;x<blinkicon.length;x++)
    {
    if( blinkicon[x].id.indexOf("select")!=-1 && obj.id!=obj )
      {
       //blinkicon[x].innerHTML=" ";
       blinkicon[x].className = 'hotLi';
      }
    }
 }
 else
 {
       obj.innerHTML=" ";
 }
}
var highlightObj;
function setHighLight(m)
{
    if(highlightObj!=null)
    {
        highlightObj.className = '';
    }
	m.className='hotLi';
	highlightObj=m;
}

function clickLabel(obj) {
	if(obj=='subCtrl_1'){
		if(document.all.subTree_1.style.display=='none'){
		  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_1.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';
	}else if(obj=='subCtrl_2'){
		if(document.all.subTree_2.style.display=='none'){
		  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_2.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_3'){
	  if(document.all.subTree_3.style.display=='none'){
		  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_3.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_4'){
	    if(document.all.subTree_4.style.display=='none'){
		  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_4.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_5'){
	  if(document.all.subTree_5.style.display=='none'){
		  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_5.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_7'){
	   if(document.all.subTree_7.style.display=='none'){
		  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_7.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_8'){
	    if(document.all.subTree_8.style.display=='none'){
		  document.all.treeIcon_8.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_8.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';

	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';   
	}else if(obj=='subCtrl_9'){
	    if(document.all.subTree_9.style.display=='none'){
		  document.all.treeIcon_9.src='images/iconDrawerDown2.gif';
		}else{
		document.all.treeIcon_9.src='images/iconDrawerDown.gif';
		}
	  document.all.treeIcon_1.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_2.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_3.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_4.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_5.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_7.src='images/iconDrawerDown2.gif';
	  document.all.treeIcon_8.src='images/iconDrawerDown2.gif'; 
	}
	
		
		
	
}


function pageinit()
{
var uls=document.getElementById("menus").getElementsByTagName("ul");
    for(var i=1;i<uls.length;i++ )
    {
        uls[i].style.display="none";
    }
    selectmenu(document.getElementById("A1"));
}

function selectmenu(obj)
{
var as=document.getElementsByTagName("a");
for(var i=0;i<as.length;i++)
{
    as[i].className="";
}
obj.className="hotLi";
}
function setcmenu(menustr)
{
var uls=document.getElementById("menus").getElementsByTagName("ul");
    for(var i=0;i<uls.length;i++ )
    {
        uls[i].style.display="none";
    }
    var menu=document.getElementById(menustr);
    if(menu.style.display!="none")
    {
        menu.style.display="none";
    }
    else{
        menu.style.display="";
    }
}

var Ptr=document.getElementById("tab").getElementsByTagName("tr");
function $() {
    for (i=1;i<Ptr.length+1;i++) { 
    Ptr[i-1].className = (i%2>0)?"t1":"t2"; 
    }
}
window.onload=$;
for(var i=0;i<Ptr.length;i++) {
    Ptr[i].onmouseover=function(){
    this.tmpClass=this.className;
    
    };
    Ptr[i].onmouseout=function(){
    this.className=this.tmpClass;
    };
}

function switchTab(tabpage, tabid){
var oItem = document.getElementById(tabpage);
for (var i = 0; i < oItem.children.length; i++) {
var x = oItem.children(i);
x.className = "";
var y = x.getElementsByTagName('a');
y[0].style.color = "";}
document.getElementById(tabid).className = "Selected";
var dvs = document.getElementById("cnt").getElementsByTagName("div");
for (var i = 0; i < dvs.length; i++) {
if (dvs[i].id == ('d' + tabid)) dvs[i].style.display = 'block';
else dvs[i].style.display = 'none';
}}
