// JavaScript Document
function importCss(){
	document.writeln('<style type="text/css">');
	document.writeln('@import url(/css/content.css);');
	document.writeln('</style>');
}

function showContent(strURL, objId) {
	// Include CSS.
	//importCss();
	// XMLHttpRequest.
	var xmlHttpReq = false;
	var self = this;
	//Mozila/Safari
	if (window.XMLHttpRequest){
		self.xmlHttpReq = new XMLHttpRequest();
	}
	//IE
	else if (window.ActiveXObject)
	{
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	//strURL = strURL + '?day=' + (new Date()).getTime();
	self.xmlHttpReq.open('GET', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function(){
		// 1 = connecting
		// 3 = connected
		// 4 = responsed
		if (self.xmlHttpReq.readyState == 4){
			updatepage(objId, self.xmlHttpReq.responseText);
		}
	}
	self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
	qstr = "";	//'qstr1=' + escape(str);	// NOTE: no '?' before querystring.
	return qstr;
}

function updatepage(objId, str) {
	document.getElementById(objId).innerHTML = str;
}

function ajaxLoad()
{
	showContent(ajaxUrl, ajaxEid);
}

function contentLoad()
{
	updateForm(ajaxEid, ajaxUrl);
	//showContent(ajaxUrl, ajaxEid);
}

function updateForm(objId, str) {
	document.getElementById(objId).src = str;
}