function proprefsearch()
{
	var ref;
	var url;
	var curr;
	curr = document.getElementById("hdnCurrencyCd").value;
	ref = document.getElementById("propref").value;
	url="proprefresult.aspx?QS=3F5733B2-10DC-472F-8A10-4ADB0046C133~" + ref + "~" + curr + "~N~~H";
	if (ref == "")
 	{
       alert('Please enter a Property Reference');
	     window.location="Home.aspx";
 	}
	
	if (ref	!= "")	
	{
		window.location=url;
	}
}

function PropertyRefSearchAndCurrencySelect()
{
	selcurrency = document.getElementById("hdnCurrencyCd").value;
	document.write('<table class="hand" width="100%" border="0" cellpadding="0" cellspacing="0">')
	document.write('<tr><td colspan="2"><strong>Select your currency</strong></td></tr>')
	document.write('<tr><td align="left" valign="middle"><span id="select"><select onchange="changeCurrency(this);" class="quicksearch" id="select" name="select" TabIndex="7" size="1">')
	if (selcurrency == "USD")
 	{
     document.write('<option value="EUR">Euro </option><option value="CAD">Canadian Dollars </option><option selected="selected" value="USD">US Dollars</option><option value="GBP">British Pounds </option>')
 	}
		if (selcurrency == "CAD")
 	{
     document.write('<option value="EUR">Euro </option><option selected="selected" value="CAD">Canadian Dollars </option><option value="USD">US Dollars</option><option value="GBP">British Pounds </option>')
 	}
		if (selcurrency == "EUR")
 	{
     document.write('<option selected="selected" value="EUR">Euro </option><option value="CAD">Canadian Dollars </option><option value="USD">US Dollars</option><option value="GBP">British Pounds </option>')
 	}
		if (selcurrency == "GBP")
 	{
     document.write('<option value="EUR">Euro </option><option value="CAD">Canadian Dollars </option><option value="USD">US Dollars</option><option selected="selected" value="GBP">British Pounds </option>')
 	}
	if (selcurrency == "")
 	{
     document.write('<option value="EUR">Euro </option><option value="CAD">Canadian Dollars </option><option value="USD">US Dollars</option><option selected="selected" value="GBP">British Pounds </option>')
 	}
	document.write('</select></span></td><td width="46" valign="top"></td></tr>')




	/** BUG IN HERE **/
	document.write('<tr><td colspan="2"><strong>Search by Property Ref</strong></td></tr>')
	document.write('<tr><td align="left" valign="middle"><span id"propref"><label>')
	document.write('<input id="propref" name="propref" maxlength="7" type="text" onkeydown="return propRefKeyDown(event)" TabIndex="9" class="quicksearchtext"/></label></span></td>')
	document.write('<td valign="middle"><a onkeydown="return propRefKeyDown(event)" onclick="proprefsearch()" onkeydown="javascript:proprefsearch()" style="cursor:hand"><img src="images/go.gif" alt="go" width="40" height="20" TabIndex="10" /></a></td></tr></table>') 
	
}




//NB home_page.js originally...
function propRefKeyDown(e)
{
	var keyCode = (window.event) ? event.keyCode : e.which;
	if(keyCode == 13)
        {
        	proprefsearch();
		return false; // Prevent the form from submitting normally
	}
	else
	return true;
}







function VirtualTourSample()
{
	document.write('<div id="VTTable">');
	document.write('<p>');
	document.write('<a href="VirtualTour.html"><img src="images/vt.jpg" height="57" width="87" alt="Take a Virtual Tour" align="left" /></a>');
	document.write('<a href="VirtualTour.html">Virtual Tours</a>');
	document.write('<br />');
	document.write('<br />');
	document.write('Take a virtual tour around one of our many cottages&hellip;');
	document.write('</p>');
	document.write('</div>');
}

var newWin = null; 
function popUp(strURL, strType, strHeight, strWidth) { 
 if (newWin != null && !newWin.closed) 
   newWin.close(); 
 var strOptions=""; 
 if (strType=="console") 
   strOptions="resizable,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="fixed") 
   strOptions="status,height="+ 
     strHeight+",width="+strWidth; 
 if (strType=="elastic") 
   strOptions="toolbar,menubar,scrollbars,"+ 
     "resizable,location,height="+ 
     strHeight+",width="+strWidth; 
 newWin = window.open(strURL, 'newWin', strOptions); 
 newWin.focus(); 
}

function VTPopup(URL)
{
	window.open(URL, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=390,height=400');
}

function show_modal_dialog_Extender()
{
}

