 
function $(id){	
//debugger;
	return document.getElementById(id);
}

//objId为A链接的ID前缀，objContId为显示层的ID前缀，Num为当前tab编号,TotalNum所有tab数量
function tabOver(objId,objContId,Num,TotalNum,classNameOn,classNameOff)
    { 
	    var tabNum = TotalNum;
	    //debugger;
	    for(var i=1;i<=tabNum;i++)
	    {
		    var tab = $(objId+i);
		    var tabCont = $(objContId+i);
		    if(i==Num)
		    {
			    tabCont.style.display='block';
			    tab.className = classNameOn;
		    }
		    else
		    {
			    tabCont.style.display='none';
			    tab.className = classNameOff;
		    }
	    }	
}

function DivShow(state,PopUpId)   
      { 
	//when flash hide the DIv,use (wmode="opaque") in  embed tag and use (<param name="wmode" value="transparent">) in object tag;
	//build by zhaohong@soufun.com 
        var   ShowDiv   =   document.getElementById(PopUpId); 
	var   IfrShim   =   document.getElementById("shimmer4"+PopUpId);
	if(!IfrShim){
		ShowDiv.style.display   =   "block";
		createShim(PopUpId); 
		ShowDiv.style.display   =   "none";
		IfrShim   =   document.getElementById("shimmer4"+PopUpId) 
	} 
	
        if(state)   
        {  
          ShowDiv.style.display   =   "block"; 
	  IfrShim.style.display   =   "block";
            
        }   
        else   
        {   
          ShowDiv.style.display   =   "none"; 
	  IfrShim.style.display   =   "none";    
        } 
      } 
 function createShim(PopUpId) { 
	  var ShowDiv   =   document.getElementById(PopUpId);   
	  var DivParent = ShowDiv.parentNode;
          var shimmer = document.createElement('iframe');   
          shimmer.id='shimmer4'+PopUpId;   
          shimmer.style.position='absolute';   
          shimmer.style.top=ShowDiv.offsetTop;   
          shimmer.style.left=ShowDiv.offsetLeft; 
          shimmer.style.width=ShowDiv.offsetWidth;   
          shimmer.style.height=ShowDiv.offsetHeight; 
	  shimmer.style.display='none';  
          shimmer.style.zIndex=ShowDiv.style.zIndex - 1;  
          shimmer.setAttribute('frameborder','0');   
          shimmer.setAttribute('src','javascript:void(0);');   
          DivParent.appendChild(shimmer);   
	} 