function Banner(){
	var imag = new Array('cursosverano','flortela','hormas','cursosverano','pedidolibros','pinturatela','cursosverano','sastreriaarte','troqueles','cursosupmoda');  
	var ImgBanner=imag[Math.floor(8 * Math.random())];
	document.write('<div id="bannersup"><a href="'+ImgBanner+'.html"><img src="imagenes/'+ImgBanner+'.jpg" alt="AcademiasISA" width="845" height="113" border="0" class="imagenes" /></a></div>')
}

function abrircentro(theURL,winName,w,h) { //v2.0
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=1';
  window.open(theURL,winName,winprops);
  }

  function anularBotonDerecho(e) {
    if (navigator.appName == 'Netscape'
       && (e.which == 3 || e.which ==    2)){
      return false;
    } else if (navigator.appName == 'Microsoft Internet Explorer' 
        && (event.button    == 2)) {
    }
  }
  document.onmousedown=anularBotonDerecho;
  document.oncontextmenu=new Function("return false");
  
  
function cupon(){
	window.open("cupon.html","","toolbar=0,scrolbar=0,width=550,height=400");
}

function OpRestoForm(){
	document.getElementById("RestoForm").style.visibility="visible";
	document.getElementById("RestoForm").style.display="block";
	document.getElementById("pasinter").style.visibility="hidden";
	document.getElementById("pasinter").style.display="none";
}

function Vertroqueles(Tipo){
	var capaocultar;
	var Ruta;
	var FotosMostrar;		
	var Titulo;
	var Grupo;
	var Grupo2;
	if (Tipo==1){
		Titulo="TROQUELES DE FLORES";
		Grupo="group1";
		Grupo2="group1r";
		Ruta="";	
		FotosMostrar = new Array('F001-Dalia-150-thumbs','F002-CameliaGrande-111-thumbs','F003-Camelia-70-thumbs','F004-CameliaMedia-60-thumbs','F005-CameliaPequeña-50-thumbs','F006-Camelia-45-thumbs','F007-MiniCamelia-30-thumbs','F008-Nenufar-100-thumbs','F009-FlorPascua-90-thumbs','F010-OrquideaGrande-90-thumbs','F011-CentroOrquidea-92-thumbs','F012-Rosa5Puntas-70-thumbs','F013-MargaritaRedonda-70-thumbs','F014-Margarita-64-thumbs','F015-PetaloRosa-55-thumbs','F016-SepaloGrande-65-thumbs','F017-SepaloPequeño-45-thumbs','F018-Clavel-64-thumbs','F019-Pensamiento-50-thumbs','F020-OrquideaPequeña-45-thumbs','F021-FlorEstrella-23-thumbs','F022-MargaritaDoble-22-thumbs','F023-TrioFlores-13-thumbs');
	}else if (Tipo==2){
		Titulo="TROQUELES DE HOJAS";
		Grupo="group2";
		Grupo2="group2r";
		Ruta="";	
		FotosMostrar = new Array('H024-HojaRosaCurvada-48-thumbs','H025-HojaRosa-75-thumbs','H026-HojaRosa-110-thumbs','H027-HojaParra-145-thumbs','H028-HojaOrquideaAlargada-95-thumbs','H029-HojaOrquideaRedonda-80-thumbs','H030-HojaVenezolana-64-thumbs','H031-HojaFlorPascua-80-thumbs','H032-Lilium-140-thumbs','H033-HojaPascua-180-thumbs','H034-LoveliaGrande-85-thumbs','H035-LoveliaPequeña-57-thumbs','H036-HojaDobleCombinada-27y18-thumbs','H037-HojasPequeñas-40-thumbs');
	}else if (Tipo==3){
		Titulo="MARCADORES";
		Grupo="group3";
		Grupo2="group3r";
		Ruta="";	
		FotosMostrar = new Array('M001-Marcador-Varios-thumbs', 'M007-Marcador-34-thumbs');
	}else if (Tipo==4){
		Titulo="TROQUELES DE HOJAS";
		Grupo="group4";
		Grupo2="group4r";
		Ruta="";	
		FotosMostrar = new Array('F001-Dalia-150-thumbs','F002-CameliaGrande-111-thumbs','F003-Camelia-70-thumbs','F004-CameliaMedia-60-thumbs','F005-CameliaPequeña-50-thumbs','F006-Camelia-45-thumbs','F007-MiniCamelia-30-thumbs','F008-Nenufar-100-thumbs','F009-FlorPascua-90-thumbs','F010-OrquideaGrande-90-thumbs','F011-CentroOrquidea-92-thumbs','F012-Rosa5Puntas-70-thumbs','F013-MargaritaRedonda-70-thumbs','F014-Margarita-64-thumbs','F015-PetaloRosa-55-thumbs','F016-SepaloGrande-65-thumbs','F017-SepaloPequeño-45-thumbs','F018-Clavel-64-thumbs','F019-Pensamiento-50-thumbs','F020-OrquideaPequeña-45-thumbs','F021-FlorEstrella-23-thumbs','F022-MargaritaDoble-22-thumbs','F023-TrioFlores-13-thumbs', 'H024-HojaRosaCurvada-48-thumbs','H025-HojaRosa-75-thumbs','H026-HojaRosa-110-thumbs','H027-HojaParra-145-thumbs','H028-HojaOrquideaAlargada-95-thumbs','H029-HojaOrquideaRedonda-80-thumbs','H030-HojaVenezolana-64-thumbs','H031-HojaFlorPascua-80-thumbs','H032-Lilium-140-thumbs','H033-HojaPascua-180-thumbs','H034-LoveliaGrande-85-thumbs','H035-LoveliaPequeña-57-thumbs','H036-HojaDobleCombinada-27y18-thumbs','H037-HojasPequeñas-40-thumbs','M001-Marcador-Varios-thumbs', 'M007-Marcador-34-thumbs');
	}else if (Tipo==5){
		Titulo="TOCADOS";
		Grupo="group2";
		Grupo2="group5r";
		Ruta="tocados/";	
		FotosMostrar = new Array('T001-Tocado','T002-Tocado','T003-Tocado','T004-Tocado','T005-Tocado','T006-Tocado','T007-Tocado','T008-Tocado','T009-Tocado','T010-Tocado','T011-Tocado','T012-Tocado');
	}
	if (Tipo){
		// muestro Gal
		document.write('<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">');
		document.write("<tr><td><span class=\"subtitulos\">"+Titulo+"</span></td></tr>");
		if (Tipo==5){
			///tocados
			document.write('<tr><td>');
			var valores;
			for (i=0;i<FotosMostrar.length;i++){
				valores = FotosMostrar[i].split('-');
				var Modelo = valores[0];
				var Nombre = valores[1];
				var Tamano = valores[2];
				var Vinculo = valores[0]+'-'+valores[1];			
				document.write("<div class=\"contenedorfoto\" ><span class=\"contenedorfoto1\"><br /><a href=\"imagenes/galerias/"+Ruta+"/"+Vinculo+".jpg\" rel=\"sexylightbox["+Grupo+"]\" title=\"" + Modelo +"-"+ Nombre + "\"><img src=\"imagenes/galerias/"+Ruta+"/" + FotosMostrar[i] + ".jpg\" alt=\"" + Modelo +"-"+ Nombre + "\" width=\"130\" height=\"100\" border=\"0\"/><br /><span class=\"letrassp\">" + Nombre + "</span></a></span><br /><span class=\"letrassp\">Referencia: "+ Modelo +" <br /></div>");
			}
			document.write('</td></tr>');
		}else{
			///resto
			if (Tipo==4){
				 document.write('<tr></td></tr><tr><td align=\"right\"><div id=\"pasinter\"/ style=\"visibility:visible; display:block\"><div id=\"navcontainer\"><ul id=\"navlist\"><li><a href=\"#\" onclick=\"OpRestoForm();\" title=\"Formalizar Pedido\">Formalizar Pedido</a></li></ul></div></div></td></tr>');
			 }
			document.write('<tr><td>');
			var valores;
			for (i=0;i<FotosMostrar.length;i++){
				valores = FotosMostrar[i].split('-');
				var Modelo = valores[0];
				var Nombre = valores[1];
				var Tamano = valores[2];
				var Vinculo = valores[0]+'-'+valores[1]+'-'+valores[2];			
				document.write("<div class=\"contenedorfoto\" ><span class=\"contenedorfoto1\"><br /><a href=\"imagenes/galerias/"+Ruta+"/"+Vinculo+".jpg\" rel=\"sexylightbox["+Grupo+"]\" title=\"" + Modelo +"-"+ Nombre + "\"><img src=\"imagenes/galerias/"+Ruta+"/" + FotosMostrar[i] + ".jpg\" alt=\"" + Modelo +"-"+ Nombre + "\" width=\"130\" height=\"100\" border=\"0\"/><br /><span class=\"letrassp\">" + Nombre + "</span></a></span><br /><span class=\"letrassp\">Tamaño: "+Tamano+"mm<br />Referencia: "+ Modelo +" <br />");
				if (Tipo==4){
					document.write("Cantidad:</span><input name=\"" + Modelo +"-"+ Nombre + "\" type=\"text\" id=\"" + Modelo +"-"+ Nombre + "\" size=\"2\" maxlength=\"3\" /><br />");
				}
				document.write("<a href=\"imagenes/galerias/"+Ruta+"/"+Vinculo+"-real.jpg\" rel=\"sexylightbox["+Grupo2+"]\" title=\"" + Modelo +"-"+ Nombre + "\">Ver Resultado:</a></span><br /></div>");
			}
			 if (Tipo==4){
				 document.write('<tr></td></tr><tr><td align=\"right\"><div id=\"pasinter\"/ style=\"visibility:visible; display:block\"><div id=\"navcontainer\"><ul id=\"navlist\"><li><a href=\"#\" onclick=\"OpRestoForm();\" title=\"Formalizar Pedido\"  >Formalizar Pedido</a></li></ul></div></div></td></tr>');
			 }
		}
		document.write('</table>');
	}
}


///formulario 
function validar(formulario){
	/// Nombre
	if (formulario.Nombre.value.length == 0) {
		alert("La informcaion del \"Nombre\" es obligatoria.");
		formulario.Nombre.focus();
		return (false);
	}
	
	var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú ";
	var checkStr = formulario.Nombre.value;
	var allValid = true; 
	for (i = 0; i < checkStr.length; i++){
		ch = checkStr.charAt(i); 
		for (j = 0; j < checkOK.length; j++)
			if (ch == checkOK.charAt(j))
			break;
			if (j == checkOK.length){ 
				allValid = false; 
				break; 
			}
		}
	if (!allValid){ 
		alert("Escriba sólo letras en el campo \"Nombre\"."); 
		formulario.Nombre.focus(); 
		return (false); 
	}
	
	//// Apellidos
	if (formulario.Apellidos.value.length == 0){
		alert("La informcaion del \"Apellidos\" es obligatoria.");
		formulario.Apellidos.focus();
		return (false);
	}
	
	var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú ";
	var checkStr = formulario.Apellidos.value;
	var allValid = true; 
	for (i = 0; i < checkStr.length; i++){
		ch = checkStr.charAt(i); 
		for (j = 0; j < checkOK.length; j++)
			if (ch == checkOK.charAt(j))
				break;
			if (j == checkOK.length){
				allValid = false; 
				break; 
			}
		}
	if (!allValid){ 
		alert("Escriba sólo letras en el campo \"Apellidos\"."); 
		formulario.Apellidos.focus(); 
		return (false); 
	} 
	///Direccion
	if (formulario.Direccion.value.length == 0) {
		alert("La informcaion del \"Direccion\" es obligatoria.");
		formulario.Direccion.focus();
		return (false);
	}
	////Población
	if (formulario.Poblacion.value.length == 0) {
		alert("La informcaion del \"Población\" es obligatoria.");
		formulario.Poblacion.focus();
		return (false);
	}
	////Provincia
	if (formulario.Provincia.value.length == 0) {
		alert("La informcaion del \"Provincia\" es obligatoria.");
		formulario.Provincia.focus();
		return (false);
	}
	////C. Postal 
	if (formulario.CPostal.value.length == 0) {
		alert("La informcaion del \"Codigo Postal\" es obligatoria.");
		formulario.CPostal.focus();
		return (false);
	}
	///Pais
	if (formulario.Pais.value.length == 0) {
		alert("La informcaion del \"Pais\" es obligatoria.");
		formulario.Pais.focus();
		return (false);
	}
	/// Telefono 
	if (formulario.Telefono.value.length == 0) {
		alert("La informcaion del \"Telefono\" es obligatoria.");
		formulario.Telefono.focus();
		return (false);
	}
	var checkOK = "0123456789"; 
	var checkStr = formulario.Telefono.value; 
	var allValid = true; 
	var decPoints = 0; 
	var allNum = ""; 
	for (i = 0; i < checkStr.length; i++){ 
		ch = checkStr.charAt(i);
		for (j = 0; j < checkOK.length; j++)
			if (ch == checkOK.charAt(j))
			break; 
		if (j == checkOK.length){
			allValid = false; 
			break; 
		} 
		allNum += ch; 
	} 
	if (!allValid){ 
		alert("Escriba sólo dígitos en el campo \"Telefono\".");
		formulario.Telefono.focus(); 
		return (false); 
	}
	/// email
	if ((formulario.Email.value.indexOf ('@', 0) == -1)||(formulario.Email.value.length < 5)||(formulario.Email.value.length==0)){ 
		alert("Escriba una dirección de correo válida en el campo \"Email\".");
		formulario.Email.focus();
		return (false);
	}  
	return (true); 
}

function bannpub(capa){
var resolh
var resolw
if(screen.width==800){
		resolh = (screen.height)
		resolw = (screen.width)
		document.getElementById("capaFondo").style.visibility="visible";
		document.getElementById("capaFondo").style.width=resolw;
		document.getElementById("capaFondo").style.height=resolh;
		document.getElementById(capa).style.visibility="visible";
			}else{
			if(screen.width==1024) {
				resolh = (screen.height-200)
				resolw = (screen.width-32)
				document.getElementById(capa).style.visibility="visible";		
					}else{	
					if(screen.width==1280) {
						resolh = (screen.height-180)
						resolw = (screen.width-30)
						document.getElementById("capaFondo").style.visibility="visible";
						document.getElementById("capaFondo").style.width=resolw;
						document.getElementById("capaFondo").style.height=resolh;
						document.getElementById(capa).style.visibility="visible";
							}else{
								// mas...
								resolh = (screen.height-180)
								resolw = (screen.width-30)
								document.getElementById("capaFondo").style.visibility="visible";
								document.getElementById("capaFondo").style.width=resolw;
								document.getElementById("capaFondo").style.height=resolh;
								document.getElementById(capa).style.visibility="visible";
							}
					}
			}
	}

function cerrarVentana(){
document.getElementById("capaVentana").style.visibility="hidden";
document.getElementById("CapaFondo").style.visibility="hidden";
}

function VerHormas(){
	var capaocultar;
	var Ruta;
	var FotosMostrar;		
	var Titulo;
	var Grupo;
	var Grupo2;
		Titulo="HORMAS PARA SOMBREROS";
		Grupo="group1";
		Grupo2="group1r";
		Ruta="hormas/";	
		FotosMostrar = new Array('AL001-29-54-40 a 50-thumbs','AL002-10-44-40 a 50-thumbs','AL003-4-40-40 a 50-thumbs','AL004-10-44-40 a 50-thumbs','AL005-10-39x35-40 a 50-thumbs','AL006-7-35x39-40 a 50-thumbs','AL007-9-45-40 a 50-thumbs','AL008-9-42-40 a 50-thumbs','CA001-29-54-54 a 61-thumbs','CP002-21.5-56 58 60 61-54 a 61-thumbs','CP003-17-54 55-54 a 61-thumbs','CP004-13-56-54 a 61-thumbs','CP005-13-55 56-54 a 61-thumbs','CP006-20-54 55-54 a 61-thumbs','MOL001-10-55 56-54 a 61-thumbs');	
		// muestro Gal
		document.write('<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">');
		document.write("<tr><td><span class=\"subtitulos\">"+Titulo+"</span></td></tr>");
		document.write('<tr></td></tr><tr><td align=\"right\"><div id=\"pasinter\"/ style=\"visibility:visible; display:block\"><div id=\"navcontainer\"><ul id=\"navlist\"><li><a href=\"#\" onclick=\"OpRestoForm();\" title=\"Formalizar Pedido\">Formalizar Pedido</a></li></ul></div></div></td></tr>');
			///hormas
			document.write('<tr><td>');
			var valores;
			for (i=0;i<FotosMostrar.length;i++){
				valores = FotosMostrar[i].split('-');
				var Modelo = valores[0];
				var Nombre = valores[1];
				var Tamano = valores[2];
				var Ampliacion = valores[3];
				var Vinculo = valores[0]+'-'+valores[1]+'-'+valores[2];			
				document.write("<div class=\"contenedorfoto\" ><span class=\"contenedorfoto1\"><br /><a href=\"imagenes/galerias/"+Ruta+"/"+Modelo+".jpg\" rel=\"sexylightbox["+Grupo+"]\" title=\""+Modelo+"-Altura: "+Nombre+"cm Diámetro: "+Tamano+"cm - Ampliación: "+Ampliacion+" \"><img src=\"imagenes/galerias/"+Ruta+"/" + FotosMostrar[i] + ".jpg\" alt=\"" + Modelo +"-"+ Nombre + "\" width=\"130\" height=\"100\" border=\"0\"/><br /><br />Referencia: "+ Modelo +"</a></span><br /><span class=\"letrassp\">Altura: "+Nombre+"cm</span><br /><span class=\"letrassp\">Diámetro: "+Tamano+"cm<br />Apliación: "+Ampliacion+"cm <br />");				
					document.write("Cantidad:</span><input name=\"" + Modelo +"\" type=\"text\" id=\""+Modelo+"-"+Nombre+"\" size=\"2\" maxlength=\"3\" /><br /></div>");
			}
			document.write('<tr></td></tr><tr><td align=\"right\"><div id=\"pasinter\"/ style=\"visibility:visible; display:block\"><div id=\"navcontainer\"><ul id=\"navlist\"><li><a href=\"#\" onclick=\"OpRestoForm();\" title=\"Formalizar Pedido\">Formalizar Pedido</a></li></ul></div></div></td></tr>');
			document.write('</table>');
}