//<!-- Function to open a new window
function openWin( windowURL, windowName, windowFeatures ) {
	return window.open( windowURL, windowName, windowFeatures );
}

function popUpColorPicker(url) {
   winStats='toolbar=no,location=no,directories=no,menubar=no,'
   winStats+='scrollbars=no,width=770,height=480'
   if (navigator.appName.indexOf("Microsoft")>=0) {
      winStats+=',left=100,top=50'
    }else{
      winStats+=',screenX=100,screenY=50'
    }
   teaseWin=window.open(url,"",winStats)
}

function PopUpWindow(url) {
   winStats='toolbar=no,location=no,directories=no,menubar=no,'
   winStats+='scrollbars=yes,width=400,height=300'
   if (navigator.appName.indexOf("Microsoft")>=0) {
      winStats+=',left=100,top=50'
    }else{
      winStats+=',screenX=100,screenY=50'
    }
   teaseWin=window.open(url,"",winStats)
}

//auto jump form fields
var downStrokeField;

function autojump(fieldName,nextFieldName,fakeMaxLength){
var myForm=document.forms[document.forms.length - 1];
var myField=myForm.elements[fieldName];
myField.nextField=myForm.elements[nextFieldName];

if (myField.maxLength == null)
   myField.maxLength=fakeMaxLength;

myField.onkeydown=autojump_keyDown;
myField.onkeyup=autojump_keyUp;
}

function autojump_keyDown(){
this.beforeLength=this.value.length;
downStrokeField=this;
}

function autojump_keyUp(){
if (
   (this == downStrokeField) && 
   (this.value.length > this.beforeLength) && 
   (this.value.length >= this.maxLength)
   )
   this.nextField.focus();
downStrokeField=null;
}

function field_maxLength(fld,len){
	var str = document.getElementById(fld).value;
	if(str.length > len){
		alert("Value cannot be longer than " + len + " characters.");
		document.getElementById(fld).style.backgroundColor = "#FFFFCC";
		document.getElementById(fld).focus();	
	}else{
		document.getElementById(fld).style.backgroundColor = "#FFFFFF";
	}
}

function confirmBox(href,message){
	var yon = window.confirm(message);
	if (yon == 1){
		window.location.href = href;
	}
}
// -->