<!--
function MakeFlyer(carid){
 url = "flyer.php?carid="+carid;
 window.open(url,'jav',
	'toolbar=0,menubar=0,scroolbars=0,directories=0,resizable=0'); 
}

function ShowPic(pic){

  detail = window.open("", "detail", 	
	"scrollbars=1,status=0,width=400,height=400");  
  detail.document.open()
  with (detail.document){
  	write("<html><head><title>Additional Picture</title>")
	write("<link rel=stylesheet href=\"styles.css\" type=\"text/css\">")
        write("</head>") 
  	write("<body>\n")
  	write("<center><img src=" + pic + ">\n")
  	write("<form>\n")
  	write("<input type=\"button\" value=\"Close\" "+
		" onClick=\"window.close()\">\n");
  	write("</form>\n");
	write("</body></html>\n");
  }
  detail.document.close();
  detail.focus();
  return false;
}

function SellHelp(){

  help = window.open("", "helpwin", 	
	"scrollbars=1,status=0,width=400,height=400");  
  help.document.open()
  with (help.document){

  	write("<html><head><title>Help on Selling your vehicle</title>")
	write("<link rel=stylesheet href=\"styles.css\" type=\"text/css\">")
        write("</head>") 
  	write("<body>\n")

  	write("<b>How do I sell my vehicle?(Private sellers)</b><br>\n")
	write("Submission of a vehicle happens in three stages.<br>\n")
	write("1.First the vehicle details are entered, including the pictures. Please note \n")
	write("that the picture filesize may not exceed 100kB and can only be of type jpg, \n")
	write("gif or bmp. Any other format will cause the picture upload to fail. Pictures \n")
	write("that exceed the maximum filesize will also be rejected.<br>\n")
	write("Please do not enter curency values or any words in the price. Just enter the ")
	write("price excluding any spaces or any non-numeric characters<br>")
	write("2. Once the pictures have been uploaded and the vehicle data has been saved, \n")
	write("you will be presented with a form where you have to fill in your contact details. \n")
	write("The only mandatory fields are your email address and a password you choose. Remember \n")
	write("that the more information you supply, the easier it will be for potential buyers \n")
	write("to get hold of you, thereby increasing your chances of selling your vehicle.<br>\n")
	write("3.An email is sent to the email address that you supplied with a link you have to \n")
	write("click on within 24 hours to activate your advertisement, otherwise it will be deleted \n")
	write("without notice. Your advertisement will also remain active for 30 days. You will \n")
	write("be emailed 5 days before the advertisement expires. You may also reactivate your \n")
	write("advertisement at any stage during the 30 day period to extend the time to 30 days \n")
	write("again.<p>")
	write("<b>How do I access my advertisement?</b><br>\n")
	write("You will require your email address and the password you supplied to log in. \n")
	write("Then you can edit, resubmit(extend) or delete your advertisement.<p> \n")
	write("<b>Remember, private sellers can only advertise one vehicle at a time.</b><p>")
  	write("<form>\n")
  	write("<input type=\"button\" value=\"Close\" "+
		" onClick=\"window.close()\">\n");
  	write("</form>\n");
	write("</body></html>\n");

  }
  help.document.close();
  help.focus();
  return false;
}

function Privacy(){

  help = window.open("", "helpwin", 	
	"scrollbars=1,status=0,width=400,height=400");  
  help.document.open()
  with (help.document){
  	write("<html><head><title>Help on Selling your vehicle</title>")
	write("<link rel=stylesheet href=\"styles.css\" type=\"text/css\">")
        write("</head>") 
  	write("<body>\n")
	write("<center><h3>Privacy Policy</h3></center>");
	write("<b>Collection of Information</b><br>\n");
	write("When you advertise a vehicle or place a wanted ad, you are required to enter a \n")
	write("certain amount of personal information, most important being your email address.<br>");
	write("This is required as that is the only means of communication between potential ");
	write("buyers and sellers. All other contact information is optional and you may decide ");
	write("what to disclose in addition to this.<p>");
	write("<b>Disclosing of information</b><br>\n");
	write("Auto Express is concerned about your personal information. Your personal details will ");
	write("not be disclosed on any of our pages if you do not wish to divulge it. Your email ");
	write("address will not be displayed on any pages or shown in the source code of any scripts ");
	write("where robots or email address collecting tools may find it. Your personal details will");
	write("be stored on our database and only your email address will be used by our system to ");
	write("notify you of the status of your advertisement.<p>");
  	write("<form>\n")
  	write("<center<input type=\"button\" value=\"Close\" "+
		" onClick=\"window.close()\"></center>\n");
  	write("</form>\n");
	write("</body></html>\n");

  }
  help.document.close();
  help.focus();
  return false;
}

function CheckEmail(theForm){
  
  var result; 
  with (theForm){
     result = (email.value  != '');
     if (!result)
	alert("Please enter an email address");
  }
  return(result)
}

function Pageno(theForm, page){
  var result;

  result = false
  with (theForm){
     pageno.value = page
  }
  return(result)
}

function ValidateCar(theForm){
  var result = true;

  with (theForm){
     if ((price.value < 500) || isNaN(price.value)){
        alert("Please enter only numbers excluding spaces in the Price field");
        result = false;
     }
     if (model.value == ''){
        alert("Please enter a model");
        result = false;
     }
     if (year.value < 1900){
        alert("Please enter a year");
        result = false;
     }
  }
  return(result);
}     

function ValidateUser(theForm, dealer){
  var result = true;

  with (theForm){
     if (dealer == 1){
   	if (name.value == ''){
	   alert("As a Dealer you should at least enter your name");
	   result = false;
	}
	if (address.value == ''){
	   alert("You did not enter an address");
	   result = false;
	}
	if (city.value == ''){
	   alert("Please enter an address");
	   result = false;
	}
	if (telno.value == ''){
	   alert("Please neter a telephone number");
	   result = false;
	}
     }
     if (email.value.length < 6){
        alert("You will not be able to place your advertisement without an email address");
	result = false;
     }
     if (passwd.value.length < 5){
	alert("Your password must be at least five characters");
	result = false;
     }
  }
  return(result);
}


-->
 
