function checkFooter() {

		windowheight = window.innerHeight;
		pageheight = document.getElementById("pagewrapper").offsetHeight;
		footerheight = document.getElementById("footerwrapper").offsetHeight;

		if (!windowheight) { 
			windowheight = document.documentElement.clientHeight;
		}

		if (!windowheight || windowheight == 0) { 
			windowheight = document.body.clientHeight;
			pageheight = document.getElementById("pagewrapper").offsetHeight;
		}

		difference = windowheight - pageheight;

		if(difference > 0) {
			pageheight = pageheight - footerheight;
			document.getElementById('pagewrapper').style.height = pageheight + difference + "px";
		} else if (difference < 0) {
			pageheight = pageheight - footerheight;
			if((pageheight + difference) > 650) {
				document.getElementById('pagewrapper').style.height = pageheight + difference + "px";
			}
		}

}


// STORE REQUIRED ACTIONS IN VARIABLE //

var W3CDOM = (document.getElementsByTagName);

function init() {

	var browserName=navigator.appName;

	if(browserName == 'Netscape') {
		var extra = document.getElementById('extra');
		if(extra) {
//			extra.style.bottom = 51 + "px";
		}
	}

	// IF ACTIONS ARE NOT SUPPORTED STOP SCRIPT //
	if (!W3CDOM) return;

	var menu = document.getElementById('menu');

	if(menu) {

		var lis = menu.getElementsByTagName('li');

		for (var i=0;i<lis.length;i++) {

			
			if (lis[i].className == "topcat") {
				lis[i].onmouseover = mousegoesover;
				lis[i].onmouseout = mousegoesout;
				lis[i].onclick = expandfunc;
			} else if(lis[i].className != "odd") {
				lis[i].onmouseover = mousegoesover2;
				lis[i].onmouseout = mousegoesout2;
			}

		}

	}

	document.onclick = clickhidefunc;

        function expandfunc(e)
        {
                if (!e) var e = window.event;

                target = e.target;
                if (!target) target = e.srcElement;

                hidefunc();
		
		while (target.id == "" && target.nodeName != "BODY") { target = target.parentNode; }

		if (document.getElementById(target.id+"_over")) {
	                document.getElementById(target.id+"_over").style.display = "BLOCK";
		}

        }

	function clickhidefunc(e) {
                if (!e) var e = window.event;
                target = e.target;
                if (!target) target = e.srcElement;
		if (target.nodeName != "LI" && target.className != "button") hidefunc();

	}


        function hidefunc()
        {
            trtags = document.getElementsByTagName("ul");

            i=0;
            while (trtag = trtags[i])
            {
            if (trtag.className == "showhide") trtag.style.display = "none";
                i++;
            }	

	

        }

}


function mousegoesover() {
	this.childNodes[0].src = "/images/"+this.id+"_over.gif";
}

function mousegoesout() {
	this.childNodes[0].src = "/images/"+this.id+".gif";
}

function mousegoesover2() {
	this.childNodes[0].childNodes[0].src = "/images/"+this.id+"_over.gif";
}

function mousegoesout2() {
	this.childNodes[0].childNodes[0].src = "/images/"+this.id+".gif";
}

function updateFunc(obj) {
	
	document.getElementById("price").innerHTML = obj.value * 99;

}
