<!--
//** 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)
{	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 = ''};
	if (theUrl.match('French')) {dlPage = '/French/download.php?target='+ref} else {dlPage ='/English/download.php?target='+ref};
	if (theUrl.match('/~user851306')) {dlUrl = '/~user851306'+dlPage+file;}
	else{dlUrl = dlPage+file;}	
	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=550,height=250');}
else {dlWindow.close();	dlWindow = window.open(dlUrl,'dl','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=1,location=0,width=550,height=250');}}	
//-->

