// JavaScript Documentwindow.onload = pageload;function pageload(){}function clearButtons(buttonGroup){

    if (buttonGroup != undefined)
    {
       for (i=0; i < buttonGroup.length; i++) {

        if (buttonGroup[i].checked == true) {
            buttonGroup[i].checked = false
        }

       }
   }

}


function MaxCharacters(max, input) {
    
    this.max = max;
    this.input = input;
    this.remaining = this.max - $('#' + input).attr('value').length;
    
    document.write('<div class="charmax">' + this.max + ' Characters Max. <strong>(<span id="max' + input + '">' +
        this.remaining + '</span> remaining.)</strong></div>');
    $('#max' + input).parent().css('color', (this.remaining > 0) ? '#000000' : '#FF0000');
    
    var base = this;
    $('#' + input).keyup(function() {
        base.remaining = base.max - $(this).attr('value').length;
        $('#max' + input).html(base.remaining);
        $('#max' + input).parent().css('color', (base.remaining > 0) ? '#000000' : '#FF0000');
    });
}


function pleaseWait(btn) {
    btn.disabled = true;
    btn.className = 'hide';
    location.href = '#top';
    
    //TB_show('Please Wait', document.getElementById('ancLoading').href, false);        document.body.style.backgroundColor = "#999"; //change the background color to white
	document.getElementById("everything").style.display = "none"; //hide everything    document.getElementById("loadingAnimation").style.display = "block";            //return true;    }function toggleme(obj){    if (typeof(obj) == "string")    {        obj = document.getElementById(obj);    }    if (obj != null)    {        if (obj.style.display == "none")	    {	        obj.style.display = "block";	    }	    else if (obj.style.display == "block")	    {	        obj.style.display = "none";	    } 	    else if (obj.className == 'hide')	    {	        obj.className = 'show';	    }	    else if (obj.className == "show")	    {	        obj.className = 'hide';	    }	}}function hideme(obj){    if (typeof(obj) == "string")    {        obj = document.getElementById(obj);    }    if (obj != null)    {        if (obj.style.display == "block")	    {	        obj.style.display = "none";	    } 	    else if (obj.className == 'show')	    {	        obj.className = 'hide';	    }	}    }function showme(obj){    if (typeof(obj) == "string")    {        obj = document.getElementById(obj);    }    if (obj != null)    {        if (obj.style.display == "none")	    {	        obj.style.display = "block";	    } 	    else if (obj.className == 'hide')	    {	        obj.className = 'show';	    }	}}function showmessage(message){    showmessage(message, '');}function showmessage(message, spanclass){    var literal = document.getElementById('liClientMessage');    literal.innerHTML = '<div id="divMessageJS" class="messagebox" style="display: block;">' +        '<div class="header">Message</div><p><span class="' +        spanclass + '">' + message + '</span><br /></p><br /><p><a href="javascript:hideme(\'divMessageJS\');" class="closebtn">x close window</a></p></div>';} //pop up function defaultfunction openNewWindow(URLtoOpen, windowName, windowFeatures) {    newWindow=window.open(URLtoOpen, windowName, windowFeatures); }function Browser() {  var ua, s, i;  this.isIE    = false;  this.isNS    = false;  this.version = null;  ua = navigator.userAgent;  s = "MSIE";  if ((i = ua.indexOf(s)) >= 0) {    this.isIE = true;    this.version = parseFloat(ua.substr(i + s.length));    return;  }  s = "Netscape6/";  if ((i = ua.indexOf(s)) >= 0) {    this.isNS = true;    this.version = parseFloat(ua.substr(i + s.length));    return;  }  // Treat any other "Gecko" browser as NS 6.1.  s = "Gecko";  if ((i = ua.indexOf(s)) >= 0) {    this.isNS = true;    this.version = 6.1;    return;  }}var browser = new Browser();if (browser.isNS) document.captureEvents(Event.MOUSEMOVE)// Set-up to use getMouseXY function onMouseMovedocument.onmousemove = getMouseXY;// Temporary variables to hold mouse x-y pos.svar tempX = 0var tempY = 0// Main function to retrieve mouse x-y pos.sfunction getMouseXY(e) {  if (browser.isIE) { // grab the x-y pos.s if browser is IE    tempX = event.clientX;// + document.body.scrollLeft;    tempY = event.clientY;// + document.body.scrollTop;  } else {  // grab the x-y pos.s if browser is NS    tempX = e.pageX    tempY = e.pageY  }    // catch possible negative values in NS4  if (tempX < 0){tempX = 0}  if (tempY < 0){tempY = 0}      return true}