function popWindow( url, width, height, windowName ){	//get center coords	var left = (screen.width - width) / 2;    var top = (screen.height - height) / 2;        win=window.open(url, windowName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);}function popScrollingWindow(url, width, height, windowName){	//get center coords	var left = (screen.width - width) / 2;    var top = (screen.height - height) / 2;        win=window.open(url, windowName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);}function openWindow(url){    var rand = "_blank";    win=window.open(url,rand,"directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes");}function popSite(){    popWindow('detectflash.html', 778, 510, 'headofstate');}function popTrailer(){    popWindow('trailer/index.html',600,433,'trailerpop');}function popInterview(name){    popWindow('interviews/index.html?movie='+name,550,363,'interviewpop');}function popSendCard(card){    popWindow('ecards/sendcard.html?card=' + card, 550, 450, 'sendpostcard');}function popMixMastaDetect(){    popWindow('mixmastadetect.html',600,420,'mixmasta');}function popMixMasta(){    popWindow('mixmasta.html',600,420,'mixmasta');}function popdvd(){    popWindow('splash.html',800,420,'dvd');}function sendMixMasta(sourceEmail, targetEmail){    if (checkEmailAddress(sourceEmail) && checkEmailAddress(targetEmail) )    {        popWindow('mixmasta_sendmail.php?sourceEmail='+sourceEmail+'&targetEmail='+targetEmail, 300, 200, 'mixmastasendmail')    }}function goMain(){    window.location.replace("main.html");}function checkEmailAddress(email){    if (email == "" || email.indexOf("@") == -1 || email.indexOf(".") == -1 || email.indexOf(" ") != -1)    {        alert(email + " is not a valid email address.  Please try again.");        return false;    }    return true;}
