
<!--
//open window function
function popUp(file,width,height) {
newWindow=window.open(file, 'newWin', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width='+ width +', height='+ height +'');
}

function checkForm() { 
	var errorMsg = "";
    var desc = document.Exhibitor.companyDescription.value;
	var descMsg = "";
	
	if (document.Exhibitor.companyName.value == ""){
		errorMsg += "\n\tCompany Name";
	}
	if (document.Exhibitor.contactPerson.value == ""){
		errorMsg += "\n\tContact Person";
	}
	if (document.Exhibitor.phone.value == ""){
		errorMsg += "\n\tPhone Number";
	}
	if (document.Exhibitor.address.value == ""){
		errorMsg += "\n\tMailing Address";
	}
		if (document.Exhibitor.city.value == ""){
		errorMsg += "\n\tCity";
	}
    	if (document.Exhibitor.zip.value == ""){
		errorMsg += "\n\tZIP";
	}
	if (document.Exhibitor.companyDescription.value == ""){
		errorMsg += "\n\tCompany Description";
	}
	if (desc.length > 200){
	   descMsg = "Company Description is too long.";
	   alert(descMsg);
	   return false;	 
	}

	if (errorMsg != ""){
		msg = "The following required field(s) must be completed. \n";
		
		errorMsg += alert( msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}


	
function checkNewsForm(){
	var errorMsg = "";

	if (document.newsletter.name.value == ""){
		errorMsg += "\n\tName";
	}
	if (document.newsletter.email.value == ""){
		errorMsg += "\n\tEmail";
	}

	if (errorMsg != ""){
		msg = "The following required field(s) must be completed. \n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}

function checkSearchForm(){
	var errorMsg = "";

	if (document.form1.search.value == ""){
		errorMsg += "\n\tSearch";
	}

	if (errorMsg != ""){
		msg = "The following required field(s) must be completed. \n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}


function addCat(){

//browser = (navigator.appName.indexOf("Microsoft") != -1)?"Microsoft": "Netscape";
 if (document.Exhibitor.otherCat.value != ""){
//add to form object for the db
 document.Exhibitor.productCategory3.value = document.Exhibitor.productCategory3.value + document.Exhibitor.otherCat.value + ",";
  
  if (document.getElementById)
  {
	//alert("getElement..");
	divInfo = document.getElementById("divOtherCat").innerHTML;
	document.getElementById("divOtherCat").innerHTML = "";
	document.getElementById("divOtherCat").innerHTML = divInfo + document.Exhibitor.otherCat.value + "<br>";
	//document.getElementById("divOtherCat").innerHTML = document.getElementById("divOtherCat").innerHTML + document.Exhibitor.otherCat.value + "<br>";
	//document.getElementById("divOtherCat").childNodes[0].nodeValue = "test";

  }
  else if (document.all)
  {
	//alert("documnent.all...");
	divOtherCat.innerHTML = divOtherCat.innerHTML + document.Exhibitor.otherCat.value + "<br>";
  }
  else if (document.layers)
  {
	//alert("document.layers...great");
	alert("Categories so far:\n" + document.Exhibitor.productCategory3.value);
		
  }
	  
  
   document.Exhibitor.otherCat.value = "";
   document.Exhibitor.otherCat.focus();
 }
  
}

function resetCat(){  
  document.Exhibitor.otherCat.value = "";
  document.Exhibitor.productCategory3.value = "";
  
  if (document.getElementById)
  {
    document.getElementById("divOtherCat").innerHTML = "";
  }
  else if (document.all)
  {
    divOtherCat.innerHTML = "";
  }
  else if (document.layers)
  {
	alert("Categories so far:\n0");
		
  }
  
}


// -->
