//<script language=javascript>
function OpenPhoto(strFileName)
{
	window.open("/ctrl_property/property_photo_view.aspx?FileName=" + strFileName,"_blank","height=415,width=540,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
	return false;
}
function OpenP(ref)
{
	window.open("/ctrl_person/person_details.aspx?person_ref=" + ref,"_blank","height=450,width=585,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function OpenO(ref)
{
	window.open("/ctrl_office/office_details.aspx?office_ref=" + ref,"_blank","height=480,width=570,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function Login() 
{
		window.open("http://oms.myproperty.co.za/default.aspx?ref=0","_blank","height=500,width=500,scrollbars=yes,menubar=no,statusbar=yes,toolbar=no,resizable=yes",false);	
}
function EmailA(ref1,ref2)
{
	window.open("/ctrl_property/property_emailagent.aspx?person_ref=" + ref1 + "&property_ref=" + ref2,"_blank","height=390,width=490,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function KS() {
		location.href= "/keyword_search.aspx?keyword=" + txtkeyword.value
}
function EmailA(ref1,ref2)
{
	window.open("/ctrl_property/property_emailagent.aspx?person_ref=" + ref1 + "&property_ref=" + ref2,"_blank","height=390,width=490,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function SI(strRef,intType) {
	window.open("/saved-items.aspx?ref=" + strRef + "&type=" + intType,"MySavedItems","top=0,left=0,height=480,width=480,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function PView(intRef,intType) {
	window.open("/ctrl_property/property_search_detail.asp?PROPERTY_REF=" + intRef + "&TYPE=" + intType + "&E=F","_blank","top=0,left=0,height=480,width=690,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function P2View(intRef,intType) {
	window.open("/ctrl_property/property_details.aspx?PROPERTY_REF=" + intRef + "&TYPE=" + intType + "&E=F","_blank","top=0,left=0,height=480,width=690,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);
}
function AView(intAgentRef) {
	window.open("/ctrl_person/agent_view.asp?AGENT_REF=" + intAgentRef,"_blank","height=400,width=590,scrollbars=yes,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);	
}
function VContact(intPropertyRef,intAgentRef,strAgentEmail) {
	window.open("/ctrl_person/contact_user.aspx?PROPERTY_REF=" + intPropertyRef + "&AGENT_REF=" + intAgentRef + "&AGENT_EMAIL=" + strAgentEmail,"_blank","height=290,width=570,scrollbars=no,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);	
}
function PEmail(intRef) {
	window.open("/ctrl_property/property_email.aspx?PROPERTY_REF=" + intRef,"_blank","height=350,width=500,scrollbars=no,menubar=no,statusbar=no,toolbar=no,resizable=yes",false);	
}
	function sm(ref){
		var a = new String();
		a = ref.id;
		ms0.className = "ms_i";
		ms1.className = "ms_i";
		ms2.className = "ms_i";
		ms3.className = "ms_i";
		ms4.className = "ms_i";
		ms5.className = "ms_i";
		m0.className = "m_i";
		m1.className = "m_i";
		m2.className = "m_i";
		m3.className = "m_i";
		m4.className = "m_i";
		m5.className = "m_i";
		ref.className = "ms_a";
		document.all(a.replace("s","")).className = "m_a";		
}
	function Search()
	{
		window.location.href = "/ctrl_property/property_search_result.asp?PAGE=1&TOWN_NAME=" + selT.value + "&SUBURB_NAME=" + selS.value + "&FROM=" + sf.value + "&TO=" + st.value + "&TYPE=" + selType.value + "&STATUS=TRUE";
	}
	function QuickView() {
		if (txtRef.value != "")
			{
			if (String(txtRef.value).substring(0,2) == "MP") {
				P2View(String(txtRef.value).substring(2,8),1);
				}
				else {
				PView(txtRef.value,1);}
			}
	}
	function openMenu(type,object,parent){
	  if (document.getElementById)
	  if(type=='on'){
	    document.getElementById(object).style.visibility="visible"; 
		document.getElementById(object).style.zIndex="100";
	  }
	      else {
		  document.getElementById(object).style.visibility="hidden";
	  }
	  return false;
	}
function BC(amount) {
		window.open("/finance/bond_calculator.htm","_blank", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=370,height=470");
}
function CC(from,to,amount) {
		window.open('http://www.hifx.co.uk/agent/myproperty/converter.asp?from=' + from + '&to=' + to + '&amount=' + amount,'Converter', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=515,height=120');
}
//</script>