$('rentsch_rslts').innerHTML = '<div style="padding-top: 25px;height:105px;background-color: #696969;color:white;"><br /><br /><strong>Please enter select your criteria above...</strong></div>';
$('realtysch_rslts').innerHTML = '<div style="padding-top: 25px;height:105px;background-color: #696969;color:white;"><br /><br /><strong>Please enter select your criteria above...</strong></div>';




$('realtytsch').addEvent('click',function(e) {

		$('realtysch_rslts').innerHTML = '<div><img src="/images/icons/loading.gif" alt="searching" title="searching" /></div>';
		$('realtytsch').disabled = true;
		$('realtytsch').value = 'loading please wait...';
		
		//$('realtysch_rslts').load('/server/response.php?action=str&find='+$('dopsearch').value+'');
		
		new Request.HTML({
			update: $('realtysch_rslts'), 
			onComplete: function(){
				$('realtytsch').disabled = false;
				$('realtytsch').value = 'Search';
			}
		}).get('/server/search_realty.php?Category='+$('RealtyCategory').options[$('RealtyCategory').selectedIndex].value+'&country='+$('Realtycountry').options[$('Realtycountry').selectedIndex].value+'&bathrooms='+$('Realtybathrooms').options[$('Realtybathrooms').selectedIndex].value+'&bedrooms='+$('Realtybedrooms').options[$('Realtybedrooms').selectedIndex].value+'&price='+$('Rentprice').options[$('Realtyprice').selectedIndex].value+'&area='+$('Realtyarea').value+'');
		
		return false;
	
});


		
$('rentsch').addEvent('click',function(e) {

		$('rentsch_rslts').innerHTML = '<div><img src="/images/icons/loading.gif" alt="searching" title="searching" /></div>';
		$('rentsch').disabled = true;
		$('rentsch').value = 'loading please wait...';
		
		//$('rentsch_rslts').load('/server/response.php?action=str&find='+$('dopsearch').value+'');
		
		new Request.HTML({
			update: $('rentsch_rslts'), 
			onComplete: function(){
				$('rentsch').disabled = false;
				$('rentsch').value = 'Search';
			}
		}).get('/server/search_rentals.php?Category='+$('RentCategory').options[$('RentCategory').selectedIndex].value+'&country='+$('Rentcountry').options[$('Rentcountry').selectedIndex].value+'&bathrooms='+$('Rentbathrooms').options[$('Rentbathrooms').selectedIndex].value+'&bedrooms='+$('Rentbedrooms').options[$('Rentbedrooms').selectedIndex].value+'&price='+$('Rentprice').options[$('Rentprice').selectedIndex].value+'&rntype='+$('Rentrntype').options[$('Rentrntype').selectedIndex].value+'&area='+$('Rentarea').value+'');
		
		return false;
	
});


/*
var librarysearch = {
	start : function() {
		//$('aloader').innerHTML = '<p align="center"><img src="/images/icons/handpoint.gif" alt="searching" title="searching" /> Library Search Results returned here</p>';
		$('ploader').innerHTML = '<p align="center"><img src="/images/icons/handpoint.gif" alt="searching" title="searching" /> Product Search Results returned here</p>';
		$('typsch_rslts').innerHTML = '<p align="center"><img src="/images/icons/handpoint.gif" alt="searching" title="searching" /> Search Results for rooms returned here</p>';
		$('rentsch_rslts').innerHTML = '<p align="center"><img src="/images/icons/handpoint.gif" alt="searching" title="searching" /> Search Results for rooms returned here</p>';
		$('realtysch_rslts').innerHTML = '<p align="center"><img src="/images/icons/handpoint.gif" alt="searching" title="searching" /> Search Results for rooms returned here</p>';

		$('librarysearch').onsubmit = function() {
			if($('librarysearchselect').selectedIndex == 0){
				alert('Please Select Search Type');
				$('librarysearchselect').focus();
				return false;
			}
			if($('librarysearchtext').value == ''){
				alert('Search Required'); 
				$('librarysearchtext').focus();
				return false;
			}
			$('aloader').innerHTML = '<div style="padding-top: 25px;height:45px;background-color: #696969;color:white;">Searching.........Please wait for your search results.</div>';
			//var myCall = new Ajax ('/server/response.php', {evalScripts: true, postBody: 'action='+$('librarysearchselect').value+'&find='+$('librarysearchtext').value+'', update: $('aloader'), onComplete: librarysearch.run});
			//myCall.request();
			
		
			
			
			$('librarysearchbtn').disabled = true;
			$('librarysearchbtn').value = 'loading please wait...';
			return false;
};

$('productsearch').onsubmit = function() {
	if($('dopsearch').value == ''){
		alert('Search Required'); 
		$('dopsearch').focus();
		return false;
	}
	$('ploader').innerHTML = '<div style="padding-top: 25px;height:45px;background-color: #696969;color:white;">Searching.........Please wait for your search results.</div>';
			//var myCall = new Ajax ('/server/response.php', {evalScripts: true, postBody: 'action=str&find='+$('dopsearch').value+'', update: $('ploader'), onComplete: librarysearch.run2});
			//myCall.request();
		
		new Request.HTML({
			update: $('ploader'), 
			onComplete: librarysearch.run
		}).get('/server/response.php?action=str&find='+$('dopsearch').value+'');
			
			$('btnpsearch').disabled = true;
			$('btnpsearch').value = 'loading please wait...';
			return false;
		}
	},
	run : function() {
		$('librarysearchbtn').disabled = false;
		$('librarysearchbtn').value = 'Search';
	},
	run2 : function() {
		$('btnpsearch').disabled = false;
		$('btnpsearch').value = 'Search';
	}
};
//window.onDomReady(librarysearch.start);
window.addEvent('domready', function() {
	//librarysearch.start();
});*/