/* Tamano de texto */
var t1 = 13; var t2 = 9;
function afuente(texto){ 	if (t1 < 18){  	t1++; 	setFuentes(t1,texto); 	} }
function rfuente(texto){	if (t1 > 12){ 	t1--;	setFuentes(t1,texto);	} }
function __afuente(texto){ 	if (t2 < 18){	t2++;	setFuentes(t2,texto);	} }
function __rfuente(texto){	if (t2 > 9){	t2--;	setFuentes(t2,texto);	} }
function setFuentes(fontactual,lay){
	//var lay = document.getElementById(idtexto);
	try{
		lay.style.fontSize=(fontactual + 4) + "px";
		//lay.style.fontSize = fontactual;
		lay.style.lineHeight = (fontactual + 7) + "px";
	}catch(e){
	}
}


function Popup(url,name,width,height,resize,scroll) {
	var dialogWin = new Object();
	dialogWin.width = width;
	dialogWin.height = height;
	now = new Date();
	var millis=now.getTime();
	var mstr=""+millis;
	if (navigator.appName == "Netscape") {
		dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
		dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
		var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	} else if (document.all) {
		dialogWin.left = (screen.width - dialogWin.width) / 2;
		dialogWin.top = (screen.height - dialogWin.height) / 2;
		var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	}
	window.open(url,name,attr);
}


//modo de uso: wwwAjax(utl,data, targetDIV, 'DIV_preloader');
function wwwAjax(url,data__,targetId,div_preload){
	var url = url;
	var params = {'data__': data__ } ;
	var miAjax = new Request.HTML({
		url: url,
		method: 'get',
		data: params,
		update: $(targetId),
		onRequest: function(){
			$(div_preload).set("html",'<img src="../um_content/images/indicator_white_small0.gif" />');	
			AddClassName($(div_preload),'formulario_visible');
		},
		onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript){
			AddClassName($(div_preload),'formulario_oculto');
			$(targetId).set('html', responseHTML);
			eval("(" + responseJavaScript + ")");
		},
		onFailure: function(){ 
			$(div_preload).set("html","Ocurrio un error."); 
			AddClassName($(div_preload),'formulario_visible');			
		},
		evalScripts: true
	});
	miAjax.send();
}
