
var GO = function(elemId){
		if(document.getElementById){
			return document.getElementById(elemId);
		}else if(document.layers){
			document.layers[elemId];
		}else{
			return eval('document.all.' + elemId);
		}
	}
	//GO("wdivname_2").className='wdiv_n';
	
	//window.onload=csh;
	
	setTimeout('csh()',100);
	function csh()
	{
		//alert("tempstr")
		if(GO("showclass"))
		{
			var tempstr=GO("showclass").value;
			
			/*if(GO("d_"+tempstr))
			{
			GO("d_"+tempstr).style.background="url('img/an.jpg')";
			GO("d_"+tempstr+"_1").className='menu2';
			}*/
			
			if(GO("d_"+tempstr+"_1"))
			{
			//GO("d_"+tempstr).style.background="url('img/an.jpg')";
			GO("d_"+tempstr+"_1").style.color='red';
			}


		}
		
	}
	
	function wdivchange(obj)
	{
		
		if(GO("wdivname_1"))
		{
		  GO("wdivname_1").className='wdiv_n';
		  GO("wdivname_2").className='wdiv_n';
		  GO("d1").style.display='none';
		  GO("d2").style.display='none';
		}
		if(GO(obj))
		{
			GO(obj).className='wdiv';
			if(obj=='wdivname_1')
			 GO("d1").style.display='block';
			 else
			 GO("d2").style.display='block';
		}
		
	}
	
	function titlechange(obj)
	{
		for(var i=1;i<3;i++)
		{
		  if(!GO("wzx_"+i))break;
		  GO("wzx_"+i).src='/img/zx'+i+'_1.jpg';
		  GO("w_content_"+i).style.display='none';
		}
		if(GO("wzx_"+obj))
		{
			GO("wzx_"+obj).src='/img/zx'+obj+'.jpg';
			if(GO("w_content_"+obj))
			 GO("w_content_"+obj).style.display='block';
		}
	}
	
	function helpshow(obj)
	{ //alert(obj);
		if(GO(obj))
		{
		 if(GO(obj).style.display=='none')
		 GO(obj).style.display='block';
		 else
		 GO(obj).style.display='none';
		}
	}

 function showing(imgid,twidth,theight)
    {
     var mypic = new Image();
     mypic.src = imgid.src;
     var mywidth = mypic.width;
     var myheight = mypic.height;
     if(mywidth>=myheight)
     {
       if (mywidth >= twidth)
      {    
       imgid.style.width = twidth;
       imgid.style.height = Math.floor(myheight/(mywidth/twidth));
      }
     }
     else
     {
       if (myheight >= theight)
        {    
         imgid.style.height = theight;
         imgid.style.width = Math.floor(mywidth/(myheight/theight));
        }
      }
    
    }