/************************* Find Browser Type and Version - DO NOT CHANGE *************************/
var browserType;
var appVersion;
var isMacintosh = false;
var isWindows = false;

if(navigator.userAgent.indexOf("Opera")>=0) {
	browserType = "Opera";
}

if(navigator.userAgent.indexOf("Mozilla")>=0) {
	browserType = "Mozilla";
}

if(navigator.userAgent.indexOf("MSIE")>=0) {
	browserType = "Internet Explorer";
		if(navigator.appVersion.indexOf("MSIE 5.5")>=0) {
			appVersion = "Internet Explorer 5.5";
		}
}

if(navigator.userAgent.indexOf("Mac")>=0) {
	isMacintosh = true;
}

if(navigator.userAgent.indexOf("Windows")>=0) {
	isWindows = true;
}
/************************* Find Browser Type and Version - DO NOT CHANGE *************************/


/************************* GetXmlHttpObject - DO NOT CHANGE *************************/
var xmlHttp;

function GetXmlHttpObject(handler) {
	var objXmlHttp = null;
	
	if(navigator.userAgent.indexOf("Opera")>=0) {
		document.location.href = './opera.html';
		return;
	}
	
	else if(navigator.userAgent.indexOf("MSIE")>=0) {
		var strName = "Msxml2.XMLHTTP";
		
		if(navigator.appVersion.indexOf("MSIE 5.5")>=0) {
			strName = "Microsoft.XMLHTTP";
		}
		
		try {
			objXmlHttp = new ActiveXObject(strName);
			objXmlHttp.onreadystatechange = handler;
			return objXmlHttp;
		} catch (e) {
			if(isWindows) {
				document.location.href = './activex.html';
			} else if(isMacintosh) {
				document.location.href = './ieonmac.html';
			}
			return;
		}
	}
	
	else if(navigator.userAgent.indexOf("Mozilla")>=0) {
		objXmlHttp = new XMLHttpRequest();
		objXmlHttp.onload = handler;
		return objXmlHttp;
	}
}
/************************* GetXmlHttpObject - DO NOT CHANGE *************************/


/************************* Detect browser and set stylesheet *************************/
if(browserType=="Mozilla") {
	if(isWindows) {
		document.write('<link id="style" rel="stylesheet" type="text/css" href="./styles/oibc_moz_win.css">');
	} else if(isMacintosh) {
		document.write('<link id="style" rel="stylesheet" type="text/css" href="./styles/oibc_moz_mac.css">');
	}
} else if(browserType=="Internet Explorer") {
	if(isWindows) {
		document.write('<link id="style" rel="stylesheet" type="text/css" href="./styles/oibc_ie_win.css">');
	} else if(isMacintosh) {
		document.write('<link id="style" rel="stylesheet" type="text/css" href="./styles/oibc_ie_win.css">');
		document.location.href = './ieonmac.html';		
	}
}
/************************* Detect browser and set stylesheet *************************/


/************************* IE hack for setting minimum width *************************/
function ieMinWidthHack() {
	if(browserType!="Internet Explorer") return;
	pageWidth = document.body.offsetWidth;
	//document.getElementById("pageContent").innerHTML = pageWidth;
	if(pageWidth < 1016) {
		if(document.getElementById("page").style.width == "") {
			document.getElementById("page").style.width = "921px";
			document.getElementById("banner").style.width = "921px";			
		}
	} else {
		if(document.getElementById("page").style.width != "") {
			document.getElementById("page").style.width = "";
			document.getElementById("banner").style.width = "";
		}
	}
}
/************************* IE hack for setting minimum width *************************/


/************************* Load XML Menu *************************/
function loadXMLMenu() {
	xmlHttp = GetXmlHttpObject(XMLMenuLoaded);
	url = "./xml/menu.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);	
}

function XMLMenuLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		menuitem = xmlHttp.responseXML.getElementsByTagName("menuitem");
		menuStr = "";
		
		for(i=0; i<menuitem.length; i++) {
			menuStr += "<div class='menu'>";
			menuStr += "<a href='javascript:loadPage(\"" + menuitem[i].firstChild.nodeValue + "\");\' class='menuitem'>"; 
			menuStr += menuitem[i].firstChild.nodeValue;
			menuStr += "</a></div>";
		}
		
		document.getElementById("pagemenu").innerHTML = menuStr;
		ieMinWidthHack();
		loadPage("Home");
		//loadPage("Timetable");
	}
}
/************************* Load XML Menu *************************/


/************************* Load Pages *************************/
var contentStr = "";

function loadPage(pageName) {
	switch(pageName) {
		case "Home": loadHomeContent();
		break;
		case "Invited Speakers": loadInvitedSpeakersContent();
		break;
		case "Commitee Members": loadCommiteeMembersContent();
		break;
		case "Timetable": loadTimetableContent1();
		break;
		case "Call for Abstracts": loadCallforAbstractsContent();
		break;
		case "Registration": document.location.href = "./registration.html";
		break;
		case "Accommodation": loadAccommodationContent();
		break;
		case "Sponsorship": loadSponsorshipContent();
		break;
		case "Confirmed Sponsors": loadConfirmedSponsorsContent();
		break;
		case "General Information": loadGeneralInformationContent();
		break;
		case "Forms": loadFormsContent();
		break;	
		default:
		break;
	}	
}

function loadActevaFrame() {
	document.getElementById("actevaframe").src = "http://www.acteva.com/go/brainconference";
}
/************************* Load Pages *************************/


/************************* Load General Information Page *************************/
function loadGeneralInformationContent() {
	contentStr  = "<span class='content_heading'>General Information</span><br><br>";
	
	contentStr += "THE FIRST ANNUAL INTERNATIONAL BRAIN CONFERENCE AT UCF";
	contentStr += " will feature a three-day seminar including lectures from renowned";
	contentStr += " professionals on the most current techniques and research findings";
	contentStr += " in neurological related research. Participants, including academicians,";
	contentStr += " physicians (neurologists, family practitioners), nurses and allied health";
	contentStr += " care professionals, will have the opportunity to take full advantage of the";
	contentStr += " formal and informal opportunities to discuss the latest progress made in";
	contentStr += " research on the \"Aging Brain\" and related diseases. Participants will also";
	contentStr += " be able to earn nine Continuing Medical Education credits.<br><br>";
	
	contentStr += "<b>SPECIAL NEEDS</b><br>";
	contentStr += "The International Brain Conference at UCF complies with the legal";
	contentStr += " requirements of the Americans with Disabilities Act and the rules and";
	contentStr += " regulations thereof. Participants with special needs are requested to";
	contentStr += " contact 407-882-1576 for assistance.<br><br>";
	
	/*contentStr += "<b>CONFERENCE HOTEL(S)</b><br>";
	contentStr += "Rooms are available at a discounted rate at the Rosen Centre hotel,";
	contentStr += " 1-800-204-7234. Ask for the International Brain Conference rate";
	contentStr += " ($155 until 12/22).<br><br>";*/
	
	contentStr += "<b>CONFERENCE FEES</b><br>";
	contentStr += "Prices are inclusive of meals from Friday evening through Sunday lunch.<br>";
	contentStr += "Registration (after 1/10, $325): <b>$275</b><br>";
	contentStr += "Discounted registration for hospital residents/";
	contentStr += "health professionals (after 1/10, $225): <b>$175</b><br>";
	contentStr += "Discounted registration for students/guests";
	contentStr += " (after 1/10, $150): <b>$100</b><br>";
	contentStr += "Early registration for general attendees";
	contentStr += " (after 1/10, $325): <b>$275</b><br>";
	contentStr += "<a href='javascript:loadPage(\"Registration\")'>Register online</a>";
	contentStr += " / Questions: <a href='mailto:research104m@mail.ucf.edu'>research104m@mail.ucf.edu</a>";
	contentStr += " / Phone: 407-882-1576<br><br>";
	
	contentStr += "<b>CALL FOR ABSTRACTS</b><br>Deadline for submission of poster presentation";
	contentStr += " abstracts: 1/10.<br><a href='javascript:loadPage(\"Call for Abstracts\")'>";
	contentStr += "Submit online</a> / Questions: <a href='mailto:ksugaya@brainconference.org'>";
	contentStr += "ksugaya@brainconference.org</a> / Phone: 407-823-1524<br><br>";
	
	/*contentStr += "<b>ACCREDITATION</b><br>";
	contentStr += "This activity has been planned and implemented in accordance with the Essential";
	contentStr += " Areas and Policies of the Accreditation Council for Continuing Medical Education";
	contentStr += " through the joint sponsorship of Orlando Regional Healthcare and the University";
	contentStr += " of Central Florida. Orlando Regional Healthcare is accredited by the ACCME to";
	contentStr += " provide continuing medical education for physicians.<br><br>";
	contentStr += "Orlando Regional Healthcare designates this educational activity for a maximum";
	contentStr += " of 9.0 AMA PRA Category 1 Credits. Physicians must claim credit commensurate";
	contentStr += " with the extent of their participation in the activity.<br><br>";
	contentStr += "Orlando Regional Healthcare is an approved provider of continuing nursing";
	contentStr += " education by the Florida Board of Nursing (Provider No. FBN2459) and the North";
	contentStr += " Carolina Nurses Association, an accredited provider, approved by the American";
	contentStr += " Nurses Credentialing Center's Commission on Accreditation (AP 085). This";
	contentStr += " activity has been approved for 9.0 contact hours.<br><br>";
	
	contentStr += "<b>COURSE OBJECTIVES</b><br>";
	contentStr += "At the end of the conference the participant";
	contentStr += "will be able to:<ol>";
	contentStr += "<li>Review normal changes in the aging brain";
	contentStr += "and neuro-pathological changes associated";
	contentStr += "with AlzheimerÕs disease.</li>";
	contentStr += "<li>Discuss new approaches to the evaluation";
	contentStr += "of patients with cognitive decline including";
	contentStr += "functional brain imaging and biological";
	contentStr += "markers.</li>";
	contentStr += "<li>Discuss the approach and evaluation of";
	contentStr += "patients with dementia.</li>";
	contentStr += "<li>Review current and future treatments";
	contentStr += "including progenitor cell therapy for dementia.</li></ol>";*/
	
	contentStr += "<b>DIRECTIONS</b><br>";
	contentStr += "<b>For transportation, a conference discount is available at Golden Touch Limo Service (tel#:321-228-5990)</b><br>";
	contentStr += "<u>From Orlando International Airport to the Rosen College of Management</u><br>";
	contentStr += "<ol>";
	contentStr += "<li>Head south - go 0.3 mi</li>";
	contentStr += "<li>Bear left at Airport Blvd - go 1.7 mi</li>";
	contentStr += "<li>Take the ramp - go 159 ft</li>";
	contentStr += "<li>Take the SR-528-TOLL W exit 1B to International Drive/(I-4)/Florida's Turnpike - go 0.3 mi</li>";
	contentStr += "<li>Merge into SR-528 W - go 8.5 mi</li>";
	contentStr += "<li>Take the Universal Blvd exit 2 to Orangewood Blvd - go 0.4 mi</li>";
	contentStr += "<li>Turn right at Universal Blvd - go 0.3 mi</li>";
	contentStr += "<li>Arrive at 9907 Universal Blvd, Orlando, FL 32819</li>";	
	contentStr += "</ol>";
	
	contentStr += "<u>From Orlando International Airport to the  Rosen Centre Hotel</u><br>";
	contentStr += "<ol>";
	contentStr += "<li>Take the NORTH EXIT as you exit the airport.</li>";
	contentStr += "<li>Take TOLL ROAD 528 WEST.</li>";
	contentStr += "<li>Travel approximately 11 miles to EXIT #1/International Dr/Convention Center/Sea World (first exit on the right).</li>";
	contentStr += "<li>Turn right onto International Drive.</li>";
	contentStr += "<li>Rosen Centre is 1/4 mile on the left. Turn left at the 3rd traffic light which is Hawaiian Ct.</li>";
	contentStr += "</ol>";
	
	contentStr += "<u>From Orlando Executive Airport to the  Rosen Centre Hotel</u><br>";
	contentStr += "<ol>";
	contentStr += "<li>Turn left onto Colonial Dr./SR 50, heading WEST. Stay in the right hand lane for approx. 3 miles.</li>";
	contentStr += "<li>Take I-4 WEST, then I-4 WEST to Exit #72(old 28), Toll Road 528 EAST (can only travel one way off exit ramp).</li>";
	contentStr += "<li>Continue 1/2 Mile to Exit #1/International Dr/Convention Center/Sea World (first exit on the right).</li>";
	contentStr += "<li>Turn right onto International Drive.</li>";
	contentStr += "<li>Rosen Centre is 1/4 mile on the left. Turn left at the 3rd traffic light which is Hawaiian Ct.</li>";
	contentStr += "</ol>";
	
	document.getElementById("pageContent").innerHTML = contentStr;
}
/************************* Load General Information Page *************************/


/************************* Load Confirmed Sponsors Page *************************/
function loadConfirmedSponsorsContent() {
	contentStr  = "<span class='content_heading'>Confirmed Sponsors</span><br>";
	
	contentStr += "<ol>";
	contentStr += "<li><a href='http://www.ucf.edu/' target='_blank'>The University of Central Florida</a></li><br>";
	contentStr += "<li><a href='http://www.alzflorida.org/' target='_blank'>The Alzheimer's Association Central and North Florida Chapter</a></li><br>";
	contentStr += "<li><a href='http://www.flhosp.org/' target='_blank'>Florida Hospital</a></li><br>";
	contentStr += "<li><a href='http://www.orlandoregional.org/ormc/' target='_blank'>Orlando Regional Healthcare</a></li><br>";
	contentStr += "<li><a href='http://www.alzheimerresourcecenter.org/' target='_blank'>Alzheimer Resource Center</a></li><br>";
	contentStr += "<li><a href='http://www.faons.org/' target='_blank'>Federation of Asian-Oceanian Neuroscience Societies</a></li><br>";
	contentStr += "<li><a href='http://www.hospitality.ucf.edu/' target='_blank'>Rosen College of Hospitality Management</a></li><br>";
	contentStr += "<li><a href='http://www.floridahightech.com/' target='_blank'>Florida High Tech Corridor Council</a></li><br>";
	contentStr += "<li><a href='http://www.orangecountyfl.net/cms/default.htm' target='_blank'>Orange County Government</a></li><br>";
	contentStr += "<li><a href='http://www.codman.com/' target='_blank'>Codman</a></li><br>";
	contentStr += "<li><a href='http://www.medtronic.com/' target='_blank'>Medtronic</a></li><br>";
	contentStr += "</ol>";
	
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br>";
		
	document.getElementById("pageContent").innerHTML = contentStr;
}
/************************* Load Confirmed Sponsors Page *************************/


/************************* Load Invited Speakers Page *************************/
function loadInvitedSpeakersContent() {
	xmlHttp = GetXmlHttpObject(XMLInvitedSpeakersContentLoaded);
	url = "./xml/speakers.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLInvitedSpeakersContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		sname = xmlHttp.responseXML.getElementsByTagName("sname");
		stitle = xmlHttp.responseXML.getElementsByTagName("stitle");
		sinstitution = xmlHttp.responseXML.getElementsByTagName("sinstitution");
		
		snameStr = "";
		stitleStr = "";
		sinstitutionStr = "";
		
		contentStr  = "<span class='content_heading'>Invited Speakers</span><br><br>";
		contentStr += "<table class='members'>";
		contentStr += "<tr class='members'><th class='members'>Name and Institution</th><th class='members'>Title</th></tr>";
		
		for(i=0; i<sname.length; i++) {
			snameStr = sname[i].firstChild.nodeValue;
			stitleStr = stitle[i].firstChild.nodeValue;
			sinstitutionStr = sinstitution[i].firstChild.nodeValue;
			
			contentStr += "<tr class='members'>";
			contentStr += "<td class='mname'>" + snameStr + "<br>" + sinstitutionStr + "</td>";
			contentStr += "<td class='memail'>" + stitleStr + "</td>";
			contentStr += "</tr>";
		}
		
		contentStr += "</table>";
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Invited Speakers Page *************************/


/************************* Abstract Submission - Non-Ajax version - Needs update *************************/
function disableEnterKey(e)
{
     var key;

     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          return false;
     else
          return true;
}

function submitAbstract() {
	var validEmailId = false;
	var validFirstName = false;
	var validLastName = false;
	var validInstitution = false;
	var validTitle = false;
	var validAuthors = false;
	var validAbstractText = false;
	var validAbstractTextLength = false;
	
	if(document.getElementById("emailId").value.length > 0) validEmailId = true;
	if(document.getElementById("firstName").value.length > 0) validFirstName = true;
	if(document.getElementById("lastName").value.length > 0) validLastName = true;
	if(document.getElementById("institution").value.length > 0) validInstitution = true;
	if(document.getElementById("title").value.length > 0) validTitle = true;
	if(document.getElementById("authors").value.length > 0) validAuthors = true;
	if(document.getElementById("abstractText").value.length > 0) validAbstractText = true;
	if(document.getElementById("abstractText").value.length < 3000) validAbstractTextLength = true;
	
	if(validEmailId && validFirstName && validLastName && validInstitution && validTitle && validAuthors && validAbstractText && validAbstractTextLength) {
		document.getElementById("abstractText").value = document.getElementById("abstractText").value.split("\n").join("<br>");
		document.getElementById("abstractText").value = document.getElementById("abstractText").value.split("\r").join("<br>");
		document.getElementById("abstractForm").submit();
	} else {
		if(!validEmailId) alert("Please enter a valid Email Id.");
		if(!validFirstName) alert("Please enter a valid First name.");
		if(!validLastName) alert("Please enter a valid Last name.");
		if(!validInstitution) alert("Please enter a valid Institution.");
		if(!validTitle) alert("Please enter a valid Title.");
		if(!validAuthors) alert("Please enter a valid Author(s).");
		if(!validAbstractText) alert("Please enter a valid Abstract.");
		if(!validAbstractTextLength) alert("Please make sure your abstract is lesser than 480 words or 3000 characters");
	}
}
/************************* Abstract Submission - Non-Ajax version - Needs update *************************/


/************************* Load Call for Abstracts Page *************************/
function loadCallforAbstractsContent() {
	xmlHttp = GetXmlHttpObject(XMLCallforAbstractsContentLoaded);
	url = "./xml/abstracts.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLCallforAbstractsContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");

		contentStr  = "<span class='content_heading_1'>Call for Abstracts</span><br>";
		for(i=0; i<paragraph.length; i++) {
			tempContentStr = paragraph[i].firstChild.nodeValue;
			tempContentStr = tempContentStr.split("[").join("<");
			tempContentStr = tempContentStr.split("]").join(">");

			if(tempContentStr.indexOf("<b>")!=-1)
				contentStr += "<br>" + tempContentStr + "<br>";
			else
				contentStr += "<blockquote>" + tempContentStr + "</blockquote>";
		}
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Call for Abstracts Page *************************/


/************************* Load Call for Abstracts Page *************************/
function loadAbstractSubmissionPage() {

	window.open("./abstract_submission.html", "Abstracts", "height=734, width=1044, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no");

	/*contentStr  = "<span class='content_heading_1'>Abstract Submission Page</span><br><br>";
	
	contentStr += "<b>PLEASE FOLLOW THE INSTRUCTIONS STEP BY STEP</b><br>";
	contentStr += "Do not click on the 'submit' button until you have completed the process and previewed the material. You will not be able to edit your abstract after submission.<br><br>";

	contentStr += "After submission you will receive an \"Abstract Submission Receipt number\" indicating that your abstract has successfully been submitted. You should receive this message as well as an e-mail message at the end of submission. Please do not submit multiple copies of the same abstract.";
	contentStr += "Please see below for instructions regarding corrections and updates to your submitted abstract.<br><br>";

	contentStr += "Please note: All fields marked  (*) are mandatory.<br><br>";

	contentStr += "<b>Section 1: Presenting Author's Contact Details</b><br>";
	contentStr += "Please ensure that the e-mail address is entered correctly to enable us to correspond with you regarding your abstract. Information regarding acceptance, and scheduling will be e-mailed to the e-mail address listed on the abstract submission form.<br><br>";
	
	contentStr += "Last name / Family name / Surname: (*)<br><input type='text' size='30'><br><br>";
	contentStr += "First name / Given name: (*)<br><input type='text' size='30'><br><br>";
	
	contentStr += "<select name='title'>";
	contentStr += "<option value=''>Please select:</option>";
	contentStr += "<option value='Prof'>Prof.</option>";
	contentStr += "<option value='Dr.'>Dr.</option>";
	contentStr += "<option value='Mr.'>Mr.</option>";
	contentStr += "<option value='Ms.'>Ms.</option>";
	contentStr += "</select>";

	contentStr += "<br><br>";

	contentStr += "<b>Section 2: Abstract Submission</b><br>";
	contentStr += "<textarea></textarea>";

	document.getElementById("pageContent").innerHTML = contentStr;*/
}
/************************* Load Call for Abstracts Page *************************/


/************************* Load Home Page *************************/
function loadHomeContent() {
	xmlHttp = GetXmlHttpObject(XMLHomeLoaded);
	url = "./xml/welcome.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLHomeLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");
		contentStr = "";
		
		for(i=0; i<paragraph.length-1; i++) {
			contentStr += paragraph[i].firstChild.nodeValue;
			contentStr += "<br><br>";
		}
		
		newline = xmlHttp.responseXML.getElementsByTagName("newline");
		
		for(i=0; i<newline.length; i++) {
			contentStr += newline[i].firstChild.nodeValue;
			contentStr += "<br>";
		}
		
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Home Page *************************/


/************************* Load Sponsorship Page *************************/
function loadSponsorshipContent() {
	xmlHttp = GetXmlHttpObject(XMLSponsorshipContentLoaded);
	url = "./xml/sponsorship.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLSponsorshipContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");
		
		contentStr  = "<span class='content_heading'>Sponsorship</span><br><br>";
		contentStr += "&nbsp;<a href='javascript:loadSponsorshipContent();' class='timetableLink1'>Sponsorship</a> ";
		contentStr += "&nbsp;<a href='javascript:loadPlatinumLevelContent();' class='timetableLink'>Platinum Level</a> "
		contentStr += "&nbsp;<a href='javascript:loadPatronLevelContent();' class='timetableLink'>Patron Level</a> ";
		contentStr += "&nbsp;<a href='javascript:loadSustainingLevelContent();' class='timetableLink'>Sustaining Level</a> ";
		contentStr += "<table class='sponsorship'>";
		contentStr += "<tr><td class='sponsorship'>";
				
		for(i=0; i<paragraph.length; i++) {
			contentStr += paragraph[i].firstChild.nodeValue;
			contentStr += "<br><br>";
		}
		
		//contentStr += "<br><br><br><br><br><br><br>";
		contentStr += "</td></tr></table>";
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}

function loadPlatinumLevelContent() {
	xmlHttp = GetXmlHttpObject(XMLPlatinumLevelContentLoaded);
	url = "./xml/platinum.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLPlatinumLevelContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");
		
		contentStr  = "<span class='content_heading'>Sponsorship</span><br><br>";
		contentStr += "&nbsp;<a href='javascript:loadSponsorshipContent();' class='timetableLink'>Sponsorship</a> ";
		contentStr += "&nbsp;<a href='javascript:loadPlatinumLevelContent();' class='timetableLink1'>Platinum Level</a> "
		contentStr += "&nbsp;<a href='javascript:loadPatronLevelContent();' class='timetableLink'>Patron Level</a> ";
		contentStr += "&nbsp;<a href='javascript:loadSustainingLevelContent();' class='timetableLink'>Sustaining Level</a> ";
		contentStr += "<table class='sponsorship'>";
		contentStr += "<tr><td class='sponsorship'>";
		
		contentStr += "<span class='content_heading_1'>PLATINUM LEVEL - $20,000</span><br><br>";
		contentStr += "<b>Sponsor Benefits:</b>";
		contentStr += "<ul>";
		for(i=0; i<paragraph.length; i++) {
			contentStr += "<li>";
			contentStr += paragraph[i].firstChild.nodeValue;
			contentStr += "</li><br>";
		}
		contentStr += "</ul>";
		
		//contentStr += "<br>";
		contentStr += "</td></tr></table>";
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}

function loadPatronLevelContent() {
	xmlHttp = GetXmlHttpObject(XMLPatronLevelContentLoaded);
	url = "./xml/patron.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLPatronLevelContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");
		
		contentStr  = "<span class='content_heading'>Sponsorship</span><br><br>";
		contentStr += "&nbsp;<a href='javascript:loadSponsorshipContent();' class='timetableLink'>Sponsorship</a> ";
		contentStr += "&nbsp;<a href='javascript:loadPlatinumLevelContent();' class='timetableLink'>Platinum Level</a> "
		contentStr += "&nbsp;<a href='javascript:loadPatronLevelContent();' class='timetableLink1'>Patron Level</a> ";
		contentStr += "&nbsp;<a href='javascript:loadSustainingLevelContent();' class='timetableLink'>Sustaining Level</a> ";
		contentStr += "<table class='sponsorship'>";
		contentStr += "<tr><td class='sponsorship'>";
		
		contentStr += "<span class='content_heading_1'>PATRON LEVEL - $12,000</span><br><br>";
		contentStr += "<b>Sponsor Benefits:</b>";
		contentStr += "<ul>";
		for(i=0; i<paragraph.length; i++) {
			contentStr += "<li>";
			contentStr += paragraph[i].firstChild.nodeValue;
			contentStr += "</li><br>";
		}
		contentStr += "</ul>";
		
		//contentStr += "<br><br><br><br>";
		contentStr += "</td></tr></table>";
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}

function loadSustainingLevelContent() {
	xmlHttp = GetXmlHttpObject(XMLSustainingLevelContentLoaded);
	url = "./xml/sustaining.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLSustainingLevelContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		paragraph = xmlHttp.responseXML.getElementsByTagName("paragraph");
		
		contentStr  = "<span class='content_heading'>Sponsorship</span><br><br>";
		contentStr += "&nbsp;<a href='javascript:loadSponsorshipContent();' class='timetableLink'>Sponsorship</a> ";
		contentStr += "&nbsp;<a href='javascript:loadPlatinumLevelContent();' class='timetableLink'>Platinum Level</a> "
		contentStr += "&nbsp;<a href='javascript:loadPatronLevelContent();' class='timetableLink'>Patron Level</a> ";
		contentStr += "&nbsp;<a href='javascript:loadSustainingLevelContent();' class='timetableLink1'>Sustaining Level</a> ";
		contentStr += "<table class='sponsorship'>";
		contentStr += "<tr><td class='sponsorship'>";
		
		contentStr += "<span class='content_heading_1'>SUSTAINING LEVEL - $6,000</span><br><br>";
		contentStr += "<b>Sponsor Benefits:</b>";
		contentStr += "<ul>";
		for(i=0; i<paragraph.length; i++) {
			contentStr += "<li>";
			contentStr += paragraph[i].firstChild.nodeValue;
			contentStr += "</li><br>";
		}
		contentStr += "</ul>";
		
		//contentStr += "<br><br><br><br><br>";
		contentStr += "</td></tr></table>";
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Sponsorship Page *************************/


/************************* Load Timetable Page 1 *************************/
function loadTimetableContent1() {
	xmlHttp = GetXmlHttpObject(XMLTimetableLoaded1);
	url = "./xml/timetable01.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLTimetableLoaded1() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		otime = xmlHttp.responseXML.getElementsByTagName("time");
		oevent = xmlHttp.responseXML.getElementsByTagName("event");
		
		contentStr  = "<span class='content_heading'>Timetable</span><br><br>";
		
		contentStr += "&nbsp;<a href='javascript:void(0);' class='timetableLink1'>01/19/2007</a> ";
		contentStr += "&nbsp;<a href='javascript:loadTimetableContent2();' class='timetableLink'>01/20/2007</a> "
		contentStr += "&nbsp;<a href='javascript:loadTimetableContent3();' class='timetableLink'>01/21/2007</a> ";
		contentStr += "<table class='timetable'>";

		otimeStr = "";
		oeventStr = "";
		
		for(i=0; i<otime.length; i++) {
			otimeStr  = otime[i].firstChild.nodeValue;
			oeventStr = oevent[i].firstChild.nodeValue;
			if(oeventStr.indexOf("spkr")>=0)
				oeventStr = "<b>" + oeventStr + "</b>";
				//oeventStr = "<a href='javascript:loadPage(\"Invited Speakers\");'>" + oeventStr + "</a>";
			contentStr += "<tr><td class='otime'>";
			contentStr += otimeStr;
			contentStr += "</td>"
			contentStr += "<td class='oevent'>";
			contentStr += oeventStr.indexOf("NULL")>=0?"&nbsp;":oeventStr;
			contentStr += "</td></tr>";
		}
		
		contentStr  += "</table>";
		
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Timetable Page 1 *************************/


/************************* Load Timetable Page 2 *************************/
function loadTimetableContent2() {
	xmlHttp = GetXmlHttpObject(XMLTimetableLoaded2);
	url = "./xml/timetable02.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLTimetableLoaded2() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		otime = xmlHttp.responseXML.getElementsByTagName("time");
		oevent = xmlHttp.responseXML.getElementsByTagName("event");
		
		contentStr  = "<span class='content_heading'>Timetable</span><br><br>";
		
		contentStr += "&nbsp;<a href='javascript:loadTimetableContent1();' class='timetableLink'>01/19/2007</a> ";
		contentStr += "&nbsp;<a href='javascript:void();' class='timetableLink1'>01/20/2007</a> "
		contentStr += "&nbsp;<a href='javascript:loadTimetableContent3();' class='timetableLink'>01/21/2007</a> ";
		contentStr += "<table class='timetable'>";
		
		otimeStr = "";
		oeventStr = "";
		
		for(i=0; i<otime.length; i++) {
			otimeStr  = otime[i].firstChild.nodeValue;
			oeventStr = oevent[i].firstChild.nodeValue;		
			if(oeventStr.indexOf("spkr")>=0)
				oeventStr = "<b>" + oeventStr + "</b>";
				//oeventStr = "<a href='javascript:loadPage(\"Invited Speakers\");'>" + oeventStr + "</a>";
			contentStr += "<tr><td class='otime'>";
			contentStr += otimeStr;
			contentStr += "</td>"
			contentStr += "<td class='oevent'>";
			contentStr += oeventStr.indexOf("NULL")>=0?"&nbsp;":oeventStr;
			contentStr += "</td></tr>";
		}
		
		contentStr  += "</table>";
		
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Timetable Page 2 *************************/


/************************* Load Timetable Page 3 *************************/
function loadTimetableContent3() {
	xmlHttp = GetXmlHttpObject(XMLTimetableLoaded3);
	url = "./xml/timetable03.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLTimetableLoaded3() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		otime = xmlHttp.responseXML.getElementsByTagName("time");
		oevent = xmlHttp.responseXML.getElementsByTagName("event");
		
		contentStr  = "<span class='content_heading'>Timetable</span><br><br>";

		contentStr += "&nbsp;<a href='javascript:loadTimetableContent1();' class='timetableLink'>01/19/2007</a> ";
		contentStr += "&nbsp;<a href='javascript:loadTimetableContent2();' class='timetableLink'>01/20/2007</a> "
		contentStr += "&nbsp;<a href='javascript:void();' class='timetableLink1'>01/21/2007</a> ";
		contentStr += "<table class='timetable'>";
		
		otimeStr = "";
		oeventStr = "";
		
		for(i=0; i<otime.length; i++) {
			otimeStr  = otime[i].firstChild.nodeValue;
			oeventStr = oevent[i].firstChild.nodeValue;		
			if(oeventStr.indexOf("spkr")>=0)
				oeventStr = "<b>" + oeventStr + "</b>";
				//oeventStr = "<a href='javascript:loadPage(\"Invited Speakers\");'>" + oeventStr + "</a>";
			contentStr += "<tr><td class='otime'>";
			contentStr += otimeStr;
			contentStr += "</td>"
			contentStr += "<td class='oevent'>";
			contentStr += oeventStr.indexOf("NULL")>=0?"&nbsp;":oeventStr;
			contentStr += "</td></tr>";
		}
		
		contentStr  += "</table>";
		
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Timetable Page 3 *************************/


/************************* Load Accommodation Page *************************/
function loadAccommodationContent() {
	contentStr  = "<span class='content_heading'>Accommodation</span><br>";
	contentStr += "<br>A limited number of rooms are available at the Rosen Centre hotel, please ";
	contentStr += "call 1-800-204-7234 and ask for the International Brain Conference rate of ";
	contentStr += "$155 per night.  Rooms are available until December 22, 2006, until quantity ";
	contentStr += "expires.";
	contentStr += "<br><br><a href='http://www.rosencentre.com/Location/Location.htm' target='_blank'>Visit the Rosen Centre Hotel Website</a>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br>";
		
	document.getElementById("pageContent").innerHTML = contentStr;
}
/************************* Load Accommodation Page *************************/


/************************* Load Forms Page *************************/
function loadFormsContent() {
	contentStr  = "<span class='content_heading'>Forms</span><br>";
	contentStr += "<ul>";
	contentStr += "<li>";
	contentStr += "Letter of Agreement &nbsp; <a href='./forms/Letter_of_Agreement.pdf'>Download PDF</a> &nbsp; <a href='./forms/Letter_of_Agreement.doc'>Download DOC</a>";
	contentStr += "</li>";
	contentStr += "<li>";
	contentStr += "Website Linking Agreement &nbsp; <a href='./forms/Website_Linking_Agreement.pdf'>Download PDF</a> &nbsp; <a href='./forms/Website_Linking_Agreement.doc'>Download DOC</a><br>";
	contentStr += "</li>";
	contentStr += "</ul>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br><br><br><br>";
	contentStr += "<br><br>";
		
	document.getElementById("pageContent").innerHTML = contentStr;
}
/************************* Load Forms Page *************************/


/************************* Load Commitee Members Page *************************/
function loadCommiteeMembersContent() {
	xmlHttp = GetXmlHttpObject(XMLCommiteeMembersContentLoaded);
	url = "./xml/members.xml";
	xmlHttp.open("GET", url, true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	xmlHttp.send(null);
}

function XMLCommiteeMembersContentLoaded() {
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {
		mname = xmlHttp.responseXML.getElementsByTagName("mname");
		maffiliation = xmlHttp.responseXML.getElementsByTagName("maffiliation");
		memail = xmlHttp.responseXML.getElementsByTagName("memail");
		
		mnameStr = "";
		maffiliationStr = "";
		memailStr = "";
		
		contentStr  = "<span class='content_heading'>Commitee Members</span><br><br>";
		contentStr += "<table class='members'>";
		contentStr += "<tr class='members'><th class='members'>Name and Organization</th><th class='members'>Contact</th></tr>";
		
		for(i=0; i<mname.length; i++) {
			mnameStr = mname[i].firstChild.nodeValue;
			maffiliationStr = maffiliation[i].firstChild.nodeValue;
			memailStr = memail[i].firstChild.nodeValue;
			
			contentStr += "<tr class='members'>";
			contentStr += "<td class='mname'>" + mnameStr + "<br>" + maffiliationStr + "</td>";
			contentStr += "<td class='memail'>" + "<a href='mailto:" + memailStr + "'>" + memailStr + "</a>" + "</td>";
			contentStr += "</tr>";
		}
		
		contentStr += "</table>";
				
		document.getElementById("pageContent").innerHTML = contentStr;
	}
}
/************************* Load Commitee Members Page *************************/

