function pageRedirectPath()
{
  //--------------------------------------------------------------------------------------------------
  //---------------------NOTES------------------------------------------------------------------------
  //--------------------------------------------------------------------------------------------------
  //
  // The path below works locally.
  //
  // file://Jason-5ncr1iiqw/c/laptop-backup-08-14-2008/2-23-2009/dvd05-website/welcome.html
  // ?page=location-js.html&menu=rh_nav3.html&title=title.html
  //
  // so change parsing logic.. if file don't parse on domain or server folder and add welcome.html or sphere.html
  //                           if ftp parse on username
  //                           if http parse on domain and or server folder
  //
  // if testing locally generate paths for local and remote server.
  // if testing on ftp generate paths for ftp and remote server.
  // if testing/using regularly of http just generate remote server path.
  //
  // why aren't cookies enabled on ftp?
  // ftp adds /n6539f/ to file path.
  // css doesn't work on ftp but javascript appears to...
  //
  //
  //
  //--------------------------------------------------------------------------------------------------

  var TableOut = "" //empty string to be filled throughout code
  var myDOmain = "www.wisdomwingsandwar.com" //target domain name that page will be redirected to if starting from a file folder
  var myDomainFolder = "wisdomwingsandwar" //name of folder that local copy of web site is kept in
  var LocalServerFolder = "htdocs" //name of folder that local server defaults to
  var LocalServerIP = "129.6.104.72" //local server IP address that page will be redirected to if starting from a file folder

  var knownFolders = new Array();
  knownFolders[0] = "htdocs"; //name of folder that local server defaults to
  knownFolders[1] = "dvd05-website"; //backup copy of website
  knownFolders[2] = "V:"; //mapped shortcut backup copy of website

  //--------------------------------------------------------------------------------------------------
  //these pages are loaded into framed page when loads with no specific path.-------------------------

  var defaultPages = new Array();
  defaultPages[0] = "body.html";     //lower right frame, main content
  defaultPages[1] = "navigate.html"; //lefthand menu
  defaultPages[2] = "title.html";    //top title header
  defaultPages[3] = "welcome.html";  //frame container page

  //--------------------------------------------------------------------------------------------------
  //foldersToFind1 determines menuToUse1 so their order has to match.---------------------------------
  //these load the lefthand menu associated with the main content page.-------------------------------

  var foldersToFind1 = new Array();
  foldersToFind1[0] = "aviation_related";
  foldersToFind1[1] = "war_related";
  foldersToFind1[2] = "wisdom-technical";

  var menuToUse1 = new Array();
  menuToUse1[0] = "aviation.html";
  menuToUse1[1] = "war-related.html";
  menuToUse1[2] = "wisdom-technical.html";

  //--------------------------------------------------------------------------------------------------
  //--------------------------------------------------------------------------------------------------
  //foldersToFind2 determines menuToUse2 so their order has to match.---------------------------------
  //these are all specific subfolders of foldersToFind1 and menuToUse1--------------------------------

  var foldersToFind2 = new Array();
  foldersToFind2[0] = "jims_page";
  foldersToFind2[1] = "Jims_page";
  foldersToFind2[2] = "telephone_stuff";

  var menuToUse2 = new Array();
  menuToUse2[0] = "navigate-jim-harris1.html";
  menuToUse2[1] = "navigate-jim-harris1.html";
  menuToUse2[2] = "telephone-stuff.html";

  //--------------------------------------------------------------------------------------------------
  //--------------------------------------------------------------------------------------------------
  //serverType determines serverTypeToUse so their order has to match.--------------------------------

  var serverType = new Array();
  serverType[0] = "file";
  serverType[1] = "http";
  serverType[2] = "ftp:";

  var serverTypeToUse = new Array();
  serverTypeToUse[0] = "file:/";
  serverTypeToUse[1] = "http:/";
  serverTypeToUse[2] = "ftp:/";


  //--------------------------------------------------------------------------------------------------

  var query = document.location.href;

  //--------------------------------------------------------------------------------------------------
  //this is only for display. might be better than using pathArray[0] < 3.

  var UrlOrFile = query.substring(0,4)
  var serverTypeIndex = "";

    for (i=0; i < serverType.length; i++) 
    {
      if (UrlOrFile == serverType[i]) //test document.location.href for file,http or ftp:.
      {      
        serverTypeIndex = [i];
      }
    }

  //--------------------------------------------------------------------------------------------------

  var parms = query.split("//");
  //--NEED TO ADD LOGIC TO CONVERT HEX CODES TO CHARACTERS HERE 04-10-2010----------------------------
  // String.fromCharCode() 
  // string.charCodeAt(index)
  //--------------------------------------------------------------------------------------------------


  //--------------------------------------------------------------------------------------------------
  var parmsTest = parms[1].substring(0,1);
  
    if (parmsTest == "/") //if document.location.href is a file folder than the second element will have an extra "/"
    {
      parms[1] = parms[1].substring(1);
    }
    else
    {
      parms[1] = parms[1]; //leave parms[1] as is
    }

  //--------------------------------------------------------------------------------------------------

  var pathArray = parms[1].split("/");

    if (serverTypeIndex == 2) //if document.location.href is on ftp server
    {
      var userAndPassAndDomain = ""
      var userAndPass = ""
      var userName = ""
      var password = ""
      var userAndPassAndDomain = pathArray[0].split("@");
      var userAndPass = userAndPassAndDomain[0].split(":");
      userName = userAndPass[0];
      password = userAndPass[1];
      UrlRedirect = userAndPassAndDomain[1]
    }
    else
    {
      var UrlRedirect = pathArray[0] //Make UrlRedirect equal to first element of pathArray.
      if (pathArray[0].length < 3) //Url a drive letter or url? Make UrlRedirect equal to real target domain name if pathArray is drive letter.
      {
       UrlRedirect = myDOmain
      }
    }
  //--------------------------------------------------------------------------------------------------





  //--------------------------------------------------------------------------------------------------

    var serverFolderIsPresent = 1      
    var domainFolderIsPresent = 1      
    if (pathArray.length > 1)
    {
      var i=0;
      for (i=0;i<pathArray.length;i++) //compare each pathArray element to all knownFolders elements
      {
        var j=0;
        for (j=0;j<knownFolders.length;j++) //compare pathArray[i] to each knownFolders[j] element 
        {
          if (pathArray[i] == knownFolders[j])
          {
           var serverFolderIsPresent = 2
           var serverFolder = i; // keep track of where the match was found
           var serverFolder1 = serverFolder + 1; //add 1 because array.length is based on 1 not 0
          }
        }
      }
    }

    for (i=0; i < pathArray.length; i++) 
    {
       if(pathArray[i] == myDomainFolder) //try to find a match for "myDomainFolder"
       {
        var domainFolderIsPresent = 2
        var domainFolder = i; // keep track of where the match was found
        var domainFolder1 = domainFolder + 1; //add 1 because array.length is based on 1 not 0
       }
    }
  //--------------------------------------------------------------------------------------------------


  var newFirstFilePath = new Array(); //Array to form into string to redirect page
  newFirstFilePath[0] = serverTypeToUse[1];
  newFirstFilePath[1] = UrlRedirect;

  var newfilePath = new Array(); //Array to form into string to redirect page
  newfilePath[0] = serverTypeToUse[1];
  newfilePath[1] = UrlRedirect;

  var firstFilePath = new Array();
  var filePath = new Array();

  //--------------------------------------------------------------------------------------------------
  //THE FOLLOWING CODE BUILDS ARRAY FROM ELEMENTS FOUND AFTER "LocalServerFolder" MATCH IF A MATCH IS FOUND


    if(serverFolder > 0)  //if "LocalServerFolder" found must be testing from file folder
    {
      newFirstFilePath[2] = knownFolders[serverFolder];
      newFirstFilePath[3] = defaultPages[3]; //put frames page in array if testing on local server

      for (i=serverFolder1; i < pathArray.length; i++) 
      {
       firstFilePath[i-serverFolder-1] = pathArray[i];
      }
    }
    else if (pathArray[0].length > 3)
    {
      for (i=1; i < pathArray.length; i++)
      {
       firstFilePath[i-1] = pathArray[i];
      }
    }
  //END OF CODE TO BUILD NEW ARRAY FROM ELEMENTS AFTER "domainFolder"
  //--------------------------------------------------------------------------------------------------



  //--------------------------------------------------------------------------------------------------
  //THE FOLLOWING CODE BUILDS ARRAY FROM ELEMENTS FOUND AFTER "domainFolder" MATCH IF A MATCH IS FOUND


    if(domainFolder > 0)  //if "myDomainFolder" found must be testing from file folder
    {
      newfilePath[2] = myDomainFolder;
      newfilePath[3] = defaultPages[3]; //put frames page in array if testing on local server

      for (i=domainFolder1; i < pathArray.length; i++) 
      {
       filePath[i-domainFolder-1] = pathArray[i];
      }
    }
    else if (pathArray[0].length > 3)
    {
      for (i=1; i < pathArray.length; i++)
      {
       filePath[i-1] = pathArray[i];
      }
    }
  //END OF CODE TO BUILD NEW ARRAY FROM ELEMENTS AFTER "domainFolder"
  //--------------------------------------------------------------------------------------------------



  //--------------------------------------------------------------------------------------------------
  //THIS CODE BUILDS FROM ARRAY "FirstFilePath" A NEW PAGE STRING TO USE TO SET PAGE THAT WILL BE USED FOR PAGE REDIRECT
  var newFirstPageString ="" 
  newFirstPageString += "1stpage=";
  if (firstFilePath.length < 1)
  {
    newFirstPageString += defaultPages[0];
  }
  else
  {
    if (firstFilePath.length > 1)
    {
      newFirstPageString += firstFilePath[0] + "/";
      for (i=1; i < firstFilePath.length-1; i++)
      {
        newFirstPageString += firstFilePath[i] + "/";
      }
    }
    newFirstPageString += firstFilePath[firstFilePath.length-1];
  }
  //END OF CODE BUILDS FROM ARRAY "FirstFilePath" A NEW PAGE STRING TO USE TO SET PAGE THAT WILL BE USED FOR PAGE REDIRECT
  //--------------------------------------------------------------------------------------------------

  //--------------------------------------------------------------------------------------------------
  //THIS CODE BUILDS FROM ARRAY "filePath" A NEW PAGE STRING TO USE TO SET PAGE THAT WILL BE USED FOR PAGE REDIRECT
  var newPageString ="" 
  newPageString += "page=";
  if (filePath.length < 1)
  {
    newPageString += defaultPages[0];
  }
  else
  {
    if (filePath.length > 1)
    {
      newPageString += filePath[0] + "/";
      for (i=1; i < filePath.length-1; i++)
      {
        newPageString += filePath[i] + "/";
      }
    }
    newPageString += filePath[filePath.length-1];
  }
  //END OF CODE BUILDS FROM ARRAY "filePath" A NEW PAGE STRING TO USE TO SET PAGE THAT WILL BE USED FOR PAGE REDIRECT
  //--------------------------------------------------------------------------------------------------


  //--------------------------------------------------------------------------------------------------
  //THIS CODE SEARCHS ARRAY "filePath" FOR KEY FOLDERS TO USE TO SET MENU AND TITLE DURING PAGE REDIRECT
  //Note: When comparing variables you must always use two equals signs next to each other (==)!


  var newMenuString = "";

  if (filePath.length > 1)
  {
    var i=0;
    for (i=0;i<filePath.length;i++) //compare each filePath element to all foldersToFind1 elements
    {
      var j=0;
      for (j=0;j<foldersToFind1.length;j++) //compare filePath[0] to all foldersToFind1 elements 
      {
        if (foldersToFind1[j] == filePath[i])
        {
         var newMenuString = "";
         //newMenuString += "j = " + j + ", i = " + i + ", " + filePath[i] + " == " + foldersToFind1[j] + ",  ";
         newMenuString += "menu=" + menuToUse1[j];
        }
      }

      var j=0;
      for (j=0;j<foldersToFind2.length;j++)
      {
        if (foldersToFind2[j] == filePath[i])
        {
         var newMenuString = "";
         //newMenuString += "j = " + j + ", i = " + i + ", " + filePath[i] + " == " + foldersToFind2[j] + ",  ";
         newMenuString += "menu=" + menuToUse2[j];
        }
      }
    }
  }

  if (newMenuString < 2)
  {
   newMenuString += newMenuString + "menu=" + defaultPages[1];
  }


  //END OF CODE SEARCHS ARRAY "filePath" FOR KEY FOLDERS TO USE TO SET MENU AND TITLE DURING PAGE REDIRECT
  //--------------------------------------------------------------------------------------------------



  //--------------------------------------------------------------------------------------------------
    if(domainFolder > 0)  //if "myDomainFolder" found must be testing from file folder
    {
      if (pathArray[0].length < 3) //Url a drive letter or url? "myDomainFolder" will be present if run from local server
      {
        newfilePath.length = newfilePath.length-2; //overwrite "myDomainFolder" + "defaultPages[3]" if going out on real web
      }
    }
  //--------------------------------------------------------------------------------------------------


  //--------------------------------------------------------------------------------------------------
  //THIS CODE BUILDS FROM ARRAY "newfilePath" A NEW URL STRING THAT WILL BE USED FOR PAGE REDIRECT
  var newUrlOut ="" 
  newUrlOut += newfilePath[0] + "/";

  for (i=1; i < newfilePath.length-1; i++)
  {
    newUrlOut += newfilePath[i] + "/";
  }

  newUrlOut += newfilePath[newfilePath.length-1];

  //END OF CODE BUILDS FROM ARRAY "newfilePath" A NEW URL STRING THAT WILL BE USED FOR PAGE REDIRECT
  //--------------------------------------------------------------------------------------------------

  var newUrlOutPlusQuery = "";
  newUrlOutPlusQuery += newUrlOut

  if(domainFolderIsPresent < 2) //"myDomainFolder" will be present if run from local server 
  {
    if (pathArray[0].length > 3) //is a Url
    {
       newUrlOutPlusQuery += "/"; //add "/" array if going out on real web
    }
  }

  if(domainFolderIsPresent > 1) //"myDomainFolder" will be present if run from local server 
  {
    if (pathArray[0].length < 3) //is a file
    {
       newUrlOutPlusQuery += "/"; //add "/" array if going out on real web
    }
  }

  newUrlOutPlusQuery += "?" + newPageString + "&" + newMenuString + "&title=title.html";

  getDocReferrer();

  //--------------------------------------------------------------------------------------------------
  return newUrlOutPlusQuery;
  //--------------------------------------------------------------------------------------------------

}
  //--------------------------------------------------------------------------------------------------

function getDocReferrer()
{  
  var DRfrr = document.referrer;
  //alert("pageRedirectPath.js set DRfrr to document.referrer");
  if (DRfrr.length < 2)
  {
    //alert("pageRedirectPath.js DRfrr.length < 2");
    DRfrr = "U<2";
  }
  //alert("pageRedirectPath.js set DRfrr to " + DRfrr);
  if ( Get_Cookie( 'referring-url' ) )
  {
    var valueFromCookie2 = Get_Cookie( 'referring-url' );
    //alert("pageRedirectPath.js value from Cookie 'referring-url' = " + valueFromCookie2);

    if (valueFromCookie2.length < 4 || DRfrr != valueFromCookie2)
    {
      if (valueFromCookie2.length < 4 && DRfrr != valueFromCookie2)
      {
        //alert('valueFromCookie2.length < 4 && DRfrr != valueFromCookie2');
        //alert("pageRedirectPath.js setting Cookie 'referring-url' to DRfrr");
        Set_Cookie( 'referring-url', DRfrr, '365', '/', '', '' );
      }
      else if (valueFromCookie2 != "U<2" && DRfrr != valueFromCookie2)
      {
        //alert('valueFromCookie2 != U<2 && DRfrr != valueFromCookie2');
        //alert("pageRedirectPath.js setting Cookie 'referring-url' to DRfrr");
        Set_Cookie( 'referring-url', DRfrr, '365', '/', '', '' );
      }
      else
      {
        //alert('DRfrr == valueFromCookie2');
      }
      var valueFromCookie2 = Get_Cookie( 'referring-url' );
    }
  }
  else
  {
    //alert("pageRedirectPath.js didn't find Cookie 'referring-url' so cookie set to U<2");
    Set_Cookie( 'referring-url', DRfrr , '365', '/', '', '' );
    var valueFromCookie2 = Get_Cookie( 'referring-url' );
  }    
}

  //----------------------------------------------------------------------------------------------------

function CheckChangeStyle(switchBox) 
{
  body_title = document.title;
  //alert(body_title);
  top.document.title = body_title;

  var cookieRadioDotValue = -1;
  
  //alert('top_frame radio button checked and which = '+switchBoxValue); 
  var whichStyle = new Array();
  whichStyle[0] = 'default';
  whichStyle[1] = 'rh-nav';
  whichStyle[2] = 'plain-look';
  whichStyle[3] = 'sphere-look';
  var TableOut1 = ""
  var TableOut2 = ""


  var i, get_div, id_there;
  var specific_id = ""
  for(i=0; (get_div = document.getElementsByTagName('div')[i]); i++) 
  {                              
    if(get_div.getAttribute('id') != -1) 
    {
      id_there = get_div.getAttribute('id');
      if(id_there == 'main_content_w_w_w')
      {  
        specific_id = id_there    
        //alert('specific id = ' + specific_id);
      }
      else if(id_there == 'main_content_sphere')
      {  
        specific_id = id_there    
        //alert('specific id = ' + specific_id);
      }
    }
  }

   tr1td1str = "";
   tr2td1str = "";
   tr2td2str = "";
   tr3td1str = "";
   tr3td2str = "";
   tr4td1str = "";
   tr4td2str = "";

   //testurl = "http://groups.yahoo.com/group/coldwarcomms/message/19124";
   var testurl = Get_Cookie( 'referring-url' );
   matchCCC = testurl.search(/coldwarcomms/i);
   subTestURL = testurl.substr(matchCCC,12);
   var textToAlert = "parent.window.passedReferrer = " + parent.window.passedReferrer;
   textToAlert += "\nparent.window.buttonPosition = " + parent.window.buttonPosition + "\nparent.window.rhView = " + parent.window.rhView;
   //alert(textToAlert);

  if(specific_id == 'main_content_w_w_w')
  {  
   tr1td1str = "<h2><font color=red>WISDOM WINGS AND WAR HOME PAGE</font></h2>";
   tr2td1str = "<h3><a href='javascript:wisdom_technical()'>WISDOM TECHNICAL</a><br>(Useful Info?)";
   tr2td2str = "<h3><a href='javascript:aviation_related()'>AVIATION</a><br>(Flying stuff, etc)";
   tr3td1str = "<h3><a href='javascript:war_related()'>WAR RELATED PAGES</a></h3>";
   tr3td2str = "<h3><a href='search-table.html'>SEARCH TABLE PAGE</a><br>(Table of Look Up databases I find useful)</h3>";
   tr4td1str = "<h3><a href='location-js.html'>JAVASCRIPT LOCATION TEST PAGE</a><br>(domain location tests etc...)</h3>";
   tr4td2str = "<h3><a href='DIR83.html'>SITE INDEX</a> (list of all pages)</h3>";
  }
  else if (specific_id == 'main_content_sphere')
  {
   tr1td1str = "<h2><a href='emergency/emergency.html'><font color=red>EMERGENCY PROCEDURES</font></a></h2>";
   tr2td1str = "<h3><a href='procedures/basic_info.html'>NORMAL OPERATION<br>(Researcher Section)</a></h3>(A work in progress that should include step by step how to get your experiment running)";
   tr2td2str = "<h3><a href='detailed_info.html'>DETAILED INFORMATION<br>(Maintenance, Troubleshooting, Revisions)</a></h3>";
   tr3td1str = "<h3><a href='faq.html'>FAQ's</a></h3>";
   tr3td2str = "<h3><a href='dark_side/index.html'>DARK SIDE MAIN PAGE</a></h3>";
   tr4td1str = "<h3><a href='procedures/data-collection.html'>SPHERE DATA COLLECTION MAIN PAGE</a><br>(Current conditions updated every 15 minutes)</h3>";
   tr4td2str = "<h3><a href='index_of_pages.html'>SITE INDEX</a> (list of all pages)</h3>";
  }

  TableOut1 += "<table class='clear1' HEIGHT='20%' width='100%'><tr><td class='clear1' colspan='2'>" + tr1td1str + "<p>&nbsp;<p></td></tr>";
  TableOut1 += "<tr HEIGHT='20%'><td class='clear1' width='50%'>" + tr2td1str + "<p></td><td class='clear1' width='50%'>" + tr2td2str + "</td></tr>";
  TableOut1 += "<tr HEIGHT='20%'align='center'><td class='clear1'>" + tr3td1str + "</td><td class='clear1'>" + tr3td2str + "</td></tr>";
  TableOut1 += "<tr HEIGHT='20%' align='center'><td class='clear1'>" + tr4td1str + "</td><td class='clear1'>" + tr4td2str + "</td></tr></table>";

  TableOut2 += "<table width='680'><tr><td class='title'>Wisdom Wings and War Home Page";
  if (matchCCC > -1)
  {
    TableOut2 += "<br>Thanks for following the ColdWarComms link to this web site!";  
  }
  else if (testurl == "_hotmail_signature_link")
  {
    TableOut2 += "<br>Thanks for following my Hotmail Signature link to this web site!";  
  }
  else
  {
    TableOut2 += "";  
  }
  TableOut2 += "</td></tr>";
  TableOut2 += "<tr><td class='subtitle'><a href='css/wwii_tm1.ttf' title='Click to load WWII_TM1.ttf Font that this site was designed around.'>";
  TableOut2 += "<img src='images/wwii.gif' width='62' height='15'></a></td></tr>";
  TableOut2 += "<tr><td style='background-color:#BBBBBB;'><span style='color:#000000;font-size:12px;font-weight:bold;font-family:arial,sans-serif;'>Pages from this site loaded in the following 76 countries:<br></span>";
  TableOut2 += "<img src='images/thumbs/ae.png' alt='ae.png' title='United Arab Emirates' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/al.png' alt='al.png' title='Albania' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/an.png' alt='an.png' title='Netherlands Antilles' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ar.png' alt='ar.png' title='Argentina' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/at.png' alt='at.png' title='Austria' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/au.png' alt='au.png' title='Australia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/bg.png' alt='bg.png' title='Bulgaria' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/be.png' alt='be.png' title='Belgium' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/bn.png' alt='bn.png' title='Brunei Darussalam' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/br.png' alt='br.png' title='Brazil' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/by.png' alt='by.png' title='Belarus' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ca.png' alt='ca.png' title='Canada' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ch.png' alt='ch.png' title='Switzerland' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/cl.png' alt='cl.png' title='Chile' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/co.png' alt='co.png' title='Colombia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/cr.png' alt='cr.png' title='Costa Rica' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/cy.png' alt='cy.png' title='Cyprus' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/cz.png' alt='cz.png' title='Czech Republic' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/de.png' alt='de.png' title='Germany' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/dk.png' alt='dk.png' title='Denmark' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ee.png' alt='ee.png' title='Estonia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/eg.png' alt='eg.png' title='Egypt' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/es.png' alt='es.png' title='Spain' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/eu.png' alt='eu.png' title='European Union' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/fi.png' alt='fi.png' title='Finland' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/fr.png' alt='fr.png' title='France' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/gr.png' alt='gr.png' title='Greece' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/hn.png' alt='hn.png' title='Honduras' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/hr.png' alt='hr.png' title='Croatia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/hu.png' alt='hu.png' title='Hungary' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/id.png' alt='id.png' title='Indonesia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ie.png' alt='ie.png' title='Ireland' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/il.png' alt='il.png' title='Israel' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/in.png' alt='in.png' title='India' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/it.png' alt='it.png' title='Italy' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/jp.png' alt='jp.png' title='Japan' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/kr.png' alt='kr.png' title='South Korea' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/kz.png' alt='kz.png' title='Kazakhstan' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/lk.png' alt='lk.png' title='Sri Lanka' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/lb.png' alt='lb.png' title='Lebanon' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/lt.png' alt='lt.png' title='Lithuania' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/lv.png' alt='lv.png' title='Latvia' width='16' height='11'>";

  TableOut2 += "<br>";

  TableOut2 += "<img src='images/thumbs/ma.png' alt='ma.png' title='Morocco' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/mk.png' alt='mk.png' title='Macedonia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/mm.png' alt='mm.png' title='Myanmar' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/mt.png' alt='mt.png' title='Malta' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/mu.png' alt='mu.png' title='Mauritius' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/mx.png' alt='mx.png' title='Mexico' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/my.png' alt='my.png' title='Malaysia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/nl.png' alt='nl.png' title='Netherlands' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/no.png' alt='no.png' title='Norway' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/nz.png' alt='nz.png' title='New Zealand' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/om.png' alt='om.png' title='Oman' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/pa.png' alt='pa.png' title='Panama' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ph.png' alt='ph.png' title='Philippines' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/pl.png' alt='pl.png' title='Poland' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/pk.png' alt='pk.png' title='Pakistan' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/pt.png' alt='pt.png' title='Portugal' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/qa.png' alt='qa.png' title='Qatar' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ro.png' alt='ro.png' title='Romania' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/rs.png' alt='rs.png' title='Serbia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ru.png' alt='ru.png' title='Russia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/sa.png' alt='sa.png' title='Saudi Arabia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/se.png' alt='se.png' title='Sweden' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/si.png' alt='si.png' title='Slovenia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/sg.png' alt='sg.png' title='Singapore' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/sk.png' alt='sk.png' title='Slovakia' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/th.png' alt='th.png' title='Thailand' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/tr.png' alt='tr.png' title='Turkey' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/tw.png' alt='tw.png' title='Taiwan' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ua.png' alt='ua.png' title='Ukraine' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/uk.png' alt='uk.png' title='United Kingdom' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/us.png' alt='us.png' title='United States' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/uy.png' alt='uy.png' title='Uruguay' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/ve.png' alt='ve.png' title='Venezuela' width='16' height='11'>";
  TableOut2 += "<img src='images/thumbs/za.png' alt='za.png' title='South Africa' width='16' height='11'>";
  TableOut2 += "</td></tr>";

  arst = "<area shape='poly' coords='";
  omvs = "onmouseover=";
  omvt = " onmouseout='blankimg()'>";

  TableOut2 += "<tr><td style='background-image:url(images/main-logo-05.jpg)'>";
  TableOut2 += "<map name='welcome'>";

  TableOut2 += arst;
  TableOut2 += "139,0,492,0,382,52,323,83,316,110,312,138,318,157,356,162,460,157,546,158,634,156,680,150,";
  TableOut2 += "680,280,643,274,620,240,603,240,582,250,553,252,542,265,524,282,490,272,439,275,402,296,316,308,";
  TableOut2 += "292,317,284,332,284,369,272,394,269,394,269,287,209,258,166,263,152,271,152,291,177,307,177,313,";
  TableOut2 += "142,357,142,394,100,394,100,382,135,360,135,292,73,292,0,320,0,198,20,198,135,195,168,185,168,";
  TableOut2 += "150,153,121,104,125,74,148,32,118,0,140,0,80,49,93,124,96,142,80,149,60,139,0";
  TableOut2 += "href='javascript:AH64()' ";
  TableOut2 += "title='an AH-64 that had to make an emergency landing in western PA' ";
  TableOut2 += omvs + "'AH64img()'" + omvt + arst;
  TableOut2 += "0,0,139,0,149,60,142,80,124,96,49,93,0,80' ";
  TableOut2 += "href='javascript:C130()' ";
  TableOut2 += "title='C-130 flyover during the early 1980's' ";
  TableOut2 += omvs + "'C130img()'" + omvt + arst;
  TableOut2 += "0,140,32,118,74,148,104,125,153,121,168,150,168,185,135,195,20,198,0,198' ";
  TableOut2 += "href='javascript:PWR_plant()' ";
  TableOut2 += "title='power plant from 1927 Everyday Electricity page 95' ";
  TableOut2 += omvs + "'PWR_plantimg()'" + omvt + arst;
  TableOut2 += "492,0,382,52,323,83,316,110,312,138,318,157,356,162,460,157,546,158,634,156,680,150,680,0' ";
  TableOut2 += "href='javascript:sst1997()' ";
  TableOut2 += "title='local sunset 1997' ";
  TableOut2 += omvs + "'sst1997img()'" + omvt + arst;
  TableOut2 += "272,394,284,369,284,332,292,317,316,308,402,296,439,275,490,272,524,282,542,265,553,252,582,250,603,240,620,240,643,274,680,280,680,394' ";
  TableOut2 += "href='javascript:Nash_DC3()' ";
  TableOut2 += "title='Eastern Airlines DC-3 at Nashville Municiple Airport. (from Jim Harris collection)' ";
  TableOut2 += omvs + "'Nash_DC3img()'" + omvt + arst;
  TableOut2 += "0,320,73,292,135,292,135,360,100,382,100,394,0,394' ";
  TableOut2 += "href='javascript:GH()' ";
  TableOut2 += "title='GH' ";
  TableOut2 += omvs + "'GHimg()'" + omvt + arst;
  TableOut2 += "142,394,142,357,177,313,177,307,152,291,152,271,166,263,209,258,269,287,269,394' ";
  TableOut2 += "href='javascript:EE8()' ";
  TableOut2 += "title='EE-8-B WWII US Army field telephone' ";
  TableOut2 += omvs + "'EE8img()'" + omvt;
  TableOut2 += "</map>";

  TableOut2 += "<img src='images/bg_blank-01.gif' name='welcome_img' width='680' height='394' usemap='#welcome'style='opacity:0.4;filter:alpha(opacity=40)' border='0' />";
  TableOut2 += "</td></tr>";

  TableOut2 += "<tr><td style='background-color:#555599;'><span style='color:#FFFFFF;font-size:15px;font-weight:bold;font-family:arial,sans-serif;font-style:italic;'>While they're living it up on Wall Street in that New York City town<br>"; 
  TableOut2 += "Here in the real world they're shuttin' Detroit down</span> <span style='color:#FFFFFF;font-size:10px;font-weight:normal;font-family:arial,sans-serif;font-style:italic'>- John Anderson & John Rich</span></td></tr>";


  TableOut2 += "<tr><td class='titledetail1'>I'LL KEEP MY GUNS AND WHAT'S LEFT OF MY FREEDOM AND MONEY...</td></tr>";
  TableOut2 += "<tr><td style='background-color:#FFFF00;'><span style='color:#000000;font-size:15px;font-weight:bold;font-family:arial,sans-serif;'>YOU CAN KEEP THE CHANGE!</span></td></tr>";

  TableOut2 += "<tr><td style='background-color:#555599;'><span style='color:#FFFFFF;font-size:15px;font-weight:bold;font-family:arial,sans-serif;font-style:italic;'>America is at that awkward stage. It's too late to work within the system, <br>but too early to shoot the bastards."; 
  TableOut2 += "</span> <span style='color:#FFFFFF;font-size:10px;font-weight:normal;font-family:arial,sans-serif;font-style:italic'>- Fred Maslack</span></td></tr>";
  TableOut2 += "</table>";



  cookieRadioDotValue = Get_Cookie( 'button-position' );
  //alert('cookieRadioDotValue(button-position) in top_frame = '+cookieRadioDotValue+'\n switchBoxValue = 0'); 
  if(cookieRadioDotValue == 3) 
  {   
    if(specific_id == 'main_content_w_w_w')
    {
      document.getElementById("main_content_w_w_w").innerHTML = TableOut1;
    }
    else if(specific_id == 'main_content_sphere')
    {
      document.getElementById("main_content_sphere").innerHTML = TableOut1;
    }
  }
  else 
  {   
    if(specific_id == 'main_content_w_w_w')
    {
      document.getElementById("main_content_w_w_w").innerHTML = TableOut2;
    }
  }

  setActiveStyleSheet(whichStyle[cookieRadioDotValue]); 
  //getDocReferrer();
  AddToCreationID();
  AddCreationIDPW();
} 

function setActiveStyleSheet(title) 
{
  //alert('title='+title);
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) 
  {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) 
    {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

  //----------------------------------------------------------------------------------------------------

  function AddToCreationID()
  {
    var cookieDReferrerValue = Get_Cookie( 'referring-url' );
    var DReferrer = document.referrer;
    //alert("pageRedirectPath.js cookieDReferrerValue = " + cookieDReferrerValue + " - " + cookieDReferrerValue.length);
    //alert("pageRedirectPath.js DReferrer = " + DReferrer);
    var CreationIDtxt = document.getElementById('creation_date').innerHTML;
    //CreationIDtxt_temp = CreationIDtxt.split( '</H4>' );		
    //CreationIDtxt += CreationIDtxt_temp[0] + document.location.href + "</h4>";
    CreationIDtxt += "<span style='font-weight:bold;font-family:arial,sans-serif;font-size:10px;'>" + document.location.href + "<br>" + document.title  + "</span>";
    CreationIDtxt += "<a href='http://www.statcounter.com/project/standard/stats.php?project_id=1120104&amp;guest=1' target='_blank'>";
    CreationIDtxt += "<img src='http://c11.statcounter.com/counter.php?sc_project=1120104&amp;java=0&amp;security=ab38d5fe&amp;invisible=0' alt='View My Web Statistics' border='0'></a>";
    CreationIDtxt += "<br><span style='font-weight:bold;font-family:arial,sans-serif;font-size:10px;'>Referring URL";
    if (cookieDReferrerValue.length > 3 && cookieDReferrerValue != "undefined")
    {
      if (cookieDReferrerValue == "_hotmail_signature_link")
      {
        CreationIDtxt += " = " + cookieDReferrerValue;
      }
      else
      {
        CreationIDtxt += " = <a href='" + cookieDReferrerValue + "' target='_blank'>" + cookieDReferrerValue + "</a>";
      }
    }
    else if (cookieDReferrerValue == "undefined")
    {
      CreationIDtxt += " = Undefined Value";
    }
    else if (cookieDReferrerValue.length < 4)
    {
      CreationIDtxt += " Value Length is less than 4 and = " + cookieDReferrerValue;
    }
    else
    {
      //alert(CreationIDtxt);
      CreationIDtxt += " = Undefined Value";
    }
    CreationIDtxt += "</span>";
    CreationIDtxt += "<script type='text/javascript'> var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');";
    CreationIDtxt += "document.write(unescape('%3Cscript src='' + gaJsHost + 'google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E'));</script><script type='text/javascript'>";
    CreationIDtxt += "try {var pageTracker = _gat._getTracker('UA-10918427-1');pageTracker._trackPageview();} catch(err) {}</script>";


    //alert(CreationIDtxt);
    document.getElementById('creation_date').innerHTML = CreationIDtxt;
  }


  //----------------------------------------------------------------------------------------------------

  function AddCreationIDPW()
  {
    var pw_query = top.window.location.search.substring(1);
    //alert(pw_query.length);
    var passed_pw = 1;
    var i, get_form, name_there;
    var specific_form_name = ""

    if (pw_query.length > 0) //BEGIN IF PW_QUERY.LENGTH > 0
    {
      var pw_parms = pw_query.split("&");
      for (var i=0;i<pw_parms.length;i++) //BEGIN FOR I TO PW_PARMS].LENGTH 
      {
        var pw_pair = pw_parms[i].split("=");  
        if (pw_pair[0].length > 0) //BEGIN IF PW_PAIR[0].LENGTH > 0
        {
          var key = pw_pair[0];
          var val = pw_pair[1];
          if (key == "pwstr") //BEGIN IF KEY = PWSTR
          {
            passed_pw = val;
            //alert('query password = ' + passed_pw);
          } //END IF KEY = PWSTR
        } //END IF PW_PAIR[0].LENGTH > 0
      } //END FOR I TO PW_PARMS].LENGTH 
    } //END IF PW_QUERY.LENGTH > 0

    if (passed_pw.length > 1) //BEGIN IF PASSED_PW.LENGTH > 1
    {
            for(i=0; (get_form = document.getElementsByTagName('form')[i]); i++) 
            {                              
              if(get_form.getAttribute('name') != -1) 
              {
                name_there = get_form.getAttribute('name');
                if(name_there == 'form6')
                {  
                  specific_form_name = name_there    
                  //alert('specific form name = ' + specific_form_name);
                }
              }
            }

            if(specific_form_name == 'form6')
            {
              document.getElementById("table_link").value = passed_pw;
              //document.form6.cb1.checked = true;
            }
    } //END IF PASSED_PW.LENGTH > 1

  }

  //----------------------------------------------------------------------------------------------------
  function Get_Cookie( check_name ) {
    var a_all_cookies = document.cookie.split( ';' );
    var a_temp_cookie = '';
    var cookie_name = '';
    var cookie_value = '';
    var b_cookie_found = false; // set boolean t/f default f
	
    for ( i = 0; i < a_all_cookies.length; i++ )
    {
      // now we'll split apart each name=value pair
      a_temp_cookie = a_all_cookies[i].split( '=' );		
		
      // and trim left/right whitespace while we're at it
      cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
	
      // if the extracted name matches passed check_name
      if ( cookie_name == check_name )
      {
        b_cookie_found = true;
        // we need to handle case where cookie has no value but exists (no = sign, that is):
        if ( a_temp_cookie.length > 1 )
        {
          cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
        }
        // note that in cases where cookie is initialized but no value, null is returned
        //alert(cookie_value);
        return cookie_value;
        break;
      }
      a_temp_cookie = null;
      cookie_name = '';
    }
    if ( !b_cookie_found ) 
    {
      return null;
    }
  }

  //----------------------------------------------------------------------------------------------------
  function Set_Cookie( name, value, expires, path, domain, secure ) 
  {
    //alert('function Set_Cookie entered');
    // set time, it's in milliseconds
    var today = new Date();
    //alert(today);
    today.setTime( today.getTime() );

    // if the expires variable is set, make the correct expires time, the
    // current script below will set it for x number of days, to make it
    // for hours, delete * 24, for minutes, delete * 60 * 24

    if ( expires )
    {
      expires = expires * 1000 * 60 * 60 * 24;
    }

    //alert( 'today ' + today.toGMTString() );// this is for testing purpose only

    var expires_date = new Date( today.getTime() + (expires) );

    //alert('expires ' + expires_date.toGMTString());// this is for testing purposes only

    document.cookie = name + "=" + escape( value ) +
      ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString()
      ( ( path ) ? ";path=" + path : "" ) + 
      ( ( domain ) ? ";domain=" + domain : "" ) +
      ( ( secure ) ? ";secure" : "" );
    //alert('function Set_Cookie finished');
  }
  //----------------------------------------------------------------------------------------------------

  function AH64() 
  {
    alert('AH64');// this is for testing purpose only 
    //parent.right_frame.location= "aviation_related/index.html";
    //parent.left_frame.location= "aviation.html";
    //parent.top_frame.location= "title.html";
  }

  function C130() 
  {
    //alert('C130');// this is for testing purpose only 
    parent.right_frame.location= "aviation_related/index.html";
    parent.left_frame.location= "aviation.html";
    parent.top_frame.location= "title.html";
  }

  function PWR_plant() 
  {
    //alert('PWR_plant');// this is for testing purpose only
    parent.right_frame.location= "wisdom-technical/everyday_electricity/index.html";
    parent.left_frame.location= "wisdom-technical.html";
    parent.top_frame.location= "title.html";
  }

  function sst1997() 
  {
    //alert('local sunset 1997');// this is for testing purpose only
    parent.right_frame.location= "sunsets.html";
    parent.left_frame.location= "travels.html";
    parent.top_frame.location= "title.html";
  }

  function Nash_DC3() 
  {
    //alert('Nash_DC3');// this is for testing purpose only
    parent.right_frame.location= "war_related/wwii/jims_page/jims_collection/Primary-School.html";
    parent.left_frame.location= "navigate-jim-harris1.html";
    parent.top_frame.location= "title.html";
  }

  function GH() 
  {
    alert('GH');// this is for testing purpose only
  }

  function EE8() 
  {
    //alert("EE-8 Field Phone");
    parent.right_frame.location= "wisdom-technical/telephone_stuff/ee8/EE8_page.html";
    parent.left_frame.location= "telephone-stuff.html";
    parent.top_frame.location= "title.html";
  }

  function blankimg() {document.welcome_img.src = 'images/bg_blank-01.gif';}

  function AH64img() {document.welcome_img.src = 'images/bg_AH-64-01.gif';}

  function C130img() {document.welcome_img.src = 'images/bg_C-130-01.gif';}

  function PWR_plantimg() {document.welcome_img.src = 'images/bg_PWR-plant-01.gif';}

  function sst1997img() {document.welcome_img.src = 'images/bg_sst1997-01.gif';}

  function Nash_DC3img() {document.welcome_img.src = 'images/bg_Nash-DC-3-01.gif';}

  function GHimg() {document.welcome_img.src = 'images/bg_GH-01.gif';}

  function EE8img() {document.welcome_img.src = 'images/bg_EE8-01.gif';}
