// JavaScript Document - 

// IE flicker
	try {
	  document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}

	// NOTE, PRELOAD MENU IMAGES, ESPECIALLY HOVER STATES!!!
    if (document.images)
    {
      preload_image_object = new Image();
      image_url = new Array();
      image_url[0] = "/img/btns/216px.png";
		image_url[1] = "/img/btns/152px.png";
		image_url[2] = "/img/icons/listen.png";
		image_url[3] = "/img/icons/sendme.png";
		image_url[4] = "/img/icons/bid_now.png";
		image_url[5] = "/img/icons/eye.png";
		image_url[6] = "/img/icons/info.png";
		 var i = 0;
       for(i=0; i<=3; i++) 
         preload_image_object.src = image_url[i];
			// alert("Images preloaded now.");
    }
	 
// end preloading images

// <SET FOOTER POSITION ON SHORT PAGES:

function setFooter() {
if (document.getElementById) {
	var windowHeight=getWindowHeight();
	
	if (windowHeight>0) {
	var contentHeight=document.getElementById('main').offsetHeight;
	
	var footerElement=document.getElementById('ftr');
	var footerHeight=footerElement.offsetHeight;
			
			if (windowHeight-(contentHeight+footerHeight)>=0) {
				footerElement.style.position='relative';
				footerElement.style.top=(windowHeight-(contentHeight+footerHeight))+'px';
			}else{
			footerElement.style.position='static';
			}
	}
}

}

//determines the size of the screen to compare against
function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
	windowHeight=window.innerHeight;
	}else{
			if (document.documentElement&&document.documentElement.clientHeight) {
				windowHeight=document.documentElement.clientHeight;
			}else {
				if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
				}
			}
	}
return windowHeight;
}

// </SET FOOTER POSITION ON SHORT PAGES

/*
 * generic method for managing top global tab navigation href values
 */
function getPage(page) {
    document.location = '/' + page;
    return true;
}

