﻿function navon(key) {
    var e = document.getElementById('topbar_' + key);
    if (e.className != 'sel') e.className = 'on';
}

function navoff(key) {
    var e = document.getElementById('topbar_' + key);
    if (e.className != 'sel') e.className = 'off';
}

function signup() {
    var screenx = window.screenX ? window.screenX : window.screenLeft ? window.screenLeft : 0;
    var screeny = window.screenY ? window.screenY : window.screenTop ? window.screenTop : 0;

    var winw = window.outerWidth ? window.outerWidth : document.body.clientWidth ? document.body.clientWidth : 1024;
    var winh = window.outerHeight ? window.outerHeight : document.body.clientHeight ? document.body.clientHeight : 768;

    var midx = winw / 2;
    var midy = winh / 2;

    var popw = 640;
    var poph = 550;

    var popx = (midx - (popw / 2)) + screenx;
    var popy = (midy - (poph / 2)) + screeny;

    var blankWin = window.open("http://visitor.constantcontact.com/d.jsp?m=1102502632828&p=oi&ea=" +
        document.forms[0].elements["ea"].value,
		'signup', "width=" + popw + ",height=" + poph + ",resizable=yes,left=" + popx + ",top=" + popy + ",scrollbars=yes,toolbar=no,titlebar=yes,status=yes,menubar=no,personalbar=no,location=yes,directories=no");
}

function mm_swapImgRestore() { //v3.0 
    var i, x, a = document.mm_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function mm_preloadImages() { //v3.0 
    var d = document; if (d.images) {
        if (!d.mm_p) d.mm_p = new Array();
        var i, j = d.mm_p.length, a = mm_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.mm_p[j] = new Image; d.mm_p[j++].src = a[i]; } 
    }
}

function mm_findObj(n, d) { //v4.0 
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = mm_findObj(n, d.layers[i].document);
    if (!x && document.getElementById) x = document.getElementById(n); return x;
}

function mm_swapImage() { //v3.0 
    var i, j = 0, x, a = mm_swapImage.arguments; document.mm_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
        if ((x = mm_findObj(a[i])) != null) { document.mm_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}

function popwin(url, w, h) {
	var popwin1 = window.open(url, 'popwin1', "width=" + w + ",height=" + h + ",resizable=yes,scrollbars=yes,toolbar=no,titlebar=yes,status=yes,menubar=no,personalbar=no,location=yes,directories=no");
}