function search(){
	if (frm1.keywords.value.length<3){
		alert("The key words for searching should be composed by three characters at least.");
		frm1.keywords.focus();
		return false;
	}
	frm1.submit()
}

function documenthead(urlpath){
document.write ("<form method=POST action='"+urlpath+"search.asp' name=frm1><table border=0 width=100% cellpadding=0 bgcolor=#AAC9F2 height=60 style='border-collapse: collapse'><tr><td bgcolor=#AAC9F2>&nbsp; &nbsp;<img border=0 src='"+urlpath+"../images/ptype/logo_wb.gif'></td>"+
"<td width=370 align=right><table border=0 width=100% bgcolor=#FFFFFF background='"+urlpath+"../images/bg/bluetow.gif'><tr><td align=right><p class=pmark><a href='"+urlpath+"default.asp' class=h2>Homepage</font></a> <img border=0 src='"+urlpath+"../images/navspacer.gif' align=middle> <a href='"+urlpath+"sitemap.asp' class=h2>Site Map</a> "+
" <img border=0 src='"+urlpath+"../images/navspacer.gif' align=middle> <a href='"+urlpath+"sign_in.asp' class=h2>Member Sign In</a></font></td><td rowspan=2 width=75 style='margin-top: 6; margin-bottom: 3'><p align=center><img border=0 src='"+urlpath+"../images/find_48.gif'></td></tr><tr>"+
"<td align=right style='margin-top: 6; margin-bottom: 3'><p><input type=text name=keywords size=30> <input type=button value='Search' onclick='search()'></p></td></tr></table></td></tr><tr><td height=2 colspan=2 bgcolor=#FFFFFF></td></tr>"+
"<tr><td height=26 bgcolor=#5D5D5D colspan=2 background='"+urlpath+"../images/bg/qau.gif' >&nbsp;<img border='0' src='"+urlpath+"../forum/images/DOT3.GIF'> <a href='"+urlpath+"showtopic.asp?act=news&Catalog=4' class=h1>News &amp; Events</a> <img border=0 src='"+urlpath+"../images/navspacer.gif'align=middle> <a href='"+urlpath+"products' class=h1>Products</a> <img border=0 src='"+urlpath+"../images/navspacer.gif'align=middle>"+
" <a href='"+urlpath+"showtopic.asp?act=news&Catalog=5' class=h1>Reviews</a> <img border=0 src='"+urlpath+"../images/navspacer.gif'align=middle> <a href='"+urlpath+"downloads/' class=h1>Downloads</a> <img border=0 src='"+urlpath+"../images/navspacer.gif'align=middle> <a class=h1 href='"+urlpath+"service/faq.asp'>Communication</a>&nbsp;<img border=0 src='"+urlpath+"../images/navspacer.gif'align=middle>"+
" <a href='"+urlpath+"service/' class=h1>Service Center</a></td></tr><tr><td height=3 bgcolor=#5D5D5D colspan=2 background='"+urlpath+"../images/bg/Bal3.gif'></td></tr></table></form>");
}

function rep(repid){
frm2.act.value="rep";
frm2.repid.value=repid;
frm2.submit();
}

function addreginfoeng(){
if (frm2.usname.value.length<2){
		alert("Please type your new account name.");
		frm2.usname.focus();
		return;	
	}
if (frm2.tname.value.length<2){
		alert("Please type your first name");
		frm2.tname.focus();
		return;	
	}
if (frm2.tname1.value.length<2){
		alert("Please type your last name");
		frm2.tname1.focus();
		return;	
	}
				
if (frm2.Upassword.value.length<6){
		alert("Please type your account password.");
		frm2.Upassword.focus();
		return;	
	}
if (frm2.Upassword.value!=frm2.Upassword1.value){
		alert("The password and the confirmation password do not match. Please type the same password in both boxes.");
		frm2.Upassword1.focus();
		return;	
	}
if (frm2.email.value.length<6){
		alert("Please type your e-mail address.");
		frm2.email.focus();
		return;	
	}
if (frm2.email1.value!=frm2.email.value){
		alert("The e-mail address and the confirmation e-maill address do not match. Please type the same e-mail address in both boxes.");
		frm2.email1.focus();
		return;	
	}
if (frm2.Country.value=="-1"){
		alert("Please select your location from the country/region list.");
		frm2.Country.focus();
		return;	
	}
if (frm2.acode0.value.length<4){
		alert("Please enter the 4 digit numerical code shown in the image. ");
		frm2.acode0.focus();
		return;	
	}
	
if (frm2.cfreg.checked==false){
		alert("If you do agree to the terms and conditions, please ensure you check the box before continuing.");
		frm2.cfreg.focus();
		return;	
	}
		
	frm2.act.value="adduser";
	frm2.submit();
}