if (typeof(GSLCore) != 'undefined') {
	
/**
 * initGSLSitemap
 */
function initGSLSitemap() {
    var oSitemapObj = GSLCore.styleObj('sitemap');    
    GSLCore.createTimeout(GSLAni, 'fadeIn', 500, oSitemapObj);   
    GSLCore.createTimeout('initGSLSitemapRunner', 500);
}

/**
 * GSLSitemapRunnerItem
 */
	GSLSitemapRunnerItemType = {
    init:function() {     
		this.m_oNumber = arguments[0];
        this.m_oItem = arguments[1];
        this.m_oText = this.m_oNumber + '. ' + this.m_oItem.innerHTML;
        this.m_oPos = -20;
    },
    nextAni:function() {
    	if (0 > this.m_oPos) {
    		if (-15 == this.m_oPos) {
    			this.m_oItem.innerHTML = this.m_oText.substr(0, 60);
    			GSLAni.fadeIn(this.m_oItem);
    		}	
    		this.m_oPos += 1;
    		return(true);
    	}
    	if (this.m_oPos < this.m_oText.length) {
    		this.m_oItem.innerHTML = this.m_oText.substr(this.m_oPos, 60);
    		this.m_oPos += 1;
    		return(true);
    	}
    	GSLCss.setVisible(this.m_oItem, false);
    	this.m_oPos = -20;
    	return(false);
    }	
}
GSLSitemapRunnerItem = GSLCore.newClass(GSLSitemapRunnerItemType);

/**
 * initGSLSitemapRunner
 */
function initGSLSitemapRunner() {
    var oSitemapRunnerDiv = GSLCore.styleObj('sitemap_runner');
    if (!GSLCore.isDef(oSitemapRunnerDiv)) {
        return;
    }
    var oSitemapRunners = oSitemapRunnerDiv.getElementsByTagName('a');
    var oRunners = [];
    var oRunner = null;
    for(var oIdx = 0; oIdx < oSitemapRunners.length; oIdx++) {
    	oRunner = new GSLSitemapRunnerItem(oIdx+1, oSitemapRunners[oIdx]); 
    	oRunners[oRunners.length] = oRunner;
    }
    aniGSLSitemapRunner(0, oRunners);
}

function aniGSLSitemapRunner(oIdx, oRunners) {
	if (!oRunners[oIdx].nextAni()) {
		oIdx += 1;
		if(oIdx >= oRunners.length) {
			oIdx = 0;
		}
	}	
	GSLCore.createTimeout('aniGSLSitemapRunner', 150, oIdx, oRunners);
}

}
