// -------------------------------------------------------------------------------------------------------
// load stylesheets
// -------------------------------------------------------------------------------------------------------

var host = window.location.hostname;
if(host == 'localhost' || host == '192.168.0.1')
  var pfad = "/gerd/gerry/website/tools";
else var pfad = "/tools";

document.write('<link rel="stylesheet" href="' + pfad + '/css/default.css" type="text/css">');
document.write('<link rel="stylesheet" href="' + pfad + '/css/farben.css" type="text/css">');

// -------------------------------------------------------------------------------------------------------
// global functions
// -------------------------------------------------------------------------------------------------------

var new_popup = 0;

function goTo(src) {
  document.location.href = src;
}

function goToTop(src) {
  top.location.href = src;
}

function newWindow(url, breite, hoehe, left, top, scroll, menu, tool, resizable) {
  if(new_popup && !new_popup.closed) new_popup.close();
  if(!left && !top) {
    left = (screen.width - breite) / 2;
    top = (screen.height - hoehe) / 2;
  }
  new_popup = window.open(url, "new_popup", "width=" + breite + ",height=" + hoehe +
                          ",left=" + left + ",top=" + top + ",scrollbars=" + scroll +
                          ",menubar=" + menu + ",toolbar=" + tool + ",resizable=" + resizable);
  new_popup.focus();
}

function showImage(url, breite, hoehe, titel) {
  var left = (screen.width - breite) / 2;
  var top = (screen.height - hoehe) / 2;
  if(new_popup && !new_popup.closed) new_popup.close();
  new_popup = window.open("", "new_popup", "width=" + breite + ",height=" + hoehe + ",left=" + left + ",top=" + top);
  new_popup.document.writeln('<html><head><title>' + (titel ? titel : 'Image') + '</title></head>');
  new_popup.document.writeln('<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>');
  new_popup.document.writeln('<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=center>');
  new_popup.document.writeln('<a href="javascript:self.close()"><img src="' + url + '" border=0></a>');
  new_popup.document.writeln('</td></tr></table>');
  new_popup.document.writeln('</body></html>');
  new_popup.focus();
}

// -------------------------------------------------------------------------------------------------------

