document.writeln("<SCRIPT language=javascript>function checkForm(fm)");
document.writeln("{  ");
document.writeln("if(fm.keyword.value==\'\'){");
document.writeln("        alert(\"请填写要搜索的关键词!\");");
document.writeln("		fm.keyword.focus();");
document.writeln("		return false;");
document.writeln("}if(fm.type.value==\"baidu\"){");
document.writeln(" location.replace(\"\/plus\/search.php?keyword=\"+fm.keyword.value);");
document.writeln(" return false;");
document.writeln("}else if(fm.type.value==\"keygen\"){");
document.writeln(" location.replace(\"http:\/\/www.baidu.com\/s?wd=\"+fm.keyword.value);");
document.writeln(" return false;");
document.writeln("}");
document.writeln("}\/\/图片自动按比例缩放!");
document.writeln("var flag=false;");
document.writeln("function DrawImage(ImgD,iwidth,iheight){");
document.writeln("var image=new Image();");
document.writeln("\/\/var iwidth = 900; \/\/定义允许图片宽度");
document.writeln("\/\/var iheight = 1500; \/\/定义允许图片高度");
document.writeln("image.src=ImgD.src;");
document.writeln("if(image.width>0 && image.height>0){");
document.writeln("flag=true;");
document.writeln("if(image.width\/image.height>= iwidth\/iheight){");
document.writeln("if(image.width>iwidth){ ");
document.writeln("ImgD.width=iwidth;");
document.writeln("ImgD.height=(image.height*iwidth)\/image.width;");
document.writeln("}else{");
document.writeln("ImgD.width=image.width; ");
document.writeln("ImgD.height=image.height;");
document.writeln("}ImgD.alt=image.width+\"×\"+image.height;");
document.writeln("}");
document.writeln("else{");
document.writeln("if(image.height>iheight){ ");
document.writeln("ImgD.height=iheight;");
document.writeln("ImgD.width=(image.width*iheight)\/image.height; ");
document.writeln("}else{");
document.writeln("ImgD.width=image.width; ");
document.writeln("ImgD.height=image.height;");
document.writeln("}");
document.writeln("ImgD.alt=image.width+\"×\"+image.height;");
document.writeln("}");
document.writeln("}");
document.writeln("} <\/SCRIPT>");
document.writeln("");
