var drawFunctions = new Array(0), windowWidth, windowHeight;

function getWindowSize() {
        if (document.documentElement && document.documentElement.clientWidth > 16 && document.documentElement.clientHeight > 16) {
                windowWidth = document.documentElement.clientWidth;
                windowHeight = document.documentElement.clientHeight;
        } else if (document.body && document.body.clientWidth > 16 && document.body.clientHeight > 16) {
                windowWidth = document.body.clientWidth;
                windowHeight = document.body.clientHeight;
        } else {
                windowWidth = window.innerWidth;
                windowHeight = window.innerHeight;
        }
}

function changeImages(menusubstring, menufilename) {
        var imgs = document.getElementsByTagName('IMG').length;
        for (var i = 0; i < imgs; i++) {
            if (document.getElementsByTagName('IMG')[i].src.indexOf(menusubstring, 0) != -1)
                document.getElementsByTagName('IMG')[i].src = menufilename;
        }
}

function draw() {
	for (var i = 0; i < drawFunctions.length; i++) {
	    drawFunctions[i]();
	}

	window.setTimeout("draw()", 50);
}

function onLoad() {
	draw();
}

