function PopIt(theURL, w, h){
self.name="main";
        ver = parseInt(navigator.appVersion.substring(0,1));       newWin=window.open(theURL,"ipix_pop","width="+w+",height="+h+",menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,location=0,left=200,top=200");
	if ((!((navigator.appName == "Netscape")&&(ver==2))) && (!((navigator.appName == "Microsoft Internet Explorer")&&(ver<4)))){
          setTimeout("if (newWin) newWin.focus();",1000);
    }
	}
function PopIt2(theURL, w, h){
self.name="main";
        ver = parseInt(navigator.appVersion.substring(0,1));       newWin=window.open(theURL,"ipix_pop","width="+w+",height="+h+",menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes,");
	if ((!((navigator.appName == "Netscape")&&(ver==2))) && (!((navigator.appName == "Microsoft Internet Explorer")&&(ver<4)))){
          setTimeout("if (newWin) newWin.focus();",1000);
    }
	}
function Contact(theURL, w, h){
self.name="main";
prod = theURL
        ver = parseInt(navigator.appVersion.substring(0,1));       newWin=window.open(prod,"ipix_contact","width="+w+",height="+h+",menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,");
	if ((!((navigator.appName == "Netscape")&&(ver==2))) && (!((navigator.appName == "Microsoft Internet Explorer")&&(ver<4)))){
          setTimeout("if (newWin) newWin.focus();",1000);
    }
	}
	

window.onload = function() {
	initializeMenu("homeMenu", "home");
	initializeMenu("aboutMenu", "about");
	initializeMenu("photoproductsMenu", "photoproducts");
	initializeMenu("servicesMenu", "services");
	initializeMenu("supportMenu", "support");
	initializeMenu("galleryMenu", "gallery");
	initializeMenu("downloadsMenu", "downloads");
	initializeMenu("storeMenu", "store");
	initializeMenu("contactMenu", "contact");
	}
	

var currentMenu = null;

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    //if (window.opera) return; // I'm too tired

    actuator.onmouseover = function() {
        if (currentMenu) {
            currentMenu.style.visibility = "hidden";
            this.showMenu();
        }
    }
  
    actuator.onmouseover = function() {
        if (currentMenu == null) {
            this.showMenu();
        }
        else {
            currentMenu.style.visibility = "hidden";
            currentMenu = null;
        }

        return false;
    }

    actuator.showMenu = function() {
        menu.style.left = this.offsetLeft + "px";
        menu.style.top = this.offsetTop + this.offsetHeight + "px";
        menu.style.visibility = "visible";
        currentMenu = menu;
    }
}
