function loadboxN(){
var IntPath = document.getElementById('city1');
var TheOptions = IntPath.options.length;
document.getElementById('city1').options.length = 0;
var TheSelected = document.getElementById('city2');
var arySelected = new Array();
for (var i = 0; i < TheSelected.length; i++) {  
arySelected[TheSelected.options[i].value] = TheSelected.options[i].text;
}
var arySourceOptions = new Array();	
arySourceOptions['Anaheim'] = 'Anaheim'
arySourceOptions['Anaheim Hills'] = 'Anaheim Hills'
arySourceOptions['Brea'] = 'Brea'
arySourceOptions['Buena Park'] = "Buena Park"
arySourceOptions['Fullerton'] = "Fullerton"
arySourceOptions['La Habra'] = "La Habra"
arySourceOptions['La Palma'] = "La Palma"
arySourceOptions['Long Beach'] = 'Long Beach'
arySourceOptions['Orange'] = "Orange"
arySourceOptions['Placentia'] = "Placentia"
arySourceOptions['Villa Park'] = "Villa Park"
arySourceOptions['Yorba+Linda'] = "Yorba Linda"
    for ( testKey in arySourceOptions)
    {
    	if (arySelected[testKey] != arySourceOptions[testKey])
    	{  
    	IntPath.options[IntPath.options.length] = new Option(arySourceOptions[testKey],testKey);
    	}
    }
}

function loadboxC(){
var IntPath = document.getElementById('city1');
var TheOptions = IntPath.options.length;
document.getElementById('city1').options.length = 0;
var TheSelected = document.getElementById('city2');
var arySelected = new Array();
for (var i = 0; i < TheSelected.length; i++) {  
arySelected[TheSelected.options[i].value] = TheSelected.options[i].text;
}

var arySourceOptions = new Array();	
arySourceOptions['Costa Mesa']='Costa Mesa';
arySourceOptions['Cypress']='Cypress';
arySourceOptions['Fountain Valley']='Fountain Valley';
arySourceOptions['Garden Grove']='Garden Grove';
arySourceOptions['Huntington Beach']='Huntington Beach';
arySourceOptions['Irvine']='Irvine';
arySourceOptions['Los Alamitos']='Los Alamitos';
arySourceOptions['Newport Beach']='Newport Beach';
arySourceOptions['Newport Coast']='Newport Coast';
arySourceOptions['Santa Ana']='Santa Ana';
arySourceOptions['Seal Beach']='Seal Beach';
arySourceOptions['Stanton']='Stanton';
arySourceOptions['Tustin']='Tustin';
arySourceOptions['Westminster']='Westminster';
    for ( testKey in arySourceOptions)
    {
    	if (arySelected[testKey] != arySourceOptions[testKey])
    	{  
    	IntPath.options[IntPath.options.length] = new Option(arySourceOptions[testKey],testKey);
    	}
    }
}

function loadboxS(){
var IntPath = document.getElementById('city1');
var TheOptions = IntPath.options.length;
document.getElementById('city1').options.length = 0;
IntPath.options[IntPath.options.length] = new Option('Aliso Viejo','Aliso Viejo');
IntPath.options[IntPath.options.length] = new Option('Coto De Caza','Coto De Caza');
IntPath.options[IntPath.options.length] = new Option('Canyon Areas','Canyon Areas');
IntPath.options[IntPath.options.length] = new Option('Dana Point','Dana Point');
IntPath.options[IntPath.options.length] = new Option('Foothill Ranch','Foothill Ranch'); //s
IntPath.options[IntPath.options.length] = new Option('Ladera Ranch','Ladera Ranch'); //s
IntPath.options[IntPath.options.length] = new Option('Laguna Beach','Laguna Beach');
IntPath.options[IntPath.options.length] = new Option('Laguna Hills','Laguna Hills');
IntPath.options[IntPath.options.length] = new Option('Laguna Niguel','Laguna Niguel');
IntPath.options[IntPath.options.length] = new Option('Lake Forest','Lake Forest');
IntPath.options[IntPath.options.length] = new Option('Mission Viejo','Mission Viejo');
IntPath.options[IntPath.options.length] = new Option('Portola Hills','Portola Hills'); //s
IntPath.options[IntPath.options.length] = new Option('Rancho Santa Marg','Rancho Santa Marg');
IntPath.options[IntPath.options.length] = new Option('San Clemente','San Clemente');
IntPath.options[IntPath.options.length] = new Option('San Juan Capistrano','San Juan Capistrano');
}

function loadboxR(){
var IntPath = document.getElementById('city1');
var TheOptions = IntPath.options.length;
document.getElementById('city1').options.length = 0;

var TheSelected = document.getElementById('city2');
var arySelected = new Array();

for (var i = 0; i < TheSelected.length; i++) {  
arySelected[TheSelected.options[i].value] = TheSelected.options[i].text;
}

var arySourceOptions = new Array();	
arySourceOptions["Bermuda Dunes"] = "Bermuda Dunes";
arySourceOptions['Cathedral City']='Cathedral City';
arySourceOptions['Corona']='Corona';
arySourceOptions['La Quinta']='La Quinta';
arySourceOptions['Norco']='Norco';
arySourceOptions['Palm Desert']='Palm Desert';
arySourceOptions['Palm Springs']='Palm Springs';
arySourceOptions['Rancho Mirage']='Rancho Mirage';
arySourceOptions['Riverside']='Riverside';
    for ( testKey in arySourceOptions)
    {
    	if (arySelected[testKey] != arySourceOptions[testKey])
    	{  
    	IntPath.options[IntPath.options.length] = new Option(arySourceOptions[testKey],testKey);
    	}
    }
}

function Togglediv(divName) { 
	with (document.getElementById(divName).style) {
		if (display == "block"){
			display = "none"
			document.getElementById('advsearch').innerHTML = "[Advanced Search]";
		}
		else {
			display = "block";
			document.getElementById('advsearch').innerHTML = "[Basic Search]"
		}
	}
}

function showdiv(divName) { 
	with (document.getElementById(divName).style) {
			display = "block";
	}
	document.getElementById('bedrooms').disabled = false;
	document.getElementById('bathrooms').disabled = false;
	document.getElementById('squarefeet').disabled = false;
	document.getElementById('PROPSFR').checked = true;
}

function hidediv(divName,theID) {
	document.getElementById('PROPCONDO').checked = false;
	document.getElementById('PROPLOFT').checked = false;
	document.getElementById('PROPCOOP').checked = false;
	document.getElementById('PROPSFR').checked = false;
	document.getElementById('bedrooms').disabled = document.getElementById(theID).checked;
	document.getElementById('bathrooms').disabled = document.getElementById(theID).checked;
	with (document.getElementById(divName).style) {
	display = "none";
	}
}