nMaxItem = 2;
NameIndex = 0;
os = 1;
mos = 2;
imgCounter = 0;
ImageList = new Array();

function AddImageToList(name, Original, MouseOver)
{
	ImageList[imgCounter] = new Array(nMaxItem);
	ImageList[imgCounter][NameIndex] = name;
  ImageList[imgCounter][os] = new Image();

  ImageList[imgCounter][os].src = Original;
	
	if (MouseOver != "")
	{
    ImageList[imgCounter][mos] = new Image();
    ImageList[imgCounter][mos].src = MouseOver;
	}

	imgCounter++;
}

function ri(nameFrom, nameTo, state)
{
	for (i = 0; i < imgCounter; i++)
	{
		if (document.images[ImageList[i][NameIndex]] != null)
		{
			if ((nameFrom == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
				document.images[nameTo].src = ImageList[i][state].src;
		}
	}
}

function rii(f, nameFrom, nameTo, state)
{
	for (i = 0; i < imgCounter; i++)
	{
			if ((nameFrom == ImageList[i][NameIndex]) && (ImageList[i][state] != null))
        f.src = ImageList[i][state].src;
	}
}

function cl(url)
{
  document.location = url;
  return false;
}

function cla(url)
{
  document.location = url;
  return false;
}

function gw(s)
{
  LeftPosition = (screen.width) ? (screen.width-572)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-600)/2 : 0;
  gamewin = window.open("http://playandwin.de/game.php3?" + s, "GameWindow", "width=572,height=600,top="+TopPosition+",left="+LeftPosition +",menubar=no,toolbar=no,directories=no,scrollbars=no,resizable=no");
  if (gamewin.window.focus)
  {
    gamewin.window.focus();
  }
  return false;
}

function gwr(s)
{
  LeftPosition = (screen.width) ? (screen.width-572)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-600)/2 : 0;
  gamewin = window.open("http://playandwin.de/game.php3?a=main&s=" + s, "GameWindow", "width=572,height=600,top="+TopPosition+",left="+LeftPosition +",menubar=no,toolbar=no,directories=no,scrollbars=no,resizable=no");
  return false;
}

function mw(s)
{
  opener.top.location = "http://playandwin.de/pw.php3?p=t_m&s=" + s;
  if (opener.top.focus)
  {
    opener.top.focus();
  }
  return false;
}

function mwl(url)
{
  opener.top.location = url;
  if (opener.top.focus)
  {
    opener.top.focus();
  }
//  this.close;
  return false;
}



function MakeBookmark()
{
  var url = "http://www.playandwin.de/";
  var who = "playandwin - Gewinne im Wert von über 100.000,- EUR";

  var ver = navigator.appName;
  var num = parseInt(navigator.appVersion);
  if ((ver == "Microsoft Internet Explorer")&&(num >= 4))
  {
    window.external.AddFavorite(url,who);
  }
  return false;
}

function Media()
{
  LeftPosition = (screen.width) ? (screen.width-602)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-600)/2 : 0;
  mwin = window.open("http://playandwin.de/pw.php3?p=t_md", "MediaWindow", "width=602,height=600,top="+TopPosition+",left="+LeftPosition +",menubar=no,toolbar=no,directories=no,scrollbars=yes,resizable=no");
  if (mwin.window.focus)
  {
    mwin.window.focus();
  }
  return false;
}

function GS()
{
  LeftPosition = (screen.width) ? (screen.width-602)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-600)/2 : 0;
  mwin = window.open("http://www.gewinnspiele.com/playandwin/gs_aktuell_01.shtml", "Gewinnspiele", "width=602,height=600,top="+TopPosition+",left="+LeftPosition +",menubar=no,toolbar=no,directories=no,scrollbars=yes,resizable=no");
  if (mwin.window.focus)
  {
    mwin.window.focus();
  }
  return false;
}

// --------------------------------------------------------------------------------

AddImageToList("bar", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/main-3x1b.jpg");
AddImageToList("bara", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/main-3x1ab.jpg");
AddImageToList("JS2", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-2x1.gif");
AddImageToList("JS3", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-3x1.gif");
AddImageToList("JS4", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-4x1.gif");
AddImageToList("JS5", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-5x1.gif");
AddImageToList("JS6", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-6x1.gif");
AddImageToList("JS7", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-7x1.gif");
AddImageToList("JS8", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/menu-8x1.gif");
AddImageToList("back", "http://img.playandwin.de/1/back.gif", "http://img.playandwin.de/1/backr.gif");
AddImageToList("fore", "http://img.playandwin.de/1/fore.gif", "http://img.playandwin.de/1/forer.gif");
AddImageToList("GL1", "http://img.playandwin.de/1/gamel2.jpg", "http://img.playandwin.de/1/gamel2a.gif");
AddImageToList("GL2", "http://img.playandwin.de/1/leer.gif", "http://img.playandwin.de/1/gamel3a.gif");
AddImageToList("GL3", "http://img.playandwin.de/1/gamel7.jpg", "http://img.playandwin.de/1/gamel7a.gif");
AddImageToList("GL4", "http://img.playandwin.de/1/gamel8.jpg", "http://img.playandwin.de/1/gamel8a.gif");
AddImageToList("GL5", "http://img.playandwin.de/1/gamel9.jpg", "http://img.playandwin.de/1/gamel9a.gif");
AddImageToList("GL6", "http://img.playandwin.de/1/gamel10.jpg", "http://img.playandwin.de/1/gamel10a.gif");
AddImageToList("GL7", "http://img.playandwin.de/1/gamel11.jpg", "http://img.playandwin.de/1/gamel11a.gif");
AddImageToList("GL8", "http://img.playandwin.de/1/gamel12.jpg", "http://img.playandwin.de/1/gamel12a.gif");