function showPhoto2(theId, theLang, theType, sefUrlStatus, parseParams) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

	w_width = 950;
	w_height = 810;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = fileLocation+'templates/ws_mm_estates_13/showframe.php?pageid=' + theId+'&lang=' + theLang +'&type='+ theType;
  window.showPhoto2Window = open(fparam, 'showPhoto2Window', theWindowParam);
	setTimeout('if(showPhoto2Window&&!showPhoto2Window.closed)showPhoto2Window.focus()',100);
}
function showSpecifications(theId, theLang, theSpecType, sefUrlStatus, parseParams) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

	w_width = 500;
	w_height = 610;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = fileLocation+'templates/ws_mm_estates_13/showspecifications.php?pageid=' + theId + '&lang=' + theLang+ '&spectype='+theSpecType;
  window.showDetailsWindow = open(fparam, 'showDetailsWindow', theWindowParam);
	setTimeout('if(showDetailsWindow&&!showDetailsWindow.closed)showDetailsWindow.focus()',100);
}
function showEnquiry(theId, theLang, sefUrlStatus, parseParams) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

	w_width = 510;
	w_height = 490;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = fileLocation+'templates/ws_mm_estates_13/showenquiry.php?pageid=' + theId + '&lang=' + theLang;
  window.showEnquiryWindow = open(fparam, 'showEnquiryWindow', theWindowParam);
	setTimeout('if(showEnquiryWindow&&!showEnquiryWindow.closed)showEnquiryWindow.focus()',100);
}
function showPhoto(theId, theLang, thePhotoNum, sefUrlStatus, parseParams) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

	w_width = 700;
	w_height = 620;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = fileLocation+'templates/ws_mm_estates_13/showphoto.php?pageid=' + theId + '&lang=' + theLang + '&photonum=' + thePhotoNum;
  window.showPhotoWindow = open(fparam, 'showPhotoWindow', theWindowParam);
	setTimeout('if(showPhotoWindow&&!showPhotoWindow.closed)showPhotoWindow.focus()',100);
}
function showLocationPhoto(theId, theLang, sefUrlStatus, parseParams) {
	fileLocation = '';
	if (sefUrlStatus!='Y') {
		fileLocation = '';
	} else {
		fileLocation = '/';
	}

	w_width = 700;
	w_height = 620;
	if (screen) {
		w_left = (screen.availWidth - w_width)/2;
		w_top = ((screen.availHeight - w_height)/2)-20;
	}
	theWindowParam = 'width='+w_width+',height='+w_height+',left='+w_left+',top='+w_top+',status=no,resizable=yes,scrollbars=yes';

	fparam = fileLocation+'templates/ws_mm_estates_13/showlocationphoto.php?pageid=' + theId + '&lang=' + theLang;
  window.showLocationPhotoWindow = open(fparam, 'showLocationPhotoWindow', theWindowParam);
	setTimeout('if(showLocationPhotoWindow&&!showLocationPhotoWindow.closed)showLocationPhotoWindow.focus()',100);
}
function enquireforproperty(thePageId, theLang) {
	alert(thePageId+theLang);
	
  lochref = 'index.php?pageid='+thePageId+'&filter=Search&criteria=set';
	
	//alert("The values are: "+theLoc+" "+theType+" "+theMinPrice+" "+theMaxPrice+" "+theRef+"The url is: "+lochref);
	location = lochref;
}
function ValidatePropertyEnquiryForm (form) { // Used in Give us your feedback page (pageid=5&ctype=bm)
  var fullname = form.fullname.value;   
  var email = form.email.value;   

  if (!fullname)	{
    alert("You must enter your full name.");
    return false;
	} else if (!email)	{
		alert("You must enter your email.");
		return false;
	} else if ((email.indexOf('@') == -1) || (email.indexOf('.') == -1)) {
		alert("Wrong email format.");
		return false;
	} else {
		return true;
	}
}
