function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function loadScript(){}

function showLayer(layerName){
	if (document.getElementById){
		var targetElement = document.getElementById(layerName);
		//var shadowElement = document.getElementById(shadowLayerName);
		//targetElement.style.top = shadowElement.style.top;
		if (targetElement.style.visibility == 'visible'){
			targetElement.style.visibility = 'hidden';
			targetElement.style.height = '0px';
			}
		else{	
			targetElement.style.visibility = 'visible';
			targetElement.style.height = 'auto';
			}
		}
	}


function hideLayer(layerName){
	if (document.getElementById){
		var targetElement = document.getElementById(layerName);
		targetElement.style.visibility = 'hidden';
		targetElement.style.height = '0px';
		}
	}	


function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) // if too long...trim it!
	field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else
	countfield.value = maxlimit - field.value.length;
	}

function verify(){
	var oldstring = document.matchBox.hunterAge.value;
	var newstring = parseFloat(oldstring).toString();
	//var InpValid=1;
	if (oldstring.length == newstring.length && newstring != "NaN") {
		return true;
	}
	else {
		alert("Please insert correct age");
		return false;
	}
}
var OS,browser,version,total,thestring;


function browserCheck(){
	var detect = navigator.userAgent.toLowerCase();
	//var OS,browser,version,total,thestring;
	//var OS,total,thestring;
	if (checkIt('konqueror'))
		{
			browser = "Konqueror";
			OS = "Linux";
		}
	//else if (checkIt('safari')) browser = "Safari"
	else if (checkIt('safari')) browser = "Firefox"
	else if (checkIt('omniweb')) browser = "OmniWeb"
	else if (checkIt('firefox')) browser = "Firefox"
	else if (checkIt('opera')) browser = "Firefox"
	//else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (!checkIt('compatible'))
		{
			browser = "Netscape Navigator"
			version = detect.charAt(8);
		}
	else browser = "An unknown browser";
	if (!version) version = detect.charAt(place + thestring.length);

	if (!OS)
		{
			if (checkIt('linux')) OS = "Linux";
			else if (checkIt('x11')) OS = "Unix";
			else if (checkIt('mac')) OS = "Mac"
			else if (checkIt('win')) OS = "Windows"
			else OS = "an unknown operating system";
		}
		
	function checkIt(string)
		{
			place = detect.indexOf(string) + 1;
			thestring = string;
			return place;
		}	
return browser, version;
}
