// subnav

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById('masterdiv').getElementsByTagName('div');
		if(el.style.display != 'block'){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=='submenu')
				ar[i].style.display = 'none';
			}
			el.style.display = 'block';
		}else{
			el.style.display = 'none';
		}
	}
}

// popuppicture

function PopUpBrowser(URL) {
	windowprops = 'left=0,top=0,width=725,height=600,resizable=yes,status=yes';
	preview = window.open('browser.php?' + URL,'popalbum',windowprops);
}

function PopUpPicView(NUM) {
	windowprops = 'left=0,top=0,width=100,height=100,resizable=yes,status=yes';
	preview = window.open('picview.php?image=' + NUM,'poppicview',windowprops);
}

function PopUpQuickView(URL) {
	if(imgname != 0) {
		windowprops = 'left=0,top=0,width=100,height=100,resizable=yes,status=yes';
		preview = window.open('picview.php?original=' + URL,'popquickview',windowprops);
	}
}

function PopUpFullPic(NUM) {
	windowprops = 'left=0,top=0,width=100,height=100,resizable=yes,scrollbars=yes,status=yes';
	preview = window.open('picview.php?full=yes&image=' + NUM,'popfullpic',windowprops);
}

function GetAndSetBodyHeight() {
	if(typeof innerHeight == 'number')
		document.getElementById('picview').style.height=window.innerHeight + 'px';
}
