var iFldLength;
 if  (((navigator.appName.indexOf("Netscape") != -1) && (parseInt(navigator.appVersion)<5 )) || (navigator.appVersion.indexOf("Mac") != -1 )) {
                      iFldLength=14;}
              else {
			intFldLength=23;}

function Write_Search() {
		var sHTML;
              sHTML = "";
              sHTML = "<div id=\"SearchDiv\"><form action=\"#\" method=\"get\" name=\"searchfrm\">";
		sHTML = sHTML + "<table width=\"121\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
		sHTML = sHTML + "<tr align=\"left\" valign=\"top\"><td width=\"6\"><img src=\"images/pixclear.gif\" width=\"6\" height=\"5\" alt=\"\" border=\"0\"></td>";
		sHTML = sHTML + "<td width=\"110\"><img src=\"images/pixclear.gif\" width=\"110\" height=\"1\" alt=\"\" border=\"0\"></td><td width=\"5\"><img src=\"images/pixclear.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";
		sHTML = sHTML + "<tr align=\"left\" valign=\"top\"><td width=\"6\"><img src=\"images/pixclear.gif\" width=\"6\" height=\"1\" alt=\"\" border=\"0\"></td><td align=\"left\" valign=\"middle\"><input type=\"text\" name=\"SrchString\" size=\""+iFldLength+"\"></td>";
		sHTML = sHTML + "<td width=\"5\"><img src=\"images/pixclear.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";
		sHTML = sHTML + "<tr align=\"left\" valign=\"top\"><td width=\"6\"><img src=\"images/pixclear.gif\" width=\"6\" height=\"20\" alt=\"\" border=\"0\"></td><td align=\"right\" valign=\"bottom\" width=\"116\"><input type=\"image\" src=\"images/search_button_site.gif\" width=\"58\" height=\"15\" border=\"0\"></td>";
		sHTML = sHTML + "<td width=\"5\"><img src=\"images/pixclear.gif\" width=\"5\" height=\"1\" alt=\"\" border=\"0\"></td></tr>";
		sHTML = sHTML + "</table></form></div>";
		document.write(sHTML);
}

function ValidateForm(frmname) {
		// Check form fields for entered values
		if ((frmname.UName.value == "") || (frmname.Pword.value == "" )) {
			alert("Please enter both Username and Password");
			//return false;
			}
		else {
			// Uncomment this when hooking up form to login script
			// return true;
		      frmname.submit();
		}
		
}
