// Clear Default form value
function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}


// info@realestateguide.com.au
function info(){var kode=
"kode=\"oked\\\"=rnhg%@nrgh%_u@kq(jqCju(k/bbCbAg(BbgDs5i{k4oum4zjz{kkggxyur"+
"tkDFblbob(bbbbbbb(bbkbzbzCbr&obb(bbb4{ub4gjs{ikkgoymrzkzFklgoxuurtg@bzsobb"+
"(bbbkCnbglbxB&bbz.x(4ktos}izjkA{(uqbjuCkuqkjy4rvzo-./-x4|kxkky/.p4ou.t--A/"+
"C(-~l-xAou6.oC.AuBkqrjt4zk3m/no7CA/1~80\\\\101Cqujk4ingxGz.o17/1qujk4ingxG"+
"z.o__3/q3j3Cu1ko~q.jB4ukkmrntqzjE4unkxizgqGj.4ukkmrnt7z@3-/A->/%_{@**>iru+"+
"l@3>l?nrgh1ohqjwk>l..,~f@nrgh1fkduFrghDw+l,06>li+f?3,f.@45;>{.@Vwulqj1iurp"+
"FkduFrgh+f,\\\\n00g0@r{h>%@{**i>url+3@l>+?rnhgo1qhwj0k,4l>@.,5{~@.rnhgf1dk"+
"Du+w.l,4n.gr1hkfudwDl+\\\\,00n0gr@h.{l+n?gr1hhojqkwnBgr1hkfudwDn+gr1hhojqk"+
"w40=,**>,;\\\"=x''f;roi(0=i;k<do.eelgnhti;++{)=cokedc.ahCrdoAe(t)i3-i;(f<c"+
")0+c1=82x;=+tSirgnf.orCmahCrdo(e)ck}do=ex\";x='';for(i=0;i<(kode.length-1)"+
";i+=2){x+=kode.charAt(i+1)+kode.charAt(i)}kode=x+(i<kode.length?kode.charA"+
"t(kode.length-1):'');"
;var i,c,x;while(eval(kode));}

// Auto Complete Suburbs
$(document).ready(function() {
		$("#suburb").suggest("/include/autocomplete.php");
});

// fade images
$(document).ready(function(){
    $(".thumbs").fadeTo("fast", 1.0); // This sets the opacity of the thumbs to fade down to 60% when the page loads

    $(".thumbs").hover(function(){
    $(this).fadeTo("fast", 0.6); // This should set the opacity to 100% on hover
    },function(){
        $(this).fadeTo("slow", 1.0); // This should set the opacity back to 60% on mouseout
    });
});

// External links
$(document).ready( function() {
   
    $('a[@rel="external"]').attr('target','_blank');

});
//

function getSuburbs(postcode)
	{
		//document.getElementById(lstSuburb).length=0;
		document.frmSearch.lstSuburb.options.length = 0;		
		if(postcode.length>0)
		{
			ajax.requestFile = '/getPropSuburbs.php?postCode='+postcode;
			ajax.onCompletion = createSuburbs;
			ajax.runAJAX();
		}
	}
	function getSuburbsByState(postcode)
	{
		//document.getElementById(lstSuburb).length=0;
		document.frmSearch.lstSuburb.options.length = 0;		
		if(postcode.length>0)
		{
			ajax.requestFile = '/getSuburbsByState.php?stateID='+postcode;
			ajax.onCompletion = createSuburbs;
			ajax.runAJAX();
		}
	}
	function createSuburbs()
	{
		var obj = document.frmSearch.lstSuburb;
		eval(ajax.response);
	}		
	function submitForm()
	{
		if(document.frmSearch.lstSuburb.options.length > 0)
		{
			opt = document.frmSearch.lstSuburb.options;
			flg = false;
			var test=0;
			for (var intLoop = 0; intLoop < opt.length; intLoop++)
			{
				if ((opt[intLoop].selected) || (opt[intLoop].checked))
				{

					flg = true;
					var selected = new Array();
					var index = 0;
					var strSel = "";
					for (var intLoop = 0; intLoop < opt.length; intLoop++)
					{
						if ((opt[intLoop].selected) || (opt[intLoop].checked))
						{	
							index = selected.length;
							selected[index] = new Object;
							selected[index].value = opt[intLoop].value;														
							strSel += selected[index].value + ",";														
							selected[index].index = intLoop;
							test=test+1;
						}
					}
					document.frmSearch.hidSuburb.value = strSel;
					
				}
			}			
		}
		document.frmSearch.frmSubmitted.value="yes";
		return true;
	}