
//Constructor for a tab object
function tab(imgContainerID, divContainerID, imageOff, imageOn){
	this.imgContainerID = imgContainerID;
	this.divContainerID = divContainerID; 
	this.imageOn = imageOn;
	this.imageOff = imageOff;
}

//Toggles the display of the tabs
function toggleTabs(tab){

	if(tab.divContainerID!=currentTab.divContainerID){
		//hide the current tabs contents
		toggleVisibility(0, currentTab.divContainerID, 'outerContainer');
		//display the new tabs' contents
		toggleVisibility(1, tab.divContainerID, 'outerContainer');	
		//swap the current tabs' img to the off image
		imgSwap(currentTab.imgContainerID, currentTab.imageOff);
		//swap the new tabs' images to the on image
		imgSwap(tab.imgContainerID, tab.imageOn);
		//set the new tab to be the current tab
		currentTab = tab;	
	}
}

/********************
The following functions were copied from docs/common/scripts/utils.js in efforts to clean up that file.
16 July 2003
********************/

function randomImage(){
	var mycontent=new Array()
	mycontent[1]='<td valign=top nowrap background=docs/symposium/bg_woman.jpg>'
	mycontent[2]='<td valign=top nowrap background=docs/symposium/bg_woman_glasses.jpg>'
	mycontent[3]='<td valign=top nowrap background=docs/symposium/bg_man.jpg>'
	
	var ry=Math.floor(Math.random()*mycontent.length)
	if (ry==0)
	ry=1
	document.write(mycontent[ry])
}

//Return user to gartner3 or gartner4 when linking to documentation page.
function linkToDocumentation() {
	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"
	}
	gotoURL = "http://" + trackDomain + "/2_events/symposium/spg4/spg4_documentation.jsp";
	self.location=gotoURL;
	return;
}

//Return user to gartner3 or gartner4 when linking to documentation page.
function linkToDocumentation2() {
	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"
	}
	gotoURL = "http://" + trackDomain + "/pages/story.php.id.2027.s.8.jsp";
	self.location=gotoURL;
	return;
}

//Return user to gartner3 or gartner4 when linking to documentation page.
function linkToDocumentation3() {
	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"
	}
	gotoURL = "http://" + trackDomain + "/pages/story.php.id.2261.s.8.jsp";
	self.location=gotoURL;
	return;
}

//Removes countdown banner for SPG4 after event start date.
function countDown() {
	currentDate= new Date();
	targetDate=new Date(2002,3,29);
	daysLeft=targetDate-currentDate;
	daysLeft=Math.ceil(daysLeft/1000/60/60/24);

	if (daysLeft <= 0) {
		document.write ("<img src=docs/dot.gif border=0 hspace=0 vspace=0 height=1 width=195><br>");
	}
	else {
		document.write ("<table border=0 cellpadding=0 cellspacing=0 width=195>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><img src=docs/dot.gif border=0 hspace=0 vspace=0></td>");
		document.write ("</tr>");
		document.write ("<tr bgcolor=#ECECEC>");
		document.write ("<td valign=top><img src=docs/calendar.gif border=0 hspace=0 vspace=0 width=59 height=47></td>");
		document.write ("<td><span class=countDownNumber>" + daysLeft + "<br></span></td>");
		document.write ("<td><span style=font-family:arial,helvetica;color:#555555;font-size:15px;font-weight:bold;>days until<br>Symposium<br></span></td>");
		document.write ("</tr>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><a href=/news/story.php.id.339.html target=_top><img src=docs/registernow_ani.gif border=0 hspace=0 vspace=0 height=20 width=195></a></td>");
		document.write ("</tr>");
		document.write ("</table>");
	}
}

//Removes countdown banner for SYM12 after event start date.
function countDown2() {
	currentDate= new Date();
	targetDate=new Date(2002,9,6);
	daysLeft=targetDate-currentDate;
	daysLeft=Math.ceil(daysLeft/1000/60/60/24);

	if (daysLeft <= 0) {
		document.write ("<img src=docs/dot.gif border=0 hspace=0 vspace=0 height=1 width=195><br>");
	}
	else {
		document.write ("<table border=0 cellpadding=0 cellspacing=0 width=195>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><img src=docs/symposium/dot.gif border=0 hspace=0 vspace=0></td>");
		document.write ("</tr>");
		document.write ("<tr bgcolor=#ECBD00>");
		document.write ("<td valign=top><img src=docs/symposium/calendar.gif border=0 hspace=0 vspace=0 width=59 height=47></td>");
		document.write ('<td><span style="font-family:arial narrow,verdana,arial,helvetica;color:#000000;font-size:38px;font-weight:bold;">' + daysLeft + '<br></span></td>');
		document.write ("<td><span style=font-family:arial,helvetica;color:#555555;font-size:15px;font-weight:bold;>days until<br>Symposium<br></span></td>");
		document.write ("</tr>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><a href=javascript:sym12CloseReg();><img src=docs/symposium/registernow_sym12_ani.gif border=0 hspace=0 vspace=0 height=20 width=195></a></td>");
		document.write ("</tr>");
		document.write ("</table>");
	}
}

//Removes countdown banner for ESC14 after event start date.
function countDown3() {
	currentDate= new Date();
	targetDate=new Date(2002,10,4);
	daysLeft=targetDate-currentDate;
	daysLeft=Math.ceil(daysLeft/1000/60/60/24);

	if (daysLeft <= 0) {
		document.write ("<img src=docs/dot.gif border=0 hspace=0 vspace=0 height=1 width=195><br>");
	}
	else {
		document.write ("<table border=0 cellpadding=0 cellspacing=0 width=195>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><img src=docs/symposium/dot.gif border=0 hspace=0 vspace=0></td>");
		document.write ("</tr>");
		document.write ("<tr bgcolor=#ECBD00>");
		document.write ("<td valign=top><img src=docs/symposium/calendar.gif border=0 hspace=0 vspace=0 width=59 height=47></td>");
		document.write ('<td><span style="font-family:arial narrow,verdana,arial,helvetica;color:#000000;font-size:38px;font-weight:bold;">' + daysLeft + '<br></span></td>');
		document.write ("<td><span style=font-family:arial,helvetica;color:#555555;font-size:15px;font-weight:bold;>days until<br>Symposium<br></span></td>");
		document.write ("</tr>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><a href=/story.php.id.1327.s.5.html><img src=docs/symposium/registernow_sym12_ani.gif border=0 hspace=0 vspace=0 height=20 width=195></a></td>");
		document.write ("</tr>");
		document.write ("</table>");
	}
}

//Removes countdown banner for PS02 after event start date.
function countDown4() {
	currentDate= new Date();
	targetDate=new Date(2002,10,12);
	daysLeft=targetDate-currentDate;
	daysLeft=Math.ceil(daysLeft/1000/60/60/24);

	if (daysLeft <= 0) {
		document.write ("<img src=docs/dot.gif border=0 hspace=0 vspace=0 height=1 width=195><br>");
	}
	else {
		document.write ("<table border=0 cellpadding=0 cellspacing=0 width=195>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><img src=docs/symposium/dot.gif border=0 hspace=0 vspace=0></td>");
		document.write ("</tr>");
		document.write ("<tr bgcolor=#ECBD00>");
		document.write ("<td valign=top><img src=docs/symposium/calendar.gif border=0 hspace=0 vspace=0 width=59 height=47></td>");
		document.write ('<td><span style="font-family:arial narrow,verdana,arial,helvetica;color:#000000;font-size:38px;font-weight:bold;">' + daysLeft + '<br></span></td>');
		document.write ("<td><span style=font-family:arial,helvetica;color:#555555;font-size:15px;font-weight:bold;>days until<br>Symposium<br></span></td>");
		document.write ("</tr>");
		document.write ("<tr>");
		document.write ("<td bgcolor=#000000 colspan=3><a href=https://www.infosalons.com.au/SymposiumITxpo/Conference.asp target=_new><img src=docs/symposium/registernow_sym12_ani.gif border=0 hspace=0 vspace=0 height=20 width=195></a></td>");
		document.write ("</tr>");
		document.write ("</table>");
	}
}

function sym12CloseReg() {
	window.open('http://symposium.gartner.com/docs/symposium/sym12_regclose.html','sym12_regclose','height=220,width=400,scrollbars=yes,status=no,resizable=no');
}