//handle table row highligthing
function P7_rowLite(tb,cl){ //v1.0 by PVII -table row highlighter  var g,i,x,gr;
if(document.getElementById){
 g=document.getElementsByTagName("TABLE");
 for(x=0;x<g.length;x++){if(g[x].className&&g[x].className==tb){
 gr=g[x].getElementsByTagName("TR");
 if(gr){for(i=0;i<gr.length;i++){
 if(i>0){gr[i].onmouseover=function(){this.className=cl;};
 gr[i].onmouseout=function(){this.className='';};}}}}}}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/*
var framefenster = document.getElementsByTagName("iFrame");
var auto_resize_timer = window.setInterval("autoresize_frames()", 400);
function autoresize_frames() {
for (var i = 0; i < framefenster.length; ++i) {
	if(framefenster[i].contentWindow.document.body){
	  var framefenster_size = framefenster[i].contentWindow.document.body.offsetHeight;
	  if(document.all && !window.opera) {
		framefenster_size = framefenster[i].contentWindow.document.body.scrollHeight;
	  }
	  framefenster[i].style.height = framefenster_size + 'px';
	}
}
}*/


function setIframeHeight() {
  if(parent.frames.length && document.documentElement && document.documentElement.scrollHeight) {
	var iframe = parent.document.getElementsByTagName('iframe')[0];
	iframe.style.height = '0';
	iframe.style.height = (document.documentElement.scrollHeight + 150) + 'px';
  }
}
window.onload = setIframeHeight;


// Script by Thomas Stich
// <a href="html-or.jpg" onclick="return popup(this,123,456)" title="..."
// or
// <a href="html-or.jpg" onclick="return popup(this)" title="..."


var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

function popup(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 150;  // 150px*150px is the default size
  h = (h) ? h += 25 : 150;
  var args = 'width='+w+',height='+h+',resizable';
  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
}

window.onunload = popdown;
window.onfocus = popdown;