 function addLoadEvent(func)
{
var oldonload = window.onload;

if (typeof window.onload != 'function')
{
  window.onload = func;
} else {
   window.onload = function()
		{
		  oldonload();
		  func();
		}
  }
}

 addLoadEvent(fNewPDFWindows);

  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].onclick =
		function() {  
		  window.open(this.href,'poper','resizable,scrollbars');
		  return false;
		}
	  }
	}
}

function fNewPDFWindowsOne ()
{

   if (!document.getElementById) return false;
	var linkPDF = document.getElementById("pdf");
		linkPDF.onclick =
		function() {  
		  window.open(this.href,'PDF-Document','resizable,scrollbars');
		  return false
		}
}
