function OpenWindow (url, name, vwidth, vheight, vscreenX, vscreenY, vresizeable, vscrollbars, vmenubar) {
  NewWindow = window.open('' + url + '','' + name + '','width=' + vwidth + ',height=' + vheight + ',screenX=' + vscreenX + ',screenY=' + vscreenY + ',resizable=' + vresizeable + ',scrollbars=' + vscrollbars + ',menubar=' + vmenubar);
}

function maxLength (el, max) {

  if (el.value.length > max) el.value = el.value.substr(0, max);
  //alert(el.value);
  
}

var eventdate = new Date("September 7, 2003 20:30:00 GMT");

 function toSt(n)
 {s=""
  if(n<10) s+="0"
  return s+n.toString();
 }
 
 function countdown()
 {
  var cl=document.clock;
  var days, hours, mins, secs;
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
  {  
    cl.thetime.value = "=ZERO= LAUNCH!!! WEEEEEEEEEEEEEEEEE :-))))";
  }
  else {
    secs=toSt(count%60);
    count=Math.floor(count/60);
    mins=toSt(count%60);
    count=Math.floor(count/60);
    hours=toSt(count%24);
    count=Math.floor(count/24);
    days=count;
    cl.thetime.value = days + " Tage " + hours + " Stunden " + mins + " Minuten " + secs + " Sekunden";
  }
  
  
  setTimeout("countdown()",500);
 }
 
 
var NewWindow = false;

function checkwin (link) {

  //if (NewWindow) NewWindow.location.href=link;
  //else OpenWindow(link, 'troniklinks', 400, 600, 0, 0, 'yes', 'yes', 'no');
  document.location.reload();
  OpenWindow(link, 'troniklinks', 400, 600, 0, 0, 'yes', 'yes', 'no');
  NewWindow.focus();

}
