/*
LEGAL NOTICE
The source code, graphics, designs, images, photographs, sounds, animations, scripts, texts, banners,
advertisements, and information and contents included in this website are protected by legislation
on intellectual and industrial property rights and they can not be reproduced and / or publicated of all
or part of the website, or transmitted, distributed, divulged, modified , or treated, or other legally
recognized rights of the owner, without his prior written permission. The user, exclusively, can use
the material appearing on this website for personal and private motivations, and is prohibit the use
for commercial purposes or illegal activities. All rights associated with intellectual property are
expressly reserved by ensure compliance of the above conditions and the proper use of the contents
resented in its website, taking pertinent civil or criminal correspond in the case of infringement
or breach of these rights by the user.
IMPORTANT: We denounce in the courts any plagiarism we detect in our crawls.
(c) WWW.ABACOX.COM (Web Projects Division)
*/
//-------------------------------------------------------------------------
// mainconf.js
// Necesita tener definidas las variables DOMINIO si no que entren como GET
CARGA_GETS();
var ALERTS=false;
// HREF ACTUAL
var FSLH=self.location.href;
// Definimos el texto del tipo "undefined"
var ND="undefined";
// Definimos funciona con DOM? true/false
var NAV_DOM=(document.getElementById && true);
var NAV_DOM=(typeof(NAV_DOM)==ND)?false:NAV_DOM;
// Definimos funciona con document.all? true/false
var NAV_ALL=(document.all && true);
var NAV_ALL=(typeof(NAV_ALL)==ND)?false:NAV_ALL;
// Navegadores OPERA, FIREFOX, NETSCAPE
var NAV=navigator.userAgent.toLowerCase();
var NAV_IE = (NAV.indexOf("msie") != -1);
var NAV_IE5= NAV_IE && !NAV_DOM;
var NAV_IE55= NAV_IE && NAV_DOM;
var NAV_OP = (NAV.indexOf("opera") != -1);
var NAV_FF = (NAV.indexOf("firefox") != -1);
var NAV_NN = (NAV.indexOf("netscape") != -1);
var NAV_SF = (NAV.indexOf("safari") != -1); // y Chrome
var NAV_IE8 = (NAV.indexOf("msie 8") != -1);
// Definimos el salto de linea html
var CRLF="
\n";
var FECHA=""; var HORA="";
var DOMINIO_MAESTRO="itsshops.com";
var LOCAL_FILE=(FSLH.substr(0,7)=="file://")?true:false;
var LOCALROOT="file:///C:/RAFA/_TIENDASREUNIDAS/SITIOS_WEB/ITSSHOPS.COM/www";
var LOCAL_APACHE=FSLH.substr(0,21)=="http://localhost:9080"?true:false;
var APACHEROOT="http://localhost:9080/_TIENDASREUNIDAS/SITIOS_WEB/ITSSHOPS.COM/www";
var SSL =FSLH.substr(0,8)=="https://"?true:false;
var SSLROOT="https://host.losdns.com/"+DOMINIO_MAESTRO;
// hallamos el directorio raiz
if(LOCAL_FILE){
ROOT=LOCALROOT;
if(ALERTS){alert("LOCAL FILE ACCESS");}
} else {
if(LOCAL_APACHE){
ROOT=APACHEROOT;
//if(ALERTS){alert("LOCAL APACHE ACCESS");}
} else {
if(SSL){
ROOT=SSLROOT;
} else {
// Extraemos el dominio de la url
f=FSLH.substr(7); // eliminamos el protocolo "http://"
if (isNaN(f.substr(0,1))){
//if(f.substr(0,4)!="www."){self.location.href="http://www."+f;} // re-saltamos si no tiene el "www" delante
Af=f.split("/");
f2=Af[0]; //localizamos el host (dominio+subdominios)
if(f2.substr(0,4)=="www."){f2=f2.substr(4);} // quitamos el www. del dominio
Af2=f2.split(".");
DOMINIO=Af2.join(".");
// fl=Af2.length; DOMINIO=Af2[fl-2] + "." + Af2[fl-1];
ROOT="http://www."+DOMINIO;
}
}
}
}
if(typeof(DOMINIO)==ND){DOMINIO="itsshops.com";if(ALERTS){alert("Main Domain");}}
if(typeof(ROOT)==ND){ROOT="http://www."+DOMINIO;}
switch(DOMINIO){
case "itsshops.com" || "itsshops.com:80": PREFIJO="shcom";break;
case "itsshops.co.uk" || "itsshops.co.uk:80": PREFIJO="shcuk";break;
case "itsshutters.com" || "itsshutters.com:80": PREFIJO="stcom";break;
case "itsshutters.co.uk" || "itsshutters.co.uk:80": PREFIJO="stcuk";break;
case "itsblinds.com" || "itsblinds.com:80": PREFIJO="blcom";break;
case "itsblinds.co.uk" || "itsblinds.co.uk:80": PREFIJO="blcuk";break;
case "itsawnings.com" || "itsawnings.com:80": PREFIJO="awcom";break;
case "itsawnings.co.uk" || "itsawnings.co.uk:80": PREFIJO="awcuk";break;
default: PREFIJO="error";
}
BASE=ROOT+"/"+PREFIJO;
// hallamos el directorio actual sin el fichero web
THIS_DIR=FSLH.substr(0,FSLH.lastIndexOf("/"));
//------------------------------------------
var JS_DIR="/_javascript2";
var JS_PATH=ROOT+JS_DIR;
//------------------------------------------
var CARRITO_DIR="/_pedidos2";
var CARRITO_FILE="comprar.php";
var CARRITO_WN="W_CARRITO";
//------------------------------------------
var VISOR_DIR=JS_DIR+"/visor";
var VISOR_WN="W_VISOR";
var VISORDOC_WN="W_VISORDOC";
var VISOR_PATH=ROOT+VISOR_DIR;
//------------------------------------------
var VISORDOC_DIR ="/_docum2";
var VISORDOC_PATH=ROOT+VISORDOC_DIR;
//------------------------------------------
var CARGANDO_URI=JS_PATH+"/loading.html";
var GRABANDO_URI=JS_PATH+"/saving.html";
//------------------------------------------
var PHP_DIR="/_php";
var PHP_PATH=ROOT+PHP_DIR;
var ERROR_URI=PHP_PATH+"/jserror.php";
var ERROR_AJAX = getXMLHTTP();
var ERROR_SHOW = false;
window.onerror= ERROR_JS;
//------------------------------------------
var CLICKSW=true; // predeterminadamente estará activo el poder hacer click en la página
document.onclick= new Function("return CLICKSW;"); // si CLICKSW no está activo no permitirá los clicks (nose, el caso es que funciona)
COOKIE_CHECK(); // comprueba si están las cookies habilitadas