function newWindow(x) {
   window2=window.open(x,"window2","width=810, height=650, scrollbars=yes, left=100, top=25")
}
function helpWindow(x) {
   window2=window.open(x,"help","width=560, height=650, left=350, top=26, scrollbars=yes")
}
function helpPageFull(x) {
   window2=window.open("res_website.asp?supplierCode=PANGAEA&page="+x,"window2","width=810, height=650, scrollbars=yes, left=100, top=25")
}
function helpPage(x) {
   window2=window.open("res_pagepopup.asp?supplierCode=PANGAEA&page="+x,"help","width=560, height=650, left=350, top=26, scrollbars=yes")
}
formError = false
function validForm() {
   if (formError) { 
      formError = false
      return false
   } 
   else {
      return true
   }
}
function handler(e) {
     var key = (navigator.appName == "Netscape") ? e.which : e.keyCode;
     if (key == 13 ) {
	 	postc()
	 }
}
function postc () {
   if ((star.postcodesearch.value == '' || (star.postcodesearch.value.length < 2  )) && star.citysearch.value == '' ) {
   		alert('At least 2 characters are needed on the postcodesearch field.')
   } else {
   		top.location='res_website.asp?dosearch=1&page=stocksearch&postcodesearch=' + star.postcodesearch.value + '&prodgroupid=' + star.prodgroupId.value + '&citysearch=' + star.citysearch.value + '&productsearchId=' +star.productsearchId.value + '&countrysearch=' + star.countrysearch.value
   }
	formError = true;
}
