/* British Land Common JavaScript */

function agreetcs(form)
{
if (form.chkbox.checked)
{
/*window.location.href = varHref; */ 
popUp('/content/property/property_offer_form.asp?printable=true','name','800','600','yes');
return false;
}
else
{
alert('Please check the box if you have read, understood and agree to the terms and conditions');
return false;
}
}

function doPropertySubmit()
{
  QuickSearch.submit();
}

function entsub(myform) {
  		if (window.event && window.event.keyCode == 13)
   		 myform.submit();
  		else
    		return true;}


function blank(url){
	winId = "britishland" + Math.floor((100*(Math.random())));
	leftPos = window.screenLeft + 10;
	topPos = window.screenTop + 10;
	properties = 'left=' + leftPos + ',top=' + topPos + ', location=yes, status=yes, toolbar=yes, menubar=yes, directories=yes, resizable=yes, scrollbars=yes';
	window.open(url,winId,properties);
}

function InputReset(FromName,FieldName,CurrentValue) {
	if (document[FromName][FieldName].value == CurrentValue) {
		document[FromName][FieldName].value = '';
	}
}


/* List Show / Hide Functionality */
		
	var listDisplayState = "none";
	var listDisplayButtonText = "";
	var listID = "flip_this_list";
	var buttonID = "flip_this_button";
	
	function flipList(){
		document.getElementById(listID).style.display = listDisplayState;
		listDisplayState = ( listDisplayState == "none" ? "block" : "none" );
		listDisplayButtonText = ( listDisplayState == "none" ? "Hide additional information >" : "Show additional information >" );
		document.getElementById(buttonID).innerHTML = listDisplayButtonText;
	}

function popUp(mypage, myname, w, h, scroll) {
 var winl = (screen.width - w) / 2;
 var wint = (screen.height - h) / 2;
 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes'
 win = window.open(mypage, myname, winprops)
 if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



function printPage(){if(window.print){window.print();}}


