// XHTML STRICT method of making a popup window.
// Link formation: <a href="http://www.yourlink.com" onclick="popUp(this.href,'console',400,640);return false;" rel="external">Link Text</a>
// Note: this function requires the externalLinks function above. Pass the appropriate argument (console, fixed, or elastic) for different window types.
function popUp(strURL, strType, strHeight, strWidth) {
	var strOptions="";
	if (strType=="console") {
	    strOptions = "scrollbars,resizable,height=" + strHeight + ",width=" + strWidth;
	}
	if (strType=="fixed") {
	    strOptions = "status,height=" + strHeight + ",width=" + strWidth;
	}
	if (strType=="elastic") {
	    strOptions = "toolbar,menubar,scrollbars,resizable,location,height=" + strHeight + ",width=" + strWidth;
	}
	var new_window = window.open(strURL, 'newWin', strOptions);
    new_window.focus();
}

/* Verify validity of email address format. */
function isEmailAddress(input) {
    if (typeof(input) == 'string') {
        if (input.search(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i) != -1) {
            return true;
        }
    }

    return false;
}

$(document).ready(function(){
						   
	// Remove border from checkboxes
	//$('input:checkbox').css({ border: "none" });
	
	// XHTML STRICT method of targeting blank window using rel tag
	//$('a[@rel=external]').attr({'target': '_blank'});
	
	// Remove last border on navs
	$('#nav ul li:last-child').css({ background: "none" });
	$('#nav_sub li:last-child').css({ background: "none", marginRight: "5px" });
	$('#nav_secondary ul li:last-child').css({ background: "none", marginRight: "0", paddingRight: "0" });
	$('#nav_sub ul li.current a').css({ color: "#dd7a2d", textDecoration: "none" }); // Cause IE6 is dumb.
	
});

