<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* ----------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------- */
/* ****************************** SHARED FILE ********************************** */
/* ----------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------- */
// Prevent IE error when debugging
if (!window.console) console = {log: function() {}};

// Divs in IE don't auto adjust even if you put height of 100%.  This is to calculate the main content's height on page load and adjust accordingly
function adjustHeight() {
	mainBox = document.getElementById('main');
	//mainMargin = document.getElementById('main_margin');
	leftSide = document.getElementById('left');
	rightSide = document.getElementById('right');
//	divider = document.getElementById('divider');

	mainHeight = Math.max(mainBox.offsetHeight, mainBox.scrollHeight);

	if (leftSide)
		leftHeight = Math.max(leftSide.offsetHeight, leftSide.scrollHeight);
	if (rightSide)
		rightHeight = Math.max(rightSide.offsetHeight, rightSide.scrollHeight);

	if (leftSide)
		maxHeight = Math.max(mainHeight, leftHeight);
	if (rightSide)
		maxHeight = Math.max(mainHeight, rightHeight);

	maxHeight = maxHeight-50;
	maxHeight = maxHeight + 'px';

	if (leftSide)
		leftSide.style.height=maxHeight;
	if (rightSide)
		rightSide.style.height=maxHeight;
}
function toggleElement(elementname) {
    thisItem = document.getElementById(elementname);
    if (thisItem.style.display &amp;&amp; thisItem.style.display != 'none') {
        thisItem.style.display = 'none';
    }
    else {
        thisItem.style.display = 'inline-block';
    }
}
function hideElement(elementname) {
    thisItem = document.getElementById(elementname);
    if (thisItem)
		thisItem.style.display = 'none';
}
function showElement(elementname) {
    thisItem = document.getElementById(elementname);
    if (thisItem)
		thisItem.style.display = 'inline';
}

function toggleBullet(bulletname, bulleton, bulletoff) {
    thisItem = document.getElementById(bulletname);

    if (thisItem.style.listStyleImage=='url(' + bulleton + ')')
        thisItem.style.listStyleImage='url(' + bulletoff + ')';
    else
        thisItem.style.listStyleImage='url(' + bulleton + ')';
}

 function calculateCornerY(floatingMenu) {  
//     if (floatingMenu.targetY != 'center')  
  //       return floatingMenu.shiftY + floatingMenu.targetY;  
   
     var height = parseInt(floatingMenu.offsetHeight);  
     // Handle Opera 8 problems                                   
     var clientHeight =   
         floatingMenu.hasElement &amp;&amp; floatingMenu.hasInner  
         &amp;&amp; document.documentElement.clientHeight   
             &gt; window.innerHeight  
         ? window.innerHeight  
         : document.documentElement.clientHeight  

alert(floatingMenu.hasElement);   
     var cornerY =  
         floatingMenu.hasElement  
         ? (floatingMenu.hasInner    
            ? pageYOffset  
            : document.documentElement.scrollTop) +   
           (clientHeight - height)/2  
         : document.body.scrollTop +   
           (document.body.clientHeight - height)/2;  
     return cornerY;  
 }

 function calculateYPos(item, startPos) {  
	var pageHeight = document.body.clientHeight;
	var pixelsScrolled = document.body.scrollTop;

     var posY =  startPos + pixelsScrolled;
     return posY;  
 }

function getPos(el) {
    // yay readability
    for (var lx=0, ly=0;
         el != null;
         lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent);
    return {x: lx,y: ly};
}

// if view is hidden, make it visible.  If visible, make it hidden
function toggleView(div1, div2) {
//  alert(document.getElementById(div1));
    div1view = document.getElementById(div1);
    if (div1view.style.display == 'inline')
        div1view.style.display = 'none';
    else
        div1view.style.display = 'inline';

	if (div2) {
    div2view = document.getElementById(div2);
    if (div2view.style.display == 'none')
        div2view.style.display = 'inline';
    else
        div2view.style.display = 'none';
	}
}
function openFileBrowser() {
    window.open('editor/jscripts/tiny_mce/plugins/filemanager/', 'UploadFile', "height=500,width=700,modal=yes,alwaysRaised=yes");
    return false;
}

function popitup(url, name, options) {
	newwindow=window.open(url,name,options);
	if (window.focus) {newwindow.focus()}
	return false;
}

function limitTextarea(field, statusfield, maxlimit) {
	// trim if too long
	if (field.value.length &gt; maxlimit) 
		field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else 
		statusfield.value = maxlimit - field.value.length;
}
function showCharCount(field, statusfield, maxlimit) {
	statusfield.value = field.value.length;
}
function hideInputTip(inputField, tooltip) {
    if (inputField.value=='')
        showElement(tooltip);
}
    
function toggleNewsArchive(img, monthsdiv) {
    thisItem = document.getElementById(monthsdiv);
    thisImage = document.getElementById(img);
    if (thisItem.style.display == 'none') {
        thisItem.style.display = 'inline';
        thisImage.src = '/images/news_arrow_opened.gif';
    }
    else {
        thisItem.style.display = 'none';
    thisImage.src = '/images/news_arrow_closed.gif';
    }
}

function showDiv(elementname) {
    thisItem = document.getElementById(elementname);
    thisItem.style.display = 'inline';
}
function hideDiv(elementname) {
    thisItem = document.getElementById(elementname);
    thisItem.style.display = 'none';
}

// format a number to have comma separators (e.g. 100000 = 100,000)
function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length &gt; 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
function getQueryVar(variable, link) { 
  var query = parseUrl(link).search.substring(1); 
  var vars = query.split("&amp;"); 
  for (var i=0;i&lt;vars.length;i++) { 
    var pair = vars[i].split("="); 
    if (pair[0] == variable) { 
      return pair[1]; 
    } 
  } 
} 
function parseUrl( url ) {
    var a = document.createElement('a');
    a.href = url;
    return a;
}

// for IE workaround.  IE won't accept form tags within tr's
function submitNestedForm(element) {
				element.type = 'hidden';
		
				while(element.className != 'form')
					element = element.parentNode;
					
				var form = document.getElementById('poster');

				// row basically disappears so do some styling to make it not so strange while it's being submitted
				thisform = $(element);
				$(thisform).children('.status').html('Saving, please wait...');
				$(thisform).children('td').addClass('grayedout');
				
				var inputs = element.getElementsByTagName('input');
				while(inputs.length &gt; 0) 
					form.appendChild(inputs[0]);
					
				var selects = element.getElementsByTagName('select');
				while(selects.length &gt; 0) 
					form.appendChild(selects[0]);
					
				var textareas = element.getElementsByTagName('textarea');
				while(textareas.length &gt; 0) 
					form.appendChild(textareas[0]);
				
				form.submit();
			}
function validateNewsletterSignup(thisForm) {
        if (!validEmail(thisForm.email, 1))
                return false;
       if (!validRequired(thisForm.zip, 'Zip Code'))
                return false;

        formvalidated=true; // for form hints
    
        return true;
}
function checkAll(formField) {
	for(i=0;i&lt;formField.length;i++) {
		if (formField[i].value &gt; 0)
			formField[i].checked = 'checked';
	}
}
function uncheckAll(formField,thisField) {
	for(i=0;i&lt;formField.length;i++) {
		formField[i].checked = false;
	}
	thisField.checked='checked';
}
function loadCSS(filename) {
	// Get HTML head element 
        var head = document.getElementsByTagName('HEAD')[0];  
  
        // Create new link Element 
        var link = document.createElement('link'); 
  
        // set the attributes for link element  
        link.rel = 'stylesheet';  
      
        link.type = 'text/css'; 
      
        link.href = filename;  
  
        // Append link element to HTML head 
        head.appendChild(link);  
	//console.log(filename);	
}
function updatePreviewImage(imageid, imagefield) {
        image = imagefield.value;
        $('#'+imageid).attr('src', '');
        $('#'+imageid).attr('src', image);
}
function GetReCaptchaID(containerID) {
        var retval = -1;
        $(".g-recaptcha").each(function(index) {
                if(this.id == containerID) {
                        retval = index;
                        return;
                }
        });

        return retval;
}
function pad (str, max) {
  str = str.toString();
  return str.length &lt; max ? pad("0" + str, max) : str;
}
// Create Base64 Object
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f&lt;e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n&gt;&gt;2;o=(n&amp;3)&lt;&lt;4|r&gt;&gt;4;u=(r&amp;15)&lt;&lt;2|i&gt;&gt;6;a=i&amp;63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f&lt;e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s&lt;&lt;2|o&gt;&gt;4;r=(o&amp;15)&lt;&lt;4|u&gt;&gt;2;i=(u&amp;3)&lt;&lt;6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n&lt;e.length;n++){var r=e.charCodeAt(n);if(r&lt;128){t+=String.fromCharCode(r)}else if(r&gt;127&amp;&amp;r&lt;2048){t+=String.fromCharCode(r&gt;&gt;6|192);t+=String.fromCharCode(r&amp;63|128)}else{t+=String.fromCharCode(r&gt;&gt;12|224);t+=String.fromCharCode(r&gt;&gt;6&amp;63|128);t+=String.fromCharCode(r&amp;63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n&lt;e.length){r=e.charCodeAt(n);if(r&lt;128){t+=String.fromCharCode(r);n++}else if(r&gt;191&amp;&amp;r&lt;224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&amp;31)&lt;&lt;6|c2&amp;63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&amp;15)&lt;&lt;12|(c2&amp;63)&lt;&lt;6|c3&amp;63);n+=3}}return t}}

</pre></body></html>