function getPage(page) {
document.location.href=page;	
}




function orderList(listtype) {
if(listtype == document.getElementById("listOrder").value) listtype = listtype+"b";
var fullpage = document.getElementById("fullpage").value;
document.location.href = fullpage+"&o="+listtype;
}

function sendData(param, page)
	{
	
		if(document.all)
		{
			//Internet Explorer
			var XhrObj = new ActiveXObject("Microsoft.XMLHTTP") ;
		}//fin if
		else
		{
		    //Mozilla
			var XhrObj = new XMLHttpRequest();
		}

		var content = document.getElementById("switchSelect");
		
		XhrObj.open("POST", page);


		XhrObj.onreadystatechange = function()
		{
			if (XhrObj.readyState == 4 && XhrObj.status == 200)
				content.innerHTML = XhrObj.responseText ;
		}

		XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		XhrObj.send(param);
	}
	
	
	function goBack() {
	
	history.go(-1)
}

function switchVisible(object) {
	object = document.getElementById(object);
	if(object.className=='hidden') {
		object.className='visible'
	} else {
		object.className='hidden';
	}
	
}

 var pagesubmited = 0

    function submitForm() {

      var errorMsg = "";

      if (document.theform.enquirybody.value == "") {
        errorMsg = errorMsg + "Please enter your enquiry.\n";
      }
      if (document.theform.enquirybody.value.length > 3000) {
        errorMsg = errorMsg + "Your enquiry must be less than 3000 characters.\n";
      }

      if (document.theform.title.value == "") {
        errorMsg = errorMsg + "Please enter your title i.e. Mr, Mrs, Miss.\n";
      }
      if (document.theform.title.value.length > 50) {
        errorMsg = errorMsg + "You must enter less than 50 characters for your title.\n";
      }
      if (document.theform.firstname.value == "") {
        errorMsg = errorMsg + "Please enter your firstname.\n";
      }
      if (document.theform.firstname.value.length > 50) {
        errorMsg = errorMsg + "You must enter less than 50 characters for your firstname.\n";
      }
      if (document.theform.surname.value == "") {
        errorMsg = errorMsg + "Please enter your surname.\n";
      }
      if (document.theform.surname.value.length > 50) {
        errorMsg = errorMsg + "You must enter less than 50 characters for your surname.\n";
      }
      if (document.theform.email.value == "") {
        errorMsg = errorMsg + "Please enter your email address.\n";
      }
      if (document.theform.email.value.length > 255) {
        errorMsg = errorMsg + "You must enter less than 255 characters for your email address.\n";
      }
      if (document.theform.businessname.value.length == "") {
        errorMsg = errorMsg + "Please enter your company name.\n";
      }
      if (!isGoodEmail(document.theform.email.value)) {
        errorMsg = errorMsg + "Please enter a valid email address.\n";
      }
      if (document.theform.countryid.options[document.theform.countryid.selectedIndex].value == 0) {
        errorMsg = errorMsg + "Please select a country.\n";
      }
      if (pagesubmited) {
        errorMsg = errorMsg + "Please be patient, the page is being submitted!\n";
      }

      if (errorMsg.length < 1) {
        pagesubmited = 1;
        document.theform.submit();
      } else {
        alert(errorMsg);
      }
        
    }
	
	
	
	function writeMap () {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="776" height="600" id="mapFR" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="wmode" value="opaque" />');
document.write('<param name="movie" value="map.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="map.swf" wmode="transparent"  quality="best" bgcolor="#ffffff" width="776" height="600" name="mapFR" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}


	function writeMovie () {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="320" height="240" id="mapFR" align="middle">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="wmode" value="opaque" />');
document.write('<param name="movie" value="movie.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="movie.swf" wmode="transparent"  quality="best" bgcolor="#ffffff" width="320" height="240" name="mapFR" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}



    