var emArray = new Array;
emArray["jb"] = "Jim|Bourdon|raja2004|elasmo.com".split("|");
emArray["bh"] = "Bill|Heim|Billheim3|verizon3.net".split("|");
emArray["mg"] = "Merle|Graffam|pgraffam|vhs3.vhs.kane.k12.ut.us".split("|");
emArray["gg"] = "Gary|Grimsley|gjg57|netzero.net".split("|");
emArray["kg"] = "Kim|Greene|greene_rouse|email.msn.com".split("|");
emArray["me"] = "Mike|Everhart|mjever|southwind.net".split("|");
emArray["mf"] = "Mike|Folmer|SHRK2TH|aol.com".split("|");
emArray["rl"] = "Rome|Lytton|lyttorg|texaco.com".split("|");
emArray["hm"] = "Henry|Mollet|mollet|mbay.net".split("|");
emArray["sg"] = "Scott|Greenwald|SGreenwald|mbayaq.org".split("|");
emArray["wc"] = "Wayne|Callahan|callahans2|msn.com".split("|");

//NOTE: EMAIL ADDRESS IN frmFooter also




function newWindow(anyURL)
  {
  OpenWin = this.open(anyURL, "anyWindow", "toolbar=no,menubar=no,location=yes,scrollbars=yes,resizable=yes");
  }

function imgWindow(anyURL, hgt, wid)
  {
  OpenWin = this.open(anyURL, "imgViewer", "toolbar=no,height=" + hgt + ",width=" + wid + ",menubar=no,location=no,scrollbars=no,resizable=yes");
  }




/*
 function closeOpenImgWin() {
    if (ssPopWin!=null && ssPopWin.closed==false) ssPopWin.close();
   }

 function showChart(url) {
    closeOpenWin();
    ssPopWin = window.open(url,"","status=1,width=390,height=380,scrolling=yes,menubar=0,scrollbars=yes,resizable=yes,toolbar=0")
    }
*/


//--------- CLOSE OLD WINDOW, CREATE NEW, IMAGE ONLY ------------

var newImgWindow;

function closeNewImgWin() {
    if (newImgWindow!=null && newImgWindow.closed==false) newImgWindow.close();
   }

function imgNewWindow(anyURL, hgt, wid) {
  closeNewImgWin();
  newImgWindow = this.open(anyURL, "imgNewViewer", "toolbar=no,height=" + hgt + ",width=" + wid + ",menubar=no,location=no,scrollbars=no,resizable=yes");
  }


//--------- CLOSE OLD WINDOW, CREATE NEW, IMAGE & TEXT ------------

var newImgTextWindow;

function closeNewImgTextWin() {
    if (newImgTextWindow!=null && newImgTextWindow.closed==false) newImgTextWindow.close();
   }

function imgTextNewWindow(qryUrl, hgt, wid) {
  closeNewImgTextWin();
  newImgTextWindow = this.open(qryUrl, "imgNewViewer", "toolbar=no,height=" + hgt + ",width=" + wid + ",menubar=no,location=no,scrollbars=yes,resizable=yes");
  }


//----------------------------------

function openURL(anyURL)
  {
  var OpenWin;
  OpenWin = window.open(anyURL,"linkViewer","status=1,height=440,width=620,scrolling=0,menubar=0,scrollbars=1,resizable=no,toolbar=0")
  }

function elasmoShow(anyURL)
  {
  var OpenWin;                                             
  OpenWin = window.open(anyURL,"slideViewer","status=1,height=440,width=620,scrolling=0,menubar=0,scrollbars=0,resizable=no,toolbar=0")
  }

function dentShow(anyURL)
  {
  var OpenWin;
  OpenWin = window.open(anyURL,"dentViewer","status=1,height=440,width=620,scrolling=0,menubar=0,scrollbars=0,resizable=no,toolbar=0")
  }

function mylioShow(anyURL)
  {
  var OpenWin
  OpenWin = window.open(anyURL,"mylioViewer","height=320,width=450,scrolling=no,menubar=0,scrollbars=0,resizable=no,toolbar=0")
  }

function writeGlossary(item,desc)
  {
  var i = "<li class='glossary'><font color='#800000'><b>" + item + "</b></font> - "
  var d = desc + "</li>"
  document.write(i+d)
  }

function writeBook(item,desc,opt)
  {
  var b = ""
  if (opt=="LI")
      { 
      // alert(opt);
       b = "<li> <b>" + item + "</b> &nbsp; " +  desc + "</li>"}
    else
  
      { b =item + " &nbsp; " +  desc }
  document.write(b)
  }

function frameMe()
  {if (parent.frames.length<1)  //------- NOT WITHIN FRAMES CURRENTLY
      {var f = pth + "frameMe.html?";
       qry = f + qry;
       window.location = qry;}
  }

var imgDir_global="";

function getSpacerTag(w, h) {
  var t =  "<IMG src='" + imgDir_global + "spacer.gif' width='" + w + "' height='" + h + "' border='0'>";
  document.write(t);
}





function emailMake(emKey,sbj,fobj) {
  var adr = emArray[emKey][2] + "@" + emArray[emKey][3];
  var act = "mailto:" + adr + "?SUBJECT='" + sbj + "'";
  var brwsr="notIE";
  if (document.all) brwsr="IE";
  if (brwsr=="IE") {
  	   fobj.action=act;
       fobj.submit();
     }
    else {
       alert("Email " + emArray[emKey][0] + " regarding the " + sbj + " at " + adr);
     } 	  
  }

function sc_download(binPath) {
   var scWin;
 //url = "../../../bin/sc_download.html";
   url = binPath + "bin/sc_download.html";
   scWin = this.open(url, "scWin", "width=390, height=250,toolbar=0,menubar=0,location=1,scrollbars=1, resizable=1");
  }

/*
function addPerspective(pCap,pBy,pTxt,spare1,spare2) {
  var p = "<BR>&nbsp;<BR><TABLE bgcolor='e8e8e8' width='485'><TR><TD class='perspective'>" + pCap + "</TD><TD align='right'><B>" + pBy + "&nbsp;</B></TD></TR>"
        + "<TR bgcolor='eeeeee' ><TD colspan='2'>" + pTxt + "</TD></TR></TABLE>";
  document.write(p);
 }
*/

function addPerspective(pCap,pBy,pTxt,spare1,spare2) {
  var p = "<TABLE bgcolor='dddddd' width='490'>";

  if (pCap!=null && pCap.length>0) p = p + "<TR><TD class='perspective'>" + pCap + "</TD><TD align='right'><B>" + pBy + "&nbsp;</B></TD></TR>";
  p = p + "<TR bgcolor='e8e8e8' ><TD colspan='2'>" + pTxt + "</TD></TR></TABLE>";
  document.write(p);
 }

function endPerspective() {
  var p = "<TABLE bgcolor='dddddd' width='490'>";
  p = p + "<TR><TD><IMG src='" + imgDir_global + "spacer.gif' width='1' height='4' border='0'></TD></TR></TABLE>";
  document.write(p);
 }



function addBlakeyMap(mya) {

  var bPg = "http://jan.ucc.nau.edu/~rcb7/nam.html";
  var pth = "http://jan.ucc.nau.edu/~rcb7/";
  var lnk = "";
  switch(mya) {
     case 40:  lnk = "namPe40.jpg";   break;
     case 50:  lnk = "namPe50.jpg";   break;
     case 60:  lnk = "namPp60.jpg";   break;
     default: break;
    } 
  lnk = pth+lnk;
  var t = "<TABLE align='right' cellspacing='0' cellpadding='0'>"
        + "<TR><TD><A href='javascript:newWindow(\"" + lnk + "\")'>"
        + "<IMG src='../../refs/maps/blakey-map_" + mya + "mya.gif' border='0'></A></TD></TR>"
        + "<TR><TD class='sPT9' align='center' valign='top' bgcolor='#e0e0e0'>Reproduced with the permission of <A href='javascript:newWindow(\"" + bPg + "\")'>Dr. Blakey</A> 2007</TD></TR></TABLE>";
  document.write(t);

//alert(t);

 }

function ms_addIntro(txt) {
  var t = "<P><TABLE cellspacing='0' cellpadding='0' bgcolor='#FAFAFA'>"
        + "<TR><TD class='introTxt2'>" + txt + "</TD></TR></TABLE><HR></P>";
  document.write(t);
 }

function ms_addComment(txt) {
  var t = "<TABLE cellspacing='0' cellpadding='0' bgcolor='#FAFAFA'>"
        + "<TR><TD class='introTxt2'>" + txt + "</TD></TR></TABLE>";
  document.write(t);
 }


function ms_family(fam) {
  var f1 = fam.substring(0,1);
  var f2 = fam.substring(1,(fam.length));
  var t = "<SPAN class='fam1'>" + f1 + "</SPAN><SPAN class='fam2'>" + f2 + "</SPAN>";
  document.write(t);
  //alert(t);
 }
