stepcarousel.setup({
	galleryid: 'mygallery', //id of carousel DIV
	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
	panelclass: 'panel', //class of panel DIVs each holding content
	autostep: {enable:true, moveby:1, pause:5000},
	panelbehavior: {speed:500, wraparound:true, persist:true},
	defaultbuttons: {enable: false, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
	contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})
function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false; 
	try 
	{ 
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	catch(e)
	{ 
		try
		{ 
			// Creacion del objet AJAX para IE 
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		catch(E) { xmlhttp=false; }
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } 

	return xmlhttp; 
}
//ajax subcategoria
function cargaSubcategoria(cat){
		ajax=nuevoAjax();
		ajax.open("GET", "consultar_subcategoria.php?cat="+cat, true);
		ajax.onreadystatechange=function(){ 
			if (ajax.readyState==1){
				document.getElementById("contenido_subcategoria").innerHTML="<img src='images/loading.gif'>&nbsp;";
			}
			if (ajax.readyState==4){ 
				document.getElementById("contenido_subcategoria").innerHTML=ajax.responseText;
			} 
		}
		ajax.send(null);
}
//ajax productos
function cargaProductos(cat,subcat,act){
		ajax=nuevoAjax();
		ajax.open("GET", "consultar_productos.php?cat="+cat+"&subcat="+subcat+"&act="+act, true);
		ajax.onreadystatechange=function(){ 
			if (ajax.readyState==1){
				document.getElementById("contenido_productos").innerHTML="<img src='images/loading.gif'>&nbsp;";
			}
			if (ajax.readyState==4){ 
				document.getElementById("contenido_productos").innerHTML=ajax.responseText;
			} 
		}
		ajax.send(null);
}
//ocultar slide
function ocultarslide(){
	document.getElementById("contenido_menu_slide").style.display="none";
	document.getElementById("contenido_slide").style.display="none";
}
