var usingHistory = false; function rebuild_links(url){ var links = $T('A'); links.each( function(link){ if( ( !link.href.match(URL) && !link.href.match(/\.html/) ) || link.href.match('click.php4') ){ throw $continue; } link.href = link.href.replace(url, '#'); } ); } function change_location(url, cur_pos){ if(cur_pos != 4){ if(!frame){ var loc = document.location.href.split('#')[0]; document.location.href = loc + "#" + url + "&" + cur_pos; }else{ var f_src = frame.src.split('?')[0] + '?url=' + url.replace('?', '#') + '&loc=' + cur_pos; frame.src = f_src; } } } var window2 = new Timer(100); var arr = [1, 2, 3, 4]; var count = 0; var frame; var evAnchorChange = { name: 'AnchorChange', previousLocation: document.location.href, getAnchor: function(locationString){ var anch = ''; var locationSplitted = locationString.split("#"); if(locationSplitted.length > 1){ anch = locationSplitted[1]; } return anch; }, func: function(){ var previousAnchor = this.getAnchor(this.previousLocation); var currentAnchor = this.getAnchor(document.location.href); this.previousLocation = document.location.href; if(previousAnchor == currentAnchor){ return false; }else{ return currentAnchor; } } } var lnrAnchorChange = { name: "AnchorChange", func: function(val){ if(usingHistory){ if(val == 'main'){ GetSubmenuContent('', 5); }else{ var values = val.split('&'); GetSubmenuContent(values[0], Number(values[1]) + 1); } usingHistory = true; }else{ usingHistory = true; } } } window2.registerEvent(evAnchorChange); window2.registerEventListener(lnrAnchorChange); if(window.opera){ var _f = function(){return true;} document.onmousemove = document.onkeyup = _f; }