<!--

function validEmail(email) {
	invalidChars = " /:"
	if (email == "") {
		return (false);
	}
	for (i=0; i < invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) != -1) {
			return (false);
		}
	}
	atPos = email.indexOf("@", 1)
	if (atPos == -1) {
		return (false);
	}
	periodPos = email.indexOf(".", atPos)
	if (periodPos == -1) {
		return (false);
	}
	if (periodPos + 3 > email.length) {
		return (false);
	}
	return (true);
}

function checkSearchForm(){
{
	if (document.property.market.value=="")
	{
		alert("Silahkan pilih opsi yang tersedia");
		document.property.market.focus();
		return false;
	}
	if (document.property.prop.value=="")
	{
		alert("Silahkan pilih jenis properti yang Anda cari");
		document.property.prop.focus();
		return false;
	}	
	if (document.property.lok.value=="")
	{
		alert("Silahkan pilih lokasi properti yang Anda cari");
		document.property.lok.focus();
		return false;
	}	
	if (document.property.price.value=="")
	{
		alert("Silahkan pilih harga properti yang Anda cari");
		document.property.price.focus();
		return false;
	}
}
	return true;
}

function checkSearchOffice(){
{
	if (document.off.daerah.value=="")
	{
		alert("Silahkan pilih lokasi kantor ERA yang Anda cari");
		document.off.daerah.focus();
		return false;
	}
}
	return true;
}

function WinOpen(theURL, Name, popW, popH, scroll) 
	{ // V 1.0
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',noresize'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

/*collapse expand single item
by Leo Charre & Jesse Fergusson
Internet Connection  2004 2005 ©
www.internetconnection.net
*/

imgout=new Image(9,9);
imgin=new Image(9,9);

/////////////////BEGIN USER EDITABLE///////////////////////////////
	imgout.src="pics/btn_popup_off.gif";
	imgin.src="pics/btn_popup_on.gif";
///////////////END USER EDITABLE///////////////////////////////////

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide funtion depends on if element is shown or hidden
function shoh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');			
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}

//-->