

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header

// Set the message for the alert box
am = "DO NOT cut and paste information into the boxes";

// do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;



    <!-- Hide the JavaScript
    
      function getDate(){
        var now = new Date();
        var day = new Object();
        var month = new Object();
			
	    day[0] = "Sunday";
		day[1] = "Monday";
		day[2] = "Tuesday";
		day[3] = "Wednesday";
		day[4] = "Thursday";
		day[5] = "Friday";
		day[6] = "Saturday";
		month[0] = "01";
		month[1] = "02";
		month[2] = "03";
		month[3] = "04";
		month[4] = "05";
		month[5] = "06";
		month[6] = "07";
		month[7] = "08";
		month[8] = "09";
		month[9] = "10";
		month[10] = "11";
		month[11] = "12";
		
		year = now.getYear();
	    document.write("<input type=hidden size=25 readonly name=requiredonsalefrom value=" + now.getDate() + "/" + month[now.getMonth()] + "/" + year + ">");		        
      }
      
      function getOrderNumber(lbound, ubound){
        document.write("<input type=text size=20 readonly name=orderid value=" + (Math.floor(Math.random() * (ubound - lbound)) + lbound) + ">");
      }
      
      function checkFullName(fullName){
        var fullNameValue = fullName.value;
        
        //The full name should be less than 50 characters
        if(fullNameValue.length > 50){
          alert('Please enter less than 50 characters for your name. E.g. John Doe');
          fullName.focus();
        }
      }
      
      function checkAddress(address){
        var addressValue = address.value;
        
        //The address should be less than 150 characters
        if(addressValue.length > 150){
          alert('Please enter less than 150 characters for your address.');
          address.focus();
        }
      }
      
      function checkPostCode(postcode){
        var postCodeValue = postcode.value;
        var isValidPostCode = 1

		//If the field has nothing in it, then return
		if(postCodeValue == '')
		  return;
		  
		//If the postcode has a length of 6 then the space should be in position 3
        if(postCodeValue.length == 6){
          if(postCodeValue.indexOf(' ') != 2)
            isValidPostCode = 0;
        }
        else{
          if(postCodeValue.length == 7){
            if(postCodeValue.indexOf(' ') != 3)
              isValidPostCode = 0;
          }
          else{
            //If the postcode has a length of 8, then the space should be in position 5
            if(postCodeValue.length == 8){
              if(postCodeValue.indexOf(' ') != 4)
                isValidPostCode = 0;
            }
          }
        }
        
        //If the postcode is invalid, display an error showing the correct format
        if(isValidPostCode == 0){
          alert('The postcode is incorrect, the format should be LU3 9KJ or BA45 7DR');
          postcode.focus();
        }
      }
      
      function checkTelephoneNo(telephoneNo){
        var telephoneNoValue = telephoneNo.value;
        var isValidNumber = 1
                
        //Make sure that the Telephone Number is not more than 15 characters
        if(telephoneNoValue.length > 15){
          alert('Please enter less than 15 characters for your Land Phone Number. E.g 01923 232323');
          telephoneNo.focus();
          return;
        }
        
        //Make sure that the Telephone Number is numeric by checking that each character is either 
        //a number of a space        
        for(var i=0; i<telephoneNoValue.length; i++){
          if(isNaN(telephoneNoValue.charAt(i))){
            if(telephoneNoValue.charAt(i) != ' '){
              isValidNumber = 0;
            }
          }
        }
        //If there was a character in the number, then display an error
        if(isValidNumber == 0){
          alert('Please enter a numerical telephone number');
          telephoneNo.focus();
        }
      }
      
      function checkEmail(emailAddress){
        var emailAddressValue = emailAddress.value;
        var isValidEmailAddress = 1
        
        //If the Email address is blank, then simply do nothing
        if(emailAddressValue == '')
          return;
          
        //Make sure that the length of the Email address is less than 50 characters
        if(emailAddressValue.length > 50){
          alert('Please enter less than 50 characters for your email address. E.g. johndoe@depserateseller.co.uk');  
          emailAddress.focus();
          return;
        }
        
        //Check for the @ symbol
        if(emailAddressValue.indexOf('@') < 0)
          isValidEmailAddress = 0;
        //Check for the '.'
        if(emailAddressValue.indexOf('.') < 0)
          isValidEmailAddress = 0;
        //If the Email address is invalid, then produce an error
        if(isValidEmailAddress == 0){
          alert('Please enter a valid Email address. E.g. johndoe@depserateseller.co.uk');
          emailAddress.focus();          
        }
      }
      
      function checkModel(modelOfCar){
        var modelOfCarValue = modelOfCar.value
        
        if(modelOfCarValue.indexOf(' ') > 0){
          alert('Please enter only one word for the model of car. E.g. Escort');
          modelOfCar.focus();
        }
      }
      
      function checkMiles(noOfMiles){
        var noOfMilesValue = noOfMiles.value;
        
        //Make sure that the number of miles is numeric
        if(isNaN(noOfMilesValue)){
          alert('Please enter a numerical value for the number of miles. E.g. 10000');
          noOfMiles.focus();
        }
      }
      
      function checkPrice(requiredPrice){
        var requiredPriceValue = requiredPrice.value;
                
        //Make sure that the price is an integer, i.e. a whole number
        if(requiredPriceValue.indexOf('.') > 0){        
          alert('Please do not enter decimals in the price. E.g. 8500');
          requiredPrice.focus();
          return;
        }
        
        //Make sure that the price is numeric
        if(isNaN(requiredPriceValue)){
          alert('Please enter a numerical price. E.g. 8500');
          requiredPrice.focus();
          return;
        }
        
        //Make sure that the price is less than 8 characters
        if(requiredPriceValue.length > 7){
          alert('Please enter less than 8 characters for your price. E.g 8500');
          requiredPrice.focus();
          return;
        }
      }
      
      function checkCharacter(eventObject){        
        var character
        if(document.layers)
          character = eventObject.which;          
        else
          if(document.all){
            var evt = window.event
            character = evt.keyCode;
          }
            
        //Check that the character entered is a valid character A-Z, a-z, 0-9
        if((character > 125 && character < 126) || 
           (character == 13)){
          return false;
        }
      }
      
      function checkCarDetails(carDetails){
        var carDetailsValue = carDetails.value;
        
        //Make sure that the length is less than 255
        if(carDetailsValue.length > 255){
          alert('Please enter less than 255 characters for the car details');
          carDetails.focus();
        }
      }
      
      //This function needs to be done to assign the function to the onKeyPress event (for NS)
      function assignKeyPress(){
        document.forms['userForm'].requiredcardetails.onkeypress=checkCharacter;
      }
      
      function clearCarDetails(carDetails){
        var carDetailsValue = carDetails.value
        
        //Check to see if the value is the initial text, if it is then clear it, if not then leave it
        if(carDetailsValue == 'Type any in other details about your car (e.g. Leather Trim etc) in here.')
          carDetails.value = '';
      }
      
      function clearModelOfCar(modelOfCar){
        var modelOfCarValue = modelOfCar.value;
        
        //If the text is the initial text, clear it, otherwise leave it
        if(modelOfCarValue == 'One word only')
          modelOfCar.value = '';
      }
      
      function clearrequiredTRIM(requiredTRIM){
        var requiredTRIMValue = requiredTRIM.value;
        
        //If the text is the initial text, clear it, otherwise leave it
        if(requiredTRIMValue == '.')
          requiredTRIM.value = '';
      }
      
      function validateForm(){
        var element
        var formName = document.forms['userForm'];
        var isFormValid = 1;
        
        //Perform any further validations. This is mainly to make sure that all of the required
        //fields have been completed
        for(var i=0; i<formName.length; i++){
          //Store the element name and value for validation
          element = formName.elements[i];
          
          //Check if the field is required, by checking for the string 'required'
          if(element.name.indexOf('required') == 0){              
            if(element.value.length == 0){
              alert('Please complete all of the required fields');
              element.focus();
              isFormValid = 0;
              break;
            }            
          }
        }
        //Validation has been successful, and therefore the form should be submitted
        if(isFormValid == '1')
          document.forms['userForm'].submit();
      }
    // -->

    
<!--
var message = "Advertising Your Car"; 
function dgstatus()
{
      window.status = message;
	timerID= setTimeout("dgstatus()", 10);
}

dgstatus();

// -->

