// A4 © 2005
// it's recommended to compress this file before upload to site for descreasing download time: delete all double spaces, returns, comments.

//CONFIG
var logoEnabled  = true;       //Is logo enabled. You can put "!true" instead of "false".
var logoPath     = '../images/logo.gif'; //the path to floating logo file
var logoGotoURL  = '#/';  //URL where to go if user clicked the logo

//FUNCTIONS
function getRightSize()
{
  return (document.body.parentNode.clientWidth||window.innerWidth);
}

function getBottomSize()
{
  return (document.body.parentNode.clientHeight||window.innerHeight);
}

function getYScrollSize()
{
  return (navigator.appName.indexOf("Netscape") != -1? window.pageYOffset:document.body.parentNode.scrollTop);
}

function locateDiv()
{
  with (document.getElementById('logo').style) //locate the logo
  {
position="absolute";
top  = (getBottomSize()+getYScrollSize()-img.height) +'px';
left = (getRightSize()-img.width) +'px';
  }
  setTimeout("locateDiv()", 20);
}

function showLogo()
{
  if (img.complete && img.width>0)
  {
    locateDiv();
    document.getElementById('logo').innerHTML='<a href="javascript:void()" onclick="Bookmark(\'Tous A Poil\',\'http://www.sexe-gay.com\'); return false;"><img src="'+logoPath+'" style="border: none;" border="0"></a>';
    if (Int!=0)
      clearInterval(Int);
  }
}

//THE CODE
var Int=0;
var CanSee=GetCookie('CanSeeThePage');

//hide disclamer
if (CanSee!=null && CanSee=='yes' && document.getElementById('disclamer')!=null)
  document.getElementById('disclamer').style.display="none";

//show logo
if (document.getElementById('logo')!=null)
  with (document.getElementById('logo'))
  {
    if (logoEnabled)
    { 
      var img = new Image();
      img.src = logoPath;
      if (Int==0)
        Int = setInterval("showLogo(document.getElementById('logo'), img)", 200); //logo can be unavailable right now, that's why we should check it several times in second :[
    }
  }

