
// Creates a popup window for photos

function writeConsole(content,w,h,title) {
windowProps="'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width="+w+",height="+h+"'";
window_name='';

top.consoleRef=window.open('',window_name,windowProps);

consoleContent=''
+'<html><head><TITLE>'+title+'</TITLE>'
+'<style type="text/css">'
+'<!--'
+'.close {text-decoration: none;}'
+'-->'
+'</style>'
+'</head>'
+'<BODY BGCOLOR="#000000" link="#FFFFFF" vlink="#FFFFFF" onload="self.focus();">'
+'<CENTER>'
+'<table border="0" width="100%">'
+'  <tr>'
+'    <td width="100%" align="center">'
+'	  <br><img src="'+content+'">'
+'	  <p align="center" style="font-family: sans-serif; font-size: 10px"><a href="javascript:void window.close()" class="close">close window</a></p>'
+'    </td>'
+'  </tr></table>'
+'</body>'
+'</html>'


 top.consoleRef.document.writeln(consoleContent)
 top.consoleRef.document.close()
}
// Function to validate form fields
	function test_fields(){
	msg="";
	
	name=	document.emailform.myname.value;
	email=	document.emailform.email.value;
	message=document.emailform.message.value;
	name.length==0 || name=="" || name==" " ? msg+="You forgot to enter your name.\n\r" : msg+="";
	email.length==0 || email=="" || email==" " ? msg+="You forgot to enter your email address.\n\r" : msg+="";
	message.length==0 || message=="" || message==" " ? msg+="You did not enter a message.\n\r" : msg+="";
	
		if(msg==""){
			emailform.submit();
			}
		else {
		alert("Your email was not sent because:\n\r\n\r"+msg)
			}
	}