var expdate = new Date(); var sTienda; var sSession; var sUsrID; // ------------ COOKIES -------------------------- var expdate = new Date(); expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); FixCookieDate(expdate); // Agrega a mi carrito function AddCarS(iId_prod,cad) { var TipCar; var cadena=cad; if (AddCarS.arguments.length==3){ //alert("AddCarS:"+AddCarS.arguments[1]) TipCar=AddCarS.arguments[2] PopupWinS(iId_prod,cadena,TipCar) } else{ var sCant,sDescr,sSerial,sUMed,iIdUMed, sTienda, sTipCar; sTienda = GetCookie("sa_tienda"); sDescr = ""; sObser=cadena; sUnimed=""; sSerial=""; if (sTienda != "" && sTienda != null) { if (AddCarS.arguments.length>2) sCant=AddCarS.arguments[2]; else { sCant=""; PopupWinS(iId_prod,sObser); return ; } if (AddCarS.arguments.length > 1) sObser = FilterComent(AddCarS.arguments[1]); if (AddCarS.arguments.length > 4) iIdUMed=AddCarS.arguments[4]; if (AddCarS.arguments.length > 5) sUMed=AddCarS.arguments[5]; if (AddCarS.arguments.length > 6) sSerial=AddCarS.arguments[6]; if (AddCarS.arguments.length > 7) sDescr = AddCarS.arguments[7]; sTipCar = AddCarS.arguments[8]; //alert("##"+sTipCar) if (sCant!="" && sCant!="0") { alert("entrando aL ScANT!"); if (!isNaN(sCant)) { SrvClrParms(); sSrvIdProd = iId_prod; sSrvCant = sCant; sUsrID = GetCookie("sa_usrid"); if(sUsrID != "" && sUsrID != null) sSrvUser = sUsrID; sSrvObser = sObser; alert("sSrvObser"+sSrvObser); sSrvDescr = sDescr; sSrvIdUMed = iIdUMed sSrvUmed = sUMed; sSrvSerial = sSerial; sSrvTipCar = sTipCar; sTienda = GetCookie("sa_tienda"); if(sTienda != "" && sTienda != null) sSrvTienda = sTienda; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSession = GetCookie("sa_session"); if(sSession == "" || sSession == null) alert("No se puede agregar al carrito, sesión no valida"); else{ sSrvSession = sSession; if(sSrvSession == null) sSrvSession = ""; sSrvFcode = "upd_car"; SrvSubmit(); setTimeout('RefCarritoWin()',3000); } } } } else { if(sUsrID == null) sUsrID = ""; top.frames['f_top'].window.frames['f_centro3'].location.href ="reg_passwd.asp?usrid=" + sUsrID + "&tienda=" + sTienda; } //fin de Carro especial. } } function AddLisS(iIdProd,cad) { var sCant,sObser,sSerial,sUMed,iIdUMed,sDescr; sObser=cad; sSerial=""; sUMed=""; iIdUMed=""; sDescr="" sUsrID = GetCookie("sa_usrid"); if( sUsrID != "" && sUsrID != null) { if (AddLisS.arguments.length>=3) sCant=AddLisS.arguments[2]; else { sCant=""; PopupWinLS(iIdProd,sObser); return ; } if (AddLisS.arguments.length > 2) sObser=FilterComent(AddLisS.arguments[2]); if (AddLisS.arguments.length > 3) iIdUMed = AddLisS.arguments[3]; if (AddLisS.arguments.length > 4) sUMed = AddLisS.arguments[4]; if (AddLisS.arguments.length > 5) sSerial=AddLisS.arguments[5]; if (AddLisS.arguments.length > 6) sDescr = AddLisS.arguments[6]; if (sCant!="" && sCant!="0") { if (!isNaN(sCant)) { SrvClrParms(); sSrvIdProd = iIdProd; sSrvCant = sCant; sUsrID = GetCookie("sa_usrid"); if(sUsrID != "" && sUsrID != null) sSrvUser = sUsrID; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSrvObser = sObser; sSrvDescr = sDescr; sSrvIdUMed = iIdUMed sSrvUmed = sUMed; sSrvSerial = sSerial; sTienda = GetCookie("sa_tienda"); if(sTienda != "" && sTienda != null) sSrvTienda = sTienda; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSrvFcode = "upd_lista"; ListID = GetCookie("sa_listid"); if(ListID != "" && ListID != null) sSrvListID = ListID; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); SrvSubmit(); if(sSerial.length > 0 || sSerial > 0) alert("El artículo ha sido modificado."); } } } else { alert("Antes de agregar a Mi Lista, por favor identifiquese como usuario."); GotoRegistro(0); } } function PopupWinS(id_prod,cad,TipCar) { TipCar1=typeof(TipCar) sTienda = GetCookie("sa_tienda"); sCadena=cad; if(TipCar1=="undefined"){ window.open('popupCant.asp?tip_car='+TipCar+'&id_prod='+id_prod+'&sCadena='+sCadena+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') }else{ window.open('../popupCant.asp?tip_car=' +TipCar+ '&id_prod='+id_prod+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') } } function PopupWinLS(id_prod,cad) { sCadena=cad; sTienda = GetCookie("sa_tienda"); window.open('popupCantL.asp?id_prod='+id_prod+'&sCadena='+sCadena+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') } function DeleteCookie(name) { var date_exp = new Date(1,1,1); SetCookie(name, "", date_exp); } function GetCookieValueEnd(pStartStr) { var pEndStr = document.cookie.indexOf(";", pStartStr) if( pEndStr == -1 )pEndStr = document.cookie.length; return pEndStr; } function FixCookieDate(date1) { var today = new Date(0); var mseconds = today.getTime(); if( mseconds > 0 ) date1.setTime( date1.getTime()-mseconds); } // name, value, expires, path, domain, secure function SetCookie(name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (2 < argc) ? argv[2] : null; var path = (3 < argc) ? argv[3] : null; var domain = (4 < argc) ? argv[4] : null; var secure = (5 < argc) ? argv[5] : false; var sCookie = name + "=" + escape (value) + ((expires == null) ? "; expires=" + expdate.toGMTString() : ("; expires=" + expires.toGMTString() )) + ((path == null) ? "/" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); document.cookie = sCookie; } function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } // ------------ END COOKIES -------------------------- function GotoRegistro(bInComp) { var sError, sHRef,sSecure, sTime; var sUsrID, sTienda, sSession, sColID; var today = new Date(); var sTime = today.getTime(); sTime = "&t=" + sTime; sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); sColID = GetCookie("sa_colid"); if (GotoRegistro.arguments.length > 1) { sError="&error=" + GotoRegistro.arguments[1]; } else { sError = ""; } if(bInComp==11) { top.frames['f_top'].window.frames['f_centro2'].location = "hom_login.asp"; top.frames['f_top'].window.frames['f_centro3'].location.href = "hombody.asp"; } else { sURL = "reg001.asp?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&colid=" + sColID + sTime; sURL = BuildURL(sURL); top.frames['f_top'].window.frames['f_centro3'].location.href = sURL; } } function PopupSelTienda() { if(navigator.appName.substring(0,1)=='M') window.open ("popup_seltie.html","winPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=410,height=160,left=165,top=180"); else window.open ("popup_seltie.html","winPUP","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=410,height=180,left=165,top=180"); } if(top == self && document.location.pathname.indexOf("popup") < 0 && document.location.pathname.indexOf("dir001") < 0) top.location.href = "default.html"; function GoHome() { bUsrChanging = 0; sURL = BuildURL("hombody.asp"); top.frames['f_top'].window.frames['f_centro3'].document.location=sURL; } function GotoPromociones() { sTienda = GetCookie("sa_tienda"); sURL = "ofertas.asp?idTienda=" + sTienda; top.frames['f_top'].window.frames['f_centro3'].location = sURL; } function AddCar(iId_prod) { var TipCar; if (AddCar.arguments.length==2){ //alert("AddCar:"+AddCar.arguments[1]) TipCar=AddCar.arguments[1] PopupWin(iId_prod,TipCar) }else{ var sCant,sDescr,sObser,sSerial,sUMed,iIdUMed, sTienda, sTipCar; sTienda = GetCookie("sa_tienda"); sDescr = ""; sObser=""; sUnimed=""; sSerial=""; if (sTienda != "" && sTienda != null) { if (AddCar.arguments.length>1) sCant=AddCar.arguments[1]; else { sCant=""; PopupWin(iId_prod); return ; } if (AddCar.arguments.length > 2) sObser = FilterComent(AddCar.arguments[2]); if (AddCar.arguments.length > 3) iIdUMed=AddCar.arguments[3]; if (AddCar.arguments.length > 4) sUMed=AddCar.arguments[4]; if (AddCar.arguments.length > 5) sSerial=AddCar.arguments[5]; if (AddCar.arguments.length > 6) sDescr = AddCar.arguments[6]; sTipCar = AddCar.arguments[7]; //alert("##"+sTipCar) if (sCant!="" && sCant!="0") { if (!isNaN(sCant)) { SrvClrParms(); sSrvIdProd = iId_prod; sSrvCant = sCant; sUsrID = GetCookie("sa_usrid"); if(sUsrID != "" && sUsrID != null) sSrvUser = sUsrID; sSrvObser = sObser; sSrvDescr = sDescr; sSrvIdUMed = iIdUMed sSrvUmed = sUMed; sSrvSerial = sSerial; sSrvTipCar = sTipCar; sTienda = GetCookie("sa_tienda"); if(sTienda != "" && sTienda != null) sSrvTienda = sTienda; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSession = GetCookie("sa_session"); if(sSession == "" || sSession == null) alert("No se puede agregar al carrito, sesión no valida"); else{ sSrvSession = sSession; if(sSrvSession == null) sSrvSession = ""; sSrvFcode = "upd_car"; SrvSubmit(); setTimeout('RefCarritoWin()',3000); } } } } else { if(sUsrID == null || sUsrID == "undefined") sUsrID = ""; sref= "hombody.asp"; top.frames['f_top'].window.frames['f_centro3'].location.href ="reg_passwd.asp?usrid=" + sUsrID + "&tienda=" + sTienda+ "&ref=" + sref; } //fin de Carro especial. } } //Agrega a Mi Lista function AddLis(iIdProd) { var sCant,sObser,sSerial,sUMed,iIdUMed,sDescr; sObser=""; sSerial=""; sUMed=""; iIdUMed=""; sDescr="" sUsrID = GetCookie("sa_usrid"); if( sUsrID != "" && sUsrID != null) { if (AddLis.arguments.length>=2) sCant=AddLis.arguments[1]; else { sCant=""; PopupWinL(iIdProd); return ; } if (AddLis.arguments.length > 2) sObser=FilterComent(AddLis.arguments[2]); if (AddLis.arguments.length > 3) iIdUMed = AddLis.arguments[3]; if (AddLis.arguments.length > 4) sUMed = AddLis.arguments[4]; if (AddLis.arguments.length > 5) sSerial=AddLis.arguments[5]; if (AddLis.arguments.length > 6) sDescr = AddLis.arguments[6]; if (sCant!="" && sCant!="0") { if (!isNaN(sCant)) { SrvClrParms(); sSrvIdProd = iIdProd; sSrvCant = sCant; sUsrID = GetCookie("sa_usrid"); if(sUsrID != "" && sUsrID != null) sSrvUser = sUsrID; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSrvObser = sObser; sSrvDescr = sDescr; sSrvIdUMed = iIdUMed sSrvUmed = sUMed; sSrvSerial = sSerial; sTienda = GetCookie("sa_tienda"); if(sTienda != "" && sTienda != null) sSrvTienda = sTienda; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); sSrvFcode = "upd_lista"; ListID = GetCookie("sa_listid"); if(ListID != "" && ListID != null) sSrvListID = ListID; else alert("Por favor ingrese su telefono nuevamente, por su seguridad su session ha sido cancelada."); SrvSubmit(); if(sSerial.length > 0 || sSerial > 0) alert("El artículo ha sido modificado."); } } } else { alert("Antes de agregar a Mi Lista, por favor identifiquese como usuario."); GotoRegistro(0); } } function SrvClrParms() { sSrvIdProd = ""; sSrvCant = ""; sSrvUser = ""; sSrvOlduser = ""; sSrvIdUMed = 0; sSrvUmed = ""; sSrvDescr = ""; sSrvObser = ""; sSrvTienda = ""; sSrvColid = ""; sSrvSerial = ""; sSrvFcode = ""; sSrvSession = ""; sSrvListID = ""; sSrvTipCar = ""; } var iSubmit = 0; function SrvSubmit() { var frm; if(IsDefined("top.frames['f_lista'].document.frm_f")) { bServerDone = 0; iSubmit = 0; frm = top.frames['f_lista'].document.frm_f; frm.id_prod.value = sSrvIdProd; frm.cant.value = sSrvCant; frm.user.value = sSrvUser; frm.olduser.value = sSrvOlduser; frm.idumed.value = sSrvIdUMed; frm.umed.value = sSrvUmed; frm.descr.value = sSrvDescr; frm.obser.value = sSrvObser; frm.tienda.value = sSrvTienda; frm.colid.value = sSrvColid; frm.serial.value = sSrvSerial; frm.fcode.value = sSrvFcode; frm.session.value = sSrvSession; frm.ListID.value = sSrvListID; frm.TipCar.value = sSrvTipCar; frm.submit(); } else { if( iSubmit < 8 ) { iSubmit = iSubmit + 1; setTimeout("SrvSubmit()", 400 * iSubmit); } } } function FilterComent(s) { var iS,iLength; var str; str = "" if(IsEmpty(s)) s = ""; iLength = s.length; for ( i=0; i < iLength; ++i) { if( s.charAt(i) != "'" && s.charAt(i) != '"') str = str + s.charAt(i); } return str; } // Refreshing the Carrito function RefCarritoWin(tipcar) { //alert("Refcarrito:"+tipcar) if(tipcar=="undefined")tipcar=""; sTienda = GetCookie("sa_tienda"); if(sTienda == null) sTienda = ""; sUsrID = GetCookie("sa_usrid"); if(sUsrID == null) sUsrID = ""; sSession = GetCookie("sa_session"); if(sSession == null) sSession = ""; if(IsDefined("top.frames['f_top'].window.frames['f_car02'].document")) top.frames['f_top'].window.frames['f_car02'].document.location.href = "car02.asp?tip_car=" + tipcar + "&sTienda=" + sTienda + "&sSession=" + sSession + "&sUsrID=" + sUsrID; } //Funcion para el popup para la cantidad function PopupWin(id_prod,TipCar) { TipCar1=typeof(TipCar) sTienda = GetCookie("sa_tienda"); if(TipCar1=="undefined"){ window.open('popupCant.asp?tip_car=' +TipCar+ '&id_prod='+id_prod+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') }else{ //alert("Popipwin:"+TipCar) window.open('../popupCant.asp?tip_car=' +TipCar+ '&id_prod='+id_prod+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') } } function PopupWinL(id_prod) { sTienda = GetCookie("sa_tienda"); window.open('popupCantL.asp?id_prod='+id_prod+'&sTienda='+sTienda,'winPUP','width=400,height=200,scrollbars=no,toolbar=no,statusbar=no,left=165,top=180') } //fin del popup function ChangeUser() { ClearUserData(); top.frames['f_top'].window.frames['f_centro2'].location = "hom_login.asp"; top.frames['f_top'].window.frames['f_centro3'].location.href = "hombody.asp"; } function ClearUserData() { DeleteCookie("sa_colid"); DeleteCookie("sa_tienda"); DeleteCookie("sa_usrid"); SrvClrParms(); sSrvFcode = "cierra_session"; SrvSubmit(); } function GetSession() { var sSession; sSession = GetCookie("sa_session"); if( sSession == "" || sSession == null) { SrvClrParms(); sSrvFcode = "get_session"; SrvSubmit(); sSession = top.frames['f_lista'].document.session.SessionID.value; SetCookie("sa_session",sSession); } return sSession; } function GotoCarrito(tip_car) { orden = GetCookie("orden_ca"); sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); if(top.frames['f_top'].Password == 1){ var sArgs,orden; sArgs = "?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&orden=" + orden + "&tip_car=" + tip_car; sURL = "fpa001.asp" + sArgs; ShowSearch(); top.frames['f_top'].window.frames['f_centro3'].location = sURL; } else{ sHRef = BuildURL(''); if(UsesHTTPS()) sSecure = '&secure=1'; else sSecure = '&secure=0'; if(sUsrID == null) sUsrID = ""; sTienda = GetCookie("sa_tienda"); if(sTienda == null) sTienda = ""; sSession = GetCookie("sa_session"); if(sSession == null) sSession = ""; sURL = "fra_passwd.asp?usrid=" + sUsrID + "&op=1" + "&tienda=" + sTienda + "&compra=1" + sSecure + "&session=" + sSession + "&href=" + sHRef; sURL = sURL + "&orden=" + orden + "&OpenWhat=C"+ "&tip_car=" + tip_car; sURL = BuildURL(sURL); top.frames['f_top'].window.frames['f_centro3'].location.href = sURL; } } function GotoMuestra(tip_car) { orden = GetCookie("orden_ca"); sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); if(top.frames['f_top'].Password == 1){ var sArgs,orden; sArgs = "?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&orden=" + orden + "&tip_car=" + tip_car; sURL = "car001.asp" + sArgs; ShowSearch(); top.frames['f_top'].window.frames['f_centro3'].location = sURL; } else{ sHRef = BuildURL(''); if(UsesHTTPS()) sSecure = '&secure=1'; else sSecure = '&secure=0'; if(sUsrID == null) sUsrID = ""; sTienda = GetCookie("sa_tienda"); if(sTienda == null) sTienda = ""; sSession = GetCookie("sa_session"); if(sSession == null) sSession = ""; sURL = "fra_passwd.asp?usrid=" + sUsrID + "&op=1" + "&tienda=" + sTienda + "&compra=1" + sSecure + "&session=" + sSession + "&href=" + sHRef; sURL = sURL + "&orden=" + orden + "&OpenWhat=M"+ "&tip_car=" + tip_car; sURL = BuildURL(sURL); top.frames['f_top'].window.frames['f_centro3'].location.href = sURL; } } function GotoPizza() { orden = GetCookie("orden_ca"); sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); if(top.frames['f_top'].Password == 1){ var sArgs,orden; sArgs = "?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&orden=" + orden; sURL = "mecanica.html" + sArgs; ShowSearch(); top.frames['f_top'].window.frames['f_centro3'].location = sURL; } else{ sHRef = BuildURL(''); if(UsesHTTPS()) sSecure = '&secure=1'; else sSecure = '&secure=0'; if(sUsrID == null) sUsrID = ""; sTienda = GetCookie("sa_tienda"); if(sTienda == null) sTienda = ""; sSession = GetCookie("sa_session"); if(sSession == null) sSession = ""; sURL = "fra_passwd.asp?usrid=" + sUsrID + "&tienda=" + sTienda + "&compra=1" + sSecure + "&session=" + sSession + "&href=" + sHRef; sURL = sURL + "&orden=" + orden + "&OpenWhat=Pi"; sURL = BuildURL(sURL); top.frames['f_top'].window.frames['f_centro3'].location.href = sURL; } } function SetUsrID(sUsrID) { if(sUsrID != "" && sUsrID != 0 && sUsrID != "0") SetCookie("sa_usrid", sUsrID); } function NoTelReg() { var sColID; sColID = GetCookie("sa_colid"); if (sColID == "" || sColID == null) { alert("Bienvenido a Superama.\n\nSu teléfono no está registrado.\nSi desea realizar sus compras con nosotros, por favor escriba su código postal en la siguiente ventana.\n\nPara continuar dé click en el botón"); PopupSelTienda(); } } function SetStoreCol(s, sCol) { SetCookie("sa_colid", sCol); SetCookie("sa_tienda", s); UpdateStore(); top.frames['f_top'].window.frames['f_centro1'].location.reload(); } function SetStore(sTienda) { if( sTienda != "" && sTienda != null) SetCookie("sa_tienda", sTienda); } function UpdateStore() { var sColID, sUsrID ,sTienda; SrvClrParms(); sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sColID = GetCookie("sa_colid"); sSrvUser = sUsrID; sSrvTienda = sTienda; sSrvColid = sColID; sSrvFcode = "upd_tienda"; SrvSubmit(); } function SetUsrID(sUsrID) { if( sUsrID != "" && sUsrID!=0 && sUsrID!="0" ) SetCookie("sa_usrid", sUsrID); } function GotoFormReg() { var sColID; sColID = GetCookie("sa_colid"); if (sColID == "" || sColID == null || sColID == "undefined") { alert("Antes de registrarse, por favor seleccione una tienda"); PopupSelTienda(); } sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); if(sSession == "" || sSession == null) alert("No se puede ir al registro, sesión invalida"); else{ sUsrID = GetCookie("sa_usrid"); sURL = "reg001.asp?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&colid=" + sColID; top.frames['f_top'].window.frames['f_centro3'].location = BuildURL(sURL); } } function GoHome() { bUsrChanging = 0; sURL = BuildURL("hombody.asp"); top.frames['f_top'].window.frames['f_centro3'].document.location=sURL; } function SendPassword(UsuarioID) { var bDone = false; if( IsDefined("top.frames['f_lista'].document.frm_f") ) { if(UsuarioID > 0) sUsrID = UsuarioID; else sUsrID = GetCookie("sa_usrid"); SrvClrParms(); sSrvUser = sUsrID; sSrvFcode = "sendpwd"; SrvSubmit(); bDone = true; iSPCount = 0; } if( bDone == false && iSPCount < 8 ) { iSPCount = iSPCount + 1; setTimeout("SendPassword()", iSPCount*200); } } function ReloadRegistro() { var sURL, sUsrID, sTienda, sSession, sColID; sUsrID = GetCookie("sa_usrid"); sTienda = GetCookie("sa_tienda"); sSession = GetCookie("sa_session"); sColID = GetCookie("sa_colid"); sURL = "reg001.asp?usrid=" + sUsrID + "&tienda=" + sTienda + "&session=" + sSession + "&colid=" + sColID; top.frames['f_top'].window.frames['f_centro3'] = sURL; } function TransferCar(sOld,s) { sTienda = GetCookie("sa_tienda"); sColID = GetCookie("sa_colid"); SrvClrParms(); sSrvOlduser = sOld; sSrvUser = s; sSrvSession = GetCookie("sa_session"); sSrvUser = sUsrID; sSrvTienda = sTienda; sSrvColid = sColID; sSrvFcode = "transfer_car"; SrvSubmit(); RefCarritoWin(); } function ShowSearch(){ if( IsDefined("top.frames['f_top'].window.frames['f_izq'].window.frames['m_arriba'].document.search")) { top.frames["f_top"].window.frames["f_izq"].window.frames["m_arriba"].search.imagen_busqueda.src="images/procesando.gif"; top.frames["f_top"].window.frames["f_izq"].window.frames["m_arriba"].div_busca.style.visibility="visible"; } } function HideSearch(){ if( IsDefined("top.frames['f_top'].window.frames['f_izq'].window.frames['m_arriba'].document.search")) { top.frames['f_top'].window.frames['f_izq'].window.frames['m_arriba'].div_busca.style.visibility="hidden"; } if( IsDefined("top.frames['f_top'].window.frames['f_izq'].window.frames['m_arriba'].document.search.imagen_busqueda")) { top.frames["f_top"].window.frames["f_izq"].window.frames["m_arriba"].search.imagen_busqueda.src="images/espera.gif"; } } var treepop = null; function Gotreepop(){ if( treepop ) { if( ! treepop.closed ) {treepop.focus(); } else{ treepop = window.open("popup_three.asp","menu","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=550,height=650,left=200,top=25"); } } else{ treepop = window.open("popup_three.asp","menu","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=550,height=650,left=200,top=25"); } } /************************************************/ var offsetfrommouse=[10,10]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset var displayduration=0; //duration in seconds image should remain visible. 0 for always. var currentimageheight = 400; // maximum image size. var padding=10; // padding must by larger than specified div padding in stylessheet // Global variables for sizes of hoverimg // Defined in "showtrail()", used in "followmouse()" var zoomimg_w=0; var zoomimg_h=0; if (document.getElementById || document.all){ document.write('