// high light the menu bar on mouse over
function hilite(imgname,imgsrc) {
  document.images[imgname].src = imgsrc;
}


function Launch01(win_url,win_name,win_width,win_height) {
  newwin = window.open(win_url,win_name,"height="+win_height+",width="+win_width+",scrollbars=yes,location=no,toolbar=no,directories=no,menubar=no,status=no,resizable=yes");
  newwin.opener = window;
  if (document.images) {  // eg if it's js 1.1 (which supports 'focus()')
    newwin.focus();
  }
}
	
function Launch02(win_url,win_name,win_width,win_height) {
  newwin = window.open(win_url,win_name,"height="+win_height+",width="+win_width+",scrollbars=auto,location=no,toolbar=no,directories=no,menubar=no,status=no,resizable=no");
  newwin.opener = window;
  if (document.images) {  // eg if it's js 1.1 (which supports 'focus()')
    newwin.focus();
  }
}	
	
function Launch03(win_url,win_name,win_width,win_height) {
  newwin = window.open(win_url,win_name,"height="+win_height+",width="+win_width+",scrollbars=yes,location=no,toolbar=no,directories=no,menubar=yes,status=no,resizable=yes");
  newwin.opener = window;
  if (document.images) {  // eg if it's js 1.1 (which supports 'focus()')
    newwin.focus();
  }
}	
	


// popup a window for login
function popUp(mylink,windowname) {
  if(!window.focus)return;
  var newwin = window.open(mylink,windowname,'scrollbars=no,status=yes,menubar=no,height=320,width=350,dependent=no')
  newwin.focus();
  mylink.target = windowname;
}

//Video
function OpenVideo(url, x){
var _w='200';
var _h='150';
if (x && x==1) { _w='500';_h='400'; }
if (x && x==2) { _w='500';_h='479'; }
var _parms = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+_w+',height='+_h;
myWin=window.open(url,"win1",_parms,true);
myWin.focus();
self.name = "mainWin";
}

//Video
function OpenVideoBig(url, x){
var _w='350';
var _h='250';
if (x && x==1) { _w='500';_h='400'; }
if (x && x==2) { _w='500';_h='479'; }
var _parms = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+_w+',height='+_h;
myWin=window.open(url,"win1",_parms,true);
myWin.focus();
self.name = "mainWin";
}



//Date
var isn1=null;
var isn2=false;
today=new Date();

function isnArray() {
 argnr=isnArray.arguments.length
 for (var i=0;i<argnr;i++) {
  this[i+1] = isnArray.arguments[i];
  }
 }
var isnMonths=new isnArray("January","February","March","April","May","June","July","August","September","October","November","December");


   function initArray() {
      this.length = initArray.arguments.length
      for (var i = 0; i < this.length; i++)
         this[i+1] = initArray.arguments[i]
      }

var d = new Date()
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")


//Tab for CAMDISC CAMNEWS
var n4, ie, n6;

// detect browser support for certain key objects/methods
// and assemble a custom document object

var doc,doc2,doc3,sty;

if (document.layers) {
doc = "document.";
doc2 = ".document.";
doc3 = "";
sty = "";
n4 = true;
} else if (document.all) {
doc = "document.all.";
doc2 = "";
doc3 = "";
sty = ".style";
ie = true;
} else if (document.getElementById) {
doc = "document.getElementById('";
doc2 ="')";
doc3 ="')";
sty = "').style";
n6 = true;
}

// display block or none DIV element

function blocknone(divname,tabidname,state,tabcolor,tabbg,cursortype) {
if (n4) {
divObj = eval (doc + divname);
tabObj = eval (doc + tabidname);
}
else {
divObj = eval (doc + divname + sty);
tabObj = eval (doc + tabidname + sty);
}
divObj.display = state;
tabObj.color = tabcolor;
tabObj.backgroundColor = tabbg;
tabObj.cursor = cursortype;
}
// variables that hold the value of the currently active (open) menu

var active_tabcontent = null;
var active_tab1 = null;

// function closes all active menus and turns back to 'off' state

function closeallmenus() {
if (active_tabcontent != null) {
blocknone(active_tabcontent,active_tab1,'none','#003399','#66CCFF','pointer');
}
}

// function controls tab content visibility

function controlsubmenu(tabcontent,tabid) {
closeallmenus();
blocknone(tabcontent,tabid,'block','#000','#F4F4FD','text');
active_tabcontent = tabcontent;
active_tab1 = tabid
}