// CSS Menu embedding system - © 2009 TMP - Designed specifically for EdnaBayAlaska.net

// This JavaScript embeds the CSS menu into the XHTML source document.

var spcsty='position: absolute; left:  0px; top: 0px; width: 100%; height: 30px; border: none; z-index: 2;';
var midsty='position: absolute; left: -1px; top: 0px; border: none; float: left; z-index: 3;';
var bstyex='border:0;width:88px;height:31px;float:left';
var topsty='position: absolute; white-space: nowrap;';
var tstyex=' font-family: Arial; font-size: 40px; font-weight: normal; ';
var btmsty='position: absolute; border: none;';
var inssty='margin: -9px 0px 0px -50%;';

var baseaddr='ednabayalaska.net';
var server  ='http://'+baseaddr+'\/';

var XMLFeed ='oedbws_feed.xml';

var iew=(navigator.appName == "Microsoft Internet Explorer")?0:1; // Scan for Internet Explorer (Windows)
var ie7=(iew && navigator.appVersion >= "7.0")?0:1;               // Make sure it's version 7

function includeJS(jsFile)
{
  document.write('<script type="text\/javascript" src="'+server+jsFile+'"><\/script>');
} includeJS('MenuButton_CSS.js');

function embedCSS()
{
  if (!ie7)
  { document.write('<link href="'+server+'oedbws_css.css"     type="text\/css" rel="stylesheet"\/>'); }
  if ( ie7) 
  { document.write('<link href="'+server+'oedbws_css_ie7.css" type="text\/css" rel="stylesheet"\/>'); }
} embedCSS();

function divSet(idv)
{ val=' id="button'+idv+'" onmouseover="mOver('+idv+')" onmouseout="mOut('+idv+')" onmousedown="mDown('+idv+')" onmouseup="mUp('+idv+')">'; return val; }

function embedTop(s1,i1,s2)
{
  if(s1==0) s1="Edna Bay Alaska";
  if(i1==0) i1="336";
  if(s2==0) s2="The Official Home Page";
  if(top.location==self.location)
  {
    if(document.images)
    {
      var bannli=new Image(1024,2); bannli.src=server+'banner_light.png';
      var spacer=new Image(1,1);    spacer.src=server+'spacer.gif';
      var bttni0=new Image(1,30);   bttni0.src=server+'control.png';
      var bttni1=new Image(32,30);  bttni1.src=server+'control_l.png';
      var bttni2=new Image(32,30);  bttni2.src=server+'control_r.png';
      var bttni3=new Image(1,30);   bttni3.src=server+'control_m.png';
      var rssbar=new Image(1,13);   rssbar.src=server+'top.png';
      var rssbox=new Image(31,24);  rssbox.src=server+'cssb.png';
      var rssimg=new Image(16,16);  rssimg.src=server+'rss_css.png';
      var bodybg=new Image(6,6);    bodybg.src=server+'bodybg.png';
      var mainbk=new Image(1,2);    mainbk.src=server+'content_bk.png';
      var mainsh=new Image(1,10);   mainsh.src=server+'content_bks.png';
      var bodysh=new Image(1,6);    bodysh.src=server+'body_bks.png';
    }
    var altstr=new Array("The home page","Images from around the area","The location of Edna Bay","The history of Edna Bay","Places, people and events from around the community","Live Edna Bay webcam","About this website","Links to other related pages and information","See other guests comments and sign the guest book","About the RSS feed");
    var webstr=new Array("index.shtml","images.html","location.html","history.html","places.html","webcam.html","about.html","links.html","guestbook.html","realty.html");
    var insstr=new Array("Home","Images","Location","History","Places","Webcam","About","Links","Guests","Realty");
    var st='';
    st+='<div id="banner">';
    st+='  <div style="'+topsty+'left: 20px; top: 27px;'+tstyex+'color: #bfbfbf; background: none;">'+s1+'<\/div>';
    st+='  <div style="'+topsty+'left: 19px; top: 26px;'+tstyex+'color: #a9a9a9; background: none;">'+s1+'<\/div>';
    st+='  <div style="'+topsty+'left: 18px; top: 25px;'+tstyex+'color: #909090; background: none;">'+s1+'<\/div>';
    st+='  <div style="'+topsty+'left: 17px; top: 24px;'+tstyex+'color: #3e7fd4; background: none;">'+s1+'<\/div>';
    st+='  <div style="'+topsty+'left: ' + i1 + 'px; top: 41px; font-family: Arial; font-size: 16px; color: #3a7bd0; background: none;"><b>'+s2+'<\/b><\/div>';
    st+='  <div id="overlay1"><\/div>';
    st+='  <div id="overlay2">';
    st+='    <a href="'+server+XMLFeed+'" title="[XML] RSS Feed">';
    st+='      <img src="'+rssimg.src+'" style="position: absolute; left: 10px; top: 4px; border: none;" alt="[XML] RSS Feed"\/>';
    st+='    <\/a>';
    st+='  <\/div>';
    st+='  <div id="overlay3">';
    st+='    <div id="control">';
    st+='      <img src="'+bttni1.src+'" style="position: absolute; left : -32px; top: 0px; border: none; z-index: 3;" alt=""\/>';
    st+='      <img src="'+bttni2.src+'" style="position: absolute; right: -32px; top: 0px; border: none; z-index: 3;" alt=""\/>';
    var set=0; for(set=0;set<10;set++)
    {
      st+='      <div'+divSet(set+1);
      if(set>0) { st+='        <img src="'+bttni3.src+'" style="'+midsty+'" alt=""\/>'; }
      st+='        <center>';
      st+='          <a href="'+server+webstr[set]+'" title="'+altstr[set]+'">';
      st+='          <img style="'+spcsty+'" src="'+spacer.src+'" alt="'+altstr[set]+'"\/>';
      st+='          <ins style="'+inssty+'">'+insstr[set]+'<\/ins><\/a>';
      st+='        <\/center>';
      st+='      <\/div>';
    }
    st+='    <\/div>';
    st+='  <\/div>';
    st+='<\/div>';
    st+='<div id="bodyshade"><\/div>';
    if (!ie7)
    {
      st+='<div id="bodycontent">';
      st+='  <div id="shade"><\/div>';
    }
    else if (ie7)
    {
      st+='  <div id="bodyimg">';
      st+='  <div id="bodyright"><\/div>';
      st+='  <div id="bodyleft"><\/div>';
      st+='  <div id="bodyshaderight"><\/div>';
      st+='  <div id="bodyshadeleft"><\/div>';
    }

    document.write(st);
  }
  else if(top.location!=self.location)
  { document.write('<br/><p>This page is being viewed in a frame. Click <a target="_window" href="'+document.URL+'">here<\/a> to load the page normally.<\/p>'); }
}

function embedBottom(s4)
{
  if(top.location==self.location)
  {
    if(document.images)
    {
      var bcrnrl=new Image(9,9);   bcrnrl.src=server+'cl.png';
      var bcrnrr=new Image(9,9);   bcrnrr.src=server+'cr.png';
      var hidecr=new Image(1,1);   hidecr.src=server+'hide.png';
      var spacer=new Image(1,1);   spacer.src=server+'spacer.gif';
      var wsbtn0=new Image(88,31); wsbtn0.src=server+'neutral.png';
      var wsbtn1=new Image(88,31); wsbtn1.src=server+'valid-xhtml10.png';
      var wsbtn2=new Image(88,31); wsbtn2.src=server+'valid-css.png';
      var wsbtn3=new Image(88,31); wsbtn3.src=server+'valid-rss2.png';
      var wsbtn4=new Image(88,31); wsbtn4.src=server+'xml_rss2.png';
    }
    var sb='';
    if (!ie7)
    {
      sb+='  <img src="'+spacer.src+'" style="border:0;width:20px;height:1px;float:left" alt=""\/>';
    }
    else if (ie7)
    {
      sb+='  <\/div>';
      sb+='  <img src="'+spacer.src+'" style="margin-left:8%;border:0;width:20px;height:1px;float:left" alt=""\/>';
    }
    sb+='  <a    href="http:\/\/www.anybrowser.org\/campaign" onmouseover="window.status=\'This website is fully compatible with all major browser platforms.\'; return true;" title="This website is viewable with any browser.  This website supports the browser neutral design campaign.">';
    sb+='  <img style="padding-right:20px; '+bstyex+'"';
    sb+='         src="'+wsbtn0.src+'"';
    sb+='         alt="This website is viewable with any browser.  This website supports the browser neutral design campaign."\/><\/a>';
    sb+='  <a    href="http:\/\/validator.w3.org\/check?uri=http%3A%2F%2F'+baseaddr+'%2F' + s4 + '" onmouseover="window.status=\'Validate the XHTML source file of this page.\'; return true;" title="Valid XHTML 1.0 Transitional!">';
    sb+='  <img style="'+bstyex+'"';
    sb+='         src="'+wsbtn1.src+'"';
    sb+='         alt="Valid XHTML 1.0 Transitional!" align="left" vspace="-10"\/><\/a>';
    sb+='  <a    href="http:\/\/jigsaw.w3.org\/css-validator\/validator?uri=http:\/\/'+baseaddr+'\/oedbws_css.css" onmouseover="window.status=\'Validate the global CSS source file.\'; return true;" title="Valid CSS!">';
    sb+='  <img style="'+bstyex+'"';
    sb+='         src="'+wsbtn2.src+'"';
    sb+='         alt="Valid CSS!" align="left" vspace="-10" hspace="15"\/><\/a>';
    sb+='  <a    href="http:\/\/feedvalidator.org\/check.cgi?url=http%3A\/\/'+baseaddr+'\/oedbws_feed.xml" onmouseover="window.status=\'Validate the global RSS feed.\'; return true;" title="Valid RSS!">';
    sb+='  <img style="'+bstyex+'"';
    sb+='         src="'+wsbtn3.src+'"';
    sb+='         alt="Valid RSS!" align="left" vspace="-10"\/><\/a>';
    sb+='  <a    href="http:\/\/'+baseaddr+'\/rss.html'+'" onmouseover="window.status=\'About the Edna Bay XML RSS feed.\'; return true;" title="Subscribe to the Edna Bay XML RSS feed for instant notification of site updates.">';
    sb+='  <img style="'+bstyex+'"';
    sb+='         src="'+wsbtn4.src+'"';
    sb+='         alt="Subscribe to the Edna Bay XML RSS feed for instant notification of site updates." align="left" vspace="-10" hspace="20"\/><\/a>';
    sb+='  <p align="right">';
    sb+='    <font face="Arial, Courier" size="1" color="#f8f8f8">Modified: ' + document.lastModified + ' <\/font><br\/>';
    sb+='    <font size="1" color="#bababa" face="Arial, Courier"><b>';
    sb+='      &copy; 2009 TMP';
    sb+='    <\/b><\/font>';
    sb+='  <\/p>';
    if (!ie7)
    {
      sb+='  <img src="'+bcrnrl.src+'" style="'+btmsty+'left : -2px; bottom: -1px; width: 8px; height: 8px; z-index: 1;" alt=""\/>';
      sb+='  <img src="'+bcrnrr.src+'" style="'+btmsty+'right: -1px; bottom: -1px; width: 8px; height: 8px; z-index: 1;" alt=""\/>';
      sb+='  <img src="'+hidecr.src+'" style="'+btmsty+'left : -2px; bottom: -2px; width: 8px; height: 1px; z-index: 2;" alt=""\/>';
      sb+='  <img src="'+hidecr.src+'" style="'+btmsty+'right: -1px; bottom: -2px; width: 8px; height: 1px; z-index: 2;" alt=""\/>';
      sb+='  <img src="'+hidecr.src+'" style="'+btmsty+'right: -2px; bottom: -2px; width: 1px; height: 8px; z-index: 2;" alt=""\/>';
      sb+='  <div id="spacer"><\/div>';
      sb+='  <div id="spacertwo"><\/div>';
    }
    else if (ie7)
    {
      sb+='  <div id="bodybottom"><\/div>';
      sb+='  <img src="'+bcrnrl.src+'" style="'+btmsty+'margin-right: 92%; right: -7px; bottom: 13px; width: 8px; height: 8px; z-index: 1;  border-left: 3px solid #ebebeb;" alt=""\/>';
      sb+='  <img src="'+bcrnrr.src+'" style="'+btmsty+'margin-left: 92%; left: -7px; bottom: 13px; width: 8px; height: 8px; z-index: 1; border-right: 3px solid #ebebeb;" alt=""\/>';
    }
    sb+='<\/div>';
    document.write(sb);
  }
}

// END OF FILE
  
