
function openCentered(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes,status=0';

win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
} 
function MM_openBrWindow(theURL,winName,features) { 
window.open(theURL,winName,features);
}

// script for the key industry Issues drop down menu
function jumpTo( sel )
{
var theURL;
if( theURL = sel.options[sel.selectedIndex].value )
window.location.href = theURL;
}

function editPage(tid,cn) {
openCentered('../cms/page_edit.cfm?cn=' + cn + '&tid=' + tid,'editwin',screen.width,screen.height,1);
}


function printPage(id) {
window.print();
}

function cmsOut() {
window.location.href=window.location.href + '?cmslogout=1';
}

function checkEmail(id) {
var email = document.getElementById(id);

var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus
return false;
}
}

