var doc='';var sty='';var htm='';var bType = new bTypeClass();var screen_width = screen.width;var screen_height = screen.height;var preventClear=false;var isNS4 = (navigator.appName=="Netscape")?1:0;var CLOSE_DIV = "<div class='errClose'><a href='javascript:hideShowDiv( \"errDiv\",false)'>Close X</a> </div>"function bTypeClass() {// Loads all possible parameters of the used browser and platform used  var agent = navigator.userAgent.toLowerCase();  this.major = parseInt(navigator.appVersion);  this.minor = parseFloat(navigator.appVersion);  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));  this.ns2 = (this.ns && (this.major == 3));  this.ns3 = (this.ns && (this.major == 3));  this.ns4b = (this.ns && (this.minor < 4.04));  this.ns4 = (this.ns && (this.major >= 4));  this.ie = (agent.indexOf("msie") != -1);  this.ie3 = (this.ie && (this.major == 2));  this.ie4 = (this.ie && (this.major = 4));  this.ie5 = (this.ie && (this.major >= 5));  this.op3 = (agent.indexOf("opera") != -1);  this.win = (agent.indexOf("win")!=-1);  this.mac = (agent.indexOf("mac")!=-1);  this.unix = (agent.indexOf("x11")!=-1);  this.firefox = (agent.indexOf("firefox")!=-1);  this.safari = (agent.indexOf("safari")!=-1);}function setDOM(){// this function loads the variables, to build up the DOM// layers and images are approached differently, depending on the type of browser if(bType.firefox || bType.safari) {  doc = "document.all";  sty = ".style";  htm = ".document"}else if(bType.ns4) {  doc = "document";  sty = "";  htm = ".document"} else if(bType.ie4) {  doc = "document.all";  sty = ".style";  htm = ""}else {  doc = "document.all";  sty = ".style";  htm = ".document"}    }//<<<<<<<<<<<<<<<<<<<<<<function isEmailAddress >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>function isEmailAddress(email){  var result = false  var theStr = new String(email)  var index = theStr.indexOf("@");  if (index > 0)  {    var pindex = theStr.indexOf('.',index);    if ((pindex > index+1) && (theStr.length > pindex+1))	result = true;  }  return result;}//<<<<<<<<<<<<<<<<<<<<<<function popupWindow >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>function popupWindow(the_page,the_width,the_height) {	window.open(the_page,"","status=no,menubar=no,scrollbars=yes,resizable=no,width=" + the_width + ",height=" + the_height);}//---------------------------------- function execSearch -------------------------------function execSearch(view){	var form = document.forms[0];	var path = form.WebDbName.value;	var query = escape(form.Search[form.Search.selectedIndex].text);		urlReturn = '/' + path + '/' + view + '?SearchView&Query=' + '(' + query + ')';		location.href = urlReturn;}//---------------------------------- Hide/Show function -------------------------------function hideShowDiv( identifier,show){	var thisLayer;	try {		var tmp = document.getElementById( identifier );		thisLayer = tmp.style;	}	catch (e) {		var toEval = doc + '["'+identifier+'"]'+sty;		thisLayer = eval(toEval);	}		try {		thisLayer.display = (!show) ? "none" : "block";	}	catch (e) {}}function hideShow( identifier,show){	var thisLayer;	var reqHeight;	try {		var tmp = document.getElementById( identifier );		thisLayer = tmp.style;		reqHeight = tmp.scrollHeight;	}	catch (e) {		thisLayer = eval(doc + '["'+identifier+'"]'+sty);		reqHeight = eval(doc+'["'+identifier+'"].scrollHeight')	}	try {		if(!show) {			thisLayer.visibility = 'hidden';			thisLayer.height = 1;		} else {			thisLayer.visibility = 'visible';			thisLayer.height = reqHeight;		}	}	catch (e) {}}/*---------------------------------- Common function ------------------------------- */function Left(str, n){	if (n <= 0)	    return "";	else if (n > String(str).length)	    return str;	else	    return String(str).substring(0,n);}function Right(str, n){    if (n <= 0)       return "";    else if (n > String(str).length)       return str;    else {       var iLen = String(str).length;       return String(str).substring(iLen, iLen - n);    }}function trim(aStr) {	return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "");}function strLeft(sourceStr, keyStr){	return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : sourceStr.split(keyStr)[0];}function strRight(sourceStr, keyStr){	idx = sourceStr.indexOf(keyStr);	return (idx == -1 | keyStr=='') ? '' : sourceStr.substr(idx+ keyStr.length);}function rightBack(sourceStr, keyStr){	arr = sourceStr.split(keyStr);	return (sourceStr.indexOf(keyStr) == -1 | keyStr=='') ? '' : arr.pop();}function leftBack(sourceStr, keyStr){	arr = sourceStr.split(keyStr);	arr.pop();	return (keyStr==null | keyStr=='') ? '' : arr.join(keyStr);}function middle(sourceStr, keyStrLeft, keyStrRight){	return strLeft(strRight(sourceStr,keyStrLeft), keyStrRight);}/*---------------------------------- Query String Object ------------------------------- */function Querystring(qs) { // optionally pass a querystring to parse	this.params = new Object()	this.get=Querystring_get	if (qs == null) {		var theRef = unescape(location.href);		if (theRef.indexOf("!") > -1) 			qs = strRight(theRef, "!");		else			qs = location.search.substring(1,location.search.length);		}	if (qs.length == 0) return	// Turn <plus> back to <space>	// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1	qs = qs.replace(/\+/g, ' ')	var args = qs.split('&') // parse out name/value pairs separated via &		// split out each name=value pair	for (var i=0;i<args.length;i++) {		var value;		var pair = args[i].split('=')		var name = unescape(pair[0])		if (pair.length == 2)			value = unescape(pair[1])		else			value = name		name = name.toLowerCase();		//alert(name + ":" + value)				this.params[name] = value	}}function Querystring_get(key, default_) {	// This silly looking line changes UNDEFINED to NULL	if (default_ == null) default_ = null;	key = key.toLowerCase();	var value=this.params[key]	if (value==null) value=default_;		return value}//---------------------------------- Get basic values from combos -------------------------------function getRadioValue(obj) {	if(!obj) return "";	var objLength = obj.length;	if(objLength == undefined)		if(obj.checked)			return obj.value;		else			return "";	for(var i = 0; i < objLength; i++) {		if(obj[i].checked) {			return obj[i].value;		}	}	return "";}function getCheckedValue(obj) {	if(!obj) return "";	var objLength = obj.length;		if(objLength == undefined)		if(obj.checked)			return obj.value;		else			return "";	var retVal = ""	for(var i = 0; i < objLength; i++) {		if(obj[i].checked) {			retVal = retVal + obj[i].value + "|";		}	}	return retVal;}//---------------------------------- get cur date time -------------------------------function getCurTime () {  var curtime = new Date();  var day =	curtime.getDate();  var month =	curtime.getMonth();  var year =	curtime.getYear();  var curhour =curtime.getHours();  var curmin = curtime.getMinutes();  var months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");  var time = "";   time = (curhour < 10 ? "0" : "") + curhour  + ":" + (curmin < 10 ? "0" : "") + curmin ;   return (day + " " + months[month] + " " + year + ", " + time);}//------------------------------- select a combo from a value --------------------------function selectVal(selObj, val) {	var index;	var found = false;	for (index = 0; index < selObj.length; index++) {		if (val == selObj[index].value  || val == selObj[index].text) {			found = true;			break;		}	}	if (found == false)		index = 0;	selObj.selectedIndex = index;}//---------------------------------- read and set cookies -------------------------------/* function readCookie(name){	var nameEQ = name + "=";	var ca = document.cookie.split(';');	for(var i=0;i < ca.length;i++)	{		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}	return null;} */function readCookie( check_name ) {	// first we'll split this cookie up into name/value pairs	// note: document.cookie only returns name=value, not the other components	var a_all_cookies = document.cookie.split( ';' );	var a_temp_cookie = '';	var cookie_name = '';	var cookie_value = '';	var b_cookie_found = false; // set boolean t/f default f	for ( i = 0; i < a_all_cookies.length; i++ ) {		// now we'll split apart each name=value pair		a_temp_cookie = a_all_cookies[i].split( '=' );		// and trim left/right whitespace while we're at it		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');		// if the extracted name matches passed check_name		if ( cookie_name == check_name ) {			b_cookie_found = true;			// we need to handle case where cookie has no value but exists (no = sign, that is):			if ( a_temp_cookie.length > 1 )				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );			// note that in cases where cookie is initialized but no value, null is returned			return cookie_value;			break;		}		a_temp_cookie = null;		cookie_name = '';	}	if ( !b_cookie_found ) return null;}/* function setCookie( c_name, value, expiredays) {	var exdate = new Date();	exdate.setDate( exdate.getDate() + expiredays);	document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires="+exdate.toGMTString());} */function setCookie( name, value, expires, path, domain, secure ){	// set time, it's in milliseconds	var today = new Date();	today.setTime( today.getTime() );	// if the expires variable is set, make the correct	// expires time, the current script below will set	// it for x number of days, to make it for hours,	// delete * 24, for minutes, delete * 60 * 24	if ( expires ) expires = expires * 1000 * 60 * 60 ;	var expires_date = new Date( today.getTime() + (expires) );	document.cookie = name + "=" +escape( value ) +	(( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +	(( path ) ? ";path=" + path : "" ) +	(( domain ) ? ";domain=" + domain : "" ) +	(( secure ) ? ";secure" : "" );}function showPopHelpClose( html) {	//config.Width = 120;	Tip(html, WIDTH, 120, PADDING, 6, BGCOLOR, '#E1FFEB',FADEIN, 400,FADEIN, 300, CLICKCLOSE, true, CLICKSTICKY, true)}function showHelpClose( html ) {	var dbpath = document.getElementById("dbpath").innerHTML;	var inp = html;	inp = inp.replace(/'/g,"\\'");	inp = inp.replace(/<p>/g,"");	inp = inp.replace(/<\/p>/g,"<br>");	document.write( "<a onmouseout='UnTip()' href='javascript:void(0);' onmouseover=\"showPopHelpClose('" + inp + "')\"><img src='/" + dbpath + "/info.gif!openimageresource'></a>")}