function SWFObjectNew(alto, ancho, DivObject, archivoswf, trans) {
ActiveTransparent = true;
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);
}
}


enc_on=false;
	
function encValidate2(f) { 
 
if(!enc_on){ 
alert("Por favor marque su preferencia"); 
return false; 
} 
else {return true; 
} 
}

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();
}


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('../../reder/imgThumb.php?src=' + img + '&w=550&h=360&zc=0'+ texto +'','','scrollbars=yes, width=590,height=390');}
function cafe43Foto(img, texto) {window.open('../../reder/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 + '');
}


