function g(o){return document.getElementById(o);} 
function changebg(obg){
    obg.className = "new_text_2";
}
function changebg2(obg){
    obg.className = "new_text_1";
}
function changeimg (obj,path) {
	//obj.src = path;
	var h=116;
	var w=174;
	if(obj.style.height>h || obj.style.height<h) 
		obj.style.height = h;
    if(obj.style.width>w || obj.style.width<w) 
	    obj.style.width = w;
	
	//alert(path);
}
function resizeImg(oImg,maxW,maxH,path)
{
 var image=new Image();
 image.src=oImg.src; 
 if(image.width>0 && image.height>0)
 { 
  if(image.width/image.height>= maxW/maxH)
  { 
   if(image.width>maxW)
   {  
    oImg.width=maxW; 
    oImg.height=(image.height*maxW)/image.width; 
    //ImgD.style.display="block";
   }
   else
   {
    oImg.width=image.width;  
    oImg.height=image.height; 
    //ImgD.style.display="block";
   } 
  }
  else
  {
   if(image.height>maxH)
   {  
    oImg.height=maxH; 
    oImg.width=(image.width*maxH)/image.height; 
    //ImgD.style.display="block"; 
   }
   else
   { 
    oImg.width=image.width;  
    oImg.height=image.height; 
    //ImgD.style.display="block";
   } 
  } 
 } 
}
function resizeImg2(oImg,maxW,maxH,path)
{
 var image=new Image();
 image.src=path;
 image.onload = function() {   
  oImg.src=image.src;
  //alert("123"); 
 if(image.width>0 && image.height>0)
 { 
  if(image.width/image.height>= maxW/maxH)
  { 
   if(image.width>maxW)
   {  
    oImg.width=maxW; 
    oImg.height=(image.height*maxW)/image.width; 
    //ImgD.style.display="block";
   }
   else
   {
    oImg.width=image.width;  
    oImg.height=image.height; 
    //ImgD.style.display="block";
   } 
  }
  else
  {
   if(image.height>maxH)
   {  
    oImg.height=maxH; 
    oImg.width=(image.width*maxH)/image.height; 
    //ImgD.style.display="block"; 
   }
   else
   { 
    oImg.width=image.width;  
    oImg.height=image.height; 
    //ImgD.style.display="block";
   } 
  } 
 }
 } 
}
function locking(){
document.getElementsByTagName("*") .ly.style.display="block";
document.getElementsByTagName("*") .ly.style.width=document.body.clientWidth;
document.getElementsByTagName("*") .loads.style.display='block';
document.getElementsByTagName("*") .loads.style.top="500px";
//document.getElementsByTagName("*") .loads.style.left="300px;";
}
function unlocking(){
document.getElementsByTagName("*") .ly.style.display="none";
document.getElementsByTagName("*") .loads.style.display='none';
}
function go(formname)
{
 var url;
// formname.method = "get";
 var kw=formname.word.value+" site:slecgroup.com.cn";
  //formname.q.value =kw; 
  //formname.word.value = "";
  url="http://www.google.com/search?hl=zh-CN&q="+encodeURI(kw);
  window.open(url);
  return false;

}