
<!-- Form field verify function -->

  function verify() {
  var themessage = "Please correct the following before the message can be submitted: ";
  if (document.form.first.value=="") {
  themessage = themessage  + "  \n\nFirst Name is a required field";
  }
  if (document.form.last.value=="") {
  themessage = themessage + "  \n\nLast Name is a required field";
  }
  if (document.form.email.value=="") {
  themessage = themessage + "  \n\nEmail Address is a required field";
  }
  if (document.form.email.value!="" && validate_email(document.form.email)==false) {
  themessage = themessage + "  \n\nEmail Address has an invalid format";
  }
  if (document.form.comments.value=="") {
  themessage = themessage + "  \n\nComments & Questions is a required field";
  }

  //alert if fields are empty and cancel form submit
  if (themessage == "Please correct the following before the message can be submitted: ") {
  document.form.submit();
  }
  else {
  alert(themessage);
  return false;
   }
  }
  
  
function verify_order() {
  var themessage = "Please correct the following before the form can be submitted: ";
  if (document.orderform.name.value=="") {
  themessage = themessage  + "  \n\nContact Name is a required field";
  }
  if (document.orderform.email.value=="") {
  themessage = themessage + "  \n\nEmail Address is a required field";
  } 
  if (document.orderform.email.value!="" && validate_email(document.orderform.email)==false) {
  themessage = themessage + "  \n\nEmail Address has an invalid format";
  }
  if (document.orderform.phone.value=="") {
  themessage = themessage + "  \n\nTelephone Number is a required field";
  }
  if (document.orderform.description.value=="") {
  themessage = themessage  + "  \n\nDescription is a required field"; 
  }
 
  //alert if fields are empty and cancel form submit
  if (themessage == "Please correct the following before the form can be submitted: ") {
  document.orderform.submit();
  }
  else {
  alert(themessage);
  return false;
   }
  }
  
  
  <!-- Form field validate email address -->
  function validate_email(field)
  {
  with (field)
  {
  apos=value.indexOf("@");
  dotpos=value.lastIndexOf(".");
  if (apos<1||dotpos-apos<2)
    {return false;}
  else {return true;}
  }
  }
 
function insertimage(image){  
	    var thediv=document.getElementById('stillbox');
		thediv.style.display = "";
		var newHTML = "<img class='noborders' alt='Internet-Ready Picture' src='" + image + "'>";
	    thediv.innerHTML = newHTML;	
} 


 function embedflash(image,w,h){  
	    var thediv=document.getElementById('flashbox');
		thediv.style.display = "";
		var newHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + w + "' height='" + h + "' > \
        <param name='movie' value='" + image + "' > \
		<param name='base' value='gallery'> \
        <param name='quality' value='high' > \
        <param name='wmode' value='transparent' > \
        <param name='allowFullScreen' value='true' > \
        <param name='allowScriptAccess' value='always' > \
        <embed src='" + image + "' quality='high' wmode='transparent' type='application/x-shockwave-flash' width='" + w + "' height='" + h + "' allowFullScreen='true' pluginspage='http://www.macromedia.com/go/getflashplayer' base='gallery' allowScriptAccess='always' > \
        </object>";
	    thediv.innerHTML = newHTML;
}


function embedzoom(image,w,h){ 
	var thediv=document.getElementById('zoombox');
		thediv.style.display = "";
		var newHTML = "<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' WIDTH='" + w + "' HEIGHT='" + h + "' ID='theMovie'> \
        <PARAM NAME='FlashVars' VALUE='zoomifyImagePath=" + image + "&zoomifyNavigatorVisible=false'> \
        <PARAM NAME='MENU' VALUE='FALSE'> \
		<param name='quality' value='high' > \
        <PARAM NAME='SRC' VALUE='ZoomifyViewer.swf'> \
        <EMBED FlashVars='zoomifyImagePath=" + image + "&zoomifyNavigatorVisible=false' SRC='ZoomifyViewer.swf' quality='high' MENU='false' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'  WIDTH='" + w + "' HEIGHT='" + h + "' NAME='theMovie'></EMBED> \
        </OBJECT>";
		thediv.innerHTML = newHTML;
}



  
