function initializeRSH() {
   dhtmlHistory.initialize();
   dhtmlHistory.addListener(handleHistoryChange);
   historyStorage.put("quickresults", "RSHQuickResults()");
   historyStorage.put("fullresults", "RSHFullResults()");
   historyStorage.put("accommdetails", "RSHAccommDetails()");
   historyStorage.put("resortdetails", "RSHResortDetails()");
   historyStorage.put("regiondetails", "RSHRegionDetails()");
   historyStorage.put("shortlist", "RSHShortlist()");
   historyStorage.put("flightselector", "RSHFlightSelect()");
   
   //var currentLocation = dhtmlHistory.getCurrentLocation();
   //if (currentLocation == "") {
   currentLocation = "section:quickresults";
   //}
   dhtmlHistory.add(currentLocation, currentLocation);
   currentLocation = currentLocation.replace(/section\:/, "");
   //displayLocation(currentLocation, null);
}
function handleHistoryChange(newLocation, historyData) {
	/*if (newLocation == "") {
		newLocation = "section:quickresults";
	}*/
	if(newLocation) {
		newLocation = newLocation.replace(/section\:/, "");
		displayLocation(newLocation, historyData);
	}
}
function displayLocation(newLocation, sectionData) {
	eval(historyStorage.get(newLocation));
}
function handleSection(section, id) {
	var bRun = true;
	if(id) {
		if(document.getElementById(id).className.indexOf('Na')>-1) {
			bRun = false;	
		}
	}
	if(bRun) {
		var modifiedLocation = 'section:'+section
		dhtmlHistory.add(modifiedLocation, modifiedLocation);
		displayLocation(section, null);
	}
	
}

function fillContent(sText) {
	o1 = document.getElementById('testcontent');
	if(o1) {
		o1.innerHTML = sText
	}
}
function RSHQuickResults() {
	SwitchResult('result_tab1');
}
function RSHFullResults() {
	SwitchResult('result_tab2');
}
function RSHAccommDetails() {
	SwitchResult('result_tab3');
}
function RSHResortDetails() {
	SwitchResult('result_tab4');
}
function RSHRegionDetails() {
	SwitchResult('result_tab6');
}
function RSHShortlist() {
	SwitchResult('result_tab5');
}
function RSHFlightSelect() {
	SwitchResult('result_tab7');
}
