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=584;//设置图片宽度界限 
var MaxHeight=584;//设置图片高度界限 
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 picflash(imgurl,imglink,imgtext,f_width,f_height,t_height){

 var focus_width=f_width
 var focus_height=f_height
 var text_height=t_height
 var swf_height = focus_height+text_height
 
 var pics=imgurl
 var links=imglink
 var texts=imgtext
 
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="swf/AdvChange.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write('<embed src="swf/AdvChange.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');  document.write('</object>'); 
}

function showIndex(m,n,x) {
		if (m==1) {
			for (var i=1;i<=x;i++) {
				if (n==i) {
				  getObject("indexnav_"+i).className="current";
				  getObject("indexsub_"+i).style.display="";
				}
				else
				{ 
				  getObject("indexnav_"+i).className="";
				  getObject("indexsub_"+i).style.display="none";
				}
			}
		}
}

function getObject(objectId) {
    if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId);
    } else if (document.all && document.all(objectId)) {
	return document.all(objectId);
    } else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId];
    } else {
	return false;
    }
}

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;
} 