function flashObject(file_name,width,height){
  if(file_name!=file_name.replace(".gif","")){
	  document.write('<img src="'+file_name+'" width="' + width + '" height="' + height + '" />')
    } else{
	  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
      document.write('<param name="movie" value="' + file_name + '">');
      document.write('<param name="quality" value="high">');
      document.write('<param name="wmode" value="transparent">');
      document.write('<embed src="' + file_name + '" width="' + width + '" height="' + height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
     document.write('</object>');
  
}
}


function addswf(file_name,width,height){
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="'+file_name+'" />');
  document.write('<param name="quality" value="high" />');
  document.write('<embed src="'+file_name+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
  document.write('</object>');
	}












}


function gettopmenu(obj){
var a=document.getElementById("topmenu").getElementsByTagName("a");;
for(var i=0;i<a.length;i++)
{
   a[i].className="menu1";

}

 obj.className="menu2";
	
}



////////////////////////////////////////////////////////////

function inputStyle(fEvent,oInput){
	if (!oInput.style) return;
	
	var put=oInput.getAttribute("type").toLowerCase();
   //alert(fEvent);
	switch (fEvent){
		case "focus" :
			oInput.isfocus = true;
			
		case "mouseover" :		
			if(put=="submit" || put=="button" || put=="reset")			
				oInput.className="button_over";
			else
				oInput.className = "TextBox_over";	
			break;
		case "blur" :
			oInput.isfocus = false;			
		case "mouseout" :
			if(put=="submit" || put=="button" || put=="reset")
				oInput.className = "button_out";
		    else if(!oInput.isfocus)
				oInput.className = "TextBox_out";
			break;
		//case else :
			//if(oInput.getAttribute(fEvent+"_2"))
				//eval(oInput.getAttribute(fEvent+"_2"));
	}	
}

window.onload = function(){
  //  alert("ok12");
	var oInput = document.getElementsByTagName("input");
	var onfocusStr = [];
	var onblurStr = [];
	// alert(oInput.length);
	try
	{
		for (var i=0; i<oInput.length; i++)
		{
			if (!oInput[i]||!oInput[i].getAttribute("type")) continue;
			var put=oInput[i].getAttribute("type").toLowerCase();
			if(put=="submit" || put=="button" || put=="reset")
			{
				oInput[i].className="button_out";
			}
			if (put=="text" || put=="password"){
				oInput[i].className="TextBox_out";
			}
			
			if (put=="text" || put=="password" || put=="submit" || put=="button" || put=="reset")
			{
				//alert(oInput[i].value);
				if (document.all)
				{
					oInput[i].attachEvent("onmouseover",oInput[i].onmouseover=function(){inputStyle("mouseover",this);});
					oInput[i].attachEvent("onmouseout",oInput[i].onmouseout=function(){inputStyle("mouseout",this);});
                      
				}
				else{
					oInput[i].addEventListener("onmouseover",oInput[i].onmouseover=function(){inputStyle("mouseover",this);},false);
					oInput[i].addEventListener("onmouseout",oInput[i].onmouseout=function(){inputStyle("mouseout",this);},false);				
					//获取焦点
					if(oInput[i].getAttribute("onfocus")){
						//oInput[i].addEventListener("onfocus",oInput[i].onblur=function(){eval(this.getAttribute("onfocus"));inputStyle("focus",this);},false);
					
					}else{
						//oInput[i].addEventListener("onfocus",oInput[i].onfocus=function(){inputStyle("focus",this);},false);
					  
					}
					//失去焦点
					if(oInput[i].getAttribute("onblur")){
					//	oInput[i].addEventListener("onblur",oInput[i].onblur=function(){eval(this.getAttribute("onblur"));inputStyle("blur",this);},false);
					}else{
						//oInput[i].addEventListener("onblur",oInput[i].onblur=function(){inputStyle("blur",this);},false);
					}
				}			
			}
		}
	}catch(e){}
	for(i=1;i<=8;i++)//控制面板
	{
		if(document.getElementById('con_two_'+i))
		{	
			document.getElementById('two'+i).className="hover";			
			break;
		}
	}
}


