<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">HistoryManager=function(mngid)
{
	this.id=mngid;
	this.linklist = {};
	this.addEntry=HistoryManager_addEntry;
	this.executeEntry=HistoryManager_executeEntry;
	this.init=HistoryManager_initialize;
	var lastactivelink = YAHOO.util.History.getBookmarkedState(mngid) || "none";
	YAHOO.util.History.register(mngid, lastactivelink, this.executeEntry);
    this.numberItems = 0;

}

HistoryManager_executeEntry=function(state)
{
	// We cannot distinguish between these two situations.
    if (state != null &amp;&amp; state != "none" &amp;&amp; state != window.historymanager.lastloaded) {
		var id = window.historymanager.linklist[state];
 		//if we have an history state, parse it
 		// var pl=getCustomTag(state); 
 		var pl=getCustomTag(id);
    	if (pl!=null) {
    		pl.doPost();
            return true;
    	}
    }
    return false;
}

HistoryManager_addEntry=function(linkid,value)
{
	if (!this.linklist[value]) {
		this.linklist[value] = linkid;
        this.numberItems++;
	}

    if (this.numberItems == 5) {
        var newLinkList = {};
        var iter = 1;
        var self = this;
        jQuery.each(this.linklist, function(index, link)
        {
            if (iter == (self.numberItems)) {
                newLinkList[index] = link;
            }
            iter++;
        });
        this.linklist = newLinkList;
        this.numberItems = 1;
    }
//	YAHOO.util.History.navigate(this.id,value);
}

HistoryManager_initialize=function(field,iframe)
{
// 	Initialize the browser history management library.
	try {
		YAHOO.util.History.initialize(field,iframe);		 
     } 
	catch (e) 
    {
     alert(e);
    }
}</pre></body></html>