function swapImg(name,imgPath) {	if(document.images) {		document.images[name].src = "/img/navi/" + imgPath + ".gif";	}}function email(user,domain,subject) {	locationstring = "mailto:" + user + "@" + domain+"?subject="+subject;	window.location = locationstring;}function viewImage(f,w,h,id,sec,dir) {	src = '/viewers/image.php?f='+f+'&w='+w+'&h='+h+'&id='+id+'&sec='+sec+'&dir='+dir;	openWindow(src, w, h, false);}function viewTerms() {	src = '/viewers/terms.php';	leftp = 80;	topp = 80;		window.open(src, 'picture', "width=" + 600 + ",height=" + 650 + ",left=" + leftp + ",top=" + topp + ",scrollbars=" + 1 + ",resizable=0,status=0").focus();}function viewPages(id) {	src = '/viewers/pages.php?id='+id;	leftp = 80;	topp = 80;		window.open(src, 'picture', "width=" + 580 + ",height=" + 650 + ",left=" + leftp + ",top=" + topp + ",scrollbars=" + 1 + ",resizable=0,status=0").focus();}function openWindow(src, width, height, scroll) {	window.open(src, 'picture', "width=" + width + ",height=" + height + ",left=" + Math.round((screen.width - width) / 2) + ",top=" + Math.round((screen.height - height) / 2 - 40) + ",scrollbars=" + (scroll ? 1 : 0) + ",resizable=0,status=0").focus();}function launchVR(id,useragent){	var w = screen.availWidth;	var h = screen.availHeight - 20;	t = 0;	src = '/viewers/vr2.php?id='+id+'&w='+w+'&h='+h;		window.open(src, 'vr', "width=" + w + ",height=" + h + ",left=0,top="+t+",menubar=no,location=no,resizable=no,scrollbars=no,status=no").focus();}