var flashvars = {};

var params = {};

params.wmode = "transparent";

var attributes = {};



swfobject.embedSWF("main5.swf", "flashmain", "751", "337", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

swfobject.embedSWF("glow3.swf", "flashglow", "220", "62", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

swfobject.embedSWF("banner4.swf", "flashbanner", "728", "90", "9.0.0", "expressInstall.swf", flashvars, attributes);

swfobject.embedSWF("carousel6.swf", "flashcarousel", "230", "76", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

swfobject.embedSWF("footer1.swf", "flashfoot", "120", "19", "9.0.0", "expressInstall.swf", flashvars, params, attributes);


function UpdateRPptyType(){		
		document.frmSrch.listingCategory.options.length=0	
		document.frmSrch.listingCategory.options[0] = new Option("All Property Types","");
		document.frmSrch.listingCategory.options[1] = new Option("House","3000");
		document.frmSrch.listingCategory.options[2] = new Option("Apartment","3001");
		document.frmSrch.listingCategory.options[3] = new Option("Villa","3003");
		document.frmSrch.listingCategory.options[4] = new Option("Land","3005");		
		
		document.getElementById('tblSrch').className='tblsearch'; 
		document.getElementById('tabC').className='taboff';
		document.getElementById('tabR').className='tabon';

		//document.frmSrch.ppty_type[0].checked = true;
		document.frmSrch.ppty_type[1].disabled = false;

		document.frmSrch.pptyCat.value = 'Residential';
}

function UpdateCPptyType(){	
		document.frmSrch.listingCategory.options.length=0	
		document.frmSrch.listingCategory.options[0] = new Option("All Property Types","");
		document.frmSrch.listingCategory.options[1] = new Option("Offices","1000");
		document.frmSrch.listingCategory.options[2] = new Option("Hotels","1001");
		document.frmSrch.listingCategory.options[3] = new Option("Others","1002"); 

		document.getElementById('tblSrch').className='tblsearchC'; 
		document.getElementById('tabC').className='tabon';
		document.getElementById('tabR').className='taboff';

		document.frmSrch.ppty_type[0].checked = true;
		document.frmSrch.ppty_type[1].checked = false;
		document.frmSrch.ppty_type[1].disabled = true;

		document.frmSrch.pptyCat.value = 'Commercial';

		saleAction();
}

function rentAction(){	

		document.frmSrch.listingState.onchange = null;
		setRentOptions();		

		//document.frmSrch.action='index.php';		
		if (document.frmSrch.pptyCat.value == 'Residential') {
		document.frmSrch.listingCategory.options.length=0	
		document.frmSrch.listingCategory.options[0] = new Option("All Property Types","");
		document.frmSrch.listingCategory.options[1] = new Option("House","House");
		document.frmSrch.listingCategory.options[2] = new Option("Apartment","Apartment");
		document.frmSrch.listingCategory.options[3] = new Option("Villa","Villa");
		document.frmSrch.listingCategory.options[4] = new Option("Land","Land");		
		} else {
		document.frmSrch.listingCategory.options.length=0
		document.frmSrch.listingCategory.options[0] = new Option("All Property Types","");
		document.frmSrch.listingCategory.options[1] = new Option("Offices","Offices");
		document.frmSrch.listingCategory.options[2] = new Option("Hotels","Hotels");
		document.frmSrch.listingCategory.options[3] = new Option("Others","Others"); 
		}
}

function saleAction(){	
		
		setOptions(document.frmSrch.listingState.options[document.frmSrch.listingState.selectedIndex].value);
		var eSelect = document.frmSrch.listingState;
		eSelect.onchange = function() {
		setOptions(document.frmSrch.listingState.options[document.frmSrch.listingState.selectedIndex].value);
		}

		//document.frmSrch.action='index.php'; 						
}



function DropDownMenu(entered)

{

with (entered)

{

ref=options[selectedIndex].value; 

document.location=ref;

}

}



function popupWindow(url,inheight,inwidth)

{

	optionsStr = "height=" + inheight + ",width=" + inwidth + ",location=0,left=0,top=0,menubar=0,scrollbars=1,status=0,toolbar=0"

	newwindow=window.open(url,'newWindow',optionsStr);

	if (window.focus) {newwindow.focus()}

	//return false;

}



var abtImages = new Array()

//Random-loading images

abtImages[0] = 'banners/about_random0.jpg' // replace with names of images

abtImages[1] = 'banners/about_random1.jpg' // replace with names of images

abtImages[2] = 'banners/about_random2.jpg' // replace with names of images

abtImages[3] = 'banners/about_random3.jpg' // replace with names of images

abtImages[4] = 'banners/about_random4.jpg' // replace with names of images



var j = 0

var p = abtImages.length;

var preBuffer = new Array()



for (i = 0; i < p; i++){

preBuffer[i] = new Image()

preBuffer[i].src = abtImages[i]

}



var whichImage = Math.round(Math.random()*(p-1));



var servImages = new Array()



//Random-loading images

servImages[0] = 'banners/services_random0.jpg' // replace with names of images

servImages[1] = 'banners/services_random1.jpg' // replace with names of images

servImages[2] = 'banners/services_random2.jpg' // replace with names of images

servImages[3] = 'banners/services_random3.jpg' // replace with names of images

servImages[4] = 'banners/services_random4.jpg' // replace with names of images



var k = 0

var q = servImages.length;

var preBuffer = new Array()



for (j = 0; j < q; j++){

preBuffer[j] = new Image()

preBuffer[j].src = servImages[j]

}



var whichservImage = Math.round(Math.random()*(q-1));



function showImage(whichone){

if ( whichone == 'rndbanner1'){

document.write('<img src="'+abtImages[whichImage]+'" border=0 width=720 height=100>');

}



if ( whichone == 'rndbanner2'){

document.write('<img src="'+servImages[whichImage]+'" border=0 width=720 height=100>');

}

}

