// JavaScript Document
var last_expanded = ''; 

function showHide(id) 
{ 
	var obj = document.getElementById(id); 
	var status = obj.className; 
	
	if (status == 'hide') { 
		if (last_expanded != '') { 
			var last_obj = document.getElementById(last_expanded); 
			last_obj.className = 'hide'; 
		}
		obj.className = 'show'; 
		last_expanded = id; 
	} else { 
		obj.className = 'hide'; 
	} 
	
}

function highlightMarketSectorNav(){
	document.getElementById('lendingSolutions').className = 'topmenu';
	document.getElementById('housingIntelligance').className = 'topmenu';
	document.getElementById('marketSectors').className = 'topmenu';
	document.getElementById('commentary').className = 'topmenu';
	document.getElementById('consumer').className = 'topmenu';
	document.getElementById('about').className = 'topmenu';
	document.getElementById('home').className = 'topmenu';
	setHighlight('marketSectors');
}


var strPostcodeSnapShot="Street, town or postcode";

function setBlank(){
    document.postcodeSnapShotFrm.searchKey.value = "";
}

function setDefault(){
	if ( document.postcodeSnapShotFrm && document.postcodeSnapShotFrm.searchKey.value == ""){
         document.postcodeSnapShotFrm.searchKey.value = strPostcodeSnapShot;
    }
}  
   
function postcodeSnapShotValidation(){             
    if ( document.postcodeSnapShotFrm && document.postcodeSnapShotFrm.searchKey.value == strPostcodeSnapShot){
        return false;
    }
}

function setHighlight(id) {
	document.getElementById(id).className = document.getElementById(id).className + ' highlight'; 
}
    
    

