/* Register Event Listeners -- */
/* MOZILLA */  if (document.addEventListener){document.addEventListener("DOMContentLoaded", init, null);}
/* OTHER   */  window.onload = init;
/* --------------------------- */

function init()
{	if (arguments.callee.done) return;
	arguments.callee.done = true;
   
   //Externe links
   links=document.getElementsByTagName('A');
   for (i=0;i<links.length;i++)
   {	if (links[i].className=="extern")
		{	links[i].setAttribute('target','_blank');
		}
   }
   
   
   
}



//<!-- This script and many more are available free online at -->
//<!-- The JavaScript Source!! http://javascript.internet.com -->

function NewWindow(mypage, myname, w, h, scroll)
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// Begin Seite drucken
function printWindow() {
Browser = parseInt(navigator.appVersion);
if (Browser >= 4) window.print();
}
//  End --

function bigPreview(file,width,height)
{	newwidth=450;
	if (width<height)
	{	newwidth=450;
	}
	else
	{	newwidth=650;
	}
	
	ratio=newwidth/width;
	newheight=height*ratio;
	
	if (document.attachEvent)
	{	newwidth=newwidth+20;
		newheight=newheight+20;
	}
	
	var x=window.open('index.php?rex_resize='+newwidth+'w__'+file, 'bigPrev', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+(newwidth+16)+',height='+(newheight+16));

}
