<!--
//** the Javascript used for the pop-up window **//
function errorSafe() {return true;}
window.onerror = errorSafe;
// declare global variable name
var newwindow = null; var dlwindow = null;
var rs = "yes"; var sc = "yes";var mn = "yes";var tl = "yes";var st = "yes";  var lo = "yes"; var wd ='250';var hi ='125';
//resizable //scrollbars //menubar //toolbar //status //location //width //height

function newwin(url,name,rs,sc,mn,tl,st,lo,wd,hi)
{// check if window already exists
	if (!newwindow || newwindow.closed) {// store new window object in global variable
newwindow = window.open(url,name,'resizable='+rs+',scrollbars='+sc+',menubar='+mn+',toolbar='+tl+',status,+st+,location='+lo+',width='+wd+',height='+hi);}
else {// window already exists, so check wether it's name is the same
	newwindow.close();	newwindow = window.open(url,name,'resizable='+rs+',scrollbars='+sc+',menubar='+mn+',toolbar='+tl+',status'+st+',location='+lo+',width='+wd+',height='+hi);}}    

// the javascript for the file download popup window
function dlwin(file,langue)
{	var theUrl = document.URL;	var dlPage = null;	var dlUrl = null;	var ref = null; var user = '';
	pattern=/\+/;
	file = file.replace(pattern, "%2B");
	pattern=/\ /;
	file = file.replace(pattern, "%20");
	ref = theUrl.slice(7); //removes the http://
	ref=ref.substring(ref.indexOf('/'),ref.lastIndexOf('/')+1); //takes only the relative URL part
	if (file.match('ftp://') || file.match('http://')) {ref = ''};
	dlPage = '/utils/download.php?target=';
	dlUrl = dlPage+file+'&langue='+langue;	
	dlUrl = dlUrl+'&ref='+theUrl;
	if (!dlwindow || dlwindow.closed) {dlwindow = window.open(dlUrl,'dl','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=1,location=0,width=650,height=350');}
else {dlwindow.close();	dlwindow = window.open(dlUrl,'dl','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=1,location=0,width=650,height=350');}}	
//-->
