function enlaza (index)
{
var bucle;
p_formid = index;
for (bucle=0; bucle < document.forms[index].elements.length; bucle++)
{
if (document.forms[index].elements[bucle].type == 'text')
{
document.forms[index].elements[bucle].onclick = seleccion;
document.forms[index].elements[bucle].onblur = lostfocus;
document.forms[index].elements[bucle].onfocus = gotfocus;
}
}
}
function lostfocus()
{
if (window.event.srcElement.name.split("___")[3] == '1')
{
if (window.event.srcElement.value == '')
{
window.event.srcElement.className='FRM_Field_Error';
}
else
{
window.event.srcElement.className='FRM_Field';
}
}
else
{
window.event.srcElement.className='FRM_Field';
}
}
function gotfocus()
{
window.event.srcElement.className='FRM_Field_Focus';
}
function seleccion()
{
window.event.srcElement.focus();
}
var ventana=false;
function Pop_UP(url, ancho, alto, titulo)
{
if (typeof ventana.document == "object") {ventana.close()}
LeftPosition = (screen.width) ? (screen.width-ancho)/2 : 0;
TopPosition = (screen.height) ? (screen.height-alto)/2 : 0;
destino = "imagen.php?ruta=" + url + "&titulo=" + titulo;
ventana = window.open(destino, "Imagen", "status = 1, left = " + LeftPosition + ", top = " + TopPosition + ", height = " + alto + ", width = " + ancho + ", resizable = 0" )
}
var ventanaCalendario=false
var ventanaCatalogo=false
function muestraCalendario(ruta, formulario_destino, campo_destino, fecha_ini, fecha_fin, defecto)
{
if (typeof ventanaCalendario.document == "object")
{
ventanaCalendario.close()
}
ventanaCalendario = window.open(ruta + "modulo_calendario.php?formulario=" + formulario_destino + "&nomcampo=" + campo_destino + "&fecha_min="+fecha_ini+"&fecha_max="+fecha_fin+"&defecto="+defecto,"calendario","width=300,height=300,left=100,top=100,scrollbars=no,menubars=no,statusbar=NO,status=NO,resizable=YES,location=NO")
}
function solonumeros()
{
var key=window.event.keyCode;
if (key < 48 || key > 57)
{
if (key != 46 && key != 44)
{
window.event.keyCode=0;
}
}
}
function soloprecio()
{
var key=window.event.keyCode;
if (key < 48 || key > 57)
{
if (key != 46)
{
window.event.keyCode=0;
}
}
}
function eMovie(pelicula,ancho,alto,as,l)
{
document.write('');
}
function eFlash(pelicula,variables,ancho,alto,id,wmode,align)
{
if (align!='')
{
document.write('