var showFrame = false; var iniHash = ""; var recentHash = ""; var jumpHash = 0; var display = ""; var content = ""; var module = ""; var view = ""; var eaction = ""; var reqVars = ""; var template = ""; var container = ""; var reqVars = ""; if (!document.location.hash) { iniHash = "display=default&container=content&module=jpf_portfolio&view=list&target=historyUrl&X-Mapping-nojneamh=08218C0E2126F84A817062AC23B54E88&id_portfolio=10"; document.location.hash = iniHash; jumpHash = 1; } else { if (document.location.hash!='#display=default&container=content&module=jpf_portfolio&view=list&target=historyUrl&X-Mapping-nojneamh=08218C0E2126F84A817062AC23B54E88&id_portfolio=10') { iniHash = document.location.hash; jumpHash = 0; } else { jumpHash = 1; } } window.onload = function() { if (!showFrame) { setInterval(initialiseStateFromURL, 100); } } function initialiseStateFromURL() { if (jumpHash == 1) { recentHash = document.location.hash; jumpHash = 0; } if (document.location.hash==recentHash) { return; }else{ recentHash = document.location.hash; execHash(recentHash); } } function changeHash(newhash) { if (newhash!=document.location.hash){ document.location.hash = newhash ; } } function redirectIFRAME(url) { if (showFrame) { iie.location.href = url ; } } function LoadFrame() { if (showFrame) { frameURL = iniHash; if (frameURL.match("display")) { frameURL = frameURL.replace("#","&"); } else { frameURL = frameURL.replace("#","&rt="); } frameURL = "bin.php?target=historyUrlIe" + frameURL; document.write(""); } } function requestVars(exthash) { var part= exthash.split("&"); if (part.length>1) { for ( i=0;i<=(part.length - 1);i++) { var field= part[i]; field = field.split("="); var key = field[0]; var keyvalue = field[1]; if ( key=="module" || key=="view" || key=="action" || key=="display" || key=="template" || key=="container" || key=="content") { if ( key=="display" ) { display = keyvalue; } if ( key=="module" ) { module = keyvalue; } if ( key=="view" ) { view = keyvalue; } if ( key=="action" ) { eaction = keyvalue; } if ( key=="template" ) { template = keyvalue; } if ( key=="container" ) { container = keyvalue; } if ( key=="content" ) { content = keyvalue; } } else { reqVars = reqVars + key + '=' + keyvalue; if (i<(part.length-1)) { reqVars = reqVars + '&'; } } } } else { field = exthash.split("="); var key = field[0]; var keyvalue = field[1]; display = keyvalue; } } function execHash(dstHash) { dstHash = dstHash.replace("#",""); requestVars(dstHash); if (content) { xajax_assignDContent(display,content,container,reqVars,true); } else if (module) { xajax_execDModule(display,module,view,eaction,container,reqVars,template,true); } else if (display) { xajax_execDisplay(display); } else { xajax_execRoute(dstHash); } display = ""; content = ""; module = ""; view = ""; eaction = ""; reqVars = ""; template = ""; container = ""; reqVars = ""; }