function getElem( idString ) {
	var obj = null;
	if ( document.getElementById ) {
		obj = document.getElementById( idString );
	} else if ( document.layers
	&& document.layers[idString] ) {
		obj = document.layers[idString]
	} else if ( document.all
	&& document.all[idString] ) {
		obj = document.all[idString]
	}
	return obj;
}

function addLoadEvent(funcToAdd) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = funcToAdd;
	} else {
		window.onload = function() {
			oldonload();
			funcToAdd();
		}
	}
}

function init() {
	var menuImages = ['menuParade','menuFloat','afterParty','menuEvents','menuGallery','sponsors'];
	var E;
	var extenz;
	for ( var i=0; i < menuImages.length; i++ )
	{
	  if ( menuImages[i] == 'afterParty' || menuImages[i] == 'sponsors') {
	    extenz = 'gif';
	  } else {
	    extenz = 'jpg';
	  }
	  
		e = getElem(menuImages[i]);
		e.srcOff = e.src;
		e.srcOn  = 'images/' + menuImages[i] + 'ON.' + extenz;

		e.imgPreload     = new Image;
		e.imgPreload.src = e.srcOn;
		
		e.onmouseover    = function () { this.src = this.srcOn; };
		e.onmouseout     = function () { this.src = this.srcOff; };
	}
}
addLoadEvent( init );


function getClientHeight(){
return typeof( window.innerHeight) !== "undefined" ?
window.innerHeight :
document.documentElement.clientHeight;
}

//If we have this little thing we can move to more serious business - emulating position:fixed in IE6. 
//This is done by this little snippet:

function fixFloatElement() {
// get client height
var offset = getClientHeight();
// get the element you want to change position to
var footer = document.getElementById('footer');
// get the element right above the previous element
var main = document.getElementById('main');
// set styles to the element to emulate position:fixed
footer.style.position = 'absolute';
footer.style.top = (document.documentElement.scrollTop + offset - footer.offsetHeight) + 'px';
// add margin to the element above to remove overlapping
main.style.marginBottom = footer.offsetHeight + 'px';
}


/**
Logic behind this is pretty straightforward: we need to determine client window height, get two elements (footer and an element above it) position the footer using position:absolute and setting calculated height value and at the end add margin to the element above footer to remove overlapping.

That’s it. Only thing that is left is to decide when this function needs to be launched. It is quite obvious it needs to be launched when page is loaded but also it needs to be relaunched (footer position needs to be updated) whenever user scrolls the page or resizes browser window. Additionally we need only to do this in IE6. After combining all those requirements here is the outcome code:
**/


//if (IE6) {
//window.onload = fixFloatElement;
//window.onresize = fixFloatElement;
//window.onscroll = fixFloatElement;
//}



function NewArbitraryWindow(mypage, myname, w, h, scroll, offsetLeft, offsetTop) {
		var winl = ((screen.width - w) / 2);
		var wint = ( ( (screen.height - h) / 2) );
		//alert(wint);
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
		}
