function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=633,height=800,left = 490,top = 100');");
}

function fNewPDFWindows ()
 
{
 
if (!document.getElementsByTagName) return false;
 


var links = document.getElementsByTagName("a");

 
for (var eleLink=0; eleLink < links.length; eleLink ++) {


 
	if ((links[eleLink].href.indexOf('.PDF') !== -1)|| (links[eleLink].href.indexOf('.pdf') !== -1)) {
	
		if (links[eleLink].href.indexOf('#none') == -1) {
		
 
		links[eleLink].onclick =
 
			function() {
 
 				
				window.open(this.href,"mywindow","status=1,toolbar=1,resizable=1"); 
 
				return false;
 
				}
 
			var img = document.createElement("img");
 
			img.setAttribute("src", "/fileadmin/templates/img/new-win-icon.gif");
 
			img.setAttribute("alt", "opens in a new window");
			img.setAttribute("title", "opens in a new window");			
			
 
			img.setAttribute("height", "10");

			img.setAttribute("width", "20");
			
			links[eleLink].appendChild(img);
			
 
			}
 		}
 
		}
 }
 





function addLoadEvent(func)
{

var oldonload = window.onload;


if (typeof window.onload != 'function')
 
{
 
window.onload = func;
 
} else {
 
window.onload = function()
 
{
 
oldonload();
 
func();
 
}
 
}
 }
addLoadEvent(fNewPDFWindows);



