// JavaScript Document

// These swap functions are used on the ordering pages for the "order step" icons

function MM_preloadImages() { //v1.2
if (document.images) {
var imgFiles = MM_preloadImages.arguments;
var preloadArray = new Array();
for (var i=0; i<imgFiles.length; i++) {
preloadArray[i] = new Image;
preloadArray[i].src = imgFiles[i];
}
}
}

function MM_swapImage() { //v1.2
var i,j=0,objStr,obj,swapArray=new
Array,oldArray=document.MM_swapImgData;
for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
if ((objStr.indexOf('document.layers[') == 0 && document.layers == null) ||
(objStr.indexOf('document.all[') == 0 && document.all == null))
objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
obj = eval(objStr);
if (obj != null) {
swapArray[j++] = obj;
swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
obj.src = MM_swapImage.arguments[i+2];
} }
document.MM_swapImgData = swapArray; //used for restore
}

function MM_swapImgRestore() { //v1.2
if (document.MM_swapImgData != null)
for (var i=0; i<(document.MM_swapImgData .length-1); i+=2)
document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}


function submitTheForm(theForm, theInputIndex, theValue)
{
	theForm.elements[theInputIndex].value = theValue;
	theForm.submit();
}

//Does not have toolbar, location, menubar, scrolling. But it IS resizeable
function popUpWindowResizeable(URLStr,windowName,left,top,width,height)
{
	window.status = "";
	popUpWinResizeable = open(URLStr,windowName, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top+'');
	popUpWinResizeable.focus();
}

//Same as above, but it DOES have scrolling AND menubar to allow easy printing, etc.
function popUpWindowResizeableScroll(URLStr,windowName,left,top,width,height)
{
	window.status = "";
	popUpWinResizeable = open(URLStr,windowName, 'toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top+'');
	popUpWinResizeable.focus();
}

function popUpWindowToolbar(URLStr,windowName,left,top,width,height)
{
	window.status = "";
	popUpWinResizeable = open(URLStr,windowName, 'toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top+'');
	popUpWinResizeable.focus();
}

function isBetween(minInt, maxInt, inputString)
{
	//this function does allow format: 01, 001, etc
	if((inputString >= minInt) && (inputString <= maxInt))
		return true;
	else
		return false;
}