/////////////////////////////////////////////////////////////////////////////////////////
// Source Code by Matthias Fischer (c) 2002  All rights reserved                       //
// If you want to use this code or any function please email to: mfischer25@web.de     //
/////////////////////////////////////////////////////////////////////////////////////////

yPos =  110 ;
xPos = -150 ;
cx = 0 ;
cy = yPos ;
dx = 2 ;
winY = 0;
lastY = 0;
inTimer = 0 ;
outTimer = 0 ;
visible = false  ;
delay = 1 ;

function makeStatic()
{
moveTo(cx,cy) ;
setTimeout('makeStatic();', 20) ;
}

function moveTo(x,y)
{
 if(DOM)
 {
   if(MS) getElem("id","Nav",null).style.top = document.body.scrollTop + y ;
   else getElem("id","Nav",null).style.top   = window.pageYOffset + y;

   if(MS) getElem("id","Nav",null).style.left = document.body.scrollLeft + x ;
   else getElem("id","Nav",null).style.left   = window.pageXOffset + x;
 }
 if(DOM || MS)
 {
    if (!DOM) getElem("id","Nav",null).style.top  = document.body.scrollTop + y;
    if (!DOM) getElem("id","Nav",null).style.left = document.body.scrollLeft + x;
 }
 else
 if(NS)
 {
  //getElem("id","Nav",null).top  = window.pageYOffset + y ;
  //getElem("id","Nav",null).left = window.pageXOffset + x ;
  getElem("id","Nav",null).moveTo(window.pageXOffset + x,window.pageYOffset + y);
 }
}

function rollIn()
{
  if (cx < 0 & visible)
  {
	 //moveTo(cx,yPos) ;
	 cx = cx + dx ;
  }
  else
  {
  	window.clearInterval(inTimer) ;
  }
}

function rollOut()
{
  if (cx > (xPos - 1) & !visible)
  {
	 //moveTo(cx,yPos) ;
	 cx = cx - dx ;
  }
  else
  {
  	window.clearInterval(outTimer) ;
  }
}

function Menue()
{
	visible = true ;
	inTimer = 	window.setInterval("rollIn()",delay) ;
}

function noMenue()
{
	visible = false ;
	outTimer = window.setInterval("rollOut()",delay) ;
}

function hideMenue()
{
 if(DOM || MS)
  getElem("id","Nav",null).style.visibility = "hidden";
 if(NS)
  getElem("id","Nav",null).visibility = "hide";
}

function showMenue()
{
 if(DOM || MS)
  getElem("id","Nav",null).style.visibility = "visible";
 if(NS)
  getElem("id","Nav",null).visibility = "show";
}

function handleMove(ev)
{
 if(!MS)
 {
   Event = ev;
   if(Event.screenX < 70 & !visible) Menue();
   else if(Event.screenX > 200 & visible) noMenue();
 }
}

function MShandleMove()
{
 if(MS)
 {
  if(window.event.clientX < 70 & !visible) Menue();
  else if(window.event.clientX > 200 & visible) noMenue();
 }
}

function Event_init()
{
 moveTo(xPos,yPos) ;
 cx=xPos;

 if(DOM && !MS && !OP)
 {
  getElem("tagname","body",0).addEventListener("mousemove", handleMove, true);
 }
 if(NS)
 {
  document.captureEvents(Event.MOUSEMOVE);
  document.onmousemove=handleMove;
  dx=1 ;       // soften NS ;-)
  delay = 5 ;  // slow down NS
 }
 if (DOM && OP)
 {
    document.onmousemove=handleMove;
 }
 if (MS)
 {
   getElem("tagname","body",0).onmousemove=MShandleMove;
 }
 showMenue();
 setTimeout('makeStatic();', 10) ;
}

function writeShapes1(lang)
{
	// base_dir = "http://mfischer.myip.org/kemkes/" ;
	base_dir = "http://www.campingplatz-steinhuder-meer.de/" ;
	document.write("<div id='Nav' style='position:absolute;' >\n");
	document.write("<map name='nav"+lang+"' id='nav'>\n");
	document.write("<area alt='Actually'     coords='9,13,143,42'   href='"+ base_dir + lang + "/aktuell.php' >\n");
	document.write("<area alt='Camping'      coords='9,42,143,63'   href='"+ base_dir + lang + "/camping.php' >\n");
	document.write("<area alt='Holiday flat' coords='9,63,143,86'   href='"+ base_dir + lang +"/fewo.php' >\n");
	document.write("<area alt='Swimming'     coords='9,85,143,107'  href='"+ base_dir + lang +"/schwimmen.php' >\n");
	document.write("<area alt='Offer'        coords='9,106,143,130' href='"+ base_dir + lang +"/angebot.php' >\n");
	document.write("<area alt='Prices'       coords='9,129,142,153' href='"+ base_dir + lang +"/preise.php' >\n");
	document.write("<area alt='Approach'     coords='9,153,143,174' href='"+ base_dir + lang +"/anreise.php' >\n");
	document.write("<area alt='Children'     coords='9,173,143,196' href='"+ base_dir + lang +"/kinder.php' >\n");
	document.write("<area alt='Youth'        coords='9,196,144,217' href='"+ base_dir + lang +"/jugend.php'  >\n");
	document.write("<area alt='Famielies'    coords='9,216,143,240' href='"+ base_dir + lang +"/familien.php' >\n");
	document.write("<area alt='Menu'         coords='152,26,187,143'href='"+ base_dir + "index.html' >\n");
	document.write("</map>\n");
	document.write("<img src='"+base_dir+"nav/nav_"+lang+".png' alt='Navigation "+lang+"' border='0' usemap='#nav"+lang+"'>\n");
	document.write("</div>\n");
        document.write("<img width=1 height=1 border=0 src=nav/statitjs.php?1,"+screen.width+","+screen.colorDepth+">\n") ;
}



