var current = 0;
var myPics = new Array();
var ns4 = (document.layers) ? true : false;

function addPic(_p) {
  myPics[myPics.length?myPics.length:0] = new Image();
  myPics[myPics.length-1].src=_p; // preload all pics
}

for(A=0; A<=7; A++) {
addPic("dos/pics/fp/"+A+".jpg")
}

function checkIt(val) {
  current = Math.abs((current+parseInt(val))%myPics.length);
  if (ns4) document.content.document.slide.src = myPics[current].src;
  else document.slide.src = myPics[current].src;
}

function fpSlide() {
  if (ns4) document.content.document.write("<img name=slide src='"+myPics[current].src+"' border=1 width=148 height=108>");
  else document.write("<img name=slide src='"+myPics[current].src+"' border=1 width=148 height=108>");
  var myTimer = setInterval('checkIt(1)',5000); // 5 second interval;
}

function eMail(server,name) {
  if (ns4) document.content.document.write("<a class=m href=\"mailto:"+name+"@"+server+"\">"+name+"@"+server+"</a>");
  else  document.write("<a class=m href=\"mailto:"+name+"@"+server+"\">"+name+"@"+server+"</a>");
}

window.onerror = myError;

function myError(message, url, line) {
  alert("error:\n  " + url + "\n  " + message + "\n  line: " + line);
  return false;
}
window.defaultStatus = "[ © 2004 Doorsystem sagl. ]"
	
var newwindow = '';
features = 'resize=yes,menubar=no,toolbar=no,directories=no,location=no,statusbar=yes';

function openNewWindow(url,name,w,h){
  if (newwindow.location && !newwindow.closed){
  newwindow.location.href = url;
  }
  else{
  features = 'width='+w+'0,height='+h+'0,features';
  newwindow=window.open(url,'name',features);
  if (!newwindow.opener) newwindow.opener = self;
  }
if (window.focus) {newwindow.focus()}
}