function getValue(id){
	return document.getElementById(id).value;
}
function getElement(id){
	return document.getElementById(id);
}

function nuevoAjax(){
	var xmlhttp=false;
 	try {
 		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 	} catch (e) {
 		try {
 			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 		} catch (E) {
 			xmlhttp = false;
 		}
  	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}
function fixpng(){
	var arVersion = navigator.appVersion.split("MSIE")
	
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters)){
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'"+IMG_URL + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}

}
function showDivs(){
	
	try{
		elemento = document.getElementByTagName("div");
		

	}
	catch(e){
		alert(e.message());
	}
	alert("funcion terminada");
}


/**
 * Contiene los pasos necesarios para la carga correcta del sitio
 * @return
 */
function carga(){
	
}

function mensaje(texto){
	dialogo = new Dialogo();
	dialogo.text = '<div style="text-align:center; font-weight:bold; font-size:18px; margin-top:20px;">'+texto+'</div><div style="margin-top:15px; text-align:center;"><input type="button" value="Aceptar" onclick="dialogo.close();"></div>';
	dialogo.text = dialogo.text.replace("\\n","<br>");
	dialogo.marginTop = 120;
	dialogo.setHeight(150);
	
	dialogo.show($('dialogDiv'));
}

function preventEvent(event){
	try{
		event.preventDefault();
	}
	catch(e){
		event.setDefault = false;
	}
}

/** Precarga de imagenes */

imagenes = new Array();
imagenes[1] = new Image();
imagenes[1].src = IMG_URL + 'images/ajax/ajax-loader0.gif';

var dialogo = null;
