<!--
	////////////////////////////////////////////////////////////////////////////
	// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
	// Distribute this script freely, but keep this
	// notice with the code.
	////////////////////////////////////////////////////////////////////////////
	// Example:
	//
	//  <SCRIPT TYPE="text/javascript">
	//		<!--
	//		var sr = new submitroll("images/menubutton_logonoff.gif","images/menubutton_logonon.gif","imgLogin");
	//			sr.sendfield="Submit";
	//			sr.sendvalue="Submit";
	//			sr.otheratts="ALIGN=TOP";
	//			sr.validate=true;   <-- MUST HAVE VALIDATION SCRIPT TO USE!!!
	//			sr.write();
	//		//-->
	//	</SCRIPT>
	//
	////////////////////////////////////////////////////////////////////////////
	// Modified By: RLH  20060404 - Changed the OnClick to do validation call.
	//                              You must use ???.validate = true to activate.
	//
	//              RLH  20061016 - Added the ability to do Resets
	////////////////////////////////////////////////////////////////////////////
	
	var submitRolls = new Object();

	function submitroll(src, oversrc, name)
	{
		this.src=src;
		this.oversrc=oversrc;
		this.name=name;
		this.alt="Submit";
		this.write=submitroll_write;
	}

	function submitroll_write()
	{
	var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
		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 (this.sendfield)
		{
			if (! this.sendvalue)
				this.sendvalue = 1;
			document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
			//alert("Field = " + this.sendfield + " - Value = " + this.sendvalue)
		}

		// RLH - 20061016 - Added Reset ability
		if ((this.sendvalue == "reset") || (this.sendvalue == "Reset") || (this.sendvalue == "RESET"))
		{
			document.write(thisform + '.reset();void(0);"');
		}
		else
		{
			document.write(thisform + '.submit();void(0);"');
		}
		
		// RLH - 20060404 - Added Validation to output if needed.
		if (this.validate)
		{
			document.write(' onClick="validate();return returnVal;" ');
		}
		else
		{
			if (this.msg) document.write(' onClick="return confirm(\'' , this.msg, '\')"');
		}

		document.write('>');

		document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 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>');

		if (this.sendfield)
		{
			document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
			//document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '" VALUE="' + this.sendvalue + '">');
			document.forms[document.forms.length - 1].elements[this.sendfield].value='';
			//alert(this.sendvalue);
			//document.forms[document.forms.length - 1].elements[this.sendfield].value=this.sendvalue;
		}

	}
//-->

