<!--

//DEMO

function openBrainDemo(selfcall){
 if (selfcall == null) {
  setTimeout("openBrainDemo(1)", 300);
 } else {
  if (autoclose){
  NFW.close()
 }
  var autoclose = 1
  var winl = (screen.width - '600') / 2;
  var wint = (screen.height - '700') / 2;
  winprops = 'height='+'700'+',width='+'600'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
  NFW = window.open("brain_demo.htm", 'name', winprops)
  if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
   if (autoclose){
    window.onunload = function(){NFW.close()}
  }
 }
}

//NEWS

function openArchivetext(selfcall){
 if (selfcall == null) {
  setTimeout("openArchivetext(1)", 300);
 } else {
  if (autoclose){
  NFW.close()
 }
  var autoclose = 1
  var winl = (screen.width - '450') / 2;
  var wint = (screen.height - '300') / 2;
  winprops = 'height='+'300'+',width='+'450'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
  NFW = window.open("news-archive.htm", 'name', winprops)
  if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
   if (autoclose){
    window.onunload = function(){NFW.close()}
  }
 }
}




//GAMES





function openBugs(selfcall){
 if (selfcall == null) {
  setTimeout("openBugs(1)", 300);
 } else {
  if (autoclose){
  NFW.close()
 }
  var autoclose = 1
  var winl = (screen.width - '500') / 2;
  var wint = (screen.height - '490') / 2;
  winprops = 'height='+'490'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'no'+',resizable'
  NFW = window.open("bugs-text.htm", 'name', winprops)
  if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
   window.onunload = function(){NFW.close()}
  }
 }
}


function openAsteroids(selfcall){
 if (selfcall == null) {
  setTimeout("openAsteroids(1)", 300);
 } else {
  if (autoclose){
  NFW.close()
 }
  var autoclose = 1
  var winl = (screen.width - '600') / 2;
  var wint = (screen.height - '600') / 2;
  winprops = 'height='+'600'+',width='+'600'+',top='+wint+',left='+winl+',scrollbars='+'no'+',resizable'
  NFW = window.open("asteroids-text.htm", 'name', winprops)
  if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
   window.onunload = function(){NFW.close()}
  }
 }
}

function openDecks(selfcall){
 if (selfcall == null) {
  setTimeout("openDecks(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '788') / 2;
var wint = (screen.height - '400') / 2;
winprops = 'height='+'400'+',width='+'788'+',top='+wint+',left='+winl+',scrollbars='+'no'+',resizable'
NFW = window.open("decks-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openMaze(selfcall) {
 if (selfcall == null) {
  setTimeout("openMaze(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '800') / 2;
var wint = (screen.height - '600') / 2;
winprops = 'height='+'600'+',width='+'800'+',top='+wint+',left='+winl+',scrollbars='+'no'+',resizable'
NFW = window.open("maze-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}







//PORTFOLIO




function openxspace(selfcall){
 if (selfcall == null) {
  setTimeout("openxspace(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("xspace-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}   

function openMcLaren(selfcall){
 if (selfcall == null) {
  setTimeout("openMcLaren(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("McLaren-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}        


function openSlap(selfcall){
 if (selfcall == null) {
  setTimeout("openSlap(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("soundslikeaphone-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openYentreve(selfcall){
 if (selfcall == null) {
  setTimeout("openYentreve(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("yentreve-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openSeymourPowell(selfcall){
 if (selfcall == null) {
  setTimeout("openSeymourPowell(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("seymourpowell-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openSolo(selfcall){
 if (selfcall == null) {
  setTimeout("openSolo(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("solo-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openIFE(selfcall){
 if (selfcall == null) {
  setTimeout("openIFE(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("ife-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openMotorola(selfcall){
 if (selfcall == null) {
  setTimeout("openMotorola(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("motorola-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openTx(selfcall){
 if (selfcall == null) {
  setTimeout("openTx(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("tx-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openSkybridge(selfcall){
 if (selfcall == null) {
  setTimeout("openSkybridge(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("skybridge-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openSpeechmark(selfcall){
 if (selfcall == null) {
  setTimeout("openSpeechmark(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("vip-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openMicrosoft(selfcall){
 if (selfcall == null) {
  setTimeout("openMicrosoft(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("microsoft-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openNovartis(selfcall){
 if (selfcall == null) {
  setTimeout("openNovartis(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '600') / 2;
var wint = (screen.height - '700') / 2;
winprops = 'height='+'700'+',width='+'600'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("novartis-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openSoftPlanet(selfcall){
 if (selfcall == null) {
  setTimeout("openSoftPlanet(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '500') / 2;
var wint = (screen.height - '440') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("softplanet-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}

function openYnR(selfcall){
 if (selfcall == null) {
  setTimeout("openYnR(1)", 300);
 } else {
var autoclose = 1
var winl = (screen.width - '550') / 2;
var wint = (screen.height - '580') / 2;
winprops = 'height='+'440'+',width='+'500'+',top='+wint+',left='+winl+',scrollbars='+'yes'+',resizable='+'yes'
NFW = window.open("ynr-text.htm", 'name', winprops)
if (parseInt(navigator.appVersion) >= 4) { NFW.window.focus(); }
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}
}






//OTHER FUNCTIONS





function closePopup(selfcall){
 if (selfcall == null) {
  setTimeout("closePopup(1)", 300);
 } else {
  NFW.close()
 }
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function hidestatus(){
  window.status=''
  return true
}

function InitVars(){
  var winl = (screen.width - '1') / 2;
  var wint = (screen.height - '1') / 2;
  winprops = 'height='+'1'+',width='+'1'+',top='+wint+',left='+winl+',scrollbars='+'no'+''
  NFW = window.open("empty.htm", 'name', winprops)
  NFW.close()
}



















function CheckForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a first name
	if (document.frmEnquiry.firstName.value == ""){
		errorMsg += "\n\tName \t\t- Enter your Name";	
	}
	 	
	//Check for an e-mail address and that it is valid
	if ((document.frmEnquiry.email.value == "") || (document.frmEnquiry.email.value.length > 0 && (document.frmEnquiry.email.value.indexOf("@",0) == - 1 || document.frmEnquiry.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail Address \t- Enter your valid e-mail address";
	}
			
	//Check for an enquiry
	if (document.frmEnquiry.enquiry.value == "") { 
 		errorMsg += "\n\tEnquiry \t\t- Enter an enquiry";
	}
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Your enquiry has not been sent because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}

function CheckCVForm () { 

	//Initialise variables
	var errorMsg = "";

	//Check for a first name
	if (document.frmCVRequest.firstName.value == ""){
		errorMsg += "\n\tName \t\t- Enter your Name";	
	}
	 	
	//Check for an e-mail address and that it is valid
	if ((document.frmCVRequest.email.value == "") || (document.frmCVRequest.email.value.length > 0 && (document.frmCVRequest.email.value.indexOf("@",0) == - 1 || document.frmCVRequest.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail Address \t- Enter your valid e-mail address";
	}
			
		
	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "You cannot download my CV because there are problem(s) with the form.\n";
		msg += "Please correct the problem(s) and re-submit the form.\n";
		msg += "______________________________________________________________\n\n";
		msg += "The following field(s) need to be corrected: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	MM_openBrWindow('download/cv.zip');
	return true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_validateForm() { //v3.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (val!=''+num) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
//else alert ('ok');
//else MM_openBrWindow('download/cv.zip');
  document.MM_returnValue = (errors == '');
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

//-->