function irURL(direccion){if(!window.opener){window.location.href=direccion;}else{window.opener.location.href=direccion;window.opener.focus()}}
function irHome(){window.opener.location.href="http://www.arteiweb.com";window.close()}
function focoOpener(){window.opener.focus()}
function verURL(miURL,redir){var winl=(screen.width-850)/2;var wint=(screen.height-650)/2;winprops='height=650,width=850,top='+wint+',left='+winl+',scrollbars=yes,resizable=no'
miPopup=window.open(miURL,"miwin",winprops)
miPopup.focus()
window.location.href=redir;}
function NewWin(mypage,myname,w,h,scroll){var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;winprops='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win=window.open(mypage,myname,winprops)
if(parseInt(navigator.appVersion)>=4){win.window.focus();}}
function imprimirEsp(){if(window.print)
window.print();else
alert("Lo siento, pero a tu navegador no se le puede ordenar imprimir"+" desde la web. Actualizate o hazlo desde los menús");}
function marcar(){for(i=0;i<document.formulario.checado.length;i++)document.formulario.checado[i].checked=true;}
function desmarcar(i){for(i=0;i<document.formulario.checado.length;i++)document.formulario.checado[i].checked=false;}
var ventana
var cont=0
var titulopordefecto="Fotos"
function afoto(cual,titulo)
{if(cont==1){ventana.close();ventana=null}
if(titulo==null){titulo=titulopordefecto}
ventana=window.open('','ventana','resizable=no, scrollbars=no, width=100, height=100')
ventana.document.write('<html><head><title>'+titulo+'</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="'+cual+'" onLoad="opener.redimensionar(this.width, this.height)">')
ventana.document.close()
cont++}
function redimensionar(ancho,alto)
{ventana.resizeTo(ancho+12,alto+38)
ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2)}
function maximaLongitud(texto,maxlong){var tecla,in_value,out_value;if(texto.value.length>maxlong){in_value=texto.value;out_value=in_value.substring(0,maxlong);texto.value=out_value;return false;}
return true;}
function agregarMarcadores(title,url){if(window.sidebar){window.sidebar.addPanel(title,url,"");}else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();}else if(document.all){window.external.AddFavorite(url,title);}}
function validar(formulario){if(formulario.nombrer.value.length<1){alert("Escribe algo en el campo \"Nombre\" remitente.");formulario.nombrer.focus();return(false);}
var checkOK="ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ"+"abcdefghijklmnñopqrstuvwxyzáéíóú ";var checkStr=formulario.nombrer.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("Escribe sólo letras en el campo \"Nombre\" remitente.");formulario.nombrer.focus();return(false);}
if((formulario.correor.value.indexOf('@',0)==-1)||(formulario.correor.value.length<5)){alert("Escribe una dirección válida en el campo \"Email\" remitente.");return(false);}
if(formulario.nombred.value.length<1){alert("Escribe algo en el campo \"Nombre\" destinatario.");formulario.nombred.focus();return(false);}
var checkOK="ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ"+"abcdefghijklmnñopqrstuvwxyzáéíóú ";var checkStr=formulario.nombred.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("Escribe sólo letras en el campo \"Nombre\" destinatario.");formulario.nombred.focus();return(false);}
if((formulario.correod.value.indexOf('@',0)==-1)||(formulario.correod.value.length<5)){alert("Escribe una dirección válida en el campo \"Email\" destinatino.");return(false);}
return(true);}
function mostrar(capa1,capa2,capa3){document.getElementById(capa1).style.display="none";document.getElementById(capa2).style.display="block";document.getElementById(capa3).style.display="inline";}
function ocultar(capa1,capa2,capa3){document.getElementById(capa1).style.display="inline";document.getElementById(capa2).style.display="none";document.getElementById(capa3).style.display="none";}