function picover(obj){
   obj.style.filter="";
}
function picout(obj){
   obj.style.filter="gray";
}


function findisok(obj){
   if(obj.keyword.value==""){
     alert("ÇëÊäÈëÒªËÑË÷µÄ¹Ø¼ü×Ö£¡");
     obj.keyword.focus();
	 return false;
   }
   return true;
}

function openpage(url,width,height){
    left=(screen.width-width)/2;
	top2=(screen.height-height)/2-30;
    window.open(url,"","scrollbars=no,left="+left+",top="+top2+",height="+height+",width="+width);
}


function swf(name,width,height,transparent){
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'>");
    document.write("<param name='movie' value='"+name+"'>");
    document.write("<param name='quality' value='high'>");
    document.write("<param name='menu' value='false'>");
    if(transparent==1) document.write("<param name='wmode' value='transparent'>");
    document.write("<embed src='"+name+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed>");
    document.write("</object>");
}


function guanggao(width,height,pic,links){
    var focus_width=width
	var focus_height=height
	var swf_height = focus_height
	var pics=pic
	var links=links
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+ focus_width +"' height='"+ swf_height +"'>");
	document.write("<param name='allowScriptAccess' value='sameDomain'><param name='movie' value='./images/playswf.swf'><param name=wmode value=transparent><param name='quality' value='high'>");
	document.write("<param name='menu' value='false'><param name='wmode' value='opaque'>");
	document.write("<param name='FlashVars' value='pics="+pics+"&links="+links+"&borderwidth="+focus_width+"&borderheight="+focus_height+"'>");
	document.write("<embed src='./images/playswf.swf' wmode='opaque' FlashVars='pics="+pics+"&links="+links+"&borderwidth="+focus_width+"&borderheight="+focus_height+"' menu='false' bgcolor='#DADADA' quality='high' width='"+ focus_width +"' height='"+ swf_height +"' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");	
}

function DrawImage(ImgD,w,h){
   xwidth=w;
   xheight=h;
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= xwidth/xheight){
     if(image.width>xwidth){  
     ImgD.width=xwidth;
     ImgD.height=(image.height*xwidth)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    else{
     if(image.height>xheight){  
     ImgD.height=xheight;
     ImgD.width=(image.width*xheight)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }

     }
    }
}


function switchMenu(curr_id, total_num) {
     for(var i=0; i<total_num; i++)
	 {
		  var el = document.getElementById('menu_sub_'+i);          
		  if(!el) return;
		  var subbg = document.getElementById('lmenubg_'+i);
		  var txt = document.getElementById('lmenutxt_'+i);
		  if(i == curr_id)         
		  {             
		     if(el.style.display =="block"){
			    //subbg.className="leftmenu1";
				el.style.display = "none";
				txt.className="leftmenua";
		     }
			 else{
				//subbg.className="leftmenu1a";
		        el.style.display = "block";
				txt.className="leftmenua2";
		     }
		  }
		  else{
		  //subbg.className="leftmenu1";
		  el.style.display = "none";
		  txt.className="leftmenua";
		  }
	 }
	 
}
