// Tab-o-hover v50603.5
// (c) Lizards 1901

function tabber(tab) {
	document.getElementById('hs').style.display = 'none';
	document.getElementById('hr').style.display = 'none';
	document.getElementById('fs').style.display = 'none';
	document.getElementById('fr').style.display = 'none';
	
	document.getElementById('hst').className = "inactive_tab";
	document.getElementById('hrt').className = "inactive_tab";
	document.getElementById('fst').className = "inactive_tab";
	document.getElementById('frt').className = "inactive_tab";
	
	document.getElementById(tab).style.display = 'block';
	document.getElementById(tab+'t').className = "active_tab";
}


function srtab(tab) {
		document.getElementById('sr_fs').style.display = 'none';
		document.getElementById('sr_fr').style.display = 'none';
		
		document.images['st_s1a0'].src='/img/fs_normal.gif';
		document.images['st_s1a1'].src='/img/fr_normal.gif';
		
		document.getElementById('sr_'+tab).style.display = 'block';
		document.getElementById(tab+'_i').src='/img/'+tab+'_sel.gif';
		if (tab == "fs") {
			fs_show = "/img/fs_sel.gif";
			fs_hov = "/img/fs_sel.gif";
			fr_show = "/img/fr_normal.gif";
			fr_hov = "/img/fr_hov.gif";
		}
		if (tab == "fr") {
			fr_show = "/img/fr_sel.gif";
			fr_hov = "/img/fr_sel.gif";
			fs_show = "/img/fs_normal.gif";
			fs_hov = "/img/fs_hov.gif";
		}
		
}

// this one for search
function switchtab(tab) {
		 if (tab == 'cbuy') {

			document.getElementById('cbtab').className = "active_tab";
			document.getElementById('crtab').className = "inactive_tab";
			document.getElementById('buytype').value = "0";
			document.getElementById('rescom').value = "1";
			document.getElementById('rentprice').style.display = "none";
			document.getElementById('buyprice').style.display = "block";
		} else if (tab == 'crent') {
			document.getElementById('cbtab').className = "inactive_tab";
			document.getElementById('crtab').className = "active_tab";
			document.getElementById('buytype').value = "1";
			document.getElementById('rescom').value = "1";
			document.getElementById('rentprice').style.display = "block";
			document.getElementById('buyprice').style.display = "none";
		}
	}

	function clear_me(etype) {
		it = document.getElementById('quicksearch');
		cnt = it.value;
		
		if (etype == "in") {
			if (cnt == "where?") {		
				it.value = "";
				it.style.color = "#ffffff";
			}
		}
		if (etype == "out") {
			if (cnt == "") {
				it.style.color = "#99cc00";
				it.value = "where?";
			}
		}
	}

// mapStuff mod to work with IE browser
<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function map_DoFSCommand(command, args) {
	var mapObj = isInternetExplorer ? document.all.map : document.map;
	//
	// Place your code here.
	  		if (command == "searchFtown") {

			if (args.indexOf('manchester') !=-1) {
				this.location.href = "/county/"+args+".html";
			} else {
				this.location.href = "/district/"+args+".html";
			}

  		}
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub map_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call map_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->


	function delthis() {
		return confirm("Are you sure you want to delete this saved property?");
	}

