url1=url;
url=url+'/sitefiles/img/'
if (document.images) {
	img1over = new Image();
	img1over.src = url + "tpz_boDescargas_On.gif";
	img2over = new Image();
	img2over.src = url + "tpz_boLaAcademia_On.gif";
	img3over = new Image();
	img3over.src = url + "tpz_boContacto_On.gif";
	img4over = new Image();
	img4over.src = url + "tpz_boAyuda_On.gif";
	img5over = new Image();
	img5over.src = url + "tpz_boPreguntasFrec_On.gif";
	img6over = new Image();
	img6over.src = url + "tpz_boCondiciones_On.gif";
	img7over = new Image();
	img7over.src = url + "tpz_boMapa_On.gif";
	img8over = new Image();
	img8over.src = url + "tpz_boDondeEstamos_On.gif";
	img9over = new Image();
	img9over.src = url + "tpz_boContactenos_On.gif";

	img1out = new Image();
	img1out.src = url + "tpz_boDescargas_Off.gif";
	img2out = new Image();
	img2out.src = url + "tpz_boLaAcademia_Off.gif";
	img3out = new Image();
	img3out.src = url + "tpz_boContacto_Off.gif";
	img4out = new Image();
	img4out.src = url + "tpz_boAyuda_Off.gif";
	img5out = new Image();
	img5out.src = url + "tpz_boPreguntasFrec_Off.gif";
	img6out = new Image();
	img6out.src = url + "tpz_boCondiciones_Off.gif";
	img7out = new Image();
	img7out.src = url + "tpz_boMapa_Off.gif";
	img8out = new Image();
	img8out.src = url + "tpz_boDondeEstamos_Off.gif";
	img9out = new Image();
	img9out.src = url + "tpz_boContactenos_Off.gif";
}


function turnOn(imgName) {if (document[imgName]){document[imgName].src = eval( imgName + "over.src");}}
function turnOff(imgName) {if (document[imgName]){if (document.images) {document[imgName].src = eval(imgName + "out.src");}}}
function sonido(){
	if(document.Sound.OpenState){
	if(document.Sound.OpenState!=0){
	document.Sound.play();}}
}
function sonido1(){
	if(document.Sound.OpenState){
	if(document.Sound.OpenState!=0){
	document.Sound1.play();}}
}
function textOn(val){
	if (val==1){document.img99.src = eval("text1over.src")}
	if (val==2){document.img99.src = eval("text2over.src")}
	if (val==3){document.img99.src = eval("text3over.src")}
	if (val==4){document.img99.src = eval("text4over.src")}
	if (val==5){document.img99.src = eval("text5over.src")}
}
function textOff(seccion){
	outimg = "textout.src"
	document.img99.src = eval(outimg)
}

var defaultSelected = true;
var selected = false;

function selectbox(val){
for (var i=document.selecting.box2.options.length; i>=0; i--){document.selecting.box2.options[i]=null}
document.selecting.box2.options[0] = new Option('Seleccione Producto', 0, defaultSelected, selected)
if (catalogosub[document.selecting.box1.options.selectedIndex]){
for (var i=0; i<catalogosub[document.selecting.box1.options.selectedIndex].length; i++){
	var optionName = new Option(catalogosub[document.selecting.box1.options.selectedIndex][i], catalogosubid[document.selecting.box1.options.selectedIndex][i], defaultSelected, selected)
	var length = document.selecting.box2.length;
	document.selecting.box2.options[length] = optionName;}
}
else{if (document.selecting.box1.options.selectedIndex!=0){document.URL = '#'}}
}

function gobox(val){
if (document.selecting.box2.options.selectedIndex!=0){document.URL = '../catalogo/listado.php?sec='+document.selecting.box2.options.value}
}

function inicio(){
for (var i=0; i<catalogo.length; i++){
	var optionName = new Option(catalogo[i], i, defaultSelected, selected)
	var length = document.selecting.box1.length;
	document.selecting.box1.options[length] = optionName;}
}
function popup(val,w,h){
window.open (url1+'/nuestrastiendas/popup.php?pic='+val+'', '', 'scrollbars=no,status=no,width='+w+',height='+h) 
}
function pullpush(val){
	if (document.all['opc'+val].style.display=='inline'){document.all['opc'+val].style.display='none'}
	else{document.all['opc'+val].style.display='inline'}
}

var ie=document.all
var dom=document.getElementById
var ns4=document.layers

var bouncelimit=32
var direction="up"

function initbox(){
bouncelimit=32
if (!dom&&!ie&&!ns4)
return
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
crossobj.top=scroll_top-250
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<300)
crossobj.top=parseInt(crossobj.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
bouncelimit=32
}