
function Add_A_Favorite()
{
if (window.external)
// if the browser is IE open the add favorite window
{
external.AddFavorite(location.href, document.title)
// Add the document location and title to the AddFavorite window
}
else
// Display and alert box for any other browser.
{
alert("Sorry, your browser doesn't support this feature." +
"\nPlease use the bookmark feature of your browser to save the location of this page.");
}

}



function popup(url, name, width, height, text)
{
  NewWindow = window.open(url, name, "width=" + width + ",height=" + height + ",resizable=yes,scrollbars=yes,left=30,top=0");

  if(text)
  {
    NewWindow.document.write (text);
    NewWindow.document.close();
  }

  NewWindow.focus();
}


var MicrosoftModel=0;
var xplus=10,yplus=10;
var runnerobject;

                          /* div-Sektion "runner" bewegen: */
function MouseAction(mausx,mausy)
{
  if(runnerobject)
  {
    runnerobject.left=mausx+xplus+"px";
    runnerobject.top=mausy+yplus+"px";
  }
}

                       /* das onMouseMove-event auswerten: */
function MouseMove(event)
{
  var mausx,mausy;
  if (typeof(event)!="object")              /* kein event? */
    return;
  if (MicrosoftModel)                     /* MSIE: ------- */
  {
    mausx=event.clientX;
    mausy=event.clientY;
    if (document.body.scrollLeft)
      mausx+=document.body.scrollLeft;
    if (document.body.scrollTop)
      mausy+=document.body.scrollTop;
  }
  else                                    /* Netscape: --- */
  {
    mausx=event.pageX;
    mausy=event.pageY;
  }
  MouseAction(mausx,mausy);
}

          /* Behandlung des Ereignisses und Objekt setzen: */
function MouseInit()
{
  if (document.all)         /* MSIE, Konqueror, Opera: --- */
  {
    MicrosoftModel=1;
    window.onmousemove=MouseMove;
    runnerobject=document.all.runner.style;
  }
  if (!(MicrosoftModel))                  /* Netscape: --- */
  {
    if (typeof(document.addEventListener)=="function")
                                         /* Netscape6: --- */
    {
      document.addEventListener("mousemove",MouseMove,true);
      runnerobject=document.getElementById("runner").style;
    }
    else
    if (document.runner)                 /* Netscape4: --- */
    {
      window.captureEvents(Event.MOUSEMOVE);
      window.onmousemove=MouseMove;
      runnerobject=document.runner;
    }
    else                              /* anderer Browser : */
      alert("Dein Browser kann das nicht!");
  }
}

function showDynText (text, bgcolor)
{
  document.getElementById("runner").innerHTML = text;
  document.getElementById("runner").style.backgroundColor = bgcolor;
  document.getElementById("runner").style.padding = 5+"px";
  document.getElementById("runner").style.display = 'block';
  document.getElementById("runner").style.zIndex=10;
}

function showDynPic (src, width, height)
{
  document.getElementById("runner").innerHTML = "<img src=" + src+ " width=" + width+ " height="+height+" class=BlockImage>";
  document.getElementById("runner").style.padding = 0;
  document.getElementById("runner").style.display = 'block';
}

function hideDynText ()
{
  document.getElementById("runner").innerHTML = '';
  document.getElementById("runner").style.display = "none";
}

function onClick(text, bgcolor)
{
}

function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function getElement(id) {
	if(document.getElementById) {
		return document.getElementById(id);
	}
	return;
}

// Rollover buttons

toplistteil0 = new Image();
toplistteil0.src = "http://www.fotos.sc/static/img/toplist_part0.jpg";
toplistteil1 = new Image();
toplistteil1.src = "http://www.fotos.sc/static/img/toplist_part.jpg";
loginpuzz0 = new Image();
loginpuzz0.src = "http://www.fotos.sc/static/img/puzzle0.jpg";
loginpuzz1 = new Image();
loginpuzz1.src = "http://www.fotos.sc/static/img/puzzle1.jpg";
