sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function showPopupFromGallery(image)
{
	//document.documentElement.scrollLeft/Top
	//alert( document.body.scrollTop);
    var popUp = document.getElementById("popupcontent");
	document.getElementById('zoom').src = image;
	var new_width = document.getElementById('zoom').width;
	var new_top = document.getElementById('zoom').height;	
    popUp.style.marginLeft = -(new_width/2)-40; 
    
    popUp.style.marginTop = -(new_top/2)+ document.body.scrollTop - 30;
	popUp.style.width = new_width+40;   
	popUp.style.height = new_top+40;	
    popUp.style.visibility = "visible";
}


function hidePopup()
{
	var popUp = document.getElementById("popupcontent");
    popUp.style.visibility = "hidden";
}
