function GetObj(objName){
	if(document.getElementById){
		return eval('document.getElementById("' + objName + '")');
	}else{
		return eval('document.all.' + objName);
	}
}

function show_left(id)
{
	 for (i = 1; i<= 50; i++  )
    {
        if (id == i)
        {
		   
			GetObj("left_"+id).className="n_menu_on";
        }
        else
        {
			
			GetObj("left_"+i).className="n_menu_off";
        }
	}
	
}

function show_index(id)
{
	 for (i = 1; i<= 3; i++  )
    {
        if (id == i)
        {
		   GetObj("index"+id).className="ict_on";
			document.getElementById("index_"+id).style.display='block';
        }
        else
        {
			GetObj("index"+i).className="ict_off";
			document.getElementById("index_"+i).style.display='none';
        }
	}
	
}

function submitsave()
{  	
	
	if (document.frmAddUser.y_name.value=="")
	{
	   alert("Please enter a name！");
	   document.frmAddUser.y_name.focus();
	   return false;
	}
	if(document.frmAddUser.ye.value=="year")
	{
	  	alert("Select Year！");
	   document.frmAddUser.ye.focus();
	   return false;
	}
	if(document.frmAddUser.mt.value=="month")
	{
	  	alert("Please select the month！");
	   document.frmAddUser.mt.focus();
	   return false;
	}
	if(document.frmAddUser.dt.value=="day")
	{
	  	alert("Please select the day！");
	   document.frmAddUser.dt.focus();
	   return false;
	}
	/*if (document.frmAddUser.y_sfz.value=="")
	{
	   alert("Please enter the ID number！");
	   document.frmAddUser.y_sfz.focus();
	   return false;
	}*/
	if (document.frmAddUser.y_dh.value=="")
	{
	   alert("Please enter the phone！");
	   document.frmAddUser.y_dh.focus();
	   return false;
	}
	if (document.frmAddUser.txtyanzhengma.value=="")
	{
	   alert("Please enter the code！");
	   document.frmAddUser.txtyanzhengma.focus();
	   return false;
	}
  	   return true;   
}
  

function getAbsPoint(obj,id)      
{      
   var   x,y;      
   oRect   =   obj.getBoundingClientRect();      
   x=oRect.left ;     
   y=oRect.top ;

 for(i = 0; i<= 20; i++)
    {
        if (id == i)
        {
            document.getElementById("topchild_"+id).style.display='block';
            document.getElementById("topchild_"+id).style.left=x+"px";
            document.getElementById("topchild_"+id).style.top=132+"px";
        }else{
            document.getElementById("topchild_"+i).style.display='none';
        }
     }
} 

function getAbsPoint2(id)      
{      

 for(i = 0; i<= 20; i++)
    {
      document.getElementById("topchild_"+i).style.display='none';
     }
} 


function getAbsPoint3(id)      
{      
      document.getElementById("topchild_"+id).style.display='block';
} 
  
  function getKeywords()
{
    var getValue = document.getElementById("key");
     
    if(getValue.value==""||getValue.value=="Please enter a keyword!")
    {
        alert('Please enter a keyword!');
        return false;
    }
    else
    {
       window.parent.location.href="search.aspx?classid=38&key="+encodeURIComponent(getValue.value); 
	  
    }
}

function MM_jumpMenu(targ,selObj,restore){ 
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function show_liuyan(id)
{
	 for (i = 1; i<= 2; i++  )
    {
        if (id == i)
        {
		   
			document.getElementById("liuyan_"+id).style.display='block';
        }
        else
        {
			
			document.getElementById("liuyan_"+i).style.display='none';
        }
	}
	
}


