if (docsPath == null){
	var docsPath = '';
}

if (document.cookie.indexOf("trackDomain") != -1) {
	var beginTD = document.cookie.indexOf("trackDomain=") + 12;
	var substringTD = document.cookie.substring(beginTD, document.cookie.length);
	var endTD = substringTD.indexOf("gartner.com") + 11;
	var trackDomain = substringTD.substring(0, endTD);
} else {
	var trackDomain = "www.gartner.com"
}

// top nav off
var worldwideoff = new Image();
worldwideoff.src = docsPath + "docs/symposium/2003/nav_worldwide_off.gif"
var whatisoff = new Image();
whatisoff.src = docsPath + "docs/symposium/2003/nav_whatis_off.gif"
var partnersoff = new Image();
partnersoff.src = docsPath + "docs/symposium/2003/nav_partners_off.gif"
var baeoff = new Image();
baeoff.src = docsPath + "docs/symposium/2003/nav_bae_off.gif"
var contactusoff = new Image();
contactusoff.src = docsPath + "docs/symposium/2003/nav_contactus_off.gif"
// my tools off
var emailoff = new Image();
emailoff.src = docsPath + "docs/symposium/2003/mytools_email_off.gif"
var newsletteroff = new Image();
newsletteroff.src = docsPath + "docs/symposium/2003/mytools_newsletter_off.gif"
var brochureoff = new Image();
brochureoff.src = docsPath + "docs/symposium/2003/mytools_brochure_off.gif"
var calendaroff = new Image();
calendaroff.src = docsPath + "docs/symposium/2003/mytools_calendar_off.gif"
var calendar3off = new Image();
calendar3off.src = docsPath + "docs/symposium/2003/mytools_calendar3_off.gif"
var welcomekitoff = new Image();
welcomekitoff.src = docsPath + "docs/symposium/2003/mytools_welcomekit_off.gif"
var documentationoff = new Image();
documentationoff.src = docsPath + "docs/symposium/2003/mytools_documentation_off.gif"
var documentation3off = new Image();
documentation3off.src = docsPath + "docs/symposium/2003/mytools_documentation3_off.gif"
var documentation4off = new Image();
documentation4off.src = docsPath + "docs/symposium/2003/mytools_documentation4_off.gif"
var agendaoff = new Image();
agendaoff.src = docsPath + "docs/symposium/2003/mytools_agenda_off.gif"
// nav off
var programsoff = new Image();
programsoff.src = docsPath + "docs/symposium/2003/nav_programs_off.gif"
var programmesoff = new Image();
programmesoff.src = docsPath + "docs/symposium/2003/nav_programmes_off.gif"
var peopleoff = new Image();
peopleoff.src = docsPath + "docs/symposium/2003/nav_people_off.gif"
var itxpooff = new Image();
itxpooff.src = docsPath + "docs/symposium/2003/nav_itxpo_off.gif"
var traveloff = new Image();
traveloff.src = docsPath + "docs/symposium/2003/nav_travel_off.gif"

// top nav blue
var worldwideblue = new Image();
worldwideblue.src = docsPath + "docs/symposium/2003/nav_worldwide_blue.gif"
var whatisblue = new Image();
whatisblue.src = docsPath + "docs/symposium/2003/nav_whatis_blue.gif"
var partnersblue = new Image();
partnersblue.src = docsPath + "docs/symposium/2003/nav_partners_blue.gif"
var baeblue = new Image();
baeblue.src = docsPath + "docs/symposium/2003/nav_bae_blue.gif"
var contactusblue = new Image();
contactusblue.src = docsPath + "docs/symposium/2003/nav_contactus_blue.gif"
// my tools blue
var emailblue = new Image();
emailblue.src = docsPath + "docs/symposium/2003/mytools_email_blue.gif"
var newsletterblue = new Image();
newsletterblue.src = docsPath + "docs/symposium/2003/mytools_newsletter_blue.gif"
var brochureblue = new Image();
brochureblue.src = docsPath + "docs/symposium/2003/mytools_brochure_blue.gif"
var calendarblue = new Image();
calendarblue.src = docsPath + "docs/symposium/2003/mytools_calendar_blue.gif"
var calendar3blue = new Image();
calendar3blue.src = docsPath + "docs/symposium/2003/mytools_calendar3_blue.gif"
var welcomekitblue = new Image();
welcomekitblue.src = docsPath + "docs/symposium/2003/mytools_welcomekit_blue.gif"
var documentationblue = new Image();
documentationblue.src = docsPath + "docs/symposium/2003/mytools_documentation_blue.gif"
var documentation3blue = new Image();
documentation3blue.src = docsPath + "docs/symposium/2003/mytools_documentation3_blue.gif"
var documentation4blue = new Image();
documentation4blue.src = docsPath + "docs/symposium/2003/mytools_documentation4_blue.gif"
var agendablue = new Image();
agendablue.src = docsPath + "docs/symposium/2003/mytools_agenda_blue.gif"
// nav blue
var programsblue = new Image();
programsblue.src = docsPath + "docs/symposium/2003/nav_programs_blue.gif"
var programmesblue = new Image();
programmesblue.src = docsPath + "docs/symposium/2003/nav_programmes_blue.gif"
var peopleblue = new Image();
peopleblue.src = docsPath + "docs/symposium/2003/nav_people_blue.gif"
var itxpoblue = new Image();
itxpoblue.src = docsPath + "docs/symposium/2003/nav_itxpo_blue.gif"
var travelblue = new Image();
travelblue.src = docsPath + "docs/symposium/2003/nav_travel_blue.gif"

// top nav red
var worldwidered = new Image();
worldwidered.src = docsPath + "docs/symposium/2003/nav_worldwide_red.gif"
var whatisred = new Image();
whatisred.src = docsPath + "docs/symposium/2003/nav_whatis_red.gif"
var partnersred = new Image();
partnersred.src = docsPath + "docs/symposium/2003/nav_partners_red.gif"
var baered = new Image();
baered.src = docsPath + "docs/symposium/2003/nav_bae_red.gif"
var contactusred = new Image();
contactusred.src = docsPath + "docs/symposium/2003/nav_contactus_red.gif"
// my tools red
var emailred = new Image();
emailred.src = docsPath + "docs/symposium/2003/mytools_email_red.gif"
var newsletterred = new Image();
newsletterred.src = docsPath + "docs/symposium/2003/mytools_newsletter_red.gif"
var brochurered = new Image();
brochurered.src = docsPath + "docs/symposium/2003/mytools_brochure_red.gif"
var calendarred = new Image();
calendarred.src = docsPath + "docs/symposium/2003/mytools_calendar_red.gif"
var calendar3red = new Image();
calendar3red.src = docsPath + "docs/symposium/2003/mytools_calendar3_red.gif"
var welcomekitred = new Image();
welcomekitred.src = docsPath + "docs/symposium/2003/mytools_welcomekit_red.gif"
// nav red
var programsred = new Image();
programsred.src = docsPath + "docs/symposium/2003/nav_programs_red.gif"
var programmesred = new Image();
programmesred.src = docsPath + "docs/symposium/2003/nav_programmes_red.gif"
var peoplered = new Image();
peoplered.src = docsPath + "docs/symposium/2003/nav_people_red.gif"
var itxpored = new Image();
itxpored.src = docsPath + "docs/symposium/2003/nav_itxpo_red.gif"
var travelred = new Image();
travelred.src = docsPath + "docs/symposium/2003/nav_travel_red.gif"

// nav grey
var programsgrey = new Image();
programsgrey.src = docsPath + "docs/symposium/2003/nav_programs_grey.gif"
var programmesgrey = new Image();
programmesgrey.src = docsPath + "docs/symposium/2003/nav_programmes_grey.gif"
var peoplegrey = new Image();
peoplegrey.src = docsPath + "docs/symposium/2003/nav_people_grey.gif"
var itxpogrey = new Image();
itxpogrey.src = docsPath + "docs/symposium/2003/nav_itxpo_grey.gif"
var travelgrey = new Image();
travelgrey.src = docsPath + "docs/symposium/2003/nav_travel_grey.gif"

function on(img){
	document[img].src = eval(img+'on').src;
}

function off(img){
	document[img].src = eval(img+'off').src;
}		

function blue(img){
	document[img].src = eval(img+'blue').src;
}

function red(img){
	document[img].src = eval(img+'red').src;
}

function grey(img){
	document[img].src = eval(img+'grey').src;
}

function randomizer(randomArray){
	var rNum=Math.floor(Math.random()*randomArray.length)
	if (rNum==0)
	rNum=1
	document.write(randomArray[rNum])
}

function photoGallery(photoName,photoText){
	document.photoLarge.src = eval('"docs/symposium/2003/' + photoName + '"');
	document.photoForm.photoCaption.value = photoText;
}

function popAB(abUrl){
	var agendaBuilder = window.open(abUrl,'agendaBuilder','height=525,width=797,toolbar=yes,scrollbars=yes,status=yes,resizable=yes');
	if (agendaBuilder){
		agendaBuilder.focus();
		return agendaBuilder;
	}
}

function validateForm(theForm) {
	if (theForm.first_name.value == ""){
		alert("Please enter your first name.");
		theForm.first_name.focus();
		return (false);
	}
	if (theForm.last_name.value ==""){
		alert("Please enter your last name.");
		theForm.last_name.focus();
		return (false);
	}
	if (theForm.company.value ==""){
		alert("Please enter your company.");
		theForm.company.focus();
		return (false);
	}
	if (theForm.country.value ==""){
		alert("Please enter your country.");
		theForm.country.focus();
		return (false);
	}
	if (theForm.email.value ==""){
		alert("Please enter your e-mail address.");
		theForm.email.focus();
		return (false);
	}
	if(validEmail(theForm.email.value) == false){
		alert("Please enter a valid e-mail address.");
		theForm.email.focus();
		return (false);
	}
	if (theForm.cboJobRole.value =="0"){
		alert("Please enter your job role.");
		theForm.cboJobRole.focus();
		return (false);
	}
} 

function validEmail(email) {
	invalidChars = " /:,;";
	for (i=0; i < invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
		if (email.indexOf(badChar,0) > -1) {
			return false;
		}
	}
	atPos = email.indexOf("@",1)
	if (atPos == -1) {
		return false;
	  }
	if (email.indexOf("@",atPos+1) > -1) {
		return false;
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {
		return false;
	}
	if (periodPos+3 > email.length) {
		return false;
	}
	return true;
}	