6 var gbWithButton = false;
10 var gsClickImage = "";
12 var gsBgColor = "#c0c0c0";
15 var gbInputEnable = 0;
19 var goNormalFont=null;
24 function setBackground(sBgImage)
26 if (sBgImage != null && sBgImage.length > 0)
29 if (gsBgImage && gsBgImage .length > 0)
31 document.body.background = gsBgImage ;
35 function setBackgroundcolor(sBgColor)
37 if (sBgColor != null && sBgColor.length > 0)
40 if (gsBgColor&& gsBgColor.length > 0)
42 document.body.bgColor = gsBgColor;
46 function setBtnType(sType)
52 else if (sType == "text")
58 function setGoImage1(sImage1)
61 if (gsOutImage && gsOutImage.length > 0)
65 function setGoImage2(sImage2)
67 gsOverImage = sImage2;
68 if (gsOverImage && gsOverImage.length > 0)
72 function setGoImage3(sImage3)
74 gsClickImage = sImage3;
75 if (gsClickImage && gsClickImage.length > 0)
79 function setGoText(sText)
82 if (gsText.length > 0)
86 function setFont(sType, sFontName, sFontSize, sFontColor, sFontStyle, sFontWeight, sFontDecoration)
88 var vFont = new whFont(sFontName, sFontSize, sFontColor, sFontStyle, sFontWeight, sFontDecoration);
92 var vFont1 = new whFont(sFontName, sFontSize, "black", sFontStyle, sFontWeight, sFontDecoration);
95 else if (sType == "Normal")
97 else if (sType == "Hover")
101 function writeFormStyle()
103 var sStyle = "<style type='text/css'>";
104 sStyle += "p.title {" + getFontStyle(goTitleFont) + "margin-top:0;margin-bottom:0}\n";
105 sStyle += ".inputfield {" + getFontStyle(goInputFont) +"width:100%; }\n";
106 sStyle+="A:link {"+getFontStyle(goNormalFont)+"}\n";
107 sStyle+="A:visited {"+getFontStyle(goNormalFont)+"}\n";
108 sStyle +="A:hover {"+getFontStyle(goHoverFont)+"}\n";
109 sStyle+=".clsFormBackground{\n";
111 sStyle+="border-top:"+gsBgColor+" 1px solid;}\n";
113 sStyle+="border-top:black 1px solid;}\n";
115 sStyle += "</style>";
116 document.write(sStyle);
119 function lookupKeyDown()
125 if (event.keyCode == 13) //Enter key
139 if (!window.Array) return;
140 document.onkeyup = lookupKeyDown;
143 function inputSubmit()
145 if ((gbInputEnable && !gbIE4)|| gbInImage)
149 function inputEnable(bEnable)
151 gbInputEnable = bEnable;
154 function inImage(bImage)
159 function getFormHTML()
162 sForm += "<table class=\"clsFormBackground\" width=\"100%\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\">";
163 sForm += "<form name=\"" + gstrFormName + "\" method=\"POST\" action=\"javascript:inputSubmit()\" style=\"width:100%\">";
166 sForm += "<p class=title><nobr>" + gsTitle + "</nobr><br><table width=\"100%\"><tr valign=\"middle\"><td width=\"100%\"><input class=\"inputfield\" type=\"text\" name=\"keywordField\" onfocus=\"inputEnable(1);\" onblur=\"inputEnable(0);\"></td>";
167 if (gbWithButton && gnType >= 0)
169 sForm += "<td><a title=\"submit button\" href=\"javascript:void(0);\" onclick=\"" + gstrFormName + ".submit(); return false;\" onfocus=\"inImage(1);\" onblur=\"inImage(0);\" onmouseup=\"onMouseUp();\" onmousedown=\"onMouseDown();\" onmouseover=\"onMouseOver();\" onmouseout=\"onMouseOut();\">"
174 sForm += "<img alt=\""+gsText+"\" id=\"go\" border=\"0\" src=\"" + gsOutImage + "\">";
178 sForm += "</a></td>";
180 sForm += "</tr></table></p></td></tr></form></table>";
184 function onMouseOver()
186 if (getElement("go") && gsOverImage)
187 getElement("go").src = gsOverImage;
190 function onMouseDown()
192 if (getElement("go") && gsClickImage)
193 getElement("go").src = gsClickImage;
198 if (getElement("go") && gsOutImage)
199 getElement("go").src = gsOutImage;
202 function onMouseOut()
204 if (getElement("go") && gsOutImage)
205 getElement("go").src = gsOutImage;
208 if (window.gbWhUtil&&window.gbWhVer&&window.gbWhProxy&&window.gbWhMsg)
210 goTitleFont=new whFont("Arial", "9pt", "#000000", "normal", "normal", "none");
211 goNormalFont=new whFont("Arial", "9pt", "#000000", "normal", "normal", "none");
212 goHoverFont=new whFont("Arial", "9pt", "#000000", "normal", "normal", "underline");
216 document.location.reload();