// show image
function showPicture(pictureToShow, windowTitle)
{
	 PicWin=window.open("","PictureViewer",'status=0,scrollbars=no,resizable=no,width=100,height=100,screenX=50,screenY=50,top=50,left=50');
	 PicWin.document.open();
	 PicWin.document.writeln('<html><head><title>' + windowTitle + '</title></head>');
	 PicWin.document.writeln('<body topmargin="0" onload="this.focus()" bgcolor="#d3bbaf" leftmargin="0" link="#000000" vlink="#000000">');
	 PicWin.document.writeln('<table border="0" width="100%" height="100%"><tr><td align="center" valign="middle">');
	 PicWin.document.writeln('<img onLoad="window.opener.resizeWindow(50,70,100);" border="1" src="'+ pictureToShow +'">');
	 PicWin.document.writeln('<br><a style="font-size:11px;font-family:verdana;" href="javascript:this.close()">Close</a></body></html>');
	 PicWin.document.close();
}
function resizeWindow(Hborder, Vborder, millisecs)
{     
	 setTimeout("PicWin.resizeTo(PicWin.document.images[0].width + " + Hborder + ", PicWin.document.images[0].height + " + Vborder + ");", millisecs);
}

function contactformcheck(){
	var numericexpression=/^[0-9,+]+$/;
	if(contact.name.value==""){
		alert ("Please enter the information for the \"Name\" field." )
		contact.name.focus();
		return false;
	}
	if(contact.email.value == ""){ 
		alert ("Please enter the information for the \"Email\" field." )

		contact.email.focus()   
		return false;
	}

    if ((contact.email.value.indexOf('@', 0) == -1) || (contact.email.value.indexOf('.') == -1)){ 
		alert ("Please fill in a correct email address" )  ;    
		contact.email.focus()   
		return false;
	}
	if(!contact.tel.value.match(numericexpression) && contact.tel.value!=""){
		alert("Telephone Number cannot contain letters.");
		contact.tel.focus();
		return false;
	}
	if(contact.message.value==""){
		alert ("Please enter the information for the \"Message\" field." )
		contact.message.focus();
		return false;
	}
	
}
function phonecheck(){
	var numericexpression=/^[0-9,+]+$/;
	if(!contact.tel.value.match(numericexpression) && contact.tel.value!=""){
		alert("Telephone Number cannot contain letters.");
		contact.tel.value="";
		contact.tel.focus();
		return false;
	}
}

