// popup.js

/*
Show a new window and open document according to doc argument.
*/
var infoWindow = null;

function popUpDoc(doc, left, top, width, height){
	if (infoWindow != null){
		infoWindow.close();
		infoWindow = null;
	}
		
	infoWindow = window.open(doc,"","left=" + left + ",top=" + top + ",toolbar=no,scrollbars=yes,status=no,width=" + width + ",height=" + height + ",resizable=yes");
}

function popUpDocNoScroll(doc, left, top, width, height){
	if (infoWindow != null){
		infoWindow.close();
		infoWindow = null;
	}
		
	infoWindow = window.open(doc,"","left=" + left + ",top=" + top + ",toolbar=no,scrollbars=no,status=no,width=" + width + ",height=" + height);
}

function textLimit(field, maxlen) {
    if (field.value.length > maxlen) {
        field.value = field.value.substring(0, maxlen);
    }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
