<!-- Hide script from old browsers.
function loadImages() {
	if (document.images) {

          planningoff = new Image(); planningoff.src ="images/planning_off.gif";
          forensicoff = new Image(); forensicoff.src ="images/forensic_off.gif";
          servicesoff = new Image(); servicesoff.src ="images/services_off.gif";
          profileoff = new Image(); profileoff.src ="images/profile_off.gif";
          contactsoff = new Image(); contactsoff.src ="images/contacts_off.gif";
          homeoff = new Image(); homeoff.src ="images/home_off.gif";
          disclaimeroff = new Image(); disclaimeroff.src ="images/disclaimer_off.gif";
          emailoff = new Image(); emailoff.src ="images/email_off.gif";
          bookmarkoff = new Image(); bookmarkoff.src ="images/bookmark_off.gif";
          dtoff = new Image(); dtoff.src ="images/dt_off.gif";

          planningon = new Image(); planningon.src ="images/planning_on.gif";
          forensicon = new Image(); forensicon.src ="images/forensic_on.gif";
          serviceson = new Image(); serviceson.src ="images/services_on.gif";
          profileon = new Image(); profileon.src ="images/profile_on.gif";
          contactson = new Image(); contactson.src ="images/contacts_on.gif";
          homeon = new Image(); homeon.src ="images/home_on.gif";
          disclaimeron = new Image(); disclaimeron.src ="images/disclaimer_on.gif";
          emailon = new Image(); emailon.src ="images/email_on.gif";
          bookmarkon = new Image(); bookmarkon.src ="images/bookmark_on.gif";
          dton = new Image(); dton.src ="images/dt_on.gif";

        }
}
loadImages();

// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");
        }
}


// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");
        }
}



// Function to validate newsletter subscription form
function Subscribe(form) {

  if (form.Email.value == "" || CheckEmail(form.Email.value) == false) {
    alert("Please enter a valid Email Address.");
    form.Email.focus();
    return false;
  }  
  return true;
}	

// Function to validate enquiry form
function Validate(){
	var valid = false;
	var dstrg = "";
	var i = 0;

with (document.enquiryform) {
		if (Name.value == "")
			dstrg = dstrg + "Name\n";
		if (Phone.value == "")
			dstrg = dstrg + "Phone\n";
		if (Email.value == "" || CheckEmail(Email.value) == false)
			dstrg = dstrg + "Email Address\n";
		if (Service.value == "")
			dstrg = dstrg + "Service\n";


} // end of validate function

	if (dstrg.length > 0 ) {
//		dstrg = dstrg.substr(2);
		dstrg = "Please give valid inputs for the following:\n\n" + dstrg;
		alert(dstrg);
		return false;
		}
	else  
		{
		return true;
		}
	
} // end of function

function CheckEmail(Email){
	//Check for Valid Email Address
	//Variable Declration		
	var i = 0;
	var FlagAtSign = "False";
	var FlagDotSign = "False";
	var StrLen = 0;
	var EmailTxt = "";
	
	EmailTxt=Email;
	StrLen = EmailTxt.length;
	//Check for @ and . in Email given
	for(i=0; i<=StrLen-1; i++)
	{
		StrCurrentChar = EmailTxt.substring(i,i+1);
		if (StrCurrentChar=='@')
		{
			FlagAtSign="Ok";
		}
		if (StrCurrentChar=='.')
		{
			FlagDotSign="Ok";
		}
	}
	if (FlagAtSign!="Ok"  || FlagDotSign!="Ok")
	{  
		return false
	}
	else 
	{
		return true
	}
	//Email validation finished
}


// End script hiding from old browsers. -->
