<!--
function showInfo(objName,x,newText,name,imgName) { //v4.01
	if (imgName!=''){ 
	document.images["swapMe"].src=imgName;
	}
	if (name!=''){
	document.images["swapMe"].alt=name;
	}
	  if ((obj=MM_findObj(objName))!=null) with (obj)
		if (document.layers) {document.write(unescape(newText)); document.close();}
		else innerHTML = unescape(newText);
}
function hideInfo(objName) {
	document.images["swapMe"].src="images/people/roger-big.jpg";
	document.images["swapMe"].alt="Roger Southam";
	newText="<h1>Roger Southam</h1><p>Roger is the Founder and Chief Executive of Chainbow and has a very hands on approach to management. He is best known for his signature bow-tie apparel. <a href=docs/news/background-info/roger-southam-biography.pdf target=_blank>Download Roger\'s Biography (PDF)</a></p>";
	  if ((obj=MM_findObj(objName))!=null) with (obj)
		if (document.layers) {document.write(unescape(newText)); document.close();}
		else innerHTML = unescape(newText);	
}
function showInfo2(objName,x,newText,objName2,newText2){
	  if ((obj=MM_findObj(objName))!=null) with (obj)
		if (document.layers) {document.write(unescape(newText)); document.close();}
		else innerHTML = unescape(newText);
	  if ((obj2=MM_findObj(objName2))!=null) with (obj2)
		if (document.layers) {document.write(unescape(newText2)); document.close();}
		else innerHTML = unescape(newText2);
}
function swapImage(imgName,altText){
	if (imgName!=''){ 
	document.images["swapMe"].src= imgName;
	}
	if (altText!=''){
	document.images["swapMe"].alt=altText;
	}
}
function swapImageBuySell(imgName,altText){
	if (imgName!=''){ 
	document.images["swapMe"].src=imgName;
	}
	if (altText!=''){
	document.images["swapMe"].alt=altText;
	}
}
function swapImageContactTeam(){ 
selected = document.getElementById("teamList").selectedIndex
//alert(document.getElementById("33").value)
	if (selected == "0") {
		alert("Error, cannot find team member.")
		document.images["swapMe"].src="/images/keys.jpg";
		document.images["swapMe"].alt= "Picture of keys attached to Chainbow keyring";
	} else {
		document.images["swapMe"].src="/images/" +  document.getElementById("name"+document.getElementById("teamList").options[selected].value).value;
		document.images["swapMe"].alt= document.getElementById("teamList").options[selected].text
	}
}
function swapImageRestore(imgName,altText){
	document.images["swapMe"].src=imgName;
	document.images["swapMe"].alt=altText;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
var ns = (navigator.appName.indexOf("Microsoft") < 0);
function getObject(id) {
         if (ns) { return document.getElementById(id); } 
		 else { return document.all[id]; }
}


function toggle(aNodename) {
	var aNode = getObject('expand-div' + aNodename);
         if (aNode.style.display == 'none') { 
			 aNode.style.display = 'block';
         } else { 
			aNode.style.display = 'none';
			
         }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function benchMrkValS1() { 
var email 
var errors
var telNumber
var count 
errors= ''
email = document.getElementById("s1_04").value
email = email.indexOf('@')
telNumber = document.getElementById("s1_05").value
telNumber = telNumber.replace(" ","");
telNumber = telNumber.replace("  ","");
telNumber = telNumber.replace("+","");
telNumber = telNumber.replace("-","");
telNumber = telNumber.replace("(","");
telNumber = telNumber.replace(")","");
count = "0"
	/*if (document.getElementById("s1_01").value == "") {
		errors = "-Name cannot be blank\n"
	} */
	/*if (document.getElementById("s1_02").value == "") {
		errors += "-Flat number cannot be blank\n"
	} */
	if (document.getElementById("s1_03").selectedIndex == "0") {
		errors +="-Development cannot be blank\n"
	} 
	/*if (document.getElementById("s1_04").value == "") {
		errors +="-Email cannot be blank\n"
	}*/
	if (document.getElementById("s1_04").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address\n"
	}
	}
	if (isNaN(telNumber)) {
		errors +="-Phone number must contain a number"
	}
	if (document.getElementById('radioCheck').value != "checked"){
		errors +="-Owner/tenant information is blank.\n"
	}
//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
//Clear of errors, however we need to warn users who have not enterd an email that they cannot enter the prize draw.
	if (errors == '') {
//no errors so check if an email address is present. 		
		if (document.getElementById("s1_04").value == "") { 
			var answer = confirm ("We will not be able to enter you into the prize draw, or contact you in relation to the survey if you don't enter an email address");
// they are happy to submit without entering the draw
			if (answer== true) {
				document.forms["benchmark-survey"].submit();
// they want to enter the draw, dont submit
			}else{		
			}
// email address is present, submit form			
		} else {
			document.forms["benchmark-survey"].submit();
		}
	} 
}
function doubleCheck(url,msg) { //v3.0
var answer = confirm (msg);
if (answer== true) {
  window.location=url;
}else{
}
}

function benchMrkValS2(type){
	if (type == "old") {
		document.forms["benchmark-survey"].action="stage03.asp";
		document.forms["benchmark-survey"].submit();
	}
	if (type == "new") {
		document.forms["benchmark-survey"].action="stage03_new.asp";
		document.forms["benchmark-survey"].submit();
	}
}
function benchMrkMovePage(newPage){
	document.forms["benchmark-survey"].action=newPage;
	document.forms["benchmark-survey"].submit();
}
function switchBlogText() {
	var currentText	= document.getElementById("show-hide").innerHTML
	if (currentText == "Show Original"){
		document.getElementById("show-hide").innerHTML = "Hide Original"
	} else if (currentText == "Hide Original"){
		document.getElementById("show-hide").innerHTML = "Show Original"
	}
}

function valPayment() { 
var email 
var errors
errors= ''
email = document.getElementById("email").value
email = email.indexOf('@')
	if (document.getElementById("name").value == "") {
		errors = "-Name cannot be blank\n"
	} 
	if (document.getElementById("email").value == "") {
		errors += "-Email cannot be blank\n"
	} 
	if (document.getElementById("email").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address\n"
	}
	}
	if (document.getElementById("invoiceNum").value == "") {
		errors +="-Invoice number cannot be blank\n"
	}
	if (document.getElementById("developmentName").value == "") {
		errors +="-Development name cannot be blank\n"
	}
	if (document.getElementById("amount").value == "") {
		errors +="-Amount cannot be blank\n"
	}	

//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else {
		document.forms["payment-form"].submit();
	}
}
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
function calculateServiceChargeTotal() {
var newTotal
var serviceCharge
var streamlineFigure
var preOLCAmount

newTotal = (document.getElementById("amount").value*104)/100;
//round "newTotal" to two decimals
newTotal=Math.round(newTotal*100)/100;
newTotal=MoneyFormat(newTotal);
streamlineFigure = newTotal.replace(".","");
serviceCharge = (newTotal - document.getElementById("amount").value)
serviceCharge=Math.round(serviceCharge*100)/100;
serviceCharge=MoneyFormat(serviceCharge);
//WRITE THE SERVICE CHARGE AMOUNT TO THE PAGE
document.getElementById("serviceCharge").innerHTML = "£ " + serviceCharge ;
//WRITE THE SERVICE CHARGE AMOUNT TO THE HIDDEN FIELD FOR THE DB TO READ
document.getElementById("OLC_amount").value = serviceCharge;
//WRITE THE TOTAL BEFORE THE SERVICE CHARGE IS APPLIED INTO THE HIDDEN FIELD FOR THE DB
document.getElementById("pre_OLC_amount").value = document.getElementById("amount").value
//WRITE THE NEW TOTAL INTO THE PAGE
document.getElementById("total").innerHTML = "£ " + newTotal;
//WRITE THE NEW TOTAL INTO A HIDDEN FILED FOR THE DB
document.getElementById("totalAmount").value = newTotal;
//WRITE THE FIGURE THAT STREAMLINE READS INTO THE HIDDEN FIELD
document.getElementById("streamValue").value = streamlineFigure;
}
// ------------------------------------------------------------------- 
// MoneyFormat (value) 
//   Pass a value to be converted to money format - 2 decimal places. 
//   Returns the formatted value 
// ------------------------------------------------------------------- 
function MoneyFormat(amount) { 
 var val = parseFloat(amount); 
 if (isNaN(val)) { return "0.00"; } 
 if (val <= 0) { return "0.00"; } 
 val += ""; 
 // Next two lines remove anything beyond 2 decimal places 
 if (val.indexOf('.') == -1) { return val+".00"; } 
 else { val = val.substring(0,val.indexOf('.')+3); } 
 val = (val == Math.floor(val)) ? val + '.00' : ((val*10 == 
Math.floor(val*10)) ? val + '0' : val); 
 return val; 
 }


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function openImgUploadWindow(session,img) {
var url
self.name = "mainContent"
url = "image-upload.aspx?id=" + session +"&img="+img
MM_openBrWindow(url,'','location=yes,scrollbars=yes,resizable=no,width=515,height=500');

}
//USED FOR BUY SELL
//sends uploaded imaged data from the parent image upload window to the add property buy sell page for adding to db
function sendImageDataToOpener(imgNo,imgThumbPath,imgPath){
var imgPrev 
var imgSRCThumb
var imgSRC
imgPrev = "image"+imgNo
imgSRCThumb = "imageThumbSRC"+imgNo
imgSRC = "imageSRC"+imgNo
opener.document.getElementById(imgSRCThumb).value = imgThumbPath
opener.document.getElementById(imgSRC).value = imgPath
//opener.document.form1.imageSRC1.value = imgPathThumb; 
opener.document.images[imgPrev].src=imgPath; 
self.close();
}

function valbuySellAdd() { 
var oEditor = FCKeditorAPI.GetInstance('adContent') ;
var email
var errors
var selected
selected = document.getElementById("forsaletolet").selectedIndex
errors= ''
email = document.getElementById("contactEmail").value
email = email.indexOf('@')
	selected = document.getElementById("development").selectedIndex
	if (document.getElementById("development").options[selected].value == "1") {
		errors = "-You must select a development.\n"
	} 
	selected = document.getElementById("forsaletolet").selectedIndex
	if (document.getElementById("forsaletolet").options[selected].value == "1") {
		errors += "-You must select if your property is to let or for sale.\n"
	} 
	if (document.getElementById("contactEmail").value == "") {
		errors += "-You must enter a contact email address.\n"
	}	
	if (document.getElementById("contactEmail").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address.\n"
	}
	}
	if (document.getElementById("propName").value == "") {
		errors +="-You must enter a property name.\n"
	}
	if (document.getElementById("cost").value == "") {
		errors +="-You must enter a cost.\n"
	}
	selected = document.getElementById("paymentOption").selectedIndex
	if (document.getElementById("forsaletolet").options[selected].value == "1") {
		errors += "-You must select a payment type.\n"
	} 	
	if (document.getElementById("terms").checked == false) {
		errors += "-You must agree to our terms and conditions.\n"
	}
	
// check description and do word count	
	if (oEditor.EditorDocument.body.innerHTML == ""){
		errors +="-You must enter a description\n"
	}
	
// Get the length of the text including html tags
var oBody = oEditor.EditorDocument.body.innerHTML ;
var chars = (oBody.length);

// Excluding html tags
var start_tag = /<.*?>/g;
var end_tag = /<\/.*?>/g;
var nohtml = oBody.replace(end_tag,'');
nohtml = nohtml.replace(start_tag,'');

var temp_arr = nohtml.split(/[^\b\w+\b]/g);
var arr = new Array(); arr_index = 0;
for(i = 0; i < temp_arr.length; i++){
if(temp_arr[i] != ""){
arr[arr_index] = temp_arr[i];
arr_index++;
}
}
	if (arr.length>200){
		errors +="-You cannot enter more than 200 words.\n"	
		//alert(arr.length)
	}
//alert(arr.length + " Words [not including html tags]\n\n" + chars + " Characters [including html tags]");
	

//If there are errors then alert the user



  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else if (document.getElementById("imageSRC1").value == "images/no-img.jpg"){
			var answer = confirm ("You have not added an image, are you sure you\n want to continue without adding an image?");
				if (answer== true) {
					//alert("wants to continue")
				  	document.forms["form1"].submit();
				}else{
					//alert("i will submit here")
					document.forms["form1"].submit();					
				}	
	} else {
			//alert("i will submit here")
			document.forms["form1"].submit();		
	}
}

function valBuySellExtend() {
	var errors
	errors=''
	if (document.getElementById("terms").checked == false) {
		errors += "-You must agree to our terms and conditions.\n"
	}	
	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	}
	else {
			//alert("i will submit here")
			document.forms["form1"].submit();		
	}	
}
function closePaymentPage(){
	setTimeout("self.close()", 10);
}

function valFilmLocationForm() {
var email
var errors
errors= ''
email = document.getElementById("email").value
email = email.indexOf('@') 
	if (document.getElementById("name").value == "") {
		errors += "-You must enter a contact name.\n"
	}
	if (document.getElementById("company").value == "") {
		errors += "-You must enter a company name.\n"
	}	
	if (document.getElementById("telNo").value == "") {
		errors += "-You must enter a contact phone number.\n"
	}	
	if (document.getElementById("email").value == "") {
		errors += "-You must enter a contact email address.\n"
	}	
	if (document.getElementById("email").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address.\n"
	}
	}
//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else {
		document.forms["filmInterest"].submit();
		 document.MM_returnValue = (errors == '');
	}	
}

function switchParkingLetLength(whichType) {
	if (whichType == "yearly") {
	resetParkingForms();
	document.getElementById("rentYearly").style.display = "block"
	document.getElementById("rentMonthly").style.display = "none"
	document.getElementById("rentWeekly").style.display = "none"	
	document.getElementById("rentDaily").style.display = "none"
	document.getElementById("rentHourly").style.display = "none"	
	} else if (whichType =="monthly") {
	resetParkingForms();		
	document.getElementById("rentYearly").style.display = "none"
	document.getElementById("rentMonthly").style.display = "block"
	document.getElementById("rentWeekly").style.display = "none"		
	document.getElementById("rentDaily").style.display = "none"
	document.getElementById("rentHourly").style.display = "none"		
	} else if (whichType == "weekly") {
	resetParkingForms();		
	document.getElementById("rentYearly").style.display = "none"
	document.getElementById("rentMonthly").style.display = "none"
	document.getElementById("rentWeekly").style.display = "block"		
	document.getElementById("rentDaily").style.display = "none"	
	document.getElementById("rentHourly").style.display = "none"		
	} else if (whichType == "daily") {
	resetParkingForms();		
	document.getElementById("rentYearly").style.display = "none"
	document.getElementById("rentMonthly").style.display = "none"
	document.getElementById("rentWeekly").style.display = "none"		
	document.getElementById("rentDaily").style.display = "block"	
	document.getElementById("rentHourly").style.display = "none"		
	} else if (whichType == "hourly") {
	resetParkingForms();		
	document.getElementById("rentYearly").style.display = "none"
	document.getElementById("rentMonthly").style.display = "none"
	document.getElementById("rentWeekly").style.display = "none"		
	document.getElementById("rentDaily").style.display = "none"	
	document.getElementById("rentHourly").style.display = "block"		
	}

}
function resetParkingForms(){
	document.getElementById("yearly").reset()
	document.getElementById("monthly").reset()
	document.getElementById("weekly").reset()	
	document.getElementById("daily").reset()	
	document.getElementById("hourly").reset()	
}
function submitParking(whichSpace, whichSpaceName) {  
	streamlineFigure = document.getElementById("cost").value+"00";
	document.getElementById("whichSpace").value = whichSpace
	document.getElementById("pSpace").value = whichSpaceName	
	document.getElementById("streamCost").value = streamlineFigure;	
	document.forms["space"].submit();
}
function openParkingPayment(theURL,winName,features,parentURL) { //v2.0
  window.open(theURL,winName,features);
  window.location = parentURL
}
function switchParkingRegForm(whichType) {
	if (whichType == "myChainbow") {
	document.getElementById("frmMyChainbow").style.display = "block"
	document.getElementById("frmRegister").style.display = "none"
	} else if (whichType == "register") {
	document.getElementById("frmMyChainbow").style.display = "none"
	document.getElementById("frmRegister").style.display = "block"		
	}
}
function valParkingReg() {
var email
var errors
errors= ''
email = document.getElementById("email").value
email = email.indexOf('@') 
	if (document.getElementById("name").value == "") {
		errors += "-Contact Name Cannot be Blank.\n"
	}
	if (document.getElementById("email").value == "") {
		errors += "-Email Address Cannot be Blank.\n"
	}	
	if (document.getElementById("email").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address.\n"
	}
	}
	if (document.getElementById("password").value == "") {
		errors += "-Password Cannot be Blank.\n"
	}	
	if (document.getElementById("password").value != document.getElementById("cfmPassword").value) {
		errors += "-Passwords do not match.\n"
	}	
	if (document.getElementById("address1").value == "") {
		errors += "-Address 1 Cannot be Blank.\n"
	}	
	if (document.getElementById("address2").value == "") {
		errors += "-Address 2 Cannot be Blank.\n"
	}	
	if (document.getElementById("address3").value == "") {
		errors += "-Address 3 Cannot be Blank.\n"
	}		
	if (document.getElementById("postCode").value == "") {
		errors += "-Post Code Cannot be blank.\n"
	}	
	if (document.getElementById("telNo").value == "") {
		errors += "-Telephone Number Cannot be Blank.\n"
	}	

//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else {
		document.forms["register"].submit();
		 document.MM_returnValue = (errors == '');
	}	
}
function valMCParkingReg() {
var email
var errors
var selected
errors= ''
email = document.getElementById("MCEmail").value
email = email.indexOf('@') 
	selected = document.getElementById("MCDev").selectedIndex
	if (document.getElementById("MCDev").options[selected].value == "0") {
		errors += "-You must select a development.\n"
	}
	if (document.getElementById("MCFlat").value == "") {
		errors += "-Flat Name Cannot be Blank.\n"
	}
	if (document.getElementById("MCName").value == "") {
		errors += "-Name Cannot be Blank.\n"
	}	
	if (document.getElementById("MCEmail").value == "") {
		errors += "-Email Address Cannot be Blank.\n"
	}	
	if (document.getElementById("MCEmail").value != "") {
	if (email<1 ){
		errors +="-Email must contain a valid email address.\n"
	}
	}
	
	
//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else {
		document.forms["registerMyChainbow"].submit();
		 document.MM_returnValue = (errors == '');
	}	
}
function valParkingLogin() {
var email
var errors
var selected
errors= ''
email = document.getElementById("username").value
email = email.indexOf('@') 

	if (document.getElementById("username").value == "") {
		
		errors += "-Username Cannot be Blank.\n"
	}	
	if (document.getElementById("username").value != "") {
	if (email<1 ){
		errors +="-Username must contain a valid email address.\n"
	}
	}
	if (document.getElementById("password").value == "") {
		errors += "-Password Cannot be Blank.\n"
	}	
	selected = document.getElementById("myChainbowUser").selectedIndex
	if (document.getElementById("myChainbowUser").options[selected].value == "0") {
		errors += "-Are you a my chainbow user is not selected.\n"
	}
	
	
//If there are errors then alert the user
  	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} 
	else {
		document.forms["loginParking"].submit();
		 document.MM_returnValue = (errors == '');
	}	
}

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 MC_registration_owner_or_tenant(type) {
	if (type=='o') {
		document.getElementById('Submit').style.display='none'
		document.getElementById('occupierInfo').style.display='block'		
	} else if (type=='t') {
		document.getElementById('occupierInfo').style.display='none'
		document.getElementById('Submit').style.display='block'
	}
}

function MC_registration_show_submit() {
	document.getElementById('Submit').style.display='block'	
}
function MC_registration_submit_s1() {
	var selected
	var errors
	errors = ''
	selected = document.getElementById("development").selectedIndex
	if (document.getElementById("development").options[selected].value == "0") {
		errors += "-No development selected.\n"
	}
	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} else {	
/*CHECK IF THIS IS AN OWNER OR TENANT*/	
	for (var i=0; i < document.mcRegister.ownerTenant.length; i++){
		if (document.mcRegister.ownerTenant[i].checked){
			var ownerTenant = document.mcRegister.ownerTenant[i].value;
		}
	}
/*IF ITS A TENANT THEN GO TO THE TENANT REGISTRATION PAGE*/
	if (ownerTenant == 'tenant'){		
		document.forms["mcRegister"].action="my-chainbow-reg-s2-tenant-o-ocupier.asp";
		document.forms["mcRegister"].submit();
		document.MM_returnValue = (errors == '');
	}
/*IF ITS AN OWNER CHECK IF THEY OCCUPY OR LET THE PROPERTY*/
	if (ownerTenant == 'owner'){
		for (var i=0; i < document.mcRegister.occupyLet.length; i++){
			if (document.mcRegister.occupyLet[i].checked){
			var occupyLet = document.mcRegister.occupyLet[i].value;
			}
		}
	}
	/*IF OCCUPY LET IS SET TO YES THEN ITS AN OWNER WHO LIVES AT THE PROPERTY */
	if (occupyLet == 'y'){
		document.forms["mcRegister"].action="my-chainbow-reg-s2-tenant-o-ocupier.asp";
		document.forms["mcRegister"].submit();
		document.MM_returnValue = (errors == '');
	}
	/*IF OCCUPY LET IS SET TO NO THEN ITS AN OWNER WHO LIVES AWAY FROM THE PROPERTY */
	if (occupyLet == 'n'){
		document.forms["mcRegister"].action="my-chainbow-reg-s2-owner.asp";
		document.forms["mcRegister"].submit();
		document.MM_returnValue = (errors == '');
	}	
	}
}
function MC_registration_submit_s2() {
	var selected
	var errors
	var email
	email = document.getElementById("eMail").value
	email = email.indexOf('@') 	
	reWhiteSpace = new RegExp(/\s/g);
	errors = ''
	selected = document.getElementById("propName").selectedIndex
	if (document.getElementById("propName").options[selected].value == "0") {
		errors += "-Property name/number must be selected.\n"
	}	
	if (document.getElementById("fullName").value == "") {
		errors += "-Name Cannot be Blank.\n"
	}	
	if (document.getElementById("eMail").value == "") {
		errors += "-Email address Cannot be Blank.\n"
	}	
	if (document.getElementById("eMail").value != "") {
	if (email<1 ){
		errors +="-Email address must contain a valid email address.\n"
	}
	}
     // Check for white space in email address and amment text box
	//document.getElementById("eMail").value = document.getElementById("eMail").value.replace(new RegExp(/\s/g) ,"");	
     if (reWhiteSpace.test(document.getElementById("eMail").value)) {
          errors += "-Email address cannot contain a space.\n";
         // return false;
     }		
	if (document.getElementById("devName").value == "") {
		errors += "-Development Name Cannot be Blank.\n"
	}	
	if (document.getElementById("postCode").value == "") {
		errors += "-Post Code Cannot be Blank.\n"
	}	
	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} else {
		document.forms["MC_registration"].submit();
	}
}
function MC_registration_submit_s2_owner_away() {
	var selected
	var errors
	var email
	email = document.getElementById("eMail").value
	email = email.indexOf('@') 
	
    reWhiteSpace = new RegExp(/\s/g);
	
	errors = ''
	selected = document.getElementById("propName").selectedIndex
	if (document.getElementById("propName").options[selected].value == "0") {
		errors += "-Property name/number must be selected.\n"
	}	
	if (document.getElementById("fullName").value == "") {
		errors += "-Name Cannot be Blank.\n"
	}	
	if (document.getElementById("eMail").value == "") {
		errors += "-Email address Cannot be Blank.\n"
	}	
	if (document.getElementById("eMail").value != "") {
	if (email<1 ){
		errors +="-Email address must contain a valid email address.\n"
	}
	}
     // Check for white space in email address and amment text box
	//document.getElementById("eMail").value = document.getElementById("eMail").value.replace(new RegExp(/\s/g) ,"");	
     if (reWhiteSpace.test(document.getElementById("eMail").value)) {
          errors += "-Email address cannot contain a space.\n";
         // return false;
     }	
	if (document.getElementById("address1").value == "") {
		errors += "-Address 1 Cannot be Blank.\n"
	}	
	if (document.getElementById("postCode").value == "") {
		errors += "-Post Code Cannot be Blank.\n"
	}	
	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} else {
		document.forms["MC_registration"].submit();
	}
}

function MC_val_full_access_request() {
	var selected
	var errors
	var email
	email = document.getElementById("email").value
	email = email.indexOf('@') 	
	errors = ''
	selected = document.getElementById("development").selectedIndex	
	if (document.getElementById("email").value == "") {
		errors += "-Email address Cannot be Blank.\n"
	}	
	if (document.getElementById("email").value != "") {
	if (email<1 ){
		errors +="-Email address must contain a valid email address.\n"
	}
	}	
	if (document.getElementById("name").value == "") {
		errors += "-Name Cannot be Blank.\n"
	}	
	if (document.getElementById("development").options[selected].value == "0") {
		errors += "-Development must be selected.\n"
	}
	if (document.getElementById("propRef").value == "") {
		errors += "-Property refrence Cannot be Blank.\n"
	}	
	
	if (errors != ''){
		alert('The following error(s) have occurred:\n'+errors);
	} else {
		document.forms["fullAccess"].submit();
	}	
}
//-->