
<!-- Begin
function checkEmailValid(emailStr)
{
	var emailPat=/^(.+)@(.+)$/
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	var validChars="\[^\\s" + specialChars + "\]"
	var quotedUser="(\"[^\"]*\")"
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	var atom=validChars + '+'
	var word="(" + atom + "|" + quotedUser + ")"
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	var errMsg="";   
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) 
	{
	   errMsg=errMsg+"The eMail address seems incorrect. ";
	   return errMsg;
	}
	else
	{
	  var user=matchArray[1]
	  var domain=matchArray[2]
	  if (user.match(userPat)==null) 
	  {
		errMsg=errMsg+"The eMail address seems incorrect. ";
		return errMsg;       
	  }
	  var IPArray=domain.match(ipDomainPat)
	  if (IPArray!=null) 
	  {
		  for (var i=1;i<=4;i++) 
			  {
			if (IPArray[i]>255) 
				{
				errMsg=errMsg+"The eMail address seems incorrect. ";
				return errMsg;
				}//IF
			  }//for
	   }//IP Array
	   var domainArray=domain.match(domainPat)
	   if (domainArray==null) 
	   {
		 errMsg=errMsg+"The eMail address seems incorrect. ";
		 return errMsg;
	   }
	   var atomPat=new RegExp(atom,"g")
	   var domArr=domain.match(atomPat)
	   var len=domArr.length
	   if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>5) 
	   {
		 errMsg=errMsg+"The eMail address seems incorrect. ";
		 return errMsg;	
	   } 
	   if (len<2) 
	   {
		 errMsg=errMsg+"The eMail address seems incorrect. ";
		 return errMsg;	 
	   } 
	 }//End  Match
	return "0";
}
//################################################
function clearsearch() {
   document.formsearch.q.value = '';
}
//################################################
   function CallSubmit()
    {
   document.formsearch.submit();
	}	
	//################################################
	
	function init() {
  // is the browser competent with the DOM?
  if(document.getElementById) {
    // is the browser capable of managing runtimeStyle?
    // (this would mean, basically, "hey, I'm IE")
    if(document.getElementById('logo').runtimeStyle) {
      // delete current background
      document.getElementById('logo').style.backgroundImage = 'none';
      // apply PNG background with alpha transparency filtering
      document.getElementById('logo').style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='logo.png',sizingMethod='scale')";
    }
  }
}
//################################################
   function checkcontactform(){
	   if (trim(document.contactform.TxtName.value)==""){
		   alert('Name is required.  ');
		   document.contactform.TxtName.focus();
		   return false;
	   }
		   
	  if (trim(document.contactform.TxtPhone.value)==""){
		   alert('Phone number is required.  ');
		   document.contactform.TxtPhone.focus();
		   return false;
	   }
	   
	  
	   var e=trim(document.contactform.TxtEmail.value);
		if (e=="")
		{
			 alert('A valid eMail Address is required to process your enquiry.  ');		
			 document.contactform.TxtEmail.focus();
			 return false;
		}
		else
		{
			if (checkEmailValid(e) !="0"){
				alert(checkEmailValid(e));	
				document.contactform.TxtEmail.focus();
				return false;
			}
		}	
  
	 if (trim(document.contactform.TxtCompanyName.value)==""){
		   alert('Company Name is required.  ');
		   document.contactform.TxtCompanyName.focus();
		   return false;
	   }
	   
	    if (trim(document.contactform.TxtCompanyNumber.value)==""){
		   alert('Company Number is required.  ');
		   document.contactform.TxtCompanyNumber.focus();
		   return false;
	   }

	  if (trim(document.contactform.SecurityCode.value)==""){
		   alert('Access code is required.  ');
		   document.contactform.SecurityCode.focus();
		   return false;
	   }      
	   
	   return true;
}
	   
function trim(str_inString){
	
	var char_ptr = 0;
	var rstring = str_inString;
	var tmpstring = str_inString;
	if(str_inString != ""){        		
		while(rstring.charAt(char_ptr) == ' '){
			char_ptr ++;
		}
		
		tmpstring = rstring.substring(char_ptr, rstring.length);
		rstring = tmpstring;
		char_ptr = rstring.length - 1;
		
		while(rstring.charAt(char_ptr) == ' '){
			char_ptr --;
		}
		
		tmpstring = rstring.substring(0, char_ptr + 1)
		rstring = tmpstring;
		return rstring;
	 }else{
		 return str_inString;
	 }
}

function checkform(){
	if(trim(document.formmail.tname.value)==''){
		alert('Please enter your friends name ');
		document.formmail.tname.focus();
		return false;		
	}
	if(trim(document.formmail.temail.value)==''){
		alert('Please enter your friends E-mail');
		document.formmail.temail.focus();
		return false;
	}else{
		var email_t = trim(document.formmail.temail.value)
		if(checkEmailValid(email_t )!='0'){
			alert(checkEmailValid(email_t));
			document.formmail.temail.focus();
			return false;
		}
	}
	
	if(trim(document.formmail.fname.value)==''){
		alert(' Your name is require');
		document.formmail.fname.focus();
		return false;		
	}
	if(trim(document.formmail.femail.value)==''){
		alert('Your E-mail is require');
		document.formmail.femail.focus();
		return false;
	}else{
		var email=trim(document.formmail.femail.value);
		if(checkEmailValid(email)!='0'){
			alert(checkEmailValid(email));
			document.formmail.femail.focus();
			return false;
		}
	}
	
	
  if(trim(document.formmail.securityCode.value)==""){
		alert("Access code is required!");
		document.formmail.securityCode.select();
		return false;	
	}		
	return true;
}

function  checkNew(){
	
  a = document.formmember
  var ChkID = '0' ;
  if(trim(a.name.value)==""){
	  alert("Name is required !");
	  a.name.focus();
	  return false;
  }
  var e=trim(a.email.value);
  if (e==""){
		alert("A valid E-mail Address is required to process your enquiry.");
		a.email.select();
		return false;
	}else{
		if (checkEmailValid(e) !="0") {
			alert("A valid E-mail Address is required to process your enquiry.");
			a.email.select();
			return false;	
		}
	}
	if(trim(a.securityCode.value)==""){
		alert("Access code is required to process your enquiry.")
		a.securityCode.select();
		return false;	
	}
	return true;
}
//################################################################

function CheckIsIE()
{
if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') 
	{ return true;}
	else
	{ return false; }
}
function PrintNow()
{
if (CheckIsIE() == true)
{
document.PrintThisPage.focus();
document.PrintThisPage.print();
}
else
{ //Firefox
document.getElementById('PrintThisPage').focus();
top.PrintThisPage.window.print();
}
}
//################################################################


//  End -->
