function getComboValue(fld){	sel = fld.options[fld.options.selectedIndex].value;	if(sel == null)		return("");	else		return(sel);}function getRadioValue(radiofield){	for(i=0; i<radiofield.length; i++){		if(radiofield[i].checked){			return radiofield[i].value;		}	}	return "";}function getChecked(chkName, objForm) {	if( objForm == null ||	 chkName == "" || chkName == null || chkName == "undefined" )		objForm = document.forms[0];			var items = objForm.elements;	if( items == null) 		return( null);	var chkVals = new Array();	var cnt = 0;	for( var i = 0 ; i < items.length ; i++ ) {		if( (items[i].name.toLowerCase() == chkName.toLowerCase()) && items[i].type == "checkbox") {			//if it is checked, and not undefined, then we add it to the return value.			if( items[i].checked && (items[i].value != "" || items[i].value != "undefined" )) {				chkVals[cnt] = items[i].value;				cnt++;			}		}    	}	return( chkVals );}function isChecked(chkName, strValue){	arrList = getChecked(chkName);	for(var i = 0 ; i < arrList.length ; i++ ) {		if(arrList[i] == strValue)			return true;	}	return false;}function isNumberValue(aNum, emptyOK, strDecSep, strThousSep){ 	var isNum = true;		if(strDecSep == null)		strDecSep = ",";	if(strThousSep == null)		strThousSep = ".";	if(emptyOK == null)		emptyOK= true;			aNum+="";	if( aNum == "undefined")		return false;	if(aNum == "" && emptyOK == true)		return true	//Return false for any strings that don't pass the "isNaN" check:	if( isNaN( parseInt( aNum) ) )		isNum = false;	//Allow for there to be a negative sign as the first character 	if( aNum.substring( 0, 1) == "-" ) 		aNum = aNum.substring( 1, aNum.length);	//Return false for any strings that contain letters within them:	for( var i = 0; i < aNum.length; i++ ) {		if( (aNum.charAt(i) < "0" || aNum.charAt(i) > "9") & (aNum.charAt(i) != strDecSep ) & (aNum.charAt(i) != strThousSep) ) {			isNum=false;			break;		}	}	return( isNum);}function openDbRelativeURL( url, target ){ //Check we have a target window; target = (target == null ) ? window : target; //Work out the path of the database; path = location.pathname.split('.nsf')[0] + '.nsf/'; target.location.href = path + url;}function getDbRelativeURL(){ path = location.pathname.split('.nsf')[0] + '.nsf/'; return path;}function runAction(action) {	for (var i=0;i<document.links.length;i++) { 		if(document.links[i].target==action){ //scan all links until the requested link is found 			document.links[i].target='' //reset target tag to reference the current window			document.links[i].onclick(); //activate the link 			return true;		}	}	return false;  //If link was not found false is returned}function windowOpener(url, name, args) {	//if args is null set args as empty string	args = (args == null) ? "" : args;		if (typeof(popupWin) != "object"){		popupWin = window.open(url,name,args);	} else {		if (!popupWin.closed){ 			popupWin.location.href = url;		}else {			popupWin = window.open(url, name,args);		}	}		popupWin.focus();}function getWindowCenterParam(width, height) {    if (document.all)        var xMax = screen.width, yMax = screen.height;    else        if (document.layers)            var xMax = window.outerWidth, yMax = window.outerHeight;        else            var xMax = 640, yMax=480;    var xOffset = (xMax - width)/2;    var yOffset = (yMax - height)/2;    return 'screenX='+xOffset+', screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';}