<!--

// JavaScript Document

// SUBMIT ROLLOVER BUTTONS
var submitRolls = new Object();

// function initializing image submit button
function submitroll(src, oversrc, name, alter)
{
this.src=src;												// Image source name
this.oversrc=oversrc;   									// Mouse-over image source name
this.name=name;			    								// Image name
this.alt=alter;												// Alt image name
this.msg="Are you sure that you wish to send this form?";   // Conformation message
this.write=submitroll_write;								// Storage object to be executed later								
}

// function to write html code for image button functionality
function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';

//image rollover and rollout
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;
document.write('<A onMouseOver="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].over.src"' + 
	' onMouseOut="if (document.images)document.images[\'' + this.name + "'].src=submitRolls['" + this.name + '\'].out.src"' + 
	' HREF="javascript:' +
	'if (formCheck('+thisform+')){'
	);

// If elements are present, execute the following: 	
if (this.sendfield)
	{
	if (! this.sendvalue)
        this.sendvalue = 1;
	document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
	}
	
document.write(thisform + '.submit();void(0);}"');

//Display a message before form is submited
if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, '\')"'); document.write('>');

// If an alt text is given for the image, execute the following
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');

// If image measurements are given, execute the following
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' ' + this.otheratts);
document.write('></A>');

if (this.sendfield)
	{
	document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
	document.forms[document.forms.length - 1].elements[this.sendfield].value='';
	}
}

// RESET ROLLOVER BUTTONS
var resetRolls = new Object();
// function to initialize image reset button
function resetimage(src)
{
this.src=src;						// Image source file name
this.confirm=true;					// Execute a confirmation alert?
this.alt="Reset";					// Alt image text
this.write=resetimage_write;		// Storage object for what is written by resetimage_write
}

// function to write HTML code to display previously determined button
function resetimage_write()
{
document.write('<A ');
if (this.rollover)
 {
 // Check to see if valid name has been given: If not, post message and exit function
 if (! this.name)
   {
   alert('to create a rollover you must give the image a name');
   return;
   }
 // If name is valid, proceed
 resetRolls[this.name] = new Object();
 resetRolls[this.name].over = new Image();
 resetRolls[this.name].over.src=this.rollover;
 resetRolls[this.name].out = new Image();
 resetRolls[this.name].out.src=this.src;
 document.write(' onMouseOver="if (document.images)document.images[\'' +  this.name + '\'].src=resetRolls[\'' + this.name + '\'].over.src"' + 
 ' onMouseOut="if (document.images)document.images[\'' + this.name + '\'].src=resetRolls[\'' + this.name + '\'].out.src"' );
 }
 
document.write(' HREF="javascript:');
if (this.confirm)
  document.write('if(confirm(\'Are you sure you want to reset?\'))');
document.write('document.forms[' +  (document.forms.length - 1) + '].reset();void(0);">');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '"');
document.write(' BORDER=0');
if (this.name)document.write(' NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' '+ this.otheratts);
document.write('></A>');
}
//-->