I = new Array();
A = new Array();
H = new Image();
I = new Array();

LastHLine     = '';
LastHLineBG   = '';

function preLPic(IMG,ISRC) {
  I[IMG] = new Image();
  I[IMG].src = ISRC;
}

function hp(ID) {
  if (!I[ID]) return false;
  H.src = document.images[ID].src;
  document.images[ID].src = I[ID].src;
}

function np(ID) {
  if (A['id'] != ID) document.images[ID].src = H.src;
  H.src = '';
}

function screens(theme) {
   h = 600;
   w = 660;

   SCREENS = window.open("/de/screens/index.php?theme="+theme,"epaperscreens","width="+w+",height="+h+",left="+SrceenMidPos('w',w)+",top="+SrceenMidPos('h',h)+",resizable=yes");
}

function SrceenMidPos (direction,value) {
   if (direction=='w')
      return (screen.availWidth/2)-(value/2);
   else
      return (screen.availHeight/2)-(value/2);
}
