window.defaultStatus='Welcome to Reflections of You';

	var subsection=0
	var client=0
	
function launchPortfolio(subsection,client) {
	var popWidth = 700;
	var popHeight = 570;
	var winLeft = (screen.availWidth - popWidth) / 2;
	var winTop = (screen.availHeight - popHeight) / 2;
winpops=window.open("/portfolio.php?sub="+subsection+"&client="+client+"&id=0", "portfolioWin", "width="+popWidth+",height="+popHeight+",top="+winTop+",left="+winLeft+",location=no,status=yes,scrollbars=auto")
	portfolioWin.focus()
}

window.onload = function() {
	initializeMenu("portfolioMenu", "portfolioActuator");
	initializeMenu("plansMenu", "plansActuator");
	initializeMenu("coverageMenu", "coverageActuator");
	initializeMenu("companyInfoMenu", "companyInfoActuator");
	initializeMenu("helpMenu", "helpActuator");
	setHeight('main');
	externalLinks();
}

function setHeight(objName) {
	if (document.getElementById) {
           docObj = document.getElementById(objName);
    	computedHeight = docObj.offsetHeight;
	    if(computedHeight < 420) {
	    	docObj.style.height = 420 + "px";
	    };
    }else if (document.layers) {
    	docObj = document.layers[objName];
    	computedHeight = eval("docObj." + property);
    	if(computedHeight < 420){
    		docObj.clip.height = 420 + "px";
    	};
    }else if (document.all) {
       	docObj = document.all(objName);
       	computedHeight = eval(objName + ".offsetHeight");
    	if (computedHeight < 420){
    		docObj.style.height = 420 + "px";
    	};
    };
};

if (window.opera) {
	document.write("<style> #main { min-height: 420;}</style>");
}

/*
 * menuDropdown.js - implements an dropdown menu based on a HTML list
 * Author: Dave Lindquist (dave@gazingus.org)
 */

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;

    actuator.onmouseover = function() {
        if (currentMenu == null) {
            currentMenu.style.visibility = "hidden";
            this.showMenu();
        }
    }
  
    actuator.onclick = function() {
        if (currentMenu == null) {
            this.showMenu();
        }
        else {
            currentMenu.style.visibility = "hidden";
            currentMenu = null;
        }

        return false;
    }

    actuator.showMenu = function() {
    	if(window.opera){
    		menu.style.left = this.offsetLeft + 280;
        	menu.style.top = document.getElementById(menuId).offsetTop;
    	}else{
    		menu.style.left = this.offsetLeft + 132 + "px";
        	menu.style.top = document.getElementById(menuId).offsetTop + "px";
    	}
        menu.style.visibility = "visible";
        currentMenu = menu;
    }
}

function externalLinks() { 
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
	var anchor = anchors[i]; 
	if (anchor.getAttribute("href") && 
	anchor.getAttribute("rel") == "external") 
	anchor.target = "_blank"; 
	} 
 } 
