var over2='';

if(typeof document.compatMode!='undefined' && document.compatMode!='BackCompat')
{
   layer_one="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
}
else
{
   layer_one="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
}

if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
{
   layer_two="_top:expression(document.documentElement.scrollTop-20+document.documentElement.clientHeight-this.clientHeight);}";
}
else
{
   layer_two="_top:expression(document.body.scrollTop-20+document.body.clientHeight-this.clientHeight);}";
}

var fixedCSS='#fixed{position:fixed;';
fixedCSS=fixedCSS+'_position:absolute;';
fixedCSS=fixedCSS+'bottom:0px;';
fixedCSS=fixedCSS+'left:0px;';
fixedCSS=fixedCSS+'clip:inherit;';
fixedCSS=fixedCSS+layer_one;

var popCSS='#pop {background-color:transparent;';
popCSS=popCSS+'position:fixed;';
popCSS=popCSS+'_position:absolute;';
popCSS=popCSS+'height:170px;';
popCSS=popCSS+'width:244px;';
popCSS=popCSS+'border:thin solid #000000;';
popCSS=popCSS+'left:50px;';
popCSS=popCSS+'bottom:30px;';
popCSS=popCSS+'overflow:hidden;';
popCSS=popCSS+'visibility:hidden;';
popCSS=popCSS+'z-index:100;';
popCSS=popCSS+layer_two;

document.write('<style type="text/css">'+fixedCSS+popCSS+'</style>');

function bigPopup(url)
{
   newwindow=window.open(url,'name');

   if(window.focus)
   {
      newwindow.focus()
   }
   return false;
}

function toggleMiniPOPUP_hide()
{
   var mom_id='pop';
   var NNtype='hidden';
   var IEtype='hidden';
   var WC3type='hidden';

   if(document.getElementById)
   {
      eval("document.getElementById(mom_id).style.visibility=\""+WC3type+"\""); 
   }
   else
   {
      if(document.layers)
      {
         document.layers[mom_id].visibility=NNtype;
      }
      else
      {
         if(document.all)
         {
            eval("document.all."+mom_id+".style.visibility=\""+IEtype+"\"");
         }
      }
   }
}

function toggleMiniPOPUP_show()
{
   mom_id='pop';
   var NNtype='show';
   var IEtype='visible';
   var WC3type='visible';

   if(document.getElementById)
   {
      eval("document.getElementById(mom_id).style.visibility=\""+WC3type+"\""); 
   }
   else
   {
      if(document.layers)
      {
         document.layers[mom_id].visibility=NNtype;
      }
      else
      {
         if(document.all)
         {
            eval("document.all."+mom_id+".style.visibility=\""+IEtype+"\"");
         }
      }
   }
}


function sleeplogo(ourLogo,ourAff)
{

   var bigBaseURL= "sleepstore.php"

   document.write('<div id="fixed">');
   document.write('<a href='+bigBaseURL+'><img src='+ourLogo+' alt="SMINE Resources" border="0" onMouseOver="Over=setTimeout(\'toggleMiniPOPUP_show()\',1000);clearTimeout(over2)" onMouseOut="over2=setTimeout(\'toggleMiniPOPUP_hide()\',3000);clearTimeout(Over)"></a>');document.write('</div>');
}