function show(menu) { 
   document.getElementById(menu).style.visibility = "visible"
} 
  
function hide(menu) {
   document.getElementById(menu).style.visibility = "hidden"
}

function makeTopMenu(menu, x, y, bg, width) {
	var menuHtml;
	menuHtml = "<div ID='" + menu + "' style='position:absolute;background-color:#ffffff;padding:1px 0 1px 3px;border:solid 1px " + bg + ";  top:" + y + "px; left:" + x + "px; width:" + width + "px; visibility:hidden;' onMouseOver=show('" + menu + "') onMouseOut=hide('" + menu + "') >"
	menuHtml = menuHtml + "<table width='" + width + "' cellspacing='0'  cellpadding='0'>"
	for(var i=0; i < menuItems.length; i++) {
		if(menuItems[i].menu == menu) { 
			if(menuItems[i].page != "nothing") {
				if (menuItems[i].bIndent) {
					menuHtml = menuHtml + "&nbsp; ";
				}
		 		menuHtml = menuHtml +  "<tr><td name=" + menu + i + " width=" + width + "><a href=" + menuItems[i].page + " class='subnav'>" + menuItems[i].head + "</a></td></tr>"
			} else
				menuHtml = menuHtml + "<i class=quoteItalic>" + menuItems[i].head + "</i><br>" 
		}
	}            
	menuHtml = menuHtml + "</td></tr></table></div>"  
	document.write(menuHtml)
}
  
function menuItem(menu, head, page, bIndent) { 
	this.menu=menu;
	this.head=head;
	this.page=page;
	this.bIndent=bIndent; 
}
 
var menuItems = new Array(); 
menuItems[menuItems.length] = new menuItem('Background', 'History since 1952', '/history.asp', 0); 
menuItems[menuItems.length] = new menuItem('Background', 'Angelo Rapp, Founder', '/bio_arapp.asp', 0); 
menuItems[menuItems.length] = new menuItem('Background', 'Richard Rapp, President', '/bio_rrapp.asp', 0);  


menuItems[menuItems.length] = new menuItem('Photography', 'Photo Retouching', '/PhotoRetouching.asp', 0); 
menuItems[menuItems.length] = new menuItem('Photography', 'Illustration', '/Illustration.asp', 0); 


if (typeof window.innerWidth != 'undefined') {
 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight 
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) {
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 } else {
 // older versions of IE 
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }

makeTopMenu('Background', (viewportwidth/2 + 335), 84, '#cccccc', 135);
makeTopMenu('Photography', (viewportwidth/2 + 135), 84, '#cccccc', 100);


function popWin(imgNo,imgCaption){ 
 var winWidth = 1000; 
 var winHeight = 400; 
 
 var midx = (screen.width/2) - (winWidth/2); 
 var midy = (screen.height/2) - (winHeight/2)
 var props = "height=" + winHeight + ",width=" + winWidth + ",screenX=" + midx + ",screenY=" + midy + ",top=" + midy + ",left=" + midx; 
  
 myWin = window.open("/popups.asp?ID=" + imgNo + "&imgCaption=" + imgCaption, "PopUp", props);
 window.myWin.focus(); 
} 
