// JavaScript Document
function ky_abcContentObj ()
{
	var _meGlobal = "";
	var div_ele = null;
}

ky_abcContentObj.prototype.initialize = function (url, div_id)
{
	this.div_id = div_id;
	
	this.content = new ky_loadJSONObj();
	this.content._meGlobal = this._meGlobal+".content";
	
	var strHref = window.location.href;
	if (strHref.indexOf("?")> -1 )
	{
		var strQueryString = strHref.substr(strHref.indexOf("?")+1);
		if (url.indexOf("?")> -1 )
			this.content.url = url+"&"+strQueryString;
		else
			this.content.url = url+"?"+strQueryString;
	}
	else
		this.content.url = url;
	
	this.content.initialize();	
	this.xtimer = setInterval(this._meGlobal+".loadContent()" , 30);
}
ky_abcContentObj.prototype.loadContent = function ()
{
	if (this.content.loadDone) 
		clearInterval(this.xtimer);
	else
		return;
	
	/*if (window.location.href.indexOf('Commission') > -1 && 0 )
	{
		var obj1 = new KY_documentWriter();
		obj1.URL = this.content.JSONData.URL;
		obj1.execute(this.content.JSONData.HTML.htmlEntitiesDecode(), this.div_id);
	}
	*/
this.xtimer = setInterval(this._meGlobal+".loadStaticContent()" , 100);
/*Commented by Rony Saliba on 2009-07-08 because it is filling the div twice
if (document.getElementById(this.div_id))
{
//document.getElementById(this.div_id).innerHTML = this.content.JSONData.HTML.htmlEntitiesDecode();
};		
*/

}
ky_abcContentObj.prototype.loadStaticContent = function ()
{
	if (document.getElementById(this.div_id))
	   var obj = document.getElementById(this.div_id);
	   
	   
	if (obj)
		clearInterval(this.xtimer);
	else
		return;
		
	//alert (obj);
	obj.innerHTML = this.content.JSONData.HTML.htmlEntitiesDecode();	
}
