﻿function viewPhoto(strPath)	{
	window.open('assets/viewphoto.aspx?strPath=' + strPath, 'Viewver', 'width=780, height=500, scrollbars=yes, status=yes, resizable=yes')
}

function ResizePhotoViewer(window) {
	var img = document.getElementById('imgPhoto')
	var x = img.width + 50;
	var y = img.height + 150;
	
	if (screen.availWidth<x) { 
		x = screen.availWidth - 28; 
	}
	
	window.resizeTo(x,y);
}

function showEmail(strName, strDomain, strLinkText) {
	var strEmail = strName + '@' + strDomain;
	if (!strLinkText) {strLinkText = strEmail;}
	
	document.write('<a class="email" href="mailto:' + strEmail + '">' + strLinkText + '</a>');
}

function Toggle(obj)	{
	if (document.getElementById(obj).style.display=='block')	{
		document.getElementById(obj).style.display='none';
	}
	else	{
		document.getElementById(obj).style.display='none';
		document.getElementById(obj).style.display='block';
	}
}

activateMenu = function(nav) {
	if (document.all && document.getElementById(nav).currentStyle) {
		var navroot = document.getElementById(nav);
	    
		/* Get all the list items within the menu */
		var lis=navroot.getElementsByTagName("LI");  
		for (i=0; i<lis.length; i++) {
	                
			/* If the LI has another menu level */
			if(lis[i].lastChild.tagName=="UL") {
	        
				/* assign the function to the LI */
				lis[i].onmouseover=function() {	
	            
					/* display the inner menu */
					this.lastChild.style.display="block";
				}
				lis[i].onmouseout=function() {                       
					this.lastChild.style.display="none";
				}
			}
		}
    }
}
window.onload= function() {
    activateMenu('menu'); 
}