	var args;
	function parsequery(qs) {
		if (qs.length > 2) {
			args = new Object();
			var query = qs.substring(1); // get query string (without initial "?")
			var pairs = query.split("&")  //break at ampersand into pairs
			var re = /\+/g; //the unescape() function does not remove +
			for (var i = 0; i < pairs.length; i++) {
				var pos = pairs[i].indexOf('=');  //look for "name=value"
				if (pos == -1) continue;      //if not found skip
				var argname = pairs[i].substring(0,pos);  //extract the name
				var value = pairs[i].substring(pos + 1);  //extract the value
				args[argname] = unescape(value.replace(re," "));  //store as a property
			}
		}
	}

	parsequery(location.search);
	var activeTab = (args != null && ((typeof args["tab"]) != "undefined") && args["tab"] != "") ? args["tab"] : ((typeof initialTab != "undefined") ? initialTab : "");
	var activeImg = "";
	
	var oldOnLoad = window.onload;
	window.onload = function() {
		if (typeof initialTab != "undefined" && activeTab == "") activeTab = initialTab;
		if (typeof initialImgId != "undefined") activeImg = initialImgId;
		if (args != null && ((typeof args["tab"]) != "undefined") && args["tab"] != "") {
			var kids = document.getElementById("browseOffers").firstChild.childNodes;
			for (i = 0; i < kids.length; i++) {
				if (kids[i].tagName == "A") {
					if (kids[i].href.indexOf(activeTab) != -1) activeImg = kids[i].firstChild.id;
				}
			}
		}
		if (oldOnLoad) oldOnLoad();
		document.getElementById(activeImg).className = "specOffTabOn";
		document.images[activeImg].src = document.images[activeImg].src.replace(/_off\./,"_on\.");
	}

	function browseOffersOverFunc (id) {
		if (activeImg != id) {
			document.images[id].src = document.images[id].src.replace(/_off\./,"_over\.");
		}
	}
	function browseOffersOutFunc (id) {
		if (activeImg != id) {
			document.images[id].src = document.images[id].src.replace(/_over\./,"_off\.");
		}
	}
	function browseOffersClickFunc (id) {
		if (activeImg != id) {
			document.images[activeImg].src = document.images[activeImg].src.replace(/_on\./,"_off\.");
			document.getElementById(activeImg).className = "specOffTabOff";
			document.images[id].src = document.images[id].src.replace(/_over\./,"_on\.");
			document.getElementById(id).className = "specOffTabOn";
			activeImg = id;
		}
	}


