var main = null;
function popupSite(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var winl = (screen.width - 500) / 2;
  var wint = (screen.height - 400) / 2;
  //winprops = "top=0,left=0,resizable=yes"+ ",width=" + screen.width + ",height=" + screen.height;
  winprops = 'height=450,width=600,top='+wint+',left='+winl+',scrollbars=yes,resizable'
  window.open(href, windowname, winprops);
  //return false;
  }

function popupGallery(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var winl = (screen.width - 800) / 2;
  var wint = (screen.height - 650) / 2;
    
  winprops = 'height=650,width=800,top='+wint+',left='+winl+',scrollbars=yes,resizable'
  window.open(href, windowname, winprops);
  return false;
  }

function popupSite2 (mylink)
{
        recordURL = escape (mylink);
        mylink = window.open(mylink,100*(new Date).getMinutes()+(new Date).getSeconds(),'menubar,toolbar,location,status,scrollbars,resizable');
}		  
function popupTutorial()
  {

  var winl = (screen.width - 620) / 2;
  var wint = (screen.height - 650) / 2;
  
  winprops = 'height=650,width=620,top='+wint+',left='+winl+',scrollbars=yes,resizable'

  myTutorial = launch("Tutorial/Tutorial.html","tutorial",winprops,"myWindow");

  }
  //-->

function popupHelp(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var winl = (screen.width - 350) ;
  var wint = (screen.height - 550) / 2;
  
  winprops = 'height=550,width=350,top='+wint+',left='+winl+',scrollbars=yes,resizable'
  window.open(href, windowname, winprops);
  return false;
  }
  //-->

  function popup(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=400,width=500,top='+wint+',left='+winl+',scrollbars=yes'
window.open(href, windowname, winprops);

  return false;
  }
  //-->

function popup2(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var winl = (screen.width - 600) / 2;
  var wint = (screen.height - 600) / 2;
  var winh = screen.height - 200;
  winprops = 'height='+winh+',width=650,top='+wint+',left='+winl+',scrollbars=yes,resizable'
  window.open(href, windowname, winprops);
  return false;
  }
//-->
function launch(newURL, newName, newFeatures, orgName) {
            var remote = open(newURL, newName, newFeatures);
            if (remote.opener == null)
              remote.opener = window;
            remote.opener.name = orgName;
            return remote;
          }

function launchEngLogin() {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=500,width=500,top='+wint+',left='+winl+',scrollbars=yes'

            myRemote = launch("home-files/sevp.htm",
                              "login",
                              winprops,
                              "myWindow");
          }
function launchEspLogin() {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=500,width=500,top='+wint+',left='+winl+',scrollbars=yes'

            myRemote = launch("home-files/sevp.htm",
                              "login",
                              winprops,
                              "myWindow");
          }
function launchEngTLogin() {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=400,width=500,top='+wint+',left='+winl+',scrollbars=yes'

            myRemote = launch("tutorial-login.htm",
                              "tutoriallogin",
                              winprops,
                              "myWindow");
          }
function launchEspTLogin() {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=400,width=500,top='+wint+',left='+winl+',scrollbars=yes'

            myRemote = launch("tutorialsp-login.htm",
                              "tutoriallogin",
                              winprops,
                              "myWindow");
          }
function popupMainMenu(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;

var winl = screen.width - 10 ;
var winh = screen.height - 10 ;

winprops = 'height='+winh+',width='+winl+',top=1,left=1,scrollbars=yes,resizable=yes'
main = window.open(href, windowname, winprops);
return false;
  }
  //-->

function launchLogOut() {
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=350,width=500,top='+wint+',left='+winl+',scrollbars=yes'

closetime = 10; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

preview = window.open("home-files/sevp_thankyou_logout.htm", "goodbye", winprops);
if (closetime) setTimeout("preview.close();", closetime*1000);


window.close();
}


function closemetimer() {
closetime = 10;
setTimeout("window.close();", closetime*1000);
}

function closeit() {

window.close();
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function fullScreenMM() {
main = window.open('mainmenu.htm', 'mainmenu', 'fullscreen=yes, scrollbars=auto');
}

function launchSysReq()
{
var winl = (screen.width - 500) / 2;
var wint = (screen.height - 400) / 2;
winprops = 'height=410,width=500,top='+wint+',left='+winl+',scrollbars=yes';


//my2Remote = launch("home-files/systemreq.htm","systemreq",winprops,"myWindow");
}

function launchSEVP(mylink, windowname)
  {
  if (! window.focus)return true;
  var href;
  if (typeof(mylink) == 'string')
     href=mylink;
  else
     href=mylink.href;
  var winl = (screen.width - 900) ;
  var wint = (screen.height - 700) / 2;
  
  winprops = 'height=700,width=800,top='+wint+',left='+winl+',scrollbars=yes,resizable'
  window.open(href, windowname, winprops);
  return false;
  }
  
function launchUpcoming() {
var winl = (screen.width - 900) / 2;
var wint = (screen.height - 700) / 2;
winprops = 'height=700,width=800,top='+wint+',left='+winl+',scrollbars=yes'

            myRemote = launch("upcoming.htm",
                              "upcoming",
                              winprops,
                              "myWindow");
          }
// End -->


