// JavaScript Document
<!--
//--------------------------impresion

function imprSelec(nombre)
{
	var ficha = document.getElementById(nombre);
  	var ventimp = window.open(' ', 'popimpr');
  	ventimp.document.write( ficha.innerHTML );
  	ventimp.document.close();
  	ventimp.print( );
  	ventimp.close();
} 

//*-------------------capas de opinion---------------------------

function mostrar_opinion(id)
	{
	document.getElementById(id).style.visibility="visible";
	}

function ocultar_opinion(id)
	{
	document.getElementById(id).style.visibility="hidden"; 
	}

//-----------------------------------------------------------------
function imprimir (id)
{
//alert(id);
var url = "imprime_producto.php?id="+id;
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=740, height=400");
}


function skype()
{
//alert(id);
var url = "skype.php";
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=740, height=400");
}

function enviar (id)
{
//alert(id);
var url = "envia_amigo.php?id="+id;
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=500, height=350");
}

function vacio_enviar(formulario)
{
	if (formulario.emisor.value == "")
		{
		alert("ingresa tu nombre o nick");
		formulario.emisor.focus();
		return  false;
		}
	if (formulario.correo_emisor.value == "")
		{
		alert("ingresa tu correo o mail");
		formulario.correo_emisor.focus();
		return  false;
		}
	
	var correo = formulario.correo_emisor.value;
	var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
	var comparacion = formato.test(correo);
	if(comparacion == false)
		{
		alert("El correo ingresado no es válido");
		formulario.correo_emisor.focus();
		return false;
		}
	
	if (formulario.receptor.value == "")
		{
		alert("ingrese el nombre o nick de la persona a la cual enviaras");
		formulario.receptor.focus();
		return  false;
		}
	
	if (formulario.correo_receptor.value == "")
		{
		alert("ingrese el correo o mail de la persona a la cual enviaras");
		formulario.correo_receptor.focus();
		return  false;
		}
	var correo = formulario.correo_receptor.value;
	var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
	var comparacion = formato.test(correo);
	if(comparacion == false)
		{
		alert("El correo ingresado no es válido");
		formulario.correo_receptor.focus();
		return false;
		}
	return true;
}

//-----------------------------------------------------------------
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//-----------------------------vacio opinion ----------------------

function vacio_opinion(formulario)
{
	if (formulario.nick.value == "")
		{
		alert("ingrese el nick");
		formulario.nick.focus();
		return  false;
		}
	if (formulario.correo.value == "")
		{
		alert("ingrese el correo o mail");
		formulario.correo.focus();
		return  false;
		}
	var correo = formulario.correo.value;
	var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
	var comparacion = formato.test(correo);
	if(comparacion == false)
		{
		alert("El correo ingresado no es válido");
		formulario.correo.focus();
		return false;
		}
	
	if (formulario.opinion.value == "" )
		{
		alert("ingrese su opinion");
		formulario.opinion.focus();
		return  false;
		}	
	return true;
}

//---------------------------------efecto rollover estrellas
function estrella_over(valor)
	{
	var i=1;
	while (i <= valor)
		{
		var id = "estrella"+i;
		iluminada = new Image(25,23)
		iluminada.src = "imagenesfijas/estrella_full.png"
		var navegador = navigator.appName
		if (navegador == "Microsoft Internet Explorer")
			{
			window.document[id].src = iluminada.src; //este anda con mozzilla
			//document.getElementById(id).src = iluminada.src;//este anda con IE
			}
			else
			{
			window.document[id].src = iluminada.src; //este anda con mozzilla
			}
		i = i +1;
		}
	j = 5
	while (j > valor)
		{
		var id = "estrella"+j;
		apagada = new Image(25,23)
		apagada.src = "imagenesfijas/estrella_vacia.png"
		var navegador = navigator.appName
		if (navegador == "Microsoft Internet Explorer")
			{
			window.document[id].src = apagada.src; //este anda con mozzilla
			//document.getElementById(id).src = apagada.src;//este anda con IE
			}
			else
			{
			window.document[id].src = apagada.src; //este anda con mozzilla
			}
		j = j - 1;
		}
	var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		window.document.form1.valoracion.value = valor; //este anda con mozzilla
		//document.form1.valoracion.value = valor;//este anda con IE
		}
		else
		{
		window.document.form1.valoracion.value = valor; //este anda con mozzilla
		}
	}

//---------------------------------efecto rollover rollout boton
function boton_volver_over()
	{
	iluminada = new Image(88,20)
    iluminada.src = "imagenesfijas/flecha_anterior_rollOver.gif"
    var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById("volver").src = iluminada.src;//este anda con IE
		}
		else
		{
		window.document["volver"].src = iluminada.src; //este anda con mozzilla
		}
	}
	
function boton_volver_out()//1 rollover, 0 rollout
	{
	apagada = new Image(88,20)
    apagada.src = "imagenesfijas/flecha_anterior_rollOut.gif"	
	 var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById("volver").src = apagada.src; //este anda con IE
		}
		else
		{
		window.document["volver"].src = apagada.src; //este anda con mozzilla
		}
	}
//----------------------------------------------------------------------
function boton_enviar_over()
	{
	iluminada = new Image(21,19)
    iluminada.src = "imagenesfijas/email_go_over.png"
    var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById("enviar").src = iluminada.src;//este anda con IE
		}
		else
		{
		window.document["enviar"].src = iluminada.src; //este anda con mozzilla
		}
	}
	
function boton_enviar_out()//1 rollover, 0 rollout
	{
	apagada = new Image(21,19)
    apagada.src = "imagenesfijas/email_go.png"	
	 var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById("enviar").src = apagada.src; //este anda con IE
		}
		else
		{
		window.document["enviar"].src = apagada.src; //este anda con mozzilla
		}
	}
	
//---------------------------------efecto rollover rollout boton carrito
function boton_carrito_over(id)
	{
	//alert(id)
	/*iluminada = new Image(88,20)
    iluminada.src = "imagenesfijas/agregar_btn_RollIn.gif"
    var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById(id).src = iluminada.src;//este anda con IE
		}
		else
		{
		window.document[id].src = iluminada.src; //este anda con mozzilla
		}*/
	}
	
function boton_carrito_out(id)//1 rollover, 0 rollout
	{
	/*apagada = new Image(88,20)
    apagada.src = "imagenesfijas/agregar_btn_RollOut.gif"	
	 var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById(id).src = apagada.src; //este anda con IE
		}
		else
		{
		window.document[id].src = apagada.src; //este anda con mozzilla
		}*/
	}
	
function recarga_padre_y_cierra_ventana()
	{
	window.opener.location.reload();
	window.close();
	}

function comentario_producto(url)
{
slist = window.open(url , "mywindow", "status=1 ,scrollbars=NO , top =0  , left = 250 , width=600, height=400");
//document.getElementById(id).background="imagenesfijas/32original.gif"; // para imagend de fodo
}

//-------------------------------------------------------------------------

function opinion(id)
{
var url = "crear_opinion.php?id="+id;
slist = window.open(url , "mywindow", "status=1 ,scrollbars=NO , top =0  , left = 100 , width=500, height=300");
//document.getElementById(id).background="imagenesfijas/32original.gif"; // para imagend de fodo
}

//-------------------------------------------------------------------------

function contacto()
{
slist = window.open("contacto.php" , "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 280 , width=650, height=400");
//document.getElementById(id).background="imagenesfijas/32original.gif"; // para imagend de fodo
}

//-------------------------------------------------------------------------

function dineromail()
{
slist = window.open("dineromail.php");
//document.getElementById(id).background="imagenesfijas/32original.gif"; // para imagend de fodo
}

//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
function nombre_pestana(id)
{
//alert(id);
switch(id)
		{
		case "1":
		document.getElementById("descripcion").style.visibility="visible";
		document.getElementById("ficha_tecnica").style.visibility="hidden";
		document.getElementById("opiniones").style.visibility="hidden";
		document.getElementById("consultas_frecuentes").style.visibility="hidden";
		break;
		
		case "2":
		document.getElementById("descripcion").style.visibility="hidden";
		document.getElementById("ficha_tecnica").style.visibility="visible";
		document.getElementById("opiniones").style.visibility="hidden";
		document.getElementById("consultas_frecuentes").style.visibility="hidden";
		break;
		
		case "3":
		document.getElementById("descripcion").style.visibility="hidden";
		document.getElementById("ficha_tecnica").style.visibility="hidden";
		document.getElementById("opiniones").style.visibility="visible";
		document.getElementById("consultas_frecuentes").style.visibility="hidden";
		break;
		
		case "4":	
		document.getElementById("descripcion").style.visibility="hidden";
		document.getElementById("ficha_tecnica").style.visibility="hidden";
		document.getElementById("opiniones").style.visibility="hidden";
		document.getElementById("consultas_frecuentes").style.visibility="visible";
		break;
		}
		
}


function colorfondo(color,id)
{
document.getElementById(id).style.backgroundColor=color;
//document.getElementById(id).background="imagenesfijas/32original.gif"; // para imagend de fodo
}

//-------------------------------------------------------------------------

function buscar_vacio(formulario) 
{
if (formulario.parametro.value == "" )
		{
		alert("ingrese un parametro para buscar");
		formulario.parametro.focus();
		return  false;
		}
return true;
}


//----------------------------------funcion consulta de producto-------------------------------

function consulta (url)
{
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=450, height=400");
}

//----------------------------------ficha tecnica----------------------------------------------

function ficha_tecnica (id)
{
var url ="ficha_tecnica.php?id="+id+"";
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=450, height=400");
}
//-------------------------------------------------------------------------


function muestra_foto_producto(url,ancho,alto)
{
slist = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 250 , width=600, height=500");
}

function galeria_producto(id_imagen)
{
var url="galeria_producto.php?id="+id_imagen;
sList = window.open(url, "mywindow", "status=1 ,scrollbars=yes , top =0  , left = 150 , width=600, height=550");
}
//----------------------------------funcion control vacio pedido de compra-----------------
function formulariocarrito(formulario)
{
//alert(formulario.pago[0].value)
if (formulario.pago[0].checked)
	{
	if (formulario.cuota.value == 0)
		{
		alert("Por favor seleccione el numero de cuotas");
		formulario.cuota.focus();
		return  false;
		}
	}
if (formulario.nombre.value == "")
	{
	alert("ingrese el nombre o nick");
	formulario.nombre.focus();
	return  false;
	}
if (formulario.apellido.value == "")
	{
	alert("ingrese el nombre o nick");
	formulario.apellido.focus();
	return  false;
	}
if (formulario.correo.value == "")
	{
	alert("ingrese el correo o mail");
	formulario.correo.focus();
	return  false;
	}

//----verifica formato correo-----------

var correo = formulario.correo.value;
var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
var comparacion = formato.test(correo);
if(comparacion == false)
	{
	alert("El correo ingresado no es válido");
	formulario.correo.focus();
    return false;
	}

if (formulario.codarea.value == "" )
	{
	alert("ingrese un codigo de area");
	formulario.codarea.focus();
	return  false;
	}

if (formulario.tel.value == "")
	{
	alert("ingrese un numero de telefono");
	formulario.tel.focus();
	return  false;
	}
if (isNaN(formulario.codarea.value))
	{
	alert("ingrese un codigo de area correcto");
	formulario.codarea.focus();
	return  false;
	}

if (isNaN(formulario.tel.value))
	{
	alert("ingrese un numero de telefono correcto");
	formulario.tel.focus();
	return  false;
	}
return true;
}


//----------------------------------funcion control de vacio-------------------------------
function verificarvacio (formulario)
{
if (formulario.nombre.value == "")
	{
	alert("ingrese el nombre o nick");
	formulario.nombre.focus();
	return  false;
	}
if (formulario.correo.value == "")
	{
	alert("ingrese el correo o mail");
	formulario.correo.focus();
	return  false;
	}
var correo = formulario.correo.value;
var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
var comparacion = formato.test(correo);
if(comparacion == false)
	{
	alert("El correo ingresado no es válido");
	formulario.correo.focus();
    return false;
	}

if (formulario.comentario.value == "")
	{
	alert("ingrese la consulta");
	formulario.comentario.focus();
	return  false;
	}
return true;
}

//-----------------------------------------verificacion de subrubro-------------------------------------


//-------------------------------------------------------------------------------------------------------

//-----------------------------------------verificacion registracion de usuario-------------------------
//------------------------------------------------------------------------------------------------------
function registracionusuario (formulario)
{
if (formulario.nick.value == "")
	{
	alert("ingrese el nick");
	formulario.nick.focus();
	return  false;
	}
if (formulario.pass.value == "")
	{
	alert("ingrese el password o clave");
	formulario.pass.focus();
	return  false;
	}
if (formulario.correo.value == "")
	{
	alert("ingrese el correo o mail");
	formulario.correo.focus();
	return  false;
	}
var email = formulario.correo.value;
var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
var comparacion = formato.test(email);
if(comparacion == false){
          alert("El correo ingresado no es válido");
          formulario.correo.focus();
		  return false;
     }
if (formulario.nomyape.value == "")
	{
	alert("ingrese su nombre y apellido");
	formulario.nomyape.focus();
	return  false;
	}
if (formulario.direccion.value == "")
	{
	alert("ingrese su direccion");
	formulario.direccion.focus();
	return  false;
	}
if (formulario.provincia.value == "")
	{
	alert("ingrese la provincia");
	formulario.provincia.focus();
	return  false;
	}
if (formulario.localidad.value == "")
	{
	alert("ingrese la localidad");
	formulario.localidad.focus();
	return  false;
	}
if (formulario.localidad.value == "")
	{
	alert("ingrese la localidad");
	formulario.localidad.focus();
	return  false;
	}
if (formulario.tel.value == "" && formulario.cel.value == "")
	{
	alert("Debe ingresar al menos un numero telefonico");
	formulario.tel.focus();
	return  false;
	}
return true;
}


function vacio_newsletter (formulario)
{
if (formulario.nick.value == "")
	{
	formulario.nick.focus();
	return  false;
	}
if (formulario.correo.value == "")
	{
	alert("ingrese el correo o mail");
	formulario.correo.focus();
	return  false;
	}
var nick = formulario.nick.value;
var email = formulario.correo.value;
var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
var comparacion = formato.test(email);
if(comparacion == false){
          alert("El correo ingresado no es válido");
          formulario.correo.focus();
		  return false;
     }
sList = window.open("recepcion_newsletter.php?nick="+nick+"&correo="+email+"", "mywindow", "status=1 ,scrollbars=NO , top =0  , left = 250 , width=400, height=400");
return true;
}


//------------------------------------------------------------------------------------------
//----------------------------------AJAX----------------------------------------------------
//------------------------------------------------------------------------------------------
//alert("ingresa a la rutina");
//-----------------------------creo el objeto httprequest-----------------------------------
function getXMLHTTPRequest(){
	//alert("ingresa  a buscar servidor");
	try {
		  peticion = new XMLHttpRequest();
	   } catch (trymicrosoft) {
		  try {
			  peticion = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (othermicrosoft) {
			 try {
				peticion = new ActiveXObject("Microsoft.XMLHTTP");
			 } catch (failed) {
				peticion = false;
			 }
		  }
	   }
	   if (!peticion)
	   	  {
		  alert("ERROR AL INICIALIZAR!");
		  }
return peticion;
}

//------aqui abro la conexion, luego envio, e imprimo
var montocuota = getXMLHTTPRequest();
function calculo_cuota(monto)
{
//alert (monto);	
var cant_cuota = document.carrito.cuota.value;
//alert(cant_cuota);
aleatorio= parseInt(Math.random()*9999999);
var id = "montocuota";
var url = "calculo_cuota.php?cuota="+cant_cuota+"&monto="+monto+"&"+aleatorio;
//alert(url); //ok
montocuota.open("GET",url,true);
montocuota.onreadystatechange  = function()  {
		//alert("argumento recibido="+arguments[0]);
		if (montocuota.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (montocuota.status==200)
				{
				//var iddiv = 1;
				//alert ("variable iddiv="+id);
				document.getElementById(id).innerHTML = montocuota.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert("Error al recibir la información!");
				}
			}
		}
montocuota.send(null);    
}


//----------------------------------- funciones 
// esto fue agregado para mostrar cuando carga en el carrito

function mostrar(id,tipo)
{

if (tipo == "1")
	{
	var id = "agregado"+id; 
	agregado = new Image(100,60)
	agregado.src = "imagenesfijas/carrito_vendido.png"
	var navegador = navigator.appName
	if (navegador == "Microsoft Internet Explorer")
		{
		window.document[id].src = agregado.src; //este anda con mozzilla
		//document.getElementById(id).src = agregado.src;//este anda con IE
		}
		else
		{
		window.document[id].src = agregado.src; //este anda con mozzilla
		}
	}
if (navigator.appName == 'Microsoft Internet Explorer')
	{
	var total = (event.clientY + document.documentElement.scrollTop) - 100;
	document.getElementById('capa').style.top = +total+"px";//si se puede ver la forma correcta de asiganrle la variable*/
	document.getElementById('capa').style.visibility = "visible";
	} 
	else if (navigator.appName == 'Opera')
		{
		var total = (event.clientY + document.documentElement.scrollTop) - 100;
		document.getElementById('capa').style.top = +total+"px";//si se puede ver la forma correcta de asiganrle la variable*/
		document.getElementById('capa').style.visibility = "visible";
		}
		else
		{
		document.getElementById('capa').style.visibility = "visible";
		}
}
	
function ocultar()
	{
	document.getElementById('capa').style.visibility="hidden"; 
	}

function carrito_top_verde()
	{
	iluminada = new Image(13,15)
    iluminada.src = "imagenesfijas/carrito_verde_top.png"
    var navegador = navigator.appName
	/*if (navegador == "Microsoft Internet Explorer")
		{
		document.getElementById("carrito_top").src = iluminada.src;//este anda con IE
		}
		else
		{*/
		window.document["carrito_top"].src = iluminada.src; //este anda con mozzilla
		//}
	}
//********--------------- aqui termina------------------------

var carrito = getXMLHTTPRequest();

function carrito_compras(id,tipo) {
aleatorio = parseInt(Math.random()*9999999);
mostrar(id,tipo);
carrito_top_verde();
var url = "addcarrito.php?idp="+id;
setTimeout("ocultar()",3500);
carrito.open("GET",url,true);
carrito.onreadystatechange  = function() {
		//alert("argumento recibido="+arguments[0]);
		if (carrito.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (carrito.status==200)
				{
				//var iddiv = 1;
				//alert ("variable iddiv="+id);
				document.getElementById("carrito").innerHTML = carrito.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert("Error al recibir la información!");
				}
			}
		}
carrito.send(null);    
}

//-----------------------------cerrar sesion---------------------
var cerrar_sesion = getXMLHTTPRequest();

function cerrarsesion() 
{
//alert("entra");
var url = "cerrar_sesion.php";
aleatorio = parseInt(Math.random()*9999999);
var url = "cerrar_sesion.php?id="+aleatorio;
var id="login";
cerrar_sesion.open("GET",url,true);
cerrar_sesion.onreadystatechange  = function() {
		//alert("argumento recibido="+arguments[0]);
		if (cerrar_sesion.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (cerrar_sesion.status==200)
				{
				//var iddiv = 1;
				//alert ("variable iddiv="+id);
				document.getElementById(id).innerHTML = cerrar_sesion.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert("Error al recibir la información!");
				}
			}
		}
cerrar_sesion.send(null); 
}

//------------------siguiente imagen Noticia--------------------------------
/*var imagen_siguiente = getXMLHTTPRequest();
function sig_imagen(id_producto,id,nombre,texto,ancho,alto,numero) 
{
//alert(numero);
aleatorio = parseInt(Math.random()*9999999);
var url = "imprime_imagen.php?id="+id_producto+"&nombre="+nombre+"&texto="+texto+"&ancho="+ancho+"&alto="+alto+"&"+aleatorio;
//alert(url); //ok
imagen_siguiente.open("GET",url,true);
imagen_siguiente.onreadystatechange  = function()  {
		//alert("argumento recibido="+arguments[0]);
		if (imagen_siguiente.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (imagen_siguiente.status==200)
				{
				//var iddiv = 1;
				//alert (id);
				document.getElementById(id).innerHTML = imagen_siguiente.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert (id);
				alert("Error al recibir la información!");
				}
			}
		}
imagen_siguiente.send(null);    
}*/

var imagen_siguiente = getXMLHTTPRequest();
function sig_imagen(id_arreglo) 
{
//alert(id_arreglo);
aleatorio = parseInt(Math.random()*9999999);
var url = "imprime_imagen.php?id="+id_arreglo+"&"+aleatorio;
//alert(url); //ok
imagen_siguiente.open("GET",url,true);
imagen_siguiente.onreadystatechange  = function()  {
		//alert("argumento recibido="+arguments[0]);
		if (imagen_siguiente.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (imagen_siguiente.status==200)
				{
				//var iddiv = 1;
				//alert (id);
				document.getElementById("imagen").innerHTML = imagen_siguiente.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert (id);
				alert("Error al recibir la información!");
				}
			}
		}
imagen_siguiente.send(null);    
}
//------------------shimano grupo--------------------------------

var grupo_shimano_seleccion = getXMLHTTPRequest();
function grupo_shimano() 
{
aleatorio = parseInt(Math.random()*9999999);
var tipo_shimano = document.shimano.tipo.value;
var url = "shimano_grupo.php?idtipo="+tipo_shimano+"&"+aleatorio;
//alert(url); //ok
grupo_shimano_seleccion.open("GET",url,true);
grupo_shimano_seleccion.onreadystatechange  = function()  {
		//alert("argumento recibido="+arguments[0]);
		if (grupo_shimano_seleccion.readyState==4)
			{
			//alert("ingresa por ready=2");	
			if (grupo_shimano_seleccion.status==200)
				{
				//var iddiv = 1;
				//alert (id);
				document.getElementById("grupo").innerHTML = grupo_shimano_seleccion.responseText;
				//alert (document.getElementById(id).innerHTML);
				}
				else
				{
				alert("Error al recibir la información!");
				}
			}
		}
grupo_shimano_seleccion.send(null);    
}

//------------------menu--------------------------------

var submenu = getXMLHTTPRequest();
function menu(idc,accion) 
{
aleatorio = parseInt(Math.random()*9999999);
var url = "submenu.php?idc="+idc+"&accion="+accion+"&"+aleatorio;
//alert(url); //ok
var id = "categoria_"+idc;
submenu.open("GET",url,true);
submenu.onreadystatechange  = function()  
	 {
	//alert("argumento recibido="+arguments[0]);
	if (submenu.readyState==4)
		{
		//alert("ingresa por ready=2");	
		if (submenu.status==200)
			{
			//var iddiv = 1;
			//alert (id);
			document.getElementById(id).innerHTML = submenu.responseText;
			//alert (document.getElementById(id).innerHTML);
			}
			else
			{
			alert("Error al recibir la información!");
			}
		}
	}
submenu.send(null);    
}
	
//----------------------------------------------------
//------------------menu--------------------------------

var solapa = getXMLHTTPRequest();
function solapa_producto(id,accion) 
{
//alert(accion);
var aleatorio = parseInt(Math.random()*9999999);
switch(accion)
		{
		case 1:
		var url = "producto_descripcion.php?id="+id+"&"+aleatorio;
		break;
		
		case 2:
		var url = "producto_ficha_tecnica.php?id="+id+"&"+aleatorio;
		break;
		
		case 3:
		var url = "producto_opiniones_todas.php?id="+id+"&"+aleatorio;
		break;
		
		case 4:	
		var url = "producto_consultas_frecuentes.php?id="+id+"&"+aleatorio;
		break;
		}
//alert(url); //ok
solapa.open("GET",url,true);
solapa.onreadystatechange  = function()  
	 {
	//alert("argumento recibido="+arguments[0]);
	if (solapa.readyState==4)
		{
		//alert("ingresa por ready=2");	
		if (solapa.status==200)
			{
			//var iddiv = 1;
			//alert (id);
			document.getElementById("descripcion").innerHTML = solapa.responseText;
			//alert (document.getElementById(id).innerHTML);
			}
			else
			{
			alert("Error al recibir la información!");
			}
		}
	}
solapa.send(null);    
}

//-->