	
	//load the cobranding/client information
	var arrClients = new Array();
	init();
	
	
	var qstring=(location.search);
	qstring=qstring.substring(1);
	var pairs=qstring.split("&");
	var cb="";
	var match="";
	var title="";
	var clientid="530";
	var subclientid="";
	var tmpsubclientid="";
	var fromdate="";
	var todate="";
	var type=""; //live, archived, upcoming (includes live)	
	var firstpage=false;
	for(var i=0;i<pairs.length;++i){
		var pairsplit=pairs[i].split("=")
		if (pairsplit[0]=="cb") cb=pairsplit[1];
		if (pairsplit[0]=="match") match=pairsplit[1];
		if (pairsplit[0]=="title") title=pairsplit[1];
		if (pairsplit[0]=="clientid") clientid=pairsplit[1];
		if (pairsplit[0]=="subclientid") subclientid=pairsplit[1];
		if (pairsplit[0]=="type") type=pairsplit[1];
		if (pairsplit[0]=="fromdate") fromdate=pairsplit[1];
		if (pairsplit[0]=="todate") todate=pairsplit[1];
		if (pairsplit[0]=="firstpage") firstpage=(pairsplit[1]=="true");
	
	}
	tmpsubclientid=subclientid;
	//subclientid=-1 ONLY when changing to "Any" in the dropdown
	//that means that clientid should be forced to be the topmost parent clientid
	
	if (isAggregatorClient(subclientid)){cb="";clientid=subclientid;}
 	else if (subclientid=="-1"){ clientid="530";cb="";}
	
	var currentclient=findByID(clientid);
	/*
	if (firstpage){
		if (subclientid!="" && subclientid!="-1"){
		
			currentclient=findByID(subclientid);
			clientid=currentclient.parentid;
			cb=currentclient.cb;
			
			//if you are already at the top level client, show its branding, 
			//if you are at a second-level client, show the parents' branding
			if (currentclient.parentid!=0){
				var grandparentclient=findByID(currentclient.parentid);
				cb=grandparentclient.cb;
			}	
		}	
		//get cb from querystring
		
	}else 
	*/
	if (subclientid!="" && subclientid!="-1" && !isAggregatorClient(subclientid)){
		currentclient=findByID(subclientid);
		clientid=currentclient.parentid;
		cb=currentclient.cb;
	}
	if (cb=="") cb=currentclient.cb;

	//if (subclientid=="402" || subclientid=="403"){subclientid="";}
	
	var now = new Date();
	var ms = now.getTime();
	var cacheinterval=(Math.round(ms/1000));//the url will be unique for 1 second
 	var dateformat=escape("MMMM dd, yyyy__ hh:mm a z");
	
	if (location.href.indexOf("type=upcoming")>-1) type="upcoming"
	
	//alert(location.protocol)
	var protocol=location.protocol+"//";
	var key = currentclient.key;
	var strEventURL=protocol+eventHost+"/eventManager/includes/sessions.jsp?cutoffmonths=100&clientid="+clientid+"&key="+key+"&goodafterformat="+dateformat+"&cacheinterval="+cacheinterval+"&timezone=America/New_York";
	if (match!="") strEventURL+="&match="+match;
	if (title!="") strEventURL+="&title="+title;
	if (type!="") strEventURL+="&type="+type;
	if (fromdate!="") strEventURL+="&fromdate="+fromdate;
	if (todate!="") strEventURL+="&todate="+todate;

	if (subclientid!="" && !isAggregatorClient(subclientid)) {
		strEventURL+="&subclientid="+subclientid;
	}
	//document.write(strEventURL);
	//location.href=(strEventURL);
	document.write('<script type="text/javascript" language=JavaScript src="'+strEventURL+'"><\/script>');
	
	//called from list.html to write out rows for the events
	function writerow(rownum,session) {
		var strGoodAfter = session.goodafter;
		//var arrGoodAfter = null;
		//if (strGoodAfter.indexOf("2004")!=-1) {
		//	arrGoodAfter = strGoodAfter.split("2004");
		//	arrGoodAfter[0] += "2004"
		//} else if(strGoodAfter.indexOf("2005")!=-1) {
		//	arrGoodAfter = strGoodAfter.split("2005");
		//	arrGoodAfter[0] += "2005"
		//} else if(strGoodAfter.indexOf("2006")!=-1) {
		//	arrGoodAfter = strGoodAfter.split("2006");
		//	arrGoodAfter[0] += "2006"
		//} 
		
		rExp = /__/gi;
		strGoodAfter = strGoodAfter.replace(rExp, "<br>")
		//Constructor Variables
		var classname="bgct";
		var modrownum=rownum % 2;
		classname+="0"+(modrownum+1);
		document.writeln("<tr><td width=20 class='"+classname+"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>");
		//if (arrGoodAfter) document.writeln("<td valign=top width=100 class='"+classname+"'><b>"+arrGoodAfter[0]+"<br>"+arrGoodAfter[1]+"</b><br><IMG SRC='images/clear.gif' WIDTH=100 HEIGHT=1 BORDER=0 ALT=''></td>");
		if (strGoodAfter) document.writeln("<td valign=top width=100 class='"+classname+"'><b>"+strGoodAfter+"</b><br><IMG SRC='images/clear.gif' WIDTH=100 HEIGHT=1 BORDER=0 ALT=''></td>");
		document.writeln("<td width='100%' align='left' class='"+classname+"'>");
		//if (session.sessiondesc!=null && session.sessiondesc!="&nbsp;")
		//	document.writeln("<strong><a href='"+session.sessiondesc+"' target=_blank>");
		//else
		//	document.writeln("<strong><a href='"+session.audienceurl+"' target=_blank>");
		document.writeln(session.eventtitle);
		//document.writeln("</a></strong><br>");
		//document.writeln(session.sponsor+"<br>");
		//document.writeln(getPublicationName(session.clientid));
		document.writeln("<br>Presenter: "+session.speaker);
		if (type=="upcoming") document.writeln("<br><a href='"+session.audienceurl+"' target=_blank>Register Now</a><br><br></td></tr>");
		else if (type=="archived") document.writeln("<br><a href='"+session.audienceurl+"' target=_blank>View On Demand</a><br><br></td></tr>");
	}
	
	//the list of clients (publications) - there is a parent (ANY) and the individual children sub_clients
	function writeclients(selectclientid,reloadpage){
		document.writeln('<select name="subclientid" class="select01" ');
		if (reloadpage) document.writeln('onchange="document.advsearch.submit();"');
		document.writeln('>');
		document.writeln('<option value="-1"');
		if (selectclientid=="'+clientid+'") document.writeln(" SELECTED");
		document.writeln('>Any</option>');
		
		for (var i=1;i<arrClients.length;i++){
			document.writeln('<option value="'+arrClients[i].id+'"');
			if (selectclientid==""+arrClients[i].id) document.writeln(" SELECTED");
			document.writeln('>'+arrClients[i].description+'</option>');			
		}
					
		document.writeln('</select>');
	
	}

	//called from all pages, and used to co-brand
	function writeheader(cb){
		var currentclient=findByCB(cb);
		
		
		document.writeln('<TABLE WIDTH="800" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="66">');
		document.writeln('<TR>');
		document.writeln('	<TD WIDTH="100" HEIGHT="60"><IMG SRC="images/shim.gif" WIDTH=20 HEIGHT=1 BORDER=0 ALT=""><IMG SRC="images/on24_small.gif" BORDER=0 ALT="ON24 Logo"></TD>');
		document.writeln('	<TD ALIGN="RIGHT" VALIGN="MIDDLE" NOWRAP><A HREF="http://www.on24.com" TARGET="_blank"><SPAN CLASS="blacknow"><FONT SIZE="2">ON24, Inc.</FONT></SPAN></A> - <A HREF="http://webcast.on24.com/view/help/ehelp.html" TARGET="_blank"><SPAN CLASS="blacknow"><FONT SIZE="2">Help</FONT></SPAN></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>');
		document.writeln('</TR>');
		document.writeln('<TR>');
		document.writeln('	<TD COLSPAN="2" bgcolor="#000000" align="right"><IMG SRC="images/header_top.gif" ALT="IBM Webcast Logo Bar"></TD>');
		document.writeln('</TR>');
		document.writeln('</TABLE>');
	
		/*document.writeln('<table width="100%"  cellspacing="0" cellpadding="0" align="center" border="0" >');
		document.writeln('	<tr>');
		document.writeln('		<td height="78" align="left" class="top"><img 	src="'+currentclient.leftheader+'" width="314" height="100" alt="" border="0" /></td>');
		document.writeln('		<td height="78" align="right" class="top"><img src="'+currentclient.rightheader+'" width="401" height="100" alt="" border="0" USEMAP="#Map" /></td>');
		document.writeln('	</tr>');
		document.writeln('</table>');
		
		document.writeln('<MAP NAME="Map"> ');
		document.writeln('<AREA SHAPE="RECT" COORDS="120,100,400,60" HREF="'+getHomePage(cb)+'" ALT="Home"> ');
		document.writeln('</MAP>');
		*/
	}
	
	function getHomePage(cb){
		return findByCB(cb).homepage;
	}
	


	//the left navigation shown on all pages
	function writenav(cb){
		var scid='&subclientid='+subclientid;
		if (scid=="&subclientid=-1" || isAggregatorClient(clientid)) scid="";
		document.writeln('&nbsp;&nbsp;<a href="list.html?type=upcoming&cb='+cb+'&clientid='+clientid+scid+'" class="leftnav">Upcoming</a><br><br> ');
		document.writeln('&nbsp;&nbsp;<a href="list.html?type=archived&cb='+cb+'&clientid='+clientid+scid+'" class="leftnav">Archived</a><br><br> ');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.netseminar.com/nss/archive" target="_new" class="leftnav">Events before April 1, \'03</a><br><br>');
		document.writeln('&nbsp;&nbsp;<a href="#" onclick="testYourSystem(); return false;" class="leftnav">System Check</a><br><br>');
		document.writeln('&nbsp;&nbsp;<a href="searchcriteria.html?cb='+cb+'&clientid='+clientid+scid+'" class="leftnav">Advanced Search</a><br><br>');
		document.writeln('<form action="list.html" name="search" method="get">');
		document.writeln('&nbsp;&nbsp;<font color="#000000"><b>SEARCH:&nbsp;</b><br></font><input type="hidden" name=cb value="'+cb+'"><input class="input01" type="text" size="15" name="title" maxlength="35" value="" onkeypress="TrapKeyCode()">&nbsp;<a href="#" onclick="submitClick();return false;" class="leftnav"><b>GO</b></a><br><br>');
		document.writeln('</form>');
		document.writeln('&nbsp;&nbsp;<a href="http://www.ibm.com/chips/support/" class="leftnav" target="_blank">Contact IBM</a><br><br>');
		document.writeln('&nbsp;&nbsp;<a href="http://webcast.on24.com/view/help/ehelp.html" target="_blank" class="leftnav">Technical Support</a><br><br>');

		//document.writeln('&nbsp;&nbsp;<hr align="left" width="90" size="1" noshade><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="https://www-306.ibm.com/chips/techemail/index.html" target="_blank" class="leftnav">IBM Tech Email</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www-306.ibm.com/chips/products/asics/" target="_blank" class="leftnav">IBM Chip Solutions</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www-306.ibm.com/chips/services/foundry/" target="_blank" class="leftnav">IBM Foundry</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www-306.ibm.com/chips/products/powerpc/" target="_blank" class="leftnav">IBM PowerPC</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www-1.ibm.com/technology/index.shtml" target="_blank" class="leftnav">IBM E&amp;TS </a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.ibm.com/privacy" target="_blank" class="leftnav">IBM Privacy</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.ibm.com/legal" target="_blank" class="leftnav">IBM Legal</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.ibm.com/contact" target="_blank" class="leftnav">IBM Contact</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<hr align="left" width="90" size="1" noshade><br><br>');
		//document.writeln('&nbsp;&nbsp;Copyright &copy; 2005 ON24, Inc. All rights reserved.<br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.on24.com/abouton24.html" target="_blank" class="leftnav">About ON24, Inc.</a><br><br>');
		//document.writeln('&nbsp;&nbsp;<a href="http://www.on24.com/contactus.html" target="_blank" class="leftnav">Webcast an Event</a><br><br>');
		
		//document.writeln('<a href="http://www.netseminar.com/nss/showForm?formname=salesfdbck&branding=NSS&clientID=NSS" class="HL03" target="_new">How to host an event</a>');
	}

	function isAggregatorClient(cid){
	 	if (cid=="402" || cid=="403") return true;
	}
	
	function submitClick(){
		document.search.submit();
	}
	
	//the list of clients (publications) - there is a parent (ANY) and the individual children sub_clients
	function getPublicationName(selectclientid){
			var c = findByID(selectclientid);
			if(c != null)
				return findByID(selectclientid).description+"<br>";
			else
				return "&nbsp;<br>";
	}
	
	
	//the list of standard parameters passed to each page
	function writeStandardHeaders(){
		document.writeln('<input type="hidden" name="clientid" value="'+clientid+'">');
		document.writeln('<input type="hidden" name="cb" value="'+cb+'">');
		document.writeln('<input type="hidden" name="type" value="'+type+'">');
	}	
	

	function testYourSystem() {
	
		var params="checkBrowser=true&checkOS=true&checkBandwidth=true&checkCookie=true&checkMP=true";

		window.open("http://webcast.on24.com/utils/test/testYourSystem.html?"+params,"ON24_Test_System","status=no,width=450,height=600,directories=no,location=no,toolbar=no,scrollbars=no,resizable=no");
		return false;
	}	
	
	function TrapKeyCode()
	{
		e=window.event;
		if(e.keyCode==13) submitClick();
	}	
	
	/******************* CLIENT OBJECT ***************************/

	// object constructor
	function objClient(cb,id,parentid,description,homepage,key) {
		var thisURL=location.href;
		var cbrootURL=(thisURL.substring(0,location.href.lastIndexOf("/")));
		
		// define object's properties
		this.cb = cb;
	
		// attach object's methods
		this.id = id;
		this.parentid = parentid;
		this.description = description;
		this.homepage = homepage;
		this.key = key;
		this.leftheader=cbrootURL+"/cb/"+cb+"leftheader.gif";
		this.rightheader=cbrootURL+"/cb/"+cb+"rightheader.gif";
		
		
	}
	
	// define object's methods
	function findByCB(cb) {
		for (var i=0;i<arrClients.length;i++){
			if (cb==arrClients[i].cb) return arrClients[i];
		}
	}
		
	function findByID(id) {
		for (var i=0;i<arrClients.length;i++){
			if (id==arrClients[i].id) return arrClients[i];
		}
		return null;
	}
	
	
	// regarding key; if not aggregator client key if of the parent client else it should be the aggregator's key
	function init() {
			var i=0;
			
			arrClients[i++] = new objClient("ibmstg",530,530,"IBM STG","http://www.ibm.com/", "CA740D38994606397C8B4F39DEFCBC38")
			
	}

	/************************ END OF CLIENT OBJECT ********************/	
	