function modifyString() { 
var date = new Date(); 
date.setTime(Date.parse(document.lastModified)); 
var year = date.getYear(); 
if (year<1000) year+= 1900; 
return "Letzte Aktualisierung: "+date.getDate()+"."+(date.getMonth()+1)+"."+year;
}

function ViewImage(ifile,ix,iy,ititle) { 
var win;
win = window.open("","imageviewer","width="+ix+",height="+iy+",screenX=30,screenY=30,menubar=no,toolbar=no");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div></body></html>");
win.document.close();
win.focus();
}

function ViewImage2(ifile,ix,iy,ititle) { 
var win;
ix = ix * 2;
iy = iy * 2;
if (!ititle) { ititle = "Bild" };
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body bgcolor=#F5E5C5>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+" width="+ix+" height="+iy+"></div></body></html>");
win.document.close();
win.focus();
}

function viewImg(ifile,ititle) { 
var bild= new Image();
bild.src=(ifile);
var ix = bild.width;
var iy = bild.height;
var win;
if (!ititle) { ititle = "Bild" };
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body bgcolor=#F5E5C5>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+" width="+ix+" height="+iy+"></div></body></html>");
win.document.close();
win.focus();
}

function expImage(ifile,ititle) { 
var bild= new Image();
bild.src=(ifile);
var ix = bild.width * 2;
var iy = bild.height * 2;
var win;
if (!ititle) { ititle = "Bild" };
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body bgcolor=#F5E5C5>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+" width="+ix+" height="+iy+"></div></body></html>");
win.document.close();
win.focus();
}

function ViewForm(id,title) {
  var win;
	if (win) win.close(); 
	title=escape(title);
  win=window.open("/cgi-bin/cs/yt_vote.pl?mode=form&id=" +id+ "&title=" +title,"name","width=700,height=520,scrollbars=yes,resizable=yes");
}

function viewSkill(id) {
	var win;
	if (win) win.close(); 
  win=window.open("/cgi-bin/views/gw_skill.pl?mode=popup&id=" +id,"name","width=580,height=320,scrollbars=1,resizable=1");
	win.focus();
}

function openWindow(name) {
  var s;
  var v = name + ".htm";
  if (s) s.close(); 
  s = window.open('' + v,'','width=600,height=500,scrollbars=1,toolbar=no,location=0,directories=0,menubar=1,resizable=1,status=0');
}

function intern_get_window_width (win) {
  if (win.innerWidth) {
    return win.innerWidth;
  } else if (win.document.body && win.document.body.offsetWidth) {
    return win.document.body.offsetWidth;
  } else {
    return 0;
  }
}

function org_intern_popup_image(ifile,ix,iy,ititle) { 
var bild= new Image();
bild.src=(ifile);
var ix = bild.width;
var iy = bild.height;
if (ix == 0 ) { ix = 320};
if (iy == 0 ) { iy = 320};

// balsamka allkura
var win;
if (!ititle) { ititle = "Bild" };
win = window.open("","imageviewer","width="+ix+",height="+iy+",screenX=30,screenY=30,menubar=no,toolbar=no");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body bgcolor=#F5E5C5>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+" width="+ix+" height="+iy+"></div></body></html>");
win.document.close();
iWidth = intern_get_window_width(win);
if (iWidth != 0 && iWidth != ix) {
  iWidth = ix - iWidth;
  win.resizeBy(iWidth, 0);
}
win.focus();
}

function intern_popup_image(ifile,ix,iy,ititle) { 
var bild= new Image();
bild.src=(ifile);
var ix = bild.width;
var iy = bild.height;
if (ix == 0 ) { ix = 320};
if (iy == 0 ) { iy = 320};

// balsamka allkura
var win;
if (!ititle) { ititle = "Bild" };
win = window.open("","imageviewer","width="+ix+",height="+iy+",screenX=30,screenY=30,menubar=no,toolbar=no");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title></head><body bgcolor=#F5E5C5>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+" width="+ix+" height="+iy+"></div></body></html>");
win.document.close();
iWidth = intern_get_window_width(win);
if (iWidth != 0 && iWidth != ix) {
  iWidth = ix - iWidth;
  win.resizeBy(iWidth, 0);
}
win.focus();
}

function org_int_view(ifile,ititle) { 
  intern_popup_image(ifile,320,700,ititle)
}

function int_view2(ifile,ititle) { 
  intern_popup_image(ifile,640,700,ititle)
}

function int_view(ifile,ititle) {
//var bild= new Image();
//bild.src=(ifile);
//var ix = bild.width;
//var iy = bild.height;
//if (ix == 0 ) { ix = 256};
//if (iy == 0 ) { iy = 256};
var ix = 256;
var iy = 256;

var win;
if (!ititle) { ititle = "Bild" };

win = window.open("","imageviewer","width=256,height=256,screenX=10,screenY=10,menubar=0,toolbar=0");
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("<script>");
win.document.write("function resize() {");
win.document.write("  if (window.innerWidth) {");
win.document.write("    ix = window.innerWidth;");
win.document.write("  } else if (window.document.body && window.document.body.offsetWidth) {");
win.document.write("    ix = window.document.body.offsetWidth;");
win.document.write("  } else {");
win.document.write("   ix = 0;");
win.document.write("  }");
win.document.write("  if (window.innerHeight) {");
win.document.write("    iy = window.innerHeight;");
win.document.write("  } else if (window.document.body && window.document.body.offsetHeight) {");
win.document.write("    iy = window.document.body.offsetHeight;");
win.document.write("  } else {");
win.document.write("   iy = 0;");
win.document.write("  }");
//win.document.write(ix + " - " + iy);
win.document.write("  ix = document.bild.width - ix;");
win.document.write("  iy = document.bild.height - iy;");
win.document.write("  window.resizeBy(ix, iy);");
//win.document.write(" window.resizeTo(document.bild.width, document.bild.height);");
win.document.write("}");
win.document.write("</script>");
win.document.write("</head><body bgcolor=#F5E5C5>");
win.document.write("<img name=\"bild\" style=\"position:absolute; top:0px; left:0px\" src=\"" + ifile + "\" onLoad=\"resize()\">");
// win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
// win.document.write("<img name='bild' src="+ifile+"></div></body></html>");
win.document.write("</body></html>");
win.document.close();
win.focus();
}

