function openDBRelativeURL( url, target ){     target = (target == null ) ? window : target;     var p = location.pathname;     path = '/' + p.slice( 1, p.toLowerCase().lastIndexOf('.nsf')+4) + '/';     target.location.href =  path + url;}function getPathName(){	var p = location.pathname;	var pth = p.slice( 1, p.toLowerCase().lastIndexOf('.nsf')+4) + '/';	return pth[0];}function navView( start, count ){	var strt = getPathName();	document.location = strt + '?openview&start=' + start + '&count=' + count;}/*NavigateView cycles through a view using thestart and count paramaters of the ?OpenView method.Required as @Commands do not work with single category views on the web !! Taken from www.codestore.netArguments:d = direction, either "prev" or "next"n = incremental count number*/function navigateView (d, n) {	var c = 0;	var args = location.search.split('&');	var news = new Array();	var ii = 0;	for (var i = 0; i < args.length; i ++) {		if ( args[i].toLowerCase().indexOf('start=') != -1){			c = parseInt(args[i].split('=')[1]);		} else {			news[ii] = args[i];			ii ++;		}	}	 	//var strt = getPathName();  	var strt = location.pathname;	if (args[0] == ''){		location.href = strt + '?OpenView&start=' + n;	} else if (c == 0 && d == 'next'){		location.href += '&start=' + n;	} else if (c == 0 && d == 'prev'){		return alert('There are no more documents in that direction.');	} else 	if (c <= n && d == 'prev'){		location.href = strt + news.join('&');	} else 	if (d == 'next'){		location.href = strt + news.join('&') + '&start=' + ( c + n );	} else 	if (d == 'prev'){		location.href = strt + news.join('&') + '&start=' + ( c - n);	}}function getHelp(strKey) {var strURL = "LookupHelp/" + strKey + "?OpenDocument"var winLeft = screen.width - 850;var winTop = screen.Height - 500;var winAttr = "left=" + winLeft + ", top=" + winTop + ", Height=350, Width=600, resizable, scrollbars"; var win2 = window.open(strURL,"GlobalShare_Help",winAttr)}function replacetwisties(){   for(i=0;i<document.images.length ;i++){      if( (document.images[i].src.indexOf('expand.gif')!=-1)){         document.images[i].src = '1plus.gif' ;      };       if( document.images[i].src.indexOf('collapse.gif')!=-1){         document.images[i].src = '1minus.gif' ;      }   }}function removetwisties(){   for(i=0;i<document.images.length ;i++){      if( (document.images[i].src.indexOf('expand.gif')!=-1)){         document.images[i].src = '' ;      };       if( document.images[i].src.indexOf('collapse.gif')!=-1){         document.images[i].src = '' ;      }   }}function doLogin(){	s = document.location.search;	//Check '&Login' not already in URL!	if (s.toLowerCase().indexOf("&login") == -1 ){		//Check that there is a '?Open' part to append to		a = (s=="") ? "?Open&Login" : "&Login";		ref = document.location.href.toLowerCase();		if( ref.substring( ref.length - 4, ref.length ) == ".com" ||  ref.substring( ref.length - 4, ref.length ) == "com/" 		||ref.substring( ref.length - 4, ref.length ) == ".org" ||  ref.substring( ref.length - 4, ref.length ) == "org/" ){			document.location.href +=  "?Login";		} else {			document.location.href += a;		}	}}function windowOpener(url, name, 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();}popupWins = new Array();function windowOpener(url, name, args) {/*******************************the popupWins array stores an object reference foreach separate window that is called, based uponthe name attribute that is supplied as an argument*******************************/	if ( typeof( popupWins[name] ) != "object" ){		popupWins[name] = window.open(url,name,args);	}else{		if (!popupWins[name].closed){			popupWins[name].location.href = url;		}else{			popupWins[name] = window.open(url, name,args);		}	}	popupWins[name].focus();}function TestFileType( fileName, fileTypes ){	if (!fileName) return;	dots = fileName.split(".")	//get the part AFTER the LAST period.	fileType = "." + dots[dots.length-1];	return (fileTypes.join(".").indexOf(fileType) != -1) ?	alert('That file is OK!') :	alert("Please only upload files that end in types: \n\n" + (fileTypes.join(" .")) + "\n\nPlease select a new 	file and try again.");}function trim(aStr) { return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, ""); }function moveMe(theList){	var strValue=theList.options[theList.selectedIndex].value;	trim(strValue).length > 0 ? openDBRelativeURL( strValue ) : ""}var the_cookie = document.cookie;function readCookie() {	handleLogin();     if (document.cookie == "") {		writeCookie();		return "";     } else {		the_cookie = unescape(the_cookie);		the_cookie_split = the_cookie.split(";");		for (loop=0;loop<the_cookie_split.length;loop++) {			var part_of_split = the_cookie_split[loop];			var find_name = part_of_split.indexOf("nfti_date")			if (find_name!=-1) {				break;			} // Close if		} // Close for		if (find_name==-1) {			writeCookie();			return "";		} else {			var date_split = part_of_split.split("=");			var last = date_split[1];			last=fixTheDate(last);			document.forms[0].LastVisit.value=last   //Write the data to the form				writeCookie();			return last;		} // Close if (find_name==-1)      }} // Close function readCookie()function handleLogin(){	if( getCookie( "usr" ) != null ){		//The user wants their login remembered		if( getCookie( "DomAuthSessId" ) == null ){			//The user has not loged in yet			doLogin();		}	}}function writeCookie() {     var today = new Date();     //make a cookie that's good for 3 months     var the_date = new Date(today.getYear(),today.getMonth() + 3,today.getDate(),today.getHours(),today.getMinutes(),today.getSeconds());     var the_cookie_date = the_date.toGMTString();     var the_cookie = "nfti_date="+escape(today);     var the_cookie = the_cookie + ";expires=" + the_cookie_date;     document.cookie=the_cookie}function getCookie(name) { 	var index = the_cookie.indexOf(name + "=");	if (index == -1) return null;    	index = the_cookie.indexOf("=", index) + 1; // first character    	var endstr = the_cookie.indexOf(";", index);    	if (endstr == -1) endstr = the_cookie.length; // last character    	return unescape(the_cookie.substring(index, endstr));}function getImg( theModDate, folderType ) {//Foldertype is a 1 or 0.  1 means it's hot	var lastVisitDate = document.forms[0].LastVisit.value;	if (lastVisitDate == "" ) return "red_folder.gif";  //They've never been here before	var firstSplit = lastVisitDate.split(" ");	var splitvalue=firstSplit[0].split('/')    	var day = parseInt(splitvalue[1]);     	var month = parseInt(splitvalue[0]);     	var year = parseInt(splitvalue[2]);	var splitTime = firstSplit[1].split(":")	var hour = parseInt(splitTime[0]);	var min = parseInt(splitTime[1]);     	var sec = 0;	var lastModSplit = theModDate.split(",")	var day2 = parseInt(lastModSplit[0]);     	var month2 = parseInt(lastModSplit[1]);     	var year2 = parseInt(lastModSplit[2]);	var hour2 = parseInt(lastModSplit[3]);     	var min2 = parseInt(lastModSplit[4]);	var sec2 = parseInt(lastModSplit[5]);		var lastVis = new Date( year, month-1, day, hour, min, sec );	var lastMod = new Date (year2, month2-1, day2, hour2, min2, sec2)		if (lastVis.getTime() <= lastMod.getTime() ){		//It's red		if (folderType == "1") {			//It's hot			return "hot_red_folder.gif"		} else {			return "red_folder.gif"		}	} else {		if (folderType == "1") {			//It's hot			return "hot_folder.gif"		} else {			return "folder.gif"		}	}}function fixTheDate(date) {     var split = date.split(" ");     var fix_the_time = split[3].split(":")     var hours = fix_the_time[0]     if (hours>=12) {	var ampm="PM"     } else {	var ampm="AM"     }     if (hours > 12) {	hours = hours-12     }     switch( split[1]) {     	case "Jan":     		month="01";     		break;     	case "Feb":     		month="02";     		break;     	case "Mar":     		month="03";     		break;     	case "Apr":     		month="04";     		break;     	case "May":     		month="05";     		break;     	case "Jun":     		month="06";     		break;     	case "Jul":     		month="07";     		break;     	case "Aug":     		month="08";     		break;     	case "Sep":     		month = "09";     		break;     	case "Oct":     		month = "10";     		break;     	case "Nov":     		month="11";     		break;     	case "Dec":     		month="12";     }     var new_time = hours+":"+fix_the_time[1]+" "+ampm     var new_date = month+"/"+split[2]+"/" + split[5] +" " + new_time     return new_date;}function sendFocus(fld){	var index;	var element = null;	var anchor = null;	var f;		f = document.forms[0];	for (index = 0; index < f.elements.length; index++) {		if (f.elements[index].name == fld) { element = f.elements[index]; break; }	}		for (index = 0; index < document.anchors.length; index++) {		if (document.anchors[index].name == fld) { anchor = document.anchors[index]; break; }	}		// Send focus to the input element	if (element) {		element.focus();	} 		// If we have an anchor tag by the same name, scroll there; otherwise scroll to the input element	if (anchor) {		if (anchor.scrollIntoView != null) anchor.scrollIntoView();	} else if (element) {		if (element.scrollIntoView != null) element.scrollIntoView();	}}