function SWFObjectNew(alto, ancho, DivObject, archivoswf) { ActiveTransparent = false; var SWFobject;
SWFobject = ''; SWFobject += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + ancho + '" height="' + alto + '">'; SWFobject += '<param name="movie" value="' + archivoswf + '">'; SWFobject += '<param name="quality" value="high">'; if(ActiveTransparent) { SWFobject += '<param name="wmode" value="transparent">'; }
if(ActiveTransparent) { SWFobject += '<embed src="' + archivoswf + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + ancho + '" height="' + alto + '" wmode="transparent">'; } else { SWFobject += '<embed src="' + archivoswf + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + ancho + '" height="' + alto + '">'; }	SWFobject += '</embed></object>'; if(document.getElementById(DivObject)) { document.getElementById(DivObject).innerHTML = SWFobject; } else { document.write(SWFobject); }}

function NaviSelect(eventTarget, eventArgument) {
	
		var theform;
		
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			theform = document.galerias;
		} else {
			theform = document.forms["galerias"];
		}
 theform.submit();
}

function NaviSelectUp(eventTarget, eventArgument) {
	
		var theform;
		
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			theform = document.upload;
		} else {
			theform = document.forms["upload"];
		}
 theform.submit();
}



enc_on=false;
	
function encValidate2(f) { 
 
if(!enc_on){ 
alert("Por favor marque su preferencia"); 
return false; 
} 
else {return true; 
} 
}





function ResultadosEnc (id) {
	RumEncuesta('__encuesta/resultados.php?idenc=' + id + '','','scrollbars=yes, width=480,height=360');
}

function RumEncuesta(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function GaleriaAct(id, ref) {
	window.open('____GeleriaActividades/index.php?id=' + id + '&ref=' + ref + '','','scrollbars=yes, width=850,height=570');
}

var titulopordefecto = "";
var Adal_ventana;
var cont=0;

function Adal_Foto(cual,titulo){
	if(cont==1){Adal_ventana.close();Adal_ventana=null}
	if(titulo==null){titulo=titulopordefecto}
	Adal_ventana=window.open('','Adal_ventana','resizable=yes,scrollbars=no')
	Adal_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)">');
	Adal_ventana.document.close();
	cont++;
}

function InFoto(path,n) {
	window.open('__Windows/img_principal.php?path=' + path + '&n=' + n + '','','scrollbars=yes, width=590,height=390');
}

function getGFoto(id) {
	window.open('__Windows/fotos.php?id=' + id + '','','width=590,height=400,top=50,left=50,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=yes,copyhistory=0');
}

function getGFotoMain(id) {
	window.open('__Windows/main_fotos.php?id=' + id + '','','width=590,height=400,top=50,left=50,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=yes,copyhistory=0');
}

function InFotoGal(path,n) {
window.open('__Windows/img_galeria.php?path=' + path + '&n=' + n + '','','scrollbars=yes, width=590,height=390');}
function redimensionar(ancho, alto){Adal_ventana.resizeTo(ancho+12,alto+28);Adal_ventana.moveTo((screen.width-ancho)/2,(screen.height-alto)/2);}
function AdalImagenRender(img, texto) {window.open('../../render/imgThumb.php?src=' + img + '&w=550&h=360&zc=0'+ texto +'','','scrollbars=yes, width=590,height=390');}
function serverFoto(img, texto) {window.open('../../render/imgThumb.php?src=' + img + '&w=550&h=360&zc=0'+ texto +'','','scrollbars=yes, width=590,height=390');}
function ImpArticulo(id, img) {window.open('__Windows/imprimir_art.php?id=' + id + '&img=' + img + '','','scrollbars=yes, width=600,height=500');}
function ImpArticuloNoImagen(id, img) {window.open('__Windows/imprimir_art.php?id=' + id + '&img=' + img + '','','scrollbars=yes, width=600,height=500');}

function getPrintArticulo(id) {
if (confirm("¿Deseas imprimir este artículo con su fotografía?")){ ImpArticulo(id, '1')}
else {ImpArticuloNoImagen(id, '0')}
}

function PoliticaUso() {window.open('../../../__$_Server/NtrWindows/politica_uso.php','','scrollbars=yes, width=400,height=500');}

function precio(evt){ 
var key = nav4 ? evt.which : evt.keyCode; 
return (key <= 13 || (key >= 48 && key <= 57));
}

var nav4 = window.Event ? true : false;
function adal_icm_format_md(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+''+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '' + num + '');
}

function AdalInt(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+''+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '' + num + '');
}

function NTFormLoginFun(){
	if (document.NTFormLogin.as87asas5a4s82as4a.value.length < 3){
		alert("Escriba su dirección de E-mail")
		return false;
	}
	if (document.NTFormLogin.s2df4ds5f7sd8f7re.value.length < 3){
		alert("Escriba la Contraseña")
		return false;
	}
}
function NTFormPassWFun(){
	if (document.NTFormPassW.EmailRessive.value.length < 3){
		alert("Escriba su dirección de E-mail")
		return false;
	}
}
function NTFormDisplayPW(){
	if (document.NTFormPassWNew.PassOld.value.length < 7){
		alert("Escriba su Contraseña actual")
		return false;
	}
	
	if (document.NTFormPassWNew.PassNew.value.length < 7){
		alert("Escriba su Nueva Contraseña")
		return false;
	}
}
function SortTd (bloque) { 
  if (document.getElementById(bloque).style.display == 'none') {
    document.getElementById(bloque).style.display = 'block';
	}
  else {
    document.getElementById(bloque).style.display = 'none'; 
  }
}

function serverSecureLogin() {
 
 if(serlogin.server_logemail.value.length < 2) {
  alert('Por favor escriba su correo electrónico');
  return false;
 }
 
 if(serlogin.server_logclave.value.length < 2) {
  alert('Por favor escriba su Clave');
  return false;
 }
 
 document.serlogin.submit();
 
}

function showHideDummyPwd(src) {
	
	if(src.id == 'server_pwdhiden') {
		document.getElementById('server_pwdhiden').style.display = 'none';
		document.getElementById('server_logclave').style.display = 'block';
		document.getElementById('server_logclave').focus();
	}
	
	if(src.id == 'server_logclave') {
		if (document.getElementById('server_logclave').value == '') {
			document.getElementById('server_logclave').style.display = 'none';
			document.getElementById('server_pwdhiden').style.display = 'block';
		}
	}
}





function serverRegistro(){

	if (document.FormRegistro.email.value.length < 2) {
	    alert('Por favor escriba su correo electrónico');
	    document.FormRegistro.email.focus()
		return 0;
	}
	
	if (document.FormRegistro.password.value.length < 2) {
	    alert('Por favor escriba su contraseña');
	    document.FormRegistro.password.focus()
		return 0;
	}
	
	if (document.FormRegistro.password2.value.length < 2) {
	    alert('Por favor repita su contraseña');
	    document.FormRegistro.password2.focus()
		return 0;
	}

	if (document.FormRegistro.nombre.value.length < 3) {
	    alert('Por favor escriba su nombre');
	    document.FormRegistro.nombre.focus()
		return 0;
	}

document.FormRegistro.submit();

}

function serverUpdate(){

	if (document.FormUpDate.nombre_usuario.value.length < 2) {
	    alert('Por favor escriba su nombre');
	    document.FormUpDate.nombre_usuario.focus()
		return 0;
	}

document.FormUpDate.submit();

}

function serverReset(){

	if (document.FormRegistro.email.value.length < 2) {
	    alert('Por favor escriba su correo electrónico');
	    document.FormRegistro.email.focus()
		return 0;
	}

document.FormRegistro.submit();

}

function serverUploadFile(){

	if (document.serUpLoad.tipo.value.length < 2) {
	    alert('Por favor escriba el asunto');
	    return false;
	}

document.serUpLoad.submit();

}



