<!--
function preloadreviews() {
	image1= new Image(700,789);
	image1.src = "images/review1.jpg";

	image2 = new Image(700,466);
	image2.src = "images/review2.jpg";

	image3 = new Image(700,489);
	image3.src = "images/review3.jpg";
	
	image4= new Image(700,472);
	image4.src = "images/review4.jpg";
}

function writeFlashTags(movie,height,width,flashVars,alignment,wmode,menu,backgroundcolor,id) {
//defaults
	wmode		= (wmode == undefined ? 'opaque' : wmode);
	menu		= (menu == undefined ? 'false' : menu);
	alignment	= (alignment == undefined ? 'false' : alignment);
	id			= (id == undefined ? 'false' : id);
	flashVars			= (flashVars == undefined ? '' : flashVars);
	backgroundcolor			= (backgroundcolor == undefined ? '' : backgroundcolor);
	
	if(id != false){
		var idAttribute = 'id="'+id+'"';
	} else {
		var idAttribute = '';
	}
	
	var classId = '';
	if(navigator.appVersion.toLowerCase().indexOf("msie")){
		//IE7 might act weird if this is not set...
		classId = 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
	}
	
	var HTML = '';
	HTML += '<object type="application/x-shockwave-flash" data="'+movie+'" width="'+width+'" height="'+height+'" '+idAttribute+'>';
	HTML += '	<param name="movie" value="'+movie+'" />';
	HTML += '	<param name="menu" value="'+menu+'" />';
	HTML += '	<param name="flashVars" value="' + flashVars + '" />';
	HTML += '	<param name="wmode" value="'+wmode+'" />';
	
	// If wmode is opaque and a backgroundcolor has been defined
	if(backgroundcolor != '' && wmode != 'transparent') {
		HTML += '	<param name="bgcolor" value="' + backgroundcolor + '" />';
	}

	HTML += '</' + 'object>';
	document.write(HTML);
} 

function validate() {
	if ((document.formmail.from.value=="") || (document.formmail.from.value==null)) {
	   alert('Please enter your name');
	   document.formmail.from.focus();
	   return false;
		}
	if ((document.formmail.email.value=="") || (document.formmail.email.value==null)) {
	   alert('Please enter your email address');
	   document.formmail.email.focus();
	   return false;
		}
	var emailID=document.formmail.email;
	
	if (echeck(emailID.value)==false){
		alert('Invalid email address');
		document.formmail.email.focus();
		return false
		}
	if ((document.formmail.email_confirm.value=="") || (document.formmail.email_confirm.value==null)) {
	   alert('Please confirm your email address');
	   document.formmail.email_confirm.focus();
	   return false;
		}
	if (document.formmail.email_confirm.value!=document.formmail.email.value) {
	   alert('Confirmation differs from email address, please reconfirm');
	   document.formmail.email_confirm.focus();
	   return false;
		}
	return true;
	//alert('email not yet connected');
	return false;
	
}
// ======================
// validate email address
//=======================
function echeck(str) {
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    return false
		 }
 		 return true					
	}
// -->
