function swap(image,imagefile)
{
  document.images[image].src = imagefile
}
function openWindow(url,width,height)
{
    PopURL=url;
    if(!PopWin || PopWin.closed){
        PopWin=PopWinOpen(width,height);
    }
    else {
        PopWin.close();
        PopWin=null;
        PopWin=PopWinOpen(width,height);
    }
}
var PopURL="";
var PopWin=null;
var openpopwin=null;
function PopWinOpen(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures="width="+width+",height="+height+",top="+y+",left="+x+",resizable,scrollbars=0";
	openpopwin=null;
	openpopwin=window.open(PopURL,"remote",winfeatures);
	return openpopwin;
}
function openWindow2(url,width,height)
{
    PopURL=url;
    if(!PopWin || PopWin.closed){
        PopWin=PopWinOpen2(width,height);
    }
    else {
        PopWin.close();
        PopWin=null;
        PopWin=PopWinOpen2(width,height);
    }
}
var PopURL="";
var PopWin=null;
var openpopwin=null;
function PopWinOpen2(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures="width="+width+",height="+height+",top="+y+",left="+x+",menubar=yes,toolbar=yes,location=yes,directories=no,status=yes,scrollbars=yes,resizable=yes,dependent";
	openpopwin=null;
	openpopwin=window.open(PopURL,"WinTop",winfeatures);
	return openpopwin;
}
function PopXolMain(url)
{
	var w = window.open(url,'xol_main','resizable=yes,scrollbars=yes,menubar=yes,status=yes');
	w.focus();
}
function openTutorial2(url)
{
	var x =(screen.availWidth-width)/2;
  var y =(screen.availHeight-height)/2;
	var w = window.open(url,'xol_tutorial','width=1012,height=669,top=+y+,left=+x+,resizable=yes,scrollbars=yes,menubar=yes,status=no');
	w.focus();
}

function openTutorial(url,width,height)
{
    PopURL=url;
    if(!PopWin || PopWin.closed){
        PopWin=PopWinOpen3(width,height);
    }
    else {
        PopWin.close();
        PopWin=null;
        PopWin=PopWinOpen2(width,height);
    }
}
var PopURL="";
var PopWin=null;
var openpopwin=null;
function PopWinOpen3(width,height){
    var x =(screen.availWidth-width)/2;
    var y =(screen.availHeight-height)/2;
	var winfeatures="width="+width+",height="+height+",top="+y+",left="+x+",menubar=yes,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,dependent";
	openpopwin=null;
	openpopwin=window.open(PopURL,"xol_tutorial",winfeatures);
	return openpopwin;
}