function GetXmlHttpObject (handler) {

	var objXmlHttp = null;
	
	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) {
			alert("Error. Scripting for ActiveX might be disabled");
			return;
		}
		
	}
	
	if (navigator.userAgent.indexOf("Mozilla") >= 0) {
		objXmlHttp = new XMLHttpRequest();
		objXmlHttp.onload = handler;
		objXmlHttp.onerror = handler;
		return objXmlHttp;
	}
	
}


function SubmitSearch (SearchTerm, SearchCalendar, SearchCareers, SearchCIR, SearchDocs, SearchNews, SearchResources, SearchSoftware, SearchTools, SearchDirectories, SearchDiscussion, SearchCategories) {

	var POSTurl = "/search/run.asp";
	var Content = "term=" + encodeURIComponent(SearchTerm);
	
	if (SearchCalendar.checked) { Content = Content + "&calendar=1"; } else { Content = Content + "&calendar=0"; }
	
	if (SearchCareers.checked) { Content = Content + "&careers=1"; } else { Content = Content + "&careers=0"; }
	
	if (SearchCIR.checked) { Content = Content + "&cir=1"; } else { Content = Content + "&cir=0"; }
	
	if (SearchDocs.checked) { Content = Content + "&docs=1"; } else { Content = Content + "&docs=0"; }
	
	if (SearchNews.checked) { Content = Content + "&news=1"; } else { Content = Content + "&news=0"; }
	
	if (SearchResources.checked) { Content = Content + "&resources=1"; } else { Content = Content + "&resources=0"; }
	
	if (SearchSoftware.checked) { Content = Content + "&software=1"; } else { Content = Content + "&software=0"; }
	
	if (SearchTools.checked) { Content = Content + "&tools=1"; } else { Content = Content + "&tools=0"; }
	
	if (SearchDirectories.checked) { Content = Content + "&directories=1"; } else { Content = Content + "&directories=0"; }
	
	if (SearchDiscussion.checked) { Content = Content + "&discussion=1"; } else { Content = Content + "&discussion=0"; }
	
	Content = Content + "&category=" + SearchCategories.value;
	
	xmlHttpSubmitSearch = GetXmlHttpObject(DisplaySearch);
	xmlHttpSubmitSearch.open("POST", POSTurl, true);
	xmlHttpSubmitSearch.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSubmitSearch.send(Content);
	
}


function DisplaySearch () {

	if (xmlHttpSubmitSearch.readyState==4 || xmlHttpSubmitSearch.readyState=="complete") {
		document.getElementById('search-results').innerHTML = xmlHttpSubmitSearch.responseText;
	} else if (xmlHttpSubmitSearch.readyState==1 || xmlHttpSubmitSearch.readyState=="loading") {
		document.getElementById('search-results').innerHTML = "<br /><div align='center' style='font-size: 12px; padding-bottom: 3px;'>Fetching Results</div><div align='center'><img src='/-images/content/utilities/ajax-loader.gif' /></div>";
	}
	
}

function ShowMoreResults(area, page, totalpages) {
	
	ResultPageID = area + '-result-page-' + page;
	NextResultPageID = parseInt(page + 1);
	LastResultPageID = parseInt(totalpages);
	ShowMoreID = 'show-more-' + area;
	
	var ShowMoreButton   = document.getElementById(ShowMoreID);
	var PageLevelDisplay = document.getElementById(ResultPageID);
	
	if (page < LastResultPageID) {
		
		PageLevelDisplay.style.display = "block";
		ShowMoreButton.onclick = function(){
			ShowMoreResults(area, NextResultPageID, LastResultPageID);
		}
		
	} else {
		PageLevelDisplay.style.display = "block";
		ShowMoreButton.style.display = "none";
	}
	
}

function SearchCheckAll(toggleswitch) {
	document.SearchForm.SearchDirectories.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchNews.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchDocs.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchTools.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchResources.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchSoftware.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchDiscussion.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchCareers.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchCalendar.checked = toggleswitch.checked? true:false
	document.SearchForm.SearchCIR.checked = toggleswitch.checked? true:false
	
	SubmitSearch(document.SearchForm.SearchTerm.value, document.SearchForm.SearchCalendar, document.SearchForm.SearchCareers, document.SearchForm.SearchCIR, document.SearchForm.SearchDocs, document.SearchForm.SearchNews, document.SearchForm.SearchResources, document.SearchForm.SearchSoftware, document.SearchForm.SearchTools, document.SearchForm.SearchDirectories, document.SearchForm.SearchDiscussion, document.SearchForm.SearchCategories);
}




function SubmitPollVote (PollID, SelectedAnswer) {

	var POSTurl = "/-build/home/claims-poll-vote.asp?i="  + document.ClaimsPoll.PollID.value + "&a=" + document.ClaimsPoll.SelectedAnswer.value;
	xmlHttpPOLL = GetXmlHttpObject(DisplayPollResults);
	xmlHttpPOLL.open("GET", POSTurl , true);
	xmlHttpPOLL.send(null);
	
}


function DisplayPollResults () {

	if (xmlHttpPOLL.readyState==4 || xmlHttpPOLL.readyState=="complete") {
		document.getElementById('claims-poll').innerHTML = xmlHttpPOLL.responseText;
	} else if (xmlHttpPOLL.readyState==1 || xmlHttpPOLL.readyState=="loading") {
		document.getElementById('claims-poll').innerHTML = "<br /><div align='center' class='article_text'>Fetching Results</div>";
	}
	
}


function SubmitFeedback (FullName, Email, Message) {

	var POSTurl = "/quick/contact/submit.asp";
	var Content = "fullname=" + encodeURIComponent(FullName) + "&email=" + Email + "&Message=" + encodeURIComponent(Message);
	xmlHttpFeedback = GetXmlHttpObject(DisplayFeedback);
	xmlHttpFeedback.open("POST", POSTurl, true);
	xmlHttpFeedback.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpFeedback.send(Content);
	
}


function DisplayFeedback () {

	if (xmlHttpFeedback.readyState==4 || xmlHttpFeedback.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpFeedback.responseText;
	} else if (xmlHttpFeedback.readyState==1 || xmlHttpFeedback.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Submitting Feedback</div>";
	}
	
}


function SubmitSuggestionDocument (Title, URL, Message) {

	var POSTurl = "/quick/suggest/document/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionDocument = GetXmlHttpObject(DisplaySuggestionDocument);
	xmlHttpSuggestionDocument.open("POST", POSTurl, true);
	xmlHttpSuggestionDocument.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionDocument.send(Content);
	
}


function DisplaySuggestionDocument () {

	if (xmlHttpSuggestionDocument.readyState==4 || xmlHttpSuggestionDocument.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionDocument.responseText;
	} else if (xmlHttpSuggestionDocument.readyState==1 || xmlHttpSuggestionDocument.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Document Suggestion</div>";
	}
	
}


function SubmitSuggestionNews (Title, URL, Message) {

	var POSTurl = "/quick/suggest/news/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionNews = GetXmlHttpObject(DisplaySuggestionNews);
	xmlHttpSuggestionNews.open("POST", POSTurl, true);
	xmlHttpSuggestionNews.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionNews.send(Content);
	
}


function DisplaySuggestionNews () {

	if (xmlHttpSuggestionNews.readyState==4 || xmlHttpSuggestionNews.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionNews.responseText;
	} else if (xmlHttpSuggestionNews.readyState==1 || xmlHttpSuggestionNews.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Story Suggestion</div>";
	}
	
}


function SubmitSuggestionTool (Title, URL, Message) {

	var POSTurl = "/quick/suggest/tool/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionTool = GetXmlHttpObject(DisplaySuggestionTool);
	xmlHttpSuggestionTool.open("POST", POSTurl, true);
	xmlHttpSuggestionTool.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionTool.send(Content);
	
}


function DisplaySuggestionTool () {

	if (xmlHttpSuggestionTool.readyState==4 || xmlHttpSuggestionTool.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionTool.responseText;
	} else if (xmlHttpSuggestionTool.readyState==1 || xmlHttpSuggestionTool.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Tool Suggestion</div>";
	}
	
}


function SubmitSuggestionResource (Title, URL, Message) {

	var POSTurl = "/quick/suggest/resource/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionResource = GetXmlHttpObject(DisplaySuggestionResource);
	xmlHttpSuggestionResource.open("POST", POSTurl, true);
	xmlHttpSuggestionResource.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionResource.send(Content);
	
}


function DisplaySuggestionResource () {

	if (xmlHttpSuggestionResource.readyState==4 || xmlHttpSuggestionResource.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionResource.responseText;
	} else if (xmlHttpSuggestionResource.readyState==1 || xmlHttpSuggestionResource.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Resource Suggestion</div>";
	}
	
}


function SubmitSuggestionSoftware (Title, URL, Message) {

	var POSTurl = "/quick/suggest/software/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionSoftware = GetXmlHttpObject(DisplaySuggestionSoftware);
	xmlHttpSuggestionSoftware.open("POST", POSTurl, true);
	xmlHttpSuggestionSoftware.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionSoftware.send(Content);
	
}


function DisplaySuggestionSoftware () {

	if (xmlHttpSuggestionSoftware.readyState==4 || xmlHttpSuggestionSoftware.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionSoftware.responseText;
	} else if (xmlHttpSuggestionSoftware.readyState==1 || xmlHttpSuggestionSoftware.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Software Suggestion</div>";
	}
	
}


function SubmitSuggestionEvent (Title, StartDate, EndDate, ContactName, ContactEmail, ContactPhone, URL, Message) {

	var POSTurl = "/quick/suggest/event/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&StartDate=" + StartDate + "&EndDate=" + EndDate + "&ContactName=" + ContactName + "&ContactEmail=" + ContactEmail + "&ContactPhone=" + ContactPhone + "&URL=" + URL + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionEvent = GetXmlHttpObject(DisplaySuggestionEvent);
	xmlHttpSuggestionEvent.open("POST", POSTurl, true);
	xmlHttpSuggestionEvent.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionEvent.send(Content);
	
}


function DisplaySuggestionEvent () {

	if (xmlHttpSuggestionEvent.readyState==4 || xmlHttpSuggestionEvent.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionEvent.responseText;
	} else if (xmlHttpSuggestionEvent.readyState==1 || xmlHttpSuggestionEvent.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Event Suggestion</div>";
	}
	
}


function SubmitSuggestionCareers (Title, Company, URL, City, State, Message) {

	var POSTurl = "/quick/suggest/careers/submit.asp";
	var Content = "title=" + encodeURIComponent(Title) + "&Company=" + Company + "&URL=" + URL + "&City=" + City + "&State=" + State + "&Message=" + encodeURIComponent(Message);
	xmlHttpSuggestionCareers = GetXmlHttpObject(DisplaySuggestionCareers);
	xmlHttpSuggestionCareers.open("POST", POSTurl, true);
	xmlHttpSuggestionCareers.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpSuggestionCareers.send(Content);
	
}


function DisplaySuggestionCareers () {

	if (xmlHttpSuggestionCareers.readyState==4 || xmlHttpSuggestionCareers.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpSuggestionCareers.responseText;
	} else if (xmlHttpSuggestionCareers.readyState==1 || xmlHttpSuggestionCareers.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<div align='center' class='article_text'>Submitting Job Listing Suggestion</div>";
	}
	
}


function SubmitForward (CurrentURLValue, YourName, YourEmail, FriendName, FriendEmail, Message) {

	var POSTurl = "/quick/forward/submit.asp";
	var Content = "CurrentURLValue=" + encodeURIComponent(CurrentURLValue) + "&yourname=" + YourName + "&youremail=" + YourEmail + "&friendemail=" + FriendEmail + "&friendname=" + FriendName + "&Message=" + encodeURIComponent(Message);
	xmlHttpForward = GetXmlHttpObject(DisplayForward);
	xmlHttpForward.open("POST", POSTurl, true);
	xmlHttpForward.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpForward.send(Content);
	
}


function DisplayForward () {

	if (xmlHttpForward.readyState==4 || xmlHttpForward.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpForward.responseText;
	} else if (xmlHttpForward.readyState==1 || xmlHttpForward.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Sending Page To Your Friend</div>";
	}
	
}


function SubmitBrokenLink (BrokenLink, Email, Message) {

	var POSTurl = "/quick/report-link/submit.asp";
	var Content = "CurrentURLValue=" + encodeURIComponent(BrokenLink) + "&email=" + Email + "&Message=" + encodeURIComponent(Message);
	xmlHttpBrokenLink = GetXmlHttpObject(DisplayBrokenLink);
	xmlHttpBrokenLink.open("POST", POSTurl, true);
	xmlHttpBrokenLink.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpBrokenLink.send(Content);
	
}


function DisplayBrokenLink () {

	if (xmlHttpBrokenLink.readyState==4 || xmlHttpBrokenLink.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpBrokenLink.responseText;
	} else if (xmlHttpBrokenLink.readyState==1 || xmlHttpBrokenLink.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Submitting Broken Link</div>";
	}
	
}


function SubmitEditor (FullName, Email, Message) {

	var POSTurl = "/quick/ask-the-editor/submit.asp";
	var Content = "fullname=" + encodeURIComponent(FullName) + "&email=" + Email + "&message=" + encodeURIComponent(Message);
	xmlHttpEditor = GetXmlHttpObject(DisplayEditor);
	xmlHttpEditor.open("POST", POSTurl, true);
	xmlHttpEditor.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpEditor.send(Content);
	
}


function DisplayEditor () {

	if (xmlHttpEditor.readyState==4 || xmlHttpEditor.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpEditor.responseText;
	} else if (xmlHttpEditor.readyState==1 || xmlHttpEditor.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Submitting Message</div>";
	}
	
}


function SubmitGetListed (FullName, Company, Phone, Email, SecurityCodeID, SecurityCode) {

	var POSTurl = "/quick/get-listed/submit.asp";
	var Content = "fullname=" + encodeURIComponent(FullName) + "&company=" + encodeURIComponent(Company) + "&phone=" + encodeURIComponent(Phone) + "&email=" + Email + "&SecurityCodeID=" + SecurityCodeID + "&SecurityCode=" + SecurityCode;
	xmlHttpGetListed = GetXmlHttpObject(DisplayGetListed);
	xmlHttpGetListed.open("POST", POSTurl, true);
	xmlHttpGetListed.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpGetListed.send(Content);
	
}


function DisplayGetListed () {

	if (xmlHttpGetListed.readyState==4 || xmlHttpGetListed.readyState=="complete") {
		document.getElementById('listed-overlay').innerHTML = xmlHttpGetListed.responseText;
	} else if (xmlHttpFeedback.readyState==1 || xmlHttpFeedback.readyState=="loading") {
		document.getElementById('listed-overlay').innerHTML = "<br /><div align='center' class='article_text'>Submitting Request</div>";
	}
	
}


function SubmitProviderContact (NPCAdNo, FullName, Phone, Fax, Email, Message) {

	var POSTurl = "/directories/contact/submit.asp";
	var Content = "i=" + NPCAdNo + "&fullname=" + encodeURIComponent(FullName) + "&phone=" + Phone + "&fax=" + Fax + "&email=" + Email + "&Message=" + encodeURIComponent(Message);
	xmlHttpProviderContact = GetXmlHttpObject(DisplayProviderContact);
	xmlHttpProviderContact.open("POST", POSTurl, true);
	xmlHttpProviderContact.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpProviderContact.send(Content);
	
}

function DisplayProviderContact () {

	if (xmlHttpProviderContact.readyState==4 || xmlHttpProviderContact.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpProviderContact.responseText;
	} else if (xmlHttpProviderContact.readyState==1 || xmlHttpProviderContact.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Submitting Message</div>";
	}
	
}


function AttemptLogin (Email, Password) {

	document.getElementById('facebox-overlay').innerHTML = "<div style='font-size: 12px; line-height: 18px; padding-bottom: 15px;' align='center'>Attempting Log In</div>";
	var POSTurl = "/quick/login/submit.asp";
	var Content = "email=" + encodeURIComponent(Email) + "&password=" + Password;
	xmlHttpAttemptLogin = GetXmlHttpObject(DisplayAttemptedLogin);
	xmlHttpAttemptLogin.open("POST", POSTurl, true);
	xmlHttpAttemptLogin.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpAttemptLogin.send(Content);
}

function DisplayAttemptedLogin () {

	if (xmlHttpAttemptLogin.readyState==4 || xmlHttpAttemptLogin.readyState=="complete") {
		document.getElementById('facebox-overlay').innerHTML = xmlHttpAttemptLogin.responseText;
	} else if (xmlHttpAttemptLogin.readyState==1 || xmlHttpAttemptLogin.readyState=="loading") {
		document.getElementById('facebox-overlay').innerHTML = "<br /><div align='center'>Attempting Log In</div><div align='center' style='margin-top: 10px; margin-bottom: 10px;'><img src='/-images/content/utilities/ajax-loader.gif'></div>";
	}
	
}

function AttemptDiscussionLogin (Email, Password) {

	var POSTurl = "/quick/login/discussion.asp";
	var Content = "username=" + Email + "&password=" + Password;
	xmlHttpAttemptDiscussionLogin = GetXmlHttpObject(AttemptedDiscussionLogin);
	xmlHttpAttemptDiscussionLogin.open("POST", POSTurl, true);
	xmlHttpAttemptDiscussionLogin.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpAttemptDiscussionLogin.send(Content);
	
	AttemptLogin (Email, Password);
}

function AttemptedDiscussionLogin () {

	if (xmlHttpAttemptDiscussionLogin.readyState==4 || xmlHttpAttemptDiscussionLogin.readyState=="complete") {
		document.getElementById('facebox-overlay').innerHTML = xmlHttpAttemptDiscussionLogin.responseText;
	} else if (xmlHttpAttemptDiscussionLogin.readyState==1 || xmlHttpAttemptDiscussionLogin.readyState=="loading") {
		document.getElementById('facebox-overlay').innerHTML = "<br /><div align='center'>Attempting Log In</div><div align='center' style='margin-top: 10px; margin-bottom: 10px;'><img src='/-images/content/utilities/ajax-loader.gif'></div>";
	}
	
}


function RecoverPassword (Email) {

	var POSTurl = "/quick/recover-password/submit.asp";
	var Content = "email=" + Email
	xmlHttpRecoverPassword = GetXmlHttpObject(DisplayRecoverPassword);
	xmlHttpRecoverPassword.open("POST", POSTurl, true);
	xmlHttpRecoverPassword.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	xmlHttpRecoverPassword.send(Content);
	
}

function DisplayRecoverPassword () {

	if (xmlHttpRecoverPassword.readyState==4 || xmlHttpRecoverPassword.readyState=="complete") {
		document.getElementById('feedback-overlay').innerHTML = xmlHttpRecoverPassword.responseText;
	} else if (xmlHttpRecoverPassword.readyState==1 || xmlHttpRecoverPassword.readyState=="loading") {
		document.getElementById('feedback-overlay').innerHTML = "<br /><div align='center' class='article_text'>Fetching Password</div>";
	}
	
}



function ChangeContent (NewContent) {

	xmlHttpChangeContent = GetXmlHttpObject(DisplayNewContent);
	xmlHttpChangeContent.open("POST", NewContent, true);
	xmlHttpChangeContent.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
	
	xmlHttpChangeContent.send(null);
	
}

function DisplayNewContent () {

	if (xmlHttpChangeContent.readyState==4 || xmlHttpChangeContent.readyState=="complete") {
		document.getElementById('facebox-overlay').innerHTML = xmlHttpChangeContent.responseText;
	} else if (xmlHttpChangeContent.readyState==1 || xmlHttpChangeContent.readyState=="loading") {
		document.getElementById('facebox-overlay').innerHTML = "<br />";
	}
	
}

function DisplayLogout () {

	document.getElementById('nav-account').innerHTML = "<div id='nav-account-dashboard'><a href='/account/'><img src='/-images/masthead/nav-account-dashboard.jpg' /></a></div><div id='nav-account-login'><a href='/quick/logout/'><img src='/-images/masthead/nav-account-logout.jpg' border='0' /></a></div>";
	
}

function HomeCIR() {
	document.location = "/register/?e=" + document.cir.email.value;
}

function clearText(thefield) {
	if (thefield.defaultValue==thefield.value)
	{
		thefield.value = "";
	} else if (thefield.value == "") {
		thefield.value = thefield.defaultValue;
	}
}

function clearSearch(thefield) {
	if (thefield.defaultValue==thefield.value) {
		thefield.value = "";
		thefield.style.color = "#024890";
	}
}

function checkSearch(thefield) {
	if (thefield.defaultValue!=thefield.value) {
		thefield.style.color = "#024890";
	}
}

function SearchHideShow (buttonID, resultsLayer, titleBar, hideShow) {

	if (hideShow == "hide") {
		document.getElementById(buttonID).src = "/-images/content/utilities/search-show.jpg";
		document.getElementById(resultsLayer).style.display = 'none';
		document.getElementById(titleBar).style.marginBottom = '25px';
		document.getElementById(buttonID).onclick = function(){
			SearchHideShow(buttonID, resultsLayer, titleBar, 'show');
		}
	} else if (hideShow == "show") {
		document.getElementById(buttonID).src = "/-images/content/utilities/search-hide.jpg";
		document.getElementById(resultsLayer).style.display = '';
		document.getElementById(titleBar).style.marginBottom = '0px';
		document.getElementById(buttonID).onclick = function(){
			SearchHideShow(buttonID, resultsLayer, titleBar, 'hide');
		}
	}
	
}

