function checkform()
{
 if (document.form.subcategoryid.selectedIndex==0)
 {
  alert('Please select a category');
  return(false);
 }
 if ((document.form.companyname.value=='') || (document.form.companyname.value=='-'))
 {
  alert('Please enter the company name');
  return(false);
 }
 if ((document.form.address1.value=='') || (document.form.address1.value=='-'))
 {
  alert('Please enter the company`s address');
  return(false);
 }
 if ((document.form.city.value=='') || (document.form.city.value=='-'))
 {
  alert('Please enter the company`s city');
  return(false);
 }
 if ((document.form.country.value=='') || (document.form.country.value=='-'))
 {
  alert('Please enter the country');
  return(false);
 }
 if ((document.form.telephone.value=='') || (document.form.telephone.value=='-'))
 {
  alert('Please enter the telephone number');
  return(false);
 }
 if ((document.form.email.value=='') || (document.form.email.value=='-'))
 {
  alert('Please enter the email address');
  return(false);
 }
 if ((document.form.url.value=='') || (document.form.url.value=='-'))
 {
  alert('Please enter the website address');
  return(false);
 }
 if ((document.form.password.value=='') || (document.form.password.value=='-'))
 {
  alert('Please enter a password');
  return(false);
 }
 if ((document.form.contact.value=='') || (document.form.contact.value=='-'))
 {
  alert('Please enter your contact name');
  return(false);
 }
 if ((document.form.summary.value=='') || (document.form.summary.value=='-'))
 {
  alert('Please enter a summary of your site');
  return(false);
 }
 if ((document.form.description.value=='') || (document.form.description.value=='-'))
 {
  alert('Please enter the description of your site');
  return(false);
 }
 if ((document.form.keywords.value=='') || (document.form.keywords.value=='-'))
 {
  alert('Please enter some keywords about your site');
  return(false);
 }
}

function openwindow(url)
{
    var params="menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,dependent,top=0,left=0,width=500,height=100";
    popupWin = window.open(url, 'popup',params);
    popupWin.focus(); 
}