function small_on_island_change(Sel)
{
//clear region listbox
document.forms["propertySearch"].propertySearch_region.options.length = 0;
//populate region listbox
for (i=0; i<(Islands[Sel].regs.length); i++)
	{
	document.forms["propertySearch"].propertySearch_region.options[i]= new Option(Islands[Sel].regs[i],i);
	}

}

function clear_small_power()
{
// clear island and region in small power module - small_power.asp

document.forms["propertySearch"].propertySearch_island.value = 0;
document.forms["propertySearch"].propertySearch_region.value = 0;

}




function selectCheck()

// check if less than 1 options are selected


{


	
		
		
var numSelected = 0;
var i;

	for (i = 0;  i < document.forms["search"].building_street_selected.length;  i++)
		{
		if (document.forms["search"].building_street_selected.options[i].selected)
		numSelected++;
		}
	if (numSelected < 1)
	{
	alert("Please select only one option from the list of available Streets or Buildings.");
	document.forms["search"].building_street_selected.focus();
	return (false);
	}

	if (numSelected > 1)
	{
	alert("Please select only one option from the list of available Streets or Buildings.");
	document.forms["search"].building_street_selected.focus();
	return (false);
	}

  	if(parseFloat(document.getElementById("search_priceMin").value)>parseFloat(document.getElementById("search_priceMax").value)) {
   	 alert('Price Min cannot be larger than Price Max');
    	return false;
  	}

  	if (document.forms["search"].loggedin.value != "yes" && (document.getElementById("submit_button").value == "map")) 	
	{	
		// if loggedin has no value then pop open register window
		window.open('popup_registrationLogin_1.asp?next_action=form&feature=map_sold', 'win', 'toolbars=no,scrollbars=yes,status=yes,width=660,height=480');				
		return false;

	}	
	else	
	{
		// if this var is not equal to yes	
			//Redirection code : Secf : 10-13-2006	
		if (document.getElementById("submit_button").value=="SaveSearch")
			{	
			var w = window.open('Search_string.asp','Popup_Window','toolbars=no,scrollbars=yes,status=yes,width=660,height=480');						
			document.search.target = 'Popup_Window';									
			}
		else
			{		
			document.search.target='_self';	 }				
		return true;				  
	}

  // return true;

}

