﻿
function GetObj(objName)
{
    if(document.getElementById) 
     return eval('document.getElementById("'+objName+'")');
    else
    return eval('document.all.'+objName);
}
	
function ShowNav(num){ //导航条舌签功能
	for(var i = 1;i <= 12;i++){
		if(GetObj("N_Menu_" + i)){GetObj("N_Menu_" + i).className = '';}
		if(GetObj("N_Cont_" + i)){GetObj("N_Cont_" + i).style.display = 'none';}
	}
	if(GetObj("N_Menu_" + num)){GetObj("N_Menu_" + num).className = 'selected';}
	if(GetObj("N_Cont_" + num)){GetObj("N_Cont_" + num).style.display = 'block';}
	 
}

function OnMouseImgChange(id)
{
 
    GetObj("img_Top").src='Images/Home/Class/pho'+id+'.jpg';
   for(var i = 1;i <= 3;i++){
       if(id==i)
           GetObj("t_New"+i).background='Images/Home/t_On.gif';
       else
         GetObj("t_New"+i).background='Images/Home/t_Out.gif';

     if (GetObj("T_Cont_" + i)) {
         GetObj("T_Cont_" + i).style.display = 'none';
     };

     if (GetObj("T_Cont_" + i+"_"+1)) {
         GetObj("T_Cont_" + i + "_" + 1).style.display = 'none';
     };  
   }
   if (GetObj("T_Cont_" + id)) {
       GetObj("T_Cont_" + id).style.display = 'block';
   };

   if (GetObj("T_Cont_" + id+"_"+1)) {
       GetObj("T_Cont_" + id + "_" + 1).style.display = 'block';
   };
}

function OnDMouseImgChange(id)
{
  for(var i = 1;i <= 5;i++){
       if(id==i)
         GetObj("d_Class"+i).background='Images/Home/d_On.gif';
       else
         GetObj("d_Class"+i).background='Images/Home/d_Out.gif';
         
         if(GetObj("M_Cont_" + i)){GetObj("M_Cont_" + i).style.display = 'none'};
   }
   if(GetObj("M_Cont_" + id)){GetObj("M_Cont_" + id).style.display = 'block'};
}



function Search(a_id)
{
    var word=GetObj("txtSearch").value
    GetObj(a_id).href="/search.aspx?word="+escape(word);

}
 
