
function popWin(mypage, myname, w, h, scrollV, stat) {
	// popup window
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	// default values for scroll and status
	if(scrollV!=1){scrollV = 0};
	if(stat!=1){stat = 0};
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollV+',status='+stat+',dependent=1';
	try {
		win = window.open(mypage, myname, winprops);
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	catch(e) { }
}

function URLencode(inString) {
	return escape(inString).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27');
}

function CheckForSeachValue(e, evt)
{
	evt = (evt) ? evt : event;
	var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
	if (charCode == 13)
	{		
	    CheckForValue(e.value)
		
		document.location.href="SearchResults.aspx?Search=" + URLencode(e.value);
return false;
	}
}

function CheckForValue(e)
{
	if (e != '' && e != 'Search...')
	{
		document.location.href="SearchResults.aspx?Search=" + URLencode(e.value);
		return false;
	}else{
	    alert('Please enter a search term.');
	    return false;
	}
}

function FlashCheck() {
	var f = new FlashSwapper(8);
//	document.getElementById('container').innerHTML = (f.DetectFlash() ? 'You have flash! Version:'+f.version : 'You have no flash!') + '<br />' + 
(f.version >= f.requiredVersion ? 'You have a high enough version.' : 'You do not have the required version.');
f.DetectFlash();

	if (f.version<8)
	{
	alert("You need to install flash plugh version 9 to use this page.");
	window.location("http://clients.relate.com.au/eastlink");
	}
	return false;
}

function showMaps(mapType)
{
window.open( "maps-show.aspx?maptype=" + mapType, "Maps", "status = 0, height = 658, width = 760, resizable = 0" )
}