function ampliar_img_modelo(imagen,ancho,alto){
	document.getElementById('imagen_central').src = "img/productos/med/"+imagen+'_m.jpg';
	document.getElementById('id_imagen').value = "img/productos/gra/"+imagen+'_g.jpg';
	
	document.getElementById('imagen_central')['onclick'] = new Function("PopEx(this,null,null,"+ancho+","+alto+",50,'PopBoxImageLarge','"+imagen+"_g.jpg'); return false;");			 	
	document.getElementById('boton_aumentar')['onclick'] = new Function("PopEx(this,null,null,"+ancho+","+alto+",50,'PopBoxImageLarge','"+imagen+"_g.jpg'); return false;");			 		

	//pbSrc = "img/productos/gra/"+imagen+'_g.jpg';
	//alert(document.getElementById('imagen_central').pbsrc);
}


function cambiarImagenFicha(imagen,imagen_gra,ancho,alto){
	document.getElementById('imagen_central').src = "img/productos/med/"+imagen;
	document.getElementById('id_imagen').value = "img/productos/gra/"+imagen;
	
	document.getElementById('imagen_central')['onclick'] = new Function("PopEx(this,null,null,"+ancho+","+alto+",50,'PopBoxImageLarge','"+imagen_gra+"'); return false;");			 	
	document.getElementById('boton_aumentar')['onclick'] = new Function("PopEx(this,null,null,"+ancho+","+alto+",50,'PopBoxImageLarge','"+imagen_gra+"'); return false;");			 		

	//pbSrc = "img/productos/gra/"+imagen+'_g.jpg';
	//alert(document.getElementById('imagen_central').pbsrc);
}



function marcarColor(color,num_miniatura){
		form = document.modelo;
		form.color.value = color;
		
		miniatura_actual = num_miniatura;
		
		img_peq = document.getElementById(num_miniatura+'-modelo_mini');
		img_peq.className = "cuadro_mini_modelo img_ficha_sel";
		
}

function selecciona_color(color){
		form = document.modelo;
		form.color.value = color;
		form.talla.value = '';
		
		form.submit();
}



function selecciona_talla(talla){
		form = document.modelo;
		form.talla.value = talla;
		
		form.submit();
}


function ver_pestanyas(seccion){

	if(seccion=='calzados'){
		document.getElementById('pestanya_calzados').className = 'pestanyas pestanya_sel';
		document.getElementById('pestanya_ropa').className  = 'pestanyas';
		
		document.getElementById('contenido_calzado').className = 'contenido_pestanyas';
		document.getElementById('contenido_ropa').className 	 = 'noMostrar';		
	}else{
		document.getElementById('pestanya_ropa').className = 'pestanyas pestanya_sel';		
		document.getElementById('pestanya_calzados').className  = 'pestanyas';		
		
		document.getElementById('contenido_calzado').className = 'noMostrar';
		document.getElementById('contenido_ropa').className 	 = 'contenido_pestanyas';				
	}
	
	/*
	//quitamos todas las pestanyas marcadas
	for(i=0;i<total;i++){
		document.getElementById("pestanya_"+i).className = "pestanyas";
		document.getElementById("banner_"+i).style.display   = "none";				
	}
	
	//ocultamos todos los bloques
	for(i=0;i<total;i++){
		document.getElementById("bloque_"+i).className = "noMostrar";

	}
	
	//marcamos la pestanya actual
	document.getElementById("pestanya_"+seccion).className = "pestanya_sel";
	document.getElementById("bloque_"+seccion).className   = "cuerpo_pestanyas";	
	document.getElementById("banner_"+seccion).style.display   = "block";		
	*/
}

function cambiarImagen(id,num){
		if(num==0)
			cadena = "img/elimarca_on.gif";
		else if(num==1)
			cadena = "img/papanatasmarca_on.gif";
		else if(num==2)
			cadena = "img/drivermarca_on.gif";
		else if(num==3)
			cadena= "img/cucadamarca_on.gif";		

		document.getElementById(id).src = cadena;
}

function cambiarImagenOff(id,num){
		if(num==0)
			cadena = "img/elimarca_off.gif";
		else if(num==1)
			cadena = "img/papanatasmarca_off.gif";
		else if(num==2)
			cadena = "img/drivermarca_off.gif";
		else if(num==3)
			cadena= "img/cucadamarca_off.gif";		

		document.getElementById(id).src = cadena;

}

function abrirGuiaTallas(){
		window.open("guia_tallas.php","GuiaTallas","width=650,height=500,scrollbars=yes, top=10, left=10");		
}

function abrirEnviar(id){
		window.open("enviar_amigo.php?id="+id,"Enviar Amigo","width=475,height=440,scrollbars=yes, top=10, left=10");		
}

function abrirCondiciones(){
		window.open("condiciones_compra_pop_up.php","Enviar Amigo","width=650,height=500,scrollbars=yes, top=10, left=10");		
}

function graphicsb_data1()
{
    /*---------------------------------------------
    Scroll Bar Images
    ---------------------------------------------*/
	this.up_button = "img/sample2_up.gif";                                          //image path and name only
	this.up_button_roll = "img/sample2_up_roll.gif";                                //image path and name only
	this.down_button = "img/sample2_down.gif";                                      //image path and name only
	this.down_button_roll = "img/sample2_down_roll.gif";                            //image path and name only

	this.slider_tile_bg_style = "background-image:url(img/sample2_slider_bg.gif);"  //image defined as CSS style

	this.bubble_top_cap = "img/sample2_bubble_topcap.gif,2";                        //image path and name, height - (width is automatically set to scroll bar width)
	this.bubble_bottom_cap = "img/sample2_bubble_bottomcap.gif,2";                  //image path and name, height - ""
	this.bubble_center = "img/sample2_bubble_center.gif,7";                         //image path and name, height - ""
	this.bubble_tile_bg_style = "img/sample2_bubble_bg.gif";                        //image path and name only

    /*---------------------------------------------
    Scroll Bar Container and Content
    ---------------------------------------------*/

	this.container_width = 340
	this.container_height = 100

	this.container_bg_color = "";

	this.content_padding = 10;
	this.content_styles = " color:#acacac; font-size:9px";
	this.content_class_name = "";

    /*---------------------------------------------
    Scroll Bar Behaviour and Width
    ---------------------------------------------*/

	this.scroll_bar_width = 9                     //The width of the bar in pixels.
	this.scroll_increment = 10                     //The distance to scroll when clicking the up or down buttons.


	this.allow_hover_scroll = true;                //Auto scroll while hovering over top and bottom buttons.
	this.hover_scroll_delay = 70;                   //Milliseconds (1/1000 second)


	this.use_hand_cursor = true;

}


function graphicsb_data2()
{
    /*---------------------------------------------
    Scroll Bar Images
    ---------------------------------------------*/
	this.up_button = "img/sample2_up.gif";                                          //image path and name only
	this.up_button_roll = "img/sample2_up_roll.gif";                                //image path and name only
	this.down_button = "img/sample2_down.gif";                                      //image path and name only
	this.down_button_roll = "img/sample2_down_roll.gif";                            //image path and name only

	this.slider_tile_bg_style = "background-image:url(img/sample2_slider_bg.gif);"  //image defined as CSS style

	this.bubble_top_cap = "img/sample2_bubble_topcap.gif,2";                        //image path and name, height - (width is automatically set to scroll bar width)
	this.bubble_bottom_cap = "img/sample2_bubble_bottomcap.gif,2";                  //image path and name, height - ""
	this.bubble_center = "img/sample2_bubble_center.gif,7";                         //image path and name, height - ""
	this.bubble_tile_bg_style = "img/sample2_bubble_bg.gif";                        //image path and name only

    /*---------------------------------------------
    Scroll Bar Container and Content
    ---------------------------------------------*/

	this.container_width = 785
	this.container_height = 100

	this.container_bg_color = "";

	this.content_padding = 10;
	this.content_styles = " color:#acacac; font-size:9px";
	this.content_class_name = "";

    /*---------------------------------------------
    Scroll Bar Behaviour and Width
    ---------------------------------------------*/

	this.scroll_bar_width = 9                     //The width of the bar in pixels.
	this.scroll_increment = 10                     //The distance to scroll when clicking the up or down buttons.


	this.allow_hover_scroll = true;                //Auto scroll while hovering over top and bottom buttons.
	this.hover_scroll_delay = 70;                   //Milliseconds (1/1000 second)


	this.use_hand_cursor = true;

}


function activarBoton(){
	form = document.filtro;
	
	if(form.genero.value!='-1' || form.talla.value!='-1' || form.marca.value!='-1' || form.categoria.value!='-1' || form.nombre_filtro.value!='' || form.temporada_filtro.value!='-1' ){
		document.filtro.boton_buscar.disabled  = false;
		document.filtro.boton_buscar.className = "boton_buscar_sel";
	}else{
		document.filtro.boton_buscar.disabled  = true;
		document.filtro.boton_buscar.className = "boton_buscar_no_sel";
	}
}


function marcarSeccionInicio(valor,total){

	for(i=1;i<=total;i++){
		document.getElementById('imagen_'+i).className='';		
	}
	miniatura_actual = valor;

	
	document.getElementById('imagen_'+valor).className='opcion_img_sel';			
}

