YOffset         = 20; 
staticYOffset   = 20;
slideSpeed      = 0;
waitTime        = 300; 
menuWidth       = 270; // multiple of 10!
menuBGColor     = "#555555";
menuIsStatic    = "yes";
hdrFontFamily   = "verdana";
hdrFontsize     = "2";
hdrFontColor    = "yellow";
hdrBGColor      = "black";
hdrAlign        = "left";
hdrVAlign       = "center";
hdrHeight       = "10";
linkFontFamily  = "Verdana";
linkFontsize    = "2";
linkBGColor     = "black";
linkOverBGColor = "green";
linkTarget      = "_top";
linkAlign       = "left";
barWidth        = 30; 
barBGColor      = "black"; 
barFontFamily   = "Verdana";
barFontsize     = "2";
barFontColor    = "red";
barVAlign       = "center";

///// BROWSER DETECTION /////
NS6 = (document.getElementById&&!document.all)
IE  = (document.all)
NS  = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

///// SLIDE FUNCTION //////
moving=setTimeout('null', 1)
function moveOut() 
{
  if ((NS6 && parseInt(ssm.left)<0)||(IE && ssm.pixelLeft<0)||(NS && ssm.left<0)) 
    {
    clearTimeout(moving);
    moving = setTimeout('moveOut()', slideSpeed)
    if (NS6) {theleft+=10;ssm.left = theleft;}
    if (IE) {ssm.pixelLeft += 10;}
    if (NS) {ssm.left += 10;ssm.clip.left-=10}
    }
  else 
    {
    clearTimeout(moving);
    moving=setTimeout('null',1)
    }
};

function moveBack() 
{
  clearTimeout(moving);
  moving = setTimeout('moveBack1()', waitTime)
}

function moveBack1() 
{
  if ((NS6 && parseInt(ssm.left)>(-menuWidth))||(IE && ssm.pixelLeft>(-menuWidth))||(NS && ssm.left>(-menuWidth))) 
    {
    clearTimeout(moving);
    moving = setTimeout('moveBack1()', slideSpeed);
    if (NS6) 
      {
      theleft-=10;
      ssm.left = theleft;
      }
    if (IE) {ssm.pixelLeft -= 10;}
    if (NS) {ssm.left -= 10;ssm.clip.left+=10}
    }
  else  
    {
    clearTimeout(moving);moving=setTimeout('null',1)
    }
};

///// STATIC FUNCTION /////
lastY = 0;
function makeStatic() 
{
  if (IE) {winY = document.body.scrollTop;}
  if (NS||NS6) {winY = window.pageYOffset;}
  if (NS6||IE||NS) 
    {
    if (winY!=lastY&&winY>YOffset-staticYOffset) 
      {
      smooth = .3 * (winY - lastY - YOffset + staticYOffset);
      }
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) 
      {
      smooth = .3 * (winY - lastY);
      }
      else 
      {
      smooth=0
      }
      if(smooth > 0) smooth = Math.ceil(smooth);
    else smooth = Math.floor(smooth);
  if (NS6) ssm.top=parseInt(ssm.top)+smooth;
  if (IE) ssm.pixelTop+=smooth;
  if (NS) bssm.top+=smooth;
  lastY = lastY+smooth;
  setTimeout('makeStatic()', 1)
  }
}

///// SETS OBJECT NAMES AND LOADS MENU /////
function initSlide() 
{
  if (NS6)
    {
    ssm=document.getElementById("thessm").style;
    ssm.visibility="visible";
    ssm.left = -menuWidth;
    }
  else if (IE) 
    {
    ssm=document.all("thessm").style;
    ssm.visibility = "visible";
    ssm.pixelLeft = -menuWidth;
    }
  else if (NS) 
    {
    bssm=document.layers["basessm1"];
    ssm=bssm.document.layers["basessm2"].document.layers["thessm"];
    ssm.clip.left = menuWidth;
    ssm.left = -menuWidth;
    ssm.visibility = "show";
    }
  if (menuIsStatic=="yes") makeStatic();
}

///// MENU BUILDER FUNCTIONS /////
function startMenu(menuHeader, barText) 
{
  if (IE||NS6) 
    {
    document.write('<div ID="thessm" style="visibility:hidden;Position : Absolute ;Left : 0 ;Top : '+YOffset+' ;Z-Index : 20;width:1px;clip:" onmouseover="moveOut()" onmouseout="moveBack()">')
    }
  if (NS) 
    {
    document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT=0 visibility="show" width="'+(menuWidth+barWidth+10)+'"><ILAYER name="basessm2" width="'+(menuWidth+barWidth+20)+'"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')
    }
  if (NS6)
    {
    document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><tr><td>')
    }
  document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'">');
  tempBar='';
  addHdr(menuHeader);

  if(barText.indexOf('<IMG')>-1)  
    {
    tempBar=barText
    }
  else 
    {
    for (i=0;i<barText.length;i++) 
      {
      tempBar+=barText.substring(i, i+1)+"<br/>"
      }
    }
  document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><font face="'+barFontFamily+'" size="'+barFontsize+'" COLOR="'+barFontColor+'"><b>'+tempBar+'</b></font></td></tr>')
  theleft=-menuWidth
}

function endMenu() 
{
  addHdr('&nbsp;');
  document.write('</table>')
  if (NS6){document.write('</td></tr></table>')}
  if (IE||NS6) {document.write('</div>')}
  if (NS) {document.write('</LAYER></ILAYER></LAYER>')}
  if (NS6||IE||NS) setTimeout('initSlide();', 1)
}

function addHdr(text) 
{
  document.write('<tr><td bgcolor="'+hdrBGColor+'" height="'+hdrHeight+'" align="'+hdrAlign+'" valign="'+hdrVAlign+'" width="'+(menuWidth-1)+'">&nbsp;<font face="'+hdrFontFamily+'" size="'+hdrFontsize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td>'+((!tempBar)?"":"</tr>"))
}

function addItem(text, link, target) 
{
  if (!target) {target=linkTarget}
  document.write('<tr><td bgColor="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" width="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgcolor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" width="100%" align="'+linkAlign+'"><div  align="'+linkAlign+'"><font face="'+linkFontFamily+'" size="'+linkFontsize+'">&nbsp;<a href="'+link+'" target="'+target+'" class="ssmItems">'+text+'</a></div></LAYER></ILAYER></td></tr>')
}

startMenu("Main Menu",                 "  Navigation  ")
addItem("   TheScarms Home Page",      "../default.htm", "");
addItem("   TheScarms .NET Home Page", "../dotnet/default.aspx", "");
addItem("   Classic VB6 Home Page",    "../vbasic/default.aspx", "");
addHdr("Habanero Hot Sauce Pages");
addItem("   Pure Habanero Extracts",   "extracts.htm", "");
addItem("   Extremely Hot Sauces",     "HotSauces.htm", "");
addItem("   Moderate Hot Sauces",      "ModerateSauces.htm", "");
addItem("   Mild Pepper Sauces",       "OtherSauces.htm", "");
addItem("   Chili Pepper Facts",       "pepperfacts.htm", "");
addItem("   Hot Sauce Collection",     "HotSaucesAtWork.htm", "");
addItem("   Ghost Wing Challenge",     "WingChallenge.htm", "");
addHdr("Miscellaneous");
addItem("   Contact TheScarms",        "../common/contact.aspx?1=2", "");
addItem("   Bookmark TheScarms",       "javascript:window.external.AddFavorite('http://www.TheScarms.com/thegang', 'The Hallock Street Gang')", "");
endMenu()

function WriteGoogleBottomAd() 
{
  var sLine = '';
  sLine  = '<script type="text/javascript">';
  sLine += '/* Hot Stuff Wide - 728x90 */';
  sLine += 'google_ad_client = "pub-7550912394621664";';
  sLine += 'google_ad_slot = "8924235244";';
  sLine += 'google_ad_height = "90";';
  sLine += 'google_ad_width = "728";';
  sLine += '</script>';
  sLine += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';

  document.write(sLine);
}//-->

function WriteGoogleSideAd() 
{
  var sLine = '';
  sLine  = '<script type="text/javascript">';
  sLine += '/*  Hot Stuff Tall - 120x600  */';
  sLine += 'google_ad_client = "pub-7550912394621664";';
  sLine += 'google_ad_slot = "9003031452";';
  sLine += 'google_ad_height = "600";';
  sLine += 'google_ad_width = "120";';
  sLine += '</script>';
  sLine += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';

  document.write(sLine);
}//-->
function WriteGoogleSideAd1() 
{
  var sLine = '';
  sLine  = '<script type="text/javascript">';
  sLine += '/* Hot Stuff Tall 2 - 120x600 */';
  sLine += 'google_ad_client = "pub-7550912394621664";';
  sLine += 'google_ad_slot = "0604900248";';
  sLine += 'google_ad_height = "600";';
  sLine += 'google_ad_width = "120";';
  sLine += '</script>';
  sLine += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';

  document.write(sLine);
}//-->
function WriteGoogleSideAd2() 
{
  var sLine = '';
  sLine  = '<script type="text/javascript">';
  sLine += '/*  Hot Stuff Tall 3 - 120x600  */';
  sLine += 'google_ad_client = "pub-7550912394621664";';
  sLine += 'google_ad_slot = "7971408618";';
  sLine += 'google_ad_height = "600";';
  sLine += 'google_ad_width = "120";';
  sLine += '</script>';
  sLine += '<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';

  document.write(sLine);
}//-->

