<script type="text/javascript">
<!--
/* popup auto sized */
var _PAGE="";
    _PAGE=""; /* Specify an actual page if you don't want to use the popup code. */

var _CONTENT=""; /* this holds the data to write if no external html file is used */

function openImageWindow(imageSrc, caption)
{
/*
 * if you use the name "_PAGE" for the page
 * you will have no problems at all
 * however if you change the name to something else
 * remember to change the reference to it in the following line of code
 * to reference your own filename..
 *
 * No _PAGE specified uses the javascript code embedded on this page.
 *
 */

_CONTENT="";
_CONTENT+="<HTML>\n";
_CONTENT+="<head>\n";
_CONTENT+="<"+"SCRIPT>\n";
_CONTENT+="function specialInit()\n";
_CONTENT+="{\n";
_CONTENT+="if (document.all || document.layers)\n";
_CONTENT+="window.resizeTo(document.images[0].width + 350,document.images[0].height + 260);\n";
_CONTENT+="}\n";
_CONTENT+="</"+"SCRIPT>\n";
_CONTENT+="</head>\n";
_CONTENT+="<BODY onLoad='specialInit();'>\n";
_CONTENT+="<"+"SCRIPT>\n";
_CONTENT+="document.write('<center>');\n";

_CONTENT+="document.write('<IMG SRC=\\'"+ imageSrc +"\\'>');\n";
_CONTENT+="document.write('<p style=\\'font-family:Arial, Helvetica, sans-serif; font-size:12px \\'>"+ caption +"</p>');\n";
_CONTENT+="document.write('<P><P><P><FORM><INPUT TYPE=button VALUE=Close onClick=window.close()></FORM>');\n";
_CONTENT+="document.write('</center>')\n";
_CONTENT+="</"+"SCRIPT>\n";
_CONTENT+="</BODY>\n";
_CONTENT+="</HTML>\n";

  var _parms = 'directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes';
  var _windowName = "PicViewer";
  if(_PAGE)
  {
    fileName = 'popup.htm?' + escape(imageSrc) + '&amp;' + escape(imageTitle);
    myWindowHandle = window.open(fileName,_windowName,_parms);
  }
  else
  {
    myWindowHandle=window.open("",_windowName,_parms);
    myWindowHandle.document.open();
    myWindowHandle.document.write(_CONTENT);
    myWindowHandle.document.close();
  }
  myWindowHandle.focus();
}
/* end of popup auto sized */

function yesno() {
		if (confirm("Are you sure you want to delete this record?")) 
		{
			return true;
		} else {
			return false;
		}
}

function validateform(form,uncheckedelements) {
	// Set elements to the elements of the form being submitted
	var 	elements=form.elements;
	// Create a new array to hold the elements we do not want to check
	var	dontcheck = new Array();
	// Create a string with the elements we passed to validateform
	var 	removelements = new String(uncheckedelements);
	// Get number of elements in form being submitted
	dontcheck = removelements.split(",");
	// Total number of elements in the form
	var 	numofelements = elements.length
	var 	j, u,dontcheck;
	var 	strHTML = 	'_____________________________________\n';
			strHTML +=	'The following errors were detected:\n\n';
	var 	err = 0;
	
	// Loop through each element to see if it is blank or not
	for (j=0;j<numofelements;j++) 
	{
		// Zero out skip identifier
		skip  = 0;
		// Loop through the dontcheck array
		for (u=0;u<dontcheck.length; u++) 
		{
			// If the dontcheck contains the same name as the element then skip the check
			if (dontcheck[u] == elements[j].name) {
				skip = 1;
				u = dontcheck.length;
			}	
		}
		// Do we skip checking this element?
		if (skip != 1) 
		{
			// Check for null element
			if (elements[j].value == '' ) 
			{
				// Add element name to output string
				strHTML += 'You left ' + elements[j].name + ' blank\n';
				err = 1;
			}			
		}
	}
		if (form.name == 'Create Account')
			{
				if (elements[3].value != elements[4].value )
				{
					strHTML += 'Passwords do not match\n';
					err = 1;
				}
			}
		if (form.name == 'Reservation')
			{
			if ( (elements[2].value >= elements[4].value) && (elements[4].value != ''))
			{	
				strHTML += 'The registration date you entered\nis in the past.  You must make\nyour registration 24 hours in advance.\n';
				err = 1;
			}
		}
		strHTML = strHTML += '______________________________________\nPlease check your entries and submit again\n';
		if (err == 1) 
		{
			alert(strHTML);
			return false;
		}
		else 
		{
			return true;
		}
}
-->
</script>
