
function get_sync(id,url){
	var o = document.getElementById(id);
	var a = new Ajax();
	a.set_async(false);
	a.set_cache(true);
	o.innerHTML = a.send(url);
}

function post_async(id,url)      {
	var o = document.getElementById(id);
	var a = new Ajax();
	a.set_method('POST');
	a.set_receive_handler(function() {
		if (a.get_ajax().readyState != 4) { return; }
		clearTimeout(a.get_timeout_obj());
		o.innerHTML = a.get_ajax().responseText;
	});
	a.add_input('arvhivo',document.frm.archivo.value);
	a.add_input('imagen_descripcion',document.frm.imagen_descripcion.value);
	a.add_input('imagen_texto_alt',document.frm.imagen_texto_alt.value);
	a.send(url);
}

  function envar_form(id,url)
  {
    var a = new Ajax();
    a.set_method('POST');
    a.set_receive_handler(function(c)
    {
      var o = document.getElementById(id);
      o.innerHTML = c;
    });
    a.send_all(url);
  }

function op_window(theURL,winName,features) {
  window.open(theURL,winName,features);
}

var min=8;
var max=22;
function increaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 13;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

function setClassName(clsName,type) {
	//
	(type=='body'?document.body.className = clsName : document.getElementById(type).className = clsName);
	
}
/*window.onload = function() {
	
	if (screen.width > 1024) {
		setClassName("bodyHiRes",'body');
	}else {
		setClassName("body",'body');
	}
	
	
}*/