appDefault ) { go2index(); } if ( tipo == "produto" ) { abrirProduto(undefined,hash[1]); } else if ( tipo == "pedido" ) { abrirPedido(undefined); } else if ( tipo == "afinidade" ) { carregarAfinidade(undefined,hash[1]); } else if ( tipo == "marca" ) { carregarMarca(undefined,hash[1]); } else if ( tipo == "situacao" ) { abrirSituacao(undefined,hash[1]); } else if ( tipo == "buscar" ) { document.getElementById("palavra_chave").value = hash[1]; document.getElementById("onde_procurar").value = hash[2]; document.getElementById("marca").value = hash[3]; buscar(undefined); } } var isIe = (navigator.userAgent.toLowerCase().indexOf("msie") > -1) ? true : false; function $(id) { return document.getElementById(id); } function makeHistory(newHash) { if(isIe === true) { cont++; $("control-iframe").setAttribute("src", "control.htm?id=" + newHash); } else if(newHash != appIndex) { //adicionado para controlar pagina inicial cont++; window.location.hash = newHash; } else go2index(); } function handleHistory() { var browserHash = (hash = window.location.href.split("#")[1]) ? hash : ""; if(browserHash != appHash) { if(browserHash != "") { appFunction(browserHash); appHash = browserHash; makeHistory(browserHash); } else { clearInterval(checkInterval); window.location.hash = appHash; makeHistory(appIndex); } } } function createIFrame() { var iFrame = document.createElement("iframe"); var browserHash = (hash = window.location.href.split("#")[1]) ? hash : ""; if ( browserHash == "" ) { iFrame.setAttribute("src", "control.htm?id=1"); } else { iFrame.setAttribute("src", "control.htm?id="+browserHash); } iFrame.setAttribute("id", "control-iframe"); iFrame.style.display = "none"; document.getElementsByTagName('body')[0].appendChild(iFrame); // document.body.appendChild(iFrame); // document.getElementById('bodyid').appendChild(iFrame); } function initialize() { if(isIe === true) createIFrame(); checkBookmark(); checkInterval = setInterval(handleHistory, 100); } function checkBookmark() { var browserHash = (hash = window.location.href.split("#")[1]) ? hash : ""; window.location.hash = (browserHash == "") ? appDefault : browserHash; } function go2index() { window.location = window.location.href.split("#")[0] + "#"; //window.location = window.location.href.split("#")[0]; window.location.reload(); } //document.onload = initialize();
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sobre a empresa |
|
Pague com: | ||||||||
![]() |
||||||||||
A Empresa |
Parcerias: | |||||||||
Redes de Lojas |
|
|||||||||
Fale conosco |
|
|||||||||
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|||