
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by ----- filename.js -----
 */

/* ----- formsubmithelpers.js ----- */
function inputSubmitOnClick(event) {
    if (!event) var event = window.event; // IE compatibility

    if (hasClassName(this, 'submitting')) {
        return confirm(window.form_resubmit_message);
    } else {
        addClassName(this, 'submitting');
    }
    return true;
}

function registerSubmitHandler() {
    var nodes = cssQuery('input[type=submit]');
    for (var i=0; i<nodes.length; i++) {
        var node = nodes[i];
        if (!node.onclick) {
            node.onclick = inputSubmitOnClick;
        }
    }
}
registerPloneFunction(registerSubmitHandler);


/* ----- menu.js ----- */
ns6 = (document.getElementById&&!document.all)? true:false;
ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;

function getObj(id) {
    if (ie4) {
        return document.all[id];
    } else if(ns6) {
        return document.getElementById(id);
    } else if(ns4) {
        return document.layers[id];
    } else {
        return false;
    }
}

function getStyle(id) {
    obj = getObj(id)
    if (obj == null) {
        return '';
        }
    if (ns4) {
        return obj;
    } else {
        return obj.style;
    }
}




var openmenu = 'none';
var open_parent = 'none';
var open_background = 'none';

function KillMenu() {
                if (openmenu != 'none') { 
                        getStyle(openmenu).visibility="hidden";
                        openmenu = 'none';
                        }
              
}

function ShowMenu(menu) {
                if (!ns6 & !ie4) {
                  return false;
                  }
                                KillMenu();          
                if (openmenu != menu && getStyle(menu) != '') {

                openmenu = menu;
                
                getStyle(menu).visibility="visible";
               
                }


return false;
}


/* ----- spamproof.js ----- */
// http://aviation.cliffordlaw.com/portal_javascripts/spamproof.js?original=1
function SendMail(n,d){document.location.href='mailto:'+n+'@'+d}
function xSendMail(name,domain){var BaseOptions='width=400,height=400,status=no,scrollbars=yes,resizeable=yes';var win=window.open('/emDisclaimer.aspx?n='+name+'&d='+domain,'_new',BaseOptions)}
function PrintMail(n,d,m){PrintMail(n,d,m,'')}
function PrintMail(n,d,m,l){var ns=n.replace("'","\\\'");if(m==""){m=n+'@'+d} else{m=m.replace("<at>","@")}
var ms=m.replace("'","\\\'");document.write("<a href=\"JavaScript:SendMail('" + ns + "','" + d + "'); \" onMouseOver=\"self.status='" + ms.replace("<br>", "") + "'; return true;\" onMouseOut=\"self.status=''; return true;\""+l+">"+m+"</a>");return true}
function PrintEmail(name,domain){document.write(name+"@"+domain)}
function SendEmail(name,domain){document.location.href="mailto:"+name+"@"+domain}
function sMail(s){var sx=s.replace("<at>","@");var n=sx.substring(0,sx.indexOf("@"));var d=sx.substring(sx.indexOf("@")+1);m=sx;var ns=n.replace("'","\\\'");var ms=m.replace("'","\\\'");var l='';document.write("<a href=\"JavaScript:SendMail('" + ns + "','" + d + "'); \" onMouseOver=\"self.status='" + ms + "'; return true;\" onMouseOut=\"self.status=''; return true;\""+l+">"+m+"</a>")}

/* ----- landing.js ----- */

var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}


