var pth
pth='';

  if (window.name != 'mainACT' && window.name != 'mainACT0' && window.name != 'Activia1' && window.name != 'miniWindow' && window.name != 'miniWindow2' && window.name !='courseWindow') window.name = "mainACT";
  window.focus();

var mainWin

var vblAtag = "a href=" ;

function si(srcURL,imgName) {
    if (document.images) {
      if (document.layers)	objectName = "document." + imgName + ".src" ;
      else 			objectName = "document.images." + imgName + ".src" ;
      eval(objectName + ' = "' + srcURL + '" ;') ;
    }
}

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

  var newWidth1   = 730;
  var newHeight1  = screen.availHeight - 60;
  var leftMargin1 = (screen.availWidth - newWidth1 - 20)/2;
  var topMargin1  =  20;
  var newWidth2   = 790;
  var newHeight2  = screen.availHeight - 100;
  var leftMargin2 = (screen.availWidth - newWidth2 - 20)/2;
  var topMargin2  =  40;
  var newWidth3   = 1024;
  var newHeight3  = screen.availHeight - 100;
  var leftMargin3 = (screen.availWidth - newWidth3 - 20)/2;
  var topMargin3  =  40;

  function addToFav(atfText2,atfURL2) {
	var atfText1	= 'Activia Training'
	if (atfText2>'')	atfText1 = atfText1 + ' ' + atfText2;
	var atfURL1	= 'http://www.activia.co.uk'
	if (atfURL2>'')		atfURL1 = atfURL1 + '/' + atfURL2;
	if (window.sidebar) {					// Mozilla Firefox Bookmark
		window.sidebar.addPanel(atfText1,atfURL1,'');
	} else if(window.external ) {				// IE Favorite
		window.external.AddFavorite(atfURL1,atfText1);
	} else if(window.opera && window.print) {		// Opera Hotlist
		return true;
	} else {						// Display an alert box for any other browser.
		alert('Sorry, your browser does not support this feature.\nPlease add http://www.activia.co.uk to your browsers favorites list.');
		return true;
	}
  }

  var Win0;		// Full but secondary window (used for extra content: preserves main window status but prevents lots of windows opening as with target="_blank")
  function openWindow0() {
    win0 = window.open('','mainACT0',"width=1024,height=700,top="+topMargin3+",left="+leftMargin3+",resizable=yes,scrollbars=yes,toolbar=yes,status=yes");
    win0.focus();
  }

  var win1		// Main popup window
  function openWindow1() {
    win1 = window.open('','Activia1',"width="+newWidth1+",height="+newHeight1+",top="+topMargin1+",left="+leftMargin1+",resizable=no,scrollbars=yes,toolbar=no,status=no");
    win1.focus();
  }

  var win2		// Shappoing Cart / WorldPay window
  function openWindow2() {
    win2 = window.open('','Activia2',"width="+newWidth2+",height="+newHeight2+",top="+topMargin2+",left="+leftMargin2+",resizable=no,scrollbars=yes,toolbar=no,status=no");
    win2.focus();
  }

  var mWin;		// Mini window
  function miniWindow() {
    mWin = window.open('','miniWindow','height=450,width=650,top=80,left=120,resizable=0,scrollbars=yes,toolbars=no,status=no');
  }

  var mWin2;		// Mini window
  function miniWindow2() {
    mWin2 = window.open('','miniWindow2','height=400,width=400,top=80,left=120,resizable=0,scrollbars=yes,toolbars=no,status=no');
  }

  var cWin;		// Course window (set up but not used yet)
  function courseWindow() {
    mWin2 = window.open('','courseWindow','height=500,width=450,top=200,left=300,resizable=0,scrollbars=yes,toolbars=no,status=no');
  }

  function writeEM(emName,emDomain) {
    var emAt = '&#64;';
    document.write('<'+vblAtag+'"mailto:'+emName+emAt+emDomain+'">');
    document.write(emName+emAt+emDomain+'</a></p>');
  }

  function homeLinks() {
    document.write('<div class="homepoint1"> &#8226; &nbsp;<'+vblAtag+'"mostofbudget.asp">Make the most of your budget</a></div>');
    document.write('<div class="homepoint2"> &#8226; &nbsp;<'+vblAtag+'"whatyouneed.asp">Get exactly what you need</a></div>');
    document.write('<div class="homepoint3"> &#8226; &nbsp;<'+vblAtag+'"headaches.asp">Reduce your headaches</a></div>');
    document.write('<div class="homepoint4"> &#8226; &nbsp;<'+vblAtag+'"getresults.asp">... and get results !</a></div>');
  }

  function bottLinks() {
    document.write('		<'+vblAtag+'"'+pth+'whyactivia.asp"><u>Why Activia?</u></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;');
    document.write('		<'+vblAtag+'"'+pth+'programmes.asp"><u>Training programmes</u></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;');
    document.write('		<'+vblAtag+'"'+pth+'managed.asp"><u>Managed training</u></a>');
  }
