function objFlash(nombre, ancho, alto, param) {
    if (AC_FL_RunContent == 0) {
        alert("Esta página requiere el archivo AC_RunActiveContent.js.");
    } else {
        AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
            'width', ancho,
            'height', alto,
            'src', nombre,
            'quality', 'high',
            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'loop', 'true',
            'scale', 'showall',
            'wmode', 'transparent',
            'devicefont', 'false',
            'id', nombre,
            'bgcolor', '#ffffff',
            'name', nombre,
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','sameDomain',
            'movie', 'img/' + nombre,
            'salign', '',
			'flashvars', param
            ); 
    }
}

function pop_up(url, extraurl, ancho, alto)
{
	var ventana;
	ventana = url+extraurl;
	param = 'status=no,scrollbars=no,location=no,resizable=no,width='+ancho+',height='+alto+',left=300,top=300';
	window.open(ventana, '' ,param);
}

//>>>> mar - 15/09/2009 - 13:57:43 --   Cambiados...
/*
function validar_telefono(valor)
{
	if(/^[0-9\-\(\)]+$/.test(valor)) return true;	//if (valor.length==9 && parseInt(valor)==valor) return true;
	else return false;	
}

function validar_email(valor)
{	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)) return (true)
	else return (false);
}
*/

function validar_telefono(valor)
{
	if(/^[0-9\-\(\)]+$/.test(valor)) return true;	//if (valor.length==9 && parseInt(valor)==valor) return true;
	else return false;	
}

function validar_email(valor)
{	
	//mié - 09/09/2009 - 11:41:14 
	//Validar el email pasa por al menos una arroba y un punto...

	if(valor.indexOf('@') != -1 && valor.indexOf('.')!= -1) return true;
	else return false;

	//if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)) return (true)
	//else return (false);
}

function insertar_opcion(valor, texto, campo)
{
	var opcion = document.createElement('option'); 
	opcion.value=valor;
	opcion.text=texto;
	campo.options.add(opcion);
}

function montar_elemento(tipo, clases, contenido)
{
	var temporal=document.createElement(tipo);
	temporal.className=clases;
	if(contenido) temporal.innerHTML=contenido;
	return temporal;
}

function eliminar_contenido(elemento)
{
	if(elemento.hasChildNodes) 	
		while(elemento.childNodes.length >= 1 ) 
			elemento.removeChild(elemento.childNodes[0]);		
}

function verImg(ruta, ancho, alto)
{
	param = 'status=no,scrollbars=no,location=no,resizable=no,width='+ancho+',height='+alto+',left=100,top=100';
	url = 'inc/img.php?ruta=' + ruta + '&ancho=' + ancho + '&alto=' + alto;
	window.open(url,'',param);
}


