if (document.getElementById?0:1)
{
	self.location = 'old.html';
}
var wnd;
var wndName;
var wndURL;
var tim;

var ns = (navigator.appName == 'Netscape');
var ie = (navigator.appName == "Microsoft Internet Explorer");
var bv;
if (ie)
{ var i = navigator.appVersion.indexOf('MSIE') + 5;
	bv = parseInt(navigator.appVersion.substr(i,1));
}
else
{ bv = parseInt(navigator.appVersion);
}
var sv = 'http://www.symposia.org.uk/';
var ss = 'https://www.prossl.com/symposiassl/';
if (location.href.indexOf('localhost')>0)  // test
{ sv = 'http://localhost/symposia/symposia/';
	ss = 'http://localhost/symposia/symposiassl/';
}
var np = 17;
pg = new Array(np);
pg[0] = new Array(sv+'about.html','0','','');
pg[1] = new Array(ss+'events.asp','0','','');
pg[2] = new Array(ss+'progform.asp','0','','');
pg[3] = new Array(ss+'regform.asp','0','','');
pg[4] = new Array(sv+'payment.html','0','','');
pg[5] = new Array('where','0','10','15');
pg[6] = new Array(ss+'accom.asp','0','','');
pg[7] = new Array(sv+'links.html','0','','');
pg[8] = new Array(sv+'contact.html','0','','');
pg[9] = new Array(ss+'pbform.asp','0','','');
pg[10] = new Array(sv+'venue-hcc.html','1','','');
pg[11] = new Array(sv+'venue-icsk.html','1','','');
pg[12] = new Array(sv+'venue-nhli.html','1','','');
pg[13] = new Array(sv+'venue-rgc.html','1','','');
pg[14] = new Array(sv+'venue-rcp.html','1','','');
pg[15] = new Array(sv+'venue-tl.html','1','','');
pg[16] = new Array(null,'1','','');

//pg[16] = new Array(sv+'venue-ccc.html','1','','');
//pg[17] = new Array(sv+'venue-1gg.html','1','','');
//pg[18] = new Array(sv+'venue-riba.html','1','','');
//pg[19] = new Array(sv+'venue-rsm.html','1','','');
var ncl;

function emlk(n, d, s)
{
	var a = n+'@'+d;
	var t = s==null?a:s;
	document.write('<a href="mailto:'+a+'">'+t+'</a>');
}

function setNav()
{
	var i;
	var id;
	var x = 0;
	for (i=0; i<np; i++)
	{ id = 'nav'+i;
		if (pg[i][1]==0)
		{ if (thisPage(location.href,pg[i][0]))
			{ document.getElementById(id).className = 'nava';
			}
			else
			{	document.getElementById(id).className = 'navn'
			}
			document.getElementById(id).style.left = x+'px';
			x += 88;
		}
	}
}

function thisPage(locn, menu)
{
	var i;
	if (locn.indexOf(menu)>-1) return true;
	i = menu.indexOf('form.asp');
	if (i>-1 && locn.indexOf(menu.substr(0,i)+'proc.asp')>-1) return true;
	return false;
}

function plusNav(el)
{
	var i;
	var j = el.id.substr(3);
	var id;
	var x;
	var y = 64;
	for (i=pg[j][2]; i<=pg[j][3]; i++)
	{ id = 'nav'+i;
		if (document.getElementById(id).className == 'navh')
		{ document.getElementById(id).className = 'navd';
			x = parseInt(document.getElementById(el.id).style.left) + 10;
			document.getElementById(id).style.left = x+'px';
			document.getElementById(id).style.top = y+'px';
			y += 16;
		}
		else
		{ document.getElementById(id).className = 'navh';
		}
	}
}

function closeSub(n)
{
	plusNav(document.getElementById('nav'+n));
}

function moverNav(el)
{
	ncl = el.className;
	el.className += 'h';
	el.style.cursor = 'pointer';
}
 
function moutNav(el)
{
	el.style.cursor = 'auto';
	if (el.className!='navh')
	{ el.className = ncl;
	}
}

function goPage(n)
{
	if (pg[n][0].indexOf('reg') > -1)
	{ regWnd('def');
	} 
	else
	{ self.location = pg[n][0];
	}
}

function regWnd(ref)
{
	var url = pg[3][0];
  var props = 'dependent=no,width=680,height=600,titlebar=yes,status=yes,menubar=no,toolbar=yes,directories=no,scrollbars=yes,location=no,resizable=yes';
	url += '?ref='+ref;
  wnd = window.open(url, 'reg', props);
	wndName = 'reg';
	wndURL = url;
	tim = setTimeout('chkWnd()', 2000);
	return false;
}

function pbWnd(ref)
{
	var url = pg[9][0];
  var props = 'dependent=no,width=680,height=600,titlebar=yes,status=yes,menubar=no,toolbar=yes,directories=no,scrollbars=yes,location=no,resizable=yes';
	url += '?ref='+ref;
  wnd = window.open(url, 'reg', props);
	wndName = 'reg';
	wndURL = url;
	tim = setTimeout('chkWnd()', 2000);
	return false;
}

function chkWnd()
{
	var typ;
	if (wnd.closed)
	{	typ = (wndName=='map')?'map':'form';
		alert('Unable to open a new window, possibly due to a popup blocker.  The '+typ+' you have requested will open in the main window.');
		self.location = wndURL;
	}  
}

function fav()
{
	var url = 'http://www.symposia.org.uk';
	var title = 'The Symposium Office, Imperial College London';
	if (ie && bv >= 4)
	{ window.external.AddFavorite(url,title);
	}
	if (ns)
	{ alert('Netscape/Firefox users can bookmark this site using (CTRL-D).');
	}
}
function splash(on)
{
	if (on==true)
	{ document.getElementById('splash').style.visibility = 'visible';
	}
}

function hideSplash()
{
	document.getElementById('splash').style.visibility = 'hidden';
}

function closeWnd()
{
	self.close();
}

function goNn()
{
	self.location = ss+'neonatal/login.asp';
}
