// 
// properties*.html Javascript
// 
<!---
function AddEstates(obj_form_name){
	var obj_form;
	var go_form;
	var int_dist_cnt = 0;
	var i;

	if(obj_form_name == "propertiesbyrent"){
		obj_form = document.propertiesbyrent;
		go_form = "./propertiesbyrent.php";
	}else if(obj_form_name == "propertiesbyarea"){
		obj_form = document.propertiesbyarea;
		go_form = "./propertiesbyarea.php";
	}else if(obj_form_name == "propertiesbyfloorspace"){
		obj_form = document.propertiesbyfloorspace;
		go_form = "./propertiesbyfloorspace.php";
	}else if(obj_form_name == "propertiesbybedrooms"){
		obj_form = document.propertiesbybedrooms;
		go_form = "./propertiesbybedrooms.php";
	}

	for(i=0;i<obj_form.elements['chk[]'].length;i++){
		if(obj_form.elements['chk[]'][i].checked == true){
			int_dist_cnt++;
		}
	}

	if(int_dist_cnt > 0){
		obj_form.action = go_form;
		obj_form.setvalue.value = "set";
		obj_form.submit();
		return true;
	}

	return false;
}

function OpenEstate(c){
	var url = 'properties/Unit_' + c + '.HTM';
	var wo1;
	wo1 = window.open(url,'estate',
	 				'width=712,height=700,scrollbars=yes,resizable=yes');
	wo1.focus();
}

function OpenMyFavoriteBox(){
	var url = 'controller.php?action=viewWin';
	wo1 = window.open(url,
	 				'estate',
	 				'width=712,height=700,scrollbars=yes,resizable=yes');
	wo1.focus();
}

function OpenComments (c) {
    window.open(c,
                    'comments',
                    'width=480,height=480,scrollbars=yes,status=yes');
}

function OpenTrackback (c) {
    window.open(c,
                    'trackback',
                    'width=480,height=480,scrollbars=yes,status=yes');
}

function WindowClose(){
	window.close();
}

//--->
