
function setLogIn(){

  var strScreen="";
  strScreen += "<form action='/php/user.php' method='post' target='myframe'><input type='hidden' value='Login' name='login'>";
  strScreen += "<table cellpadding=0 cellspacing=0 width=142>";
  strScreen += "<tr><td colspan=3><img src='/images/blank.gif' width=12 height=4></td></tr>";
  strScreen += "<tr><td rowspan=6><img src='/images/_rightnavigation_no00.jpg'></td><td><img src='/images/_rightnavigation_no10.jpg'></td><td rowspan=6><img src='/images/_rightnavigation_no20.jpg'></td></tr>";
  strScreen += "<tr><td bgcolor=white><input type='text' name='username' class='login'></td></tr>";
  strScreen += "<tr><td><img src='/images/_rightnavigation_no11.jpg'></td></tr>";
  strScreen += "<tr><td bgcolor=white><input type='password' name='password' class='login'></td></tr>";
  strScreen += "<tr><td><input type='image' src='/images/_rightnavigation_no12.jpg' border=0></td></tr>";
  strScreen += "</table></form>";

  top.loginscreen.innerHTML = strScreen;
}


function setLoggedIn(strName){

  var strScreen="";
  var myfontsize="4px";
  if (strName.length>8) {
    myfontsize="3px";
  }
  if (strName.length>10) {
    myfontsize="2px";
  }
  if (strName.length>12) {
    myfontsize="1px";
  }

  strScreen += "<table cellpadding=0 cellspacing=0 width=142>";
  strScreen += "<tr><td colspan=3><img src='/images/blank.gif' width=12 height=4></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes0.jpg' align=center height=88 width='142'><br><br><font size='"+ myfontsize +"'><b>" + strName + "</b></font></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes1b.jpg' height=22 width='142'><a href='/php/profiel_buddylist.php' target='myframe' class='LMENU'>Buddy List</a></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes2b.jpg' height=22 width='142'><a href='/php/user.php?action=logoff' target='myframe' class='LMENU'>Logout</a></td></tr>";
  //strScreen += "<tr><td background='/images/_rightnavigation_yes3.jpg' height=13 width='142'>&nbsp;</td></tr>";
  strScreen += "<tr><td><img src='/images/_rightnavigation_yes3.jpg' height=13></td></tr>";
  strScreen += "</table>";

  top.loginscreen.innerHTML = strScreen;
}


function setLoggedInAdmin(strName){

  var strScreen="";
  var myfontsize="4px";
  if (strName.length>8) {
    myfontsize="3px";
  }
  if (strName.length>10) {
    myfontsize="2px";
  }
  if (strName.length>12) {
    myfontsize="1px";
  }
  strScreen += "<table cellpadding=0 cellspacing=0 width=142>";
  strScreen += "<tr><td colspan=3><img src='/images/blank.gif' width=12 height=4></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes0.jpg' align=center height=88 width='142'><br><br><font size='"+ myfontsize +"'><b>" + strName + "</b></font></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes1b.jpg' height=22 width='142'><a href='/php/admin.php' target='myframe' class='LMENU'>Admin Menu</a></td></tr>";
  strScreen += "<tr><td background='/images/_rightnavigation_yes2b.jpg' height=22 width='142'><a href='/php/user.php?action=logoff' target='myframe' class='LMENU'>Logout</a></td></tr>";
//  strScreen += "<tr><td background='/images/_rightnavigation_yes3.jpg' height=13 width='142'>&nbsp;</td></tr>";
  strScreen += "<tr><td><img src='/images/_rightnavigation_yes3.jpg' height=13></td></tr>";
  strScreen += "</table>";

  top.loginscreen.innerHTML = strScreen;
}

var x = 0;
var dest = 0;
var distance = 0;
var step = 0;
var destination = 0;

function scrollprv(dx,min) {
  if (x<=min+dx)
    dx=min;
  else
    dx = x-dx;
  scrollit(dx);
}

function scrollfwd(dx,max) {
  if (x>=max-dx)
    dx=max;
  else
    dx = x+dx;
  scrollit(dx);
}


function scrollit(destination) {
  step = 1;
  dest = destination;
  if (x<dest) {
    while (x<dest) {
      step += (step /20);
      x += step;
      scroll(x,0);
    } 
    scroll(dest,0);
    x = dest;
  } else if (x > dest)  {
    while (x > dest) {
      step += (step / 20);
      if(x >= (0+step)) {
        x -= step; 
	scroll(x,0);
      } else { break;  }
    } 
    if(dest >= 0) { scroll(dest,0); }
    x = dest;
  }
  if (x<1) {x=1}
  if (x>3920) {x=3920}
}

function showVideoPlayer() {
  window.open ("/php/videoplayer.php", "thavideoplaya", "scrollbars=0,resizable=1,location=0,menubar=0,toolbar=0,status=0,width=592,height=400");
/*
  document.all.videoplayerpopup.src = "/php/videoplayer.php";
  //document.all.videoplayerpopup.style.border = "none";
  //document.all.videoplayerpopup.style.backgroundColor = "transparent";
  document.all.videoplayerpopup.style.visibility = "visible";
*/
}

