function obj_variables(num_actual,num_total)
{
	this.actual=num_actual;
	this.total=num_total; 
}

function control_estado(upodown){
	if (upodown == 1){
	   variables.actual++;
	   if(variables.actual > variables.total){variables.actual= variables.total;}
	 }
	else{
	   variables.actual--;
	   if(variables.actual < 1){variables.actual=1;}
	 }
	eval("document.matriz.src=img"+variables.actual+".src")
	
	switch (variables.actual)
	{
		case 1:
			texto="<p class=centrado>PUNTILLA PARA UN CENTRO REALIZADA EN BOLILLOS </p>";
			break;
		case 2:
			texto="<p class=centrado>ABANICO REALIZADO EN BOLILLOS</p>";
			break;
		case 3:
			texto="<p class=centrado>ABANICO REALIZADO EN HILO DE ORO</p>";
			break;
		case 4:
			texto="<p class=centrado>PAÑUELO CON EL REMATE FINAL</p>";
			break;
		case 5:
			texto="<p class=centrado>PAÑUELO ENTERO EN SU TRAMO FINAL</p>";
			break;									
		case 6:
			texto="<p class=centrado>INICIO DEL ENCAJE DE LA BLONDA PARA EL CUELLO DE LA VIRGEN DE LA AMARGURA</p>";
			break;
		case 7:
			texto="<p class=centrado>BLONDA PARA EL CUELLO DE LA VIRGEN DE LA AMARGURA</p>";
			break;				
		case 8:
			texto="<p class=centrado>CONTINUACION DE LA BLONDA CON PARTES REMATADAS</p>";
			break;							
		case 9:
			texto="<p class=centrado>CONTINUACION DE LA BLONDA CON PARTES REMATADAS</p>";
			break;					
		case 10:
			texto="<p class=centrado>PAÑUELO DE BOLILLOS</p>";
			break;		
		case 11:
			texto="<p class=centrado>PAÑUELO DE BOLILLOS</p>";
			break;	
		case 12:
			texto="<p class=centrado>ENCAJE DE BLONDA PARA EL PAÑUELO DE LA VIRGEN DE LA AMARGURA</p>";
			break;		
		case 13:
			texto="<p class=centrado>CONTINUACIÓN DE LA BLONDA PARA EL PAÑUELO</p>";
			break;															
	}
	document.all.capatxt.innerHTML=texto;

}

function grande()
{
	var fgrande = new String(eval("img"+variables.actual+".src"))
	desde = 0;
	pos = fgrande.indexOf("pequenas", desde);	 
	pos_f=fgrande.length;
	aux=fgrande.slice(pos+8,pos_f)
	aux="grandes/"+aux;
	abrir(aux,ancho[variables.actual],alto[variables.actual]);
}