function clearsh(sh)
{
if(sh.value=="请输入搜索关键词！")
	sh.value="";
}
function redosh(sh)
{
if(sh.value=="")
	sh.value="请输入搜索关键词！";
}

function chkform(sh) 
{ 
if (sh.kw.value=="") 
{ 
alert("请输入搜索关键词！"); 
sh.kw.focus(); 
return false; 
} 
if (sh.kw.value=="请输入搜索关键词！") 
{ 
alert("请输入搜索关键词！"); 
sh.kw.focus(); 
return false; 
} 
return true;
} 

function SetImgAutoSize(img) 
{ 
//var img=document.all.img1;//获取图片 
var MaxWidth=580;//设置图片宽度界限 
var MaxHeight=580;//设置图片高度界限 
var HeightWidth=img.offsetHeight/img.offsetWidth;//设置高宽比 
var WidthHeight=img.offsetWidth/img.offsetHeight;//设置宽高比 
if(img.readyState!="complete"){
 return false;//确保图片完全加载
}

if(img.offsetWidth>MaxWidth){ 
img.width=MaxWidth; 
img.height=MaxWidth*HeightWidth; 
} 
if(img.offsetHeight>MaxHeight){ 
img.height=MaxHeight; 
img.width=MaxHeight*WidthHeight; 
} 
} 

function flash(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+ur+'">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">');
document.write('</embed>');
document.write('</object>');
}
