<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newheight=parseInt(imageHeight)+25;
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+newheight+",scrollbars=no,status=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+alt+'</title><link href="css/StyleSheet.css" type="text/css" rel="stylesheet" /></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td>');
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
	newWindow.document.write('</td></tr><tr><td bgcolor="#dadec7" height="1"><img src="images/trans.gif" height="1"></td></tr>');
	newWindow.document.write('<tr><td align="center">'+alt+'</td></tr></table>'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

/*function openVTourWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newheight=parseInt(imageHeight)+25;
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+newheight+",scrollbars=no,status=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+alt+'</title><link href="css/StyleSheet.css" type="text/css" rel="stylesheet" /></head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td>');
	newWindow.document.write('<applet name="ptviewer" archive="ptviewer.jar"  code="ptviewer.class" width=320 height=240 mayscript=true>');
	newWindow.document.write('<param name=file value=\"/'+imageName+'\">');
	newWindow.document.write('<param name=pan value=0>');
	newWindow.document.write('<param name=tilt value=-25>');
	newWindow.document.write('<param name=fov value=90>');
	newWindow.document.write('<param name=fovmax value=120>');
	newWindow.document.write('<param name=fovmin value=20>');
	newWindow.document.write('<param name=auto value=-0.5>');
	newWindow.document.write('</applet>');
	
	newWindow.document.write('</td></tr><tr><td bgcolor="#dadec7" height="1"><img src="images/trans.gif" height="1"></td></tr>');
	newWindow.document.write('<tr><td align="center">Click and drag on the picture to move around<br>Use the + and - keys to zoom in and out');
	newWindow.document.write('</td></tr></table>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();

}*/
function Check_Fields(){
	var ErrMsg="Some fields are empty, please check: \n";
	var CompMsg='';
	with(document.form1){ 
		if(!name.value){
			CompMsg+="- Name \n";
		}
		if (!surname.value){
			CompMsg+="- Surname \n";
		}
	        if (email.value==''){
                	CompMsg+="- Email Adress is Empty \n";
         	}else{
                	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email.value)){
                	} else {
                	   CompMsg+="- Email address is not vaild \n";
           		}
		}
		if (!telephone.value){
			CompMsg+="- Telephone \n";
		}
		if (!address.value){
			CompMsg+="- Address \n";
		}
		if (typeof(ref)=='undefined'){
			if (request.value=='CLC Estates - Registration'){
				if (budget.value=='Budget...'){
					CompMsg+="- Budget \n";
				}
				if (when.value=='When do you want to buy...'){
					CompMsg+="- When do you want to buy \n";
				}
				if (wherewant.value=='Where do you want to own...'){
					CompMsg+="- Where do you want to own \n";
				}
			}
		}
		if (wherehear.value=='Where did you hear about us?'){
			CompMsg+="- Where did you hear about us \n";
		}
	}
	if (CompMsg){
		alert (ErrMsg+CompMsg);
		return false;
	}else{
		document.form1.action="regclient.php";
		document.form1.submit();
	}
}
//-->