function insertFlashMovie(id, oid, movie, width, height, quality, bgcolor)

{

  var e = document.getElementById(id);



  if (e) {

    e.innerHTML = 

      '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="' + oid + '" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="' + width + '" height="' + height + '">' +

      '<param name="movie" value="' + movie + '">' +

      '<param name="quality" value="' + quality + '">' +

      '<param name="bgcolor" value="' + bgcolor + '">' +

      '<embed src="' + movie + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="' + oid + '" width="' + width + '" height="' + height + '" quality="' + quality + '" bgcolor="' + bgcolor + '"></object>';

  }

}



function checkForm()

{

  var e = document.contactForm.email.value;

  var e_confirm = document.contactForm.confirm_email.value;

  var invalidChars = "34,38,39,60,61,62,63,96";

  var GoodChars = "0123456789()-+ "

	var i = 0

	

	

	



  if (document.contactForm.name.value == '') {

    alert('Please enter your name.');

    return false;

  }

  

  if (document.contactForm.email.value == '') {

    alert('Please enter an e-mail address.');

    return false;

  }

  

  if (document.contactForm.confirm_email.value == '') {

    alert('Please enter the e-mail address again in the confirmation box.');

    return false;

  }

  

  if (document.contactForm.phone.value == '' ) {

		alert("Please enter your Phone Number");

		return false;

		

	}

  

  if (document.contactForm.message.value == '') {

    alert('Please enter a message.');

    return false;

  }

  

  for (i = 0; i < e.length; i++) {

    var code = e.charCodeAt(i);

    if ((invalidChars.indexOf(code) != -1) || (code > 126)) {

      alert('The e-mail address you entered contains invalid characters. Please do not include quotes or special characters other than the @ sign.');

      return false;

    }

  }

  

  for (i = 0; i < e.length; i++) {

    var code = e.charCodeAt(i);

	var code_confirm = e_confirm.charCodeAt(i);

    if (code != code_confirm) {

      alert('The e-mail address in the confirmation box does not match with the previous email box.  Please check again!');

      return false;

    }

  }

  

  for (i =0; i <= document.contactForm.phone.value.length -1; i++) {

		if (GoodChars.indexOf(document.contactForm.phone.value.charAt(i)) == -1) {

			alert("Please enter a valid phone number");

			document.contactForm.phone.focus();

			return false;

		} 

	}



  document.contactForm.onsubmit = function () {

      return false;

    };



  return true;

}



var PROMPT = 'Please enter your message here.';

var init = false;

var skip = false;



window.onload = function () {

    initPrompt();

  }



function initPrompt()

{

  if (!init) {

    if (document.contactForm && document.contactForm.message.value == '') {

	  document.contactForm.message.value = PROMPT;

      skip = false;

    } else {

      skip = true;

    }

    init = true;

  }

}



function checkPrompt()

{



  if (init && !skip) {

    document.contactForm.message.value = '';

    skip = true;

  }

}



function openPopUp(url, width, height)

{

  open(url, "", "width=" + width + ",height=" + height + ",toolbar=no,scrollbars=yes,resizable=no");

}



//Script tp avoid Google toolbar "yellow fields"

  if(window.attachEvent)

    window.attachEvent("onload",setListeners);



  function setListeners(){

    inputList = document.getElementsByTagName("INPUT");

    for(i=0;i<inputList.length;i++){

      inputList[i].attachEvent("onpropertychange",restoreStyles);

      inputList[i].style.backgroundColor = "";

    }

    selectList = document.getElementsByTagName("SELECT");

    for(i=0;i<selectList.length;i++){

      selectList[i].attachEvent("onpropertychange",restoreStyles);

      selectList[i].style.backgroundColor = "";

    }

  }



  function restoreStyles(){

    if(event.srcElement.style.backgroundColor != "")

      event.srcElement.style.backgroundColor = "";

  }


