
<!-- BLOCK ERROR SCRIPT
function blockError(){return true;}
window.onerror = blockError;
// -->



<!-- MOUSEOVER SCRIPT
if (document.images) {

nexton = new Image(120, 55);
nexton.src = "picts/nexton.gif"

nextoff = new Image(120, 55);
nextoff.src = "picts/nextoff.gif"

}

function img_act(imgName) {
if (document.images) {
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}

function img_inact(imgName) {
if (document.images) {
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
// -->



<!-- OPENWINDOW SCRIPT
function openWin(URL) {
aWindow=window.open(URL, "thewindow", "toolbar=no, width=600, height=400, status=no, scrollbars=yes, resize=no, menubar=yes");
}

function openW2(URL) {
aWindow=window.open(URL, "thewindow2", "toolbar=no, width=400, height=270, status=no, scrollbars=yes, resize=no, menubar=yes");
}

function openW3(URL) {
aWindow=window.open(URL, "thewindow3", "toolbar=no, width=400, height=450, status=no, scrollbars=yes, resize=no, menubar=yes");
}

function openPrice(URL) {
aWindow=window.open(URL, "thewindowPrice", "toolbar=no, width=720, height=400, status=no, scrollbars=yes, resize=no, menubar=yes");
}

function openTable(URL) {
aWindow=window.open(URL, "thewindowTable", "toolbar=no, width=450, height=300, status=no, scrollbars=yes, resize=no, menubar=no");
}

function openFig(URL) {
aWindow=window.open(URL, "thewindowFig", "toolbar=no, width=650, height=450, status=no, scrollbars=yes, resize=no, menubar=no");
}


// -->



<!-- FORMSUBMISSION SCRIPT
function copyAddress()
{
	document.orderform.Bill_name.value=document.orderform.Ship_name.value
	document.orderform.Bill_institution.value=document.orderform.Ship_institution.value
	document.orderform.Bill_street.value=document.orderform.Ship_street.value
	document.orderform.Bill_city.value=document.orderform.Ship_city.value
	document.orderform.Bill_state.value=document.orderform.Ship_state.value
	document.orderform.Bill_zip.value=document.orderform.Ship_zip.value
	document.orderform.Bill_country.value=document.orderform.Ship_country.value
	document.orderform.Bill_telephone.value=document.orderform.Ship_telephone.value
	document.orderform.Bill_fax.value=document.orderform.Ship_fax.value
	document.orderform.Bill_email.value=document.orderform.Ship_email.value
}

function copyAddressShipto()
{
	document.orderform.Supervisor_name.value=document.orderform.Ship_name.value
	document.orderform.Supervisor_telephone.value=document.orderform.Ship_telephone.value
	document.orderform.Supervisor_email.value=document.orderform.Ship_email.value
}

function copyAddressBillto()
{
	document.orderform.Supervisor_name.value=document.orderform.Bill_name.value
	document.orderform.Supervisor_telephone.value=document.orderform.Bill_telephone.value
	document.orderform.Supervisor_email.value=document.orderform.Bill_email.value
}



// based off tabledeleterow.js version 1.2 2006-02-21 modified, mredkj.com
// CONFIG notes. Below are some comments that point to where this script can be customized.
// Note: Make sure to include a <tbody></tbody> in your table's HTML

var INPUT_NAME_PREFIX = 'Item#'; // this is being set via script
var TABLE_NAME = 'purchased_items'; // this should be named in the HTML
var ROW_BASE = 1; // first number (for display)
var hasLoaded = false;

window.onload=fillInRows

function fillInRows()
{
	hasLoaded = true;
	addRowToTable();
	addRowToTable();
}

// CONFIG:
// myRowObject is an object for storing information about the table rows 
function myRowObject (one, two)
{
	this.one = one; // text object
	this.two = two; // input text object
}

/*
 * addRowToTable
 * Inserts at row 'num', or appends to the end if no arguments are passed in. Don't pass in empty strings.
 */
function addRowToTable(num)
{
	if (hasLoaded) {
		var tbl = document.getElementById(TABLE_NAME);
		var nextRow = tbl.tBodies[0].rows.length;
		var iteration = nextRow + ROW_BASE;
		if (num == null) { 
			num = nextRow;
		} else {
			iteration = num + ROW_BASE;
		}
		
		// add the row
		var row = tbl.tBodies[0].insertRow(num);
		
		// CONFIG: requires classes named classy0 and classy1
		row.className = 'classy' + (iteration % 2);
	
		// CONFIG: This whole section can be configured
		
		// cell 0 - text
		var cell0 = row.insertCell(0);
		var textNode = document.createTextNode(iteration);
		cell0.appendChild(textNode);
		
		// cell 1 - input text
		var cell1 = row.insertCell(1);
		var txtInp = document.createElement('input');
		txtInp.type = 'text';
		txtInp.name = INPUT_NAME_PREFIX + iteration;
		txtInp.id = INPUT_NAME_PREFIX + iteration;
		txtInp.size = 10;
		txtInp.value = '';
		cell1.appendChild(txtInp);
		
		// cell 2 - input text
		var cell2 = row.insertCell(2);
		var txtInp = document.createElement('input');
		txtInp.type = 'text';
		txtInp.name = INPUT_NAME_PREFIX + iteration;
		txtInp.id = INPUT_NAME_PREFIX + iteration;
		txtInp.size = 30;
		txtInp.value = '';
		cell2.appendChild(txtInp);

				
		// cell 3 - input text
		var cell3 = row.insertCell(3);
		var txtInp = document.createElement('input');
		txtInp.type = 'text';
		txtInp.name = INPUT_NAME_PREFIX + iteration;
		txtInp.id = INPUT_NAME_PREFIX + iteration;
		txtInp.size = 5;
		txtInp.value = '';
		cell3.appendChild(txtInp);
		
		// Pass in the elements you want to reference later
		// Store the myRow object in each row
		row.myRow = new myRowObject(textNode, txtInp);
	}
}

// If there isn't an element with an onclick event in your row, then this function can't be used.
function deleteCurrentRow(obj)
{
	if (hasLoaded) {
		var delRow = obj.parentNode.parentNode;
		var tbl = delRow.parentNode.parentNode;
		var rIndex = delRow.sectionRowIndex;
		var rowArray = new Array(delRow);
		deleteRows(rowArray);
		reorderRows(tbl, rIndex);
	}
}

function reorderRows(tbl, startingIndex)
{
	if (hasLoaded) {
		if (tbl.tBodies[0].rows[startingIndex]) {
			var count = startingIndex + ROW_BASE;
			for (var i=startingIndex; i<tbl.tBodies[0].rows.length; i++) {
			
				// CONFIG: next line is affected by myRowObject settings
				tbl.tBodies[0].rows[i].myRow.one.data = count; // text
				
				// CONFIG: next line is affected by myRowObject settings
				tbl.tBodies[0].rows[i].myRow.two.name = INPUT_NAME_PREFIX + count; // input text
				
				// CONFIG: requires class named classy0 and classy1
				tbl.tBodies[0].rows[i].className = 'classy' + (count % 2);
				
				count++;
			}
		}
	}
}

function deleteRows(rowObjArray)
{
	if (hasLoaded) {
		for (var i=0; i<rowObjArray.length; i++) {
			var rIndex = rowObjArray[i].sectionRowIndex;
			rowObjArray[i].parentNode.deleteRow(rIndex);
		}
	}
}

/*
Auto tabbing script- By JavaScriptKit.com
http://www.javascriptkit.com
This credit MUST stay intact for use
*/

function autotab(original,destination){
if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
destination.focus()
}
//-->



<!--
//Accept terms & conditions script (by InsightEye www.insighteye.com)
//Visit JavaScript Kit (http://javascriptkit.com) for this script & more.

function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('Please read Terms and Conditions, and check the box to continue.');
return false;
}else
return true;
}
//-->


