	//Checks the user's browser and shows the warning if necessary
	function checkBrowser() {
		//Hide javascript warning
		$("#warningTab1").hide();
		
		//Check browser
		var browser = navigator.appName;
		var version = navigator.appVersion;
		if (browser == "Microsoft Internet Explorer") {
      		var indexMatch = version.indexOf("MSIE 8.0");
	  		if (indexMatch < 0) {
				//IE8 message
				$("#warningTab2").hide();
				document.getElementById("warningTab2").className = "warningTabActive";
				$("#warningTab2").show("slide", {direction: "left"}, 1000);
				return
	  		}
		}
		//Welcome message
		$("#warningTab3").hide();
		document.getElementById("warningTab3").className = "warningTabActive";
		$("#warningTab3").show("slide", {direction: "left"}, 1000);
	}
	
	//Adds the little white arrow next to the sidebar items if necessary
	function setupSidebar() {
		//Get current url
		var theUrl = document.location.href;
		theUrl = theUrl.toLowerCase();
		
		//Check if it contains the string and change class accordingly
		if (theUrl.indexOf("/aboutus") > -1) {
			document.getElementById("leftItemAboutUs").className = "sideItemActive";
		} else if (theUrl.indexOf("/services") > -1) {
			document.getElementById("leftItemServices").className = "sideItemActive";
		} else if (theUrl.indexOf("/credentials") > -1) {
			document.getElementById("leftItemCredentials").className = "sideItemActive";	
		} else if (theUrl.indexOf("/fireplaces") > -1) {
			document.getElementById("leftItemFireplaces").className = "sideItemActive";
		} else if (theUrl.indexOf("/oilchimneys") > -1) {
			document.getElementById("leftItemOilChimneys").className = "sideItemActive";
		}
	}
	
	//Gets a parameter from the current url
	function getUrlParameter(myParameterName) {
		//Get current url
		var sURL = document.URL.toString();
		
		//Check if it contains any variables
		if (sURL.indexOf("?") > 0) {
			//Get parameter string
			var arrParams = sURL.split("?");
			var arrURLParams = arrParams[1].split("&");
			
			//Loop through string getting parameter names and values
			var arrParamNames = new Array(arrURLParams.length);
			var arrParamValues = new Array(arrURLParams.length);
			var i = 0;
			for (i=0; i < arrURLParams.length; i++) {
				var sParam =  arrURLParams[i].split("=");
				arrParamNames[i] = sParam[0];
				if (sParam[1] != "")
					arrParamValues[i] = unescape(sParam[1]);
				else
					arrParamValues[i] = "";
			}
			
			//Loop through parameter names and return value if matching name
			for (i=0; i < arrURLParams.length; i++) {
				if (arrParamNames[i] == myParameterName) {
					return arrParamValues[i];
				}
			}
		} else {
			return "";
		}
	}
	
	//Checks to see if the enter button was pushed and if so clicks the given button
	function enterCheck(e, executeButtonId) {
		//Check for enter
		if (e.keyCode == 13) {
			//Click the button
			document.getElementById(executeButtonId).click();
			//??? return false;
		}
	}
		