
	function doMouseOver(elem) {
			
	}

	function doMouseOut(elem) {
			elem.style.fontWeight = "normal";
	}

	function doMouseOverItemDesc(elem) {
		
	}

	function doMouseOutItemDesc(elem) {
		if (elem.className != "selectedItem")
			elem.style.backgroundColor = "";
	}
	
	function doMouseOverLeftMenu(elem) {
		if (elem.className != "selectedItem")
			elem.style.backgroundColor = "rgb(132,235,92)"
	}

	function doMouseOutLeftMenu(elem) {
		if (elem.className != "selectedItem")
			elem.style.backgroundColor = "";
	}

	
	function doButtonMOver(elem) {
		/*document.getElementById(idElem).style.borderColor = "rgb(174, 206, 255)";*/
		elem.style.borderWidth = "2px";
	}

	function doButtonMOut(elem) {
		/*document.getElementById(idElem).style.borderColor = "rgb(77, 97, 133)";*/
		elem.style.borderWidth = "1px";
	}

			
	// Retrieve the rendered width of an element
	function getObjectWidth(elem)  {
	    var result = 0;

	    if (elem.offsetWidth) {
	        result = elem.offsetWidth;
	    } else if (elem.clip && elem.clip.width) {
	        result = elem.clip.width;
	    } else if (elem.style && elem.style.pixelWidth) {
	        result = elem.style.pixelWidth;
	    }
	    return parseInt(result);
	}
	   
	// Retrieve the rendered height of an element
	function getObjectHeight(elem)  {
	    var result = 0;
	    if (elem.offsetHeight) {
	        result = elem.offsetHeight;
	    } else if (elem.clip && elem.clip.height) {
	        result = elem.clip.height;
	    } else if (elem.style && elem.style.pixelHeight) {
	        result = elem.style.pixelHeight;
	    }
	    return parseInt(result);
	}

	// Return the available content width space in browser window
	function getInsideWindowWidth() {
		var isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;

	    if (window.innerWidth) {
	        return window.innerWidth;
	    } else if (isIE6CSS) {
	        // measure the html element's clientWidth
	        return document.body.parentElement.clientWidth;
	    } else if (document.body && document.body.clientWidth) {
	        return document.body.clientWidth;
	    }
	    return 0;
	}

	// Return the available content height space in browser window
	function getInsideWindowHeight() {
		var isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;

	    if (window.innerHeight) {
	        return window.innerHeight;
	    } else if (isIE6CSS) {
	        // measure the html element's clientHeight
	        return document.body.parentElement.clientHeight;
	    } else if (document.body && document.body.clientHeight) {
	        return document.body.clientHeight;
	    }
	    return 0;
	}
	
	function centerOnWindow(elemID) {
	    var obj = document.getElementById(elemID);
	    // window scroll factors
	    var scrollX = 0, scrollY = 0;
	    if (document.body && typeof document.body.scrollTop != "undefined") {
	        scrollX += document.body.scrollLeft;
	        scrollY += document.body.scrollTop;
	    } else if (typeof window.pageXOffset != "undefined") {
	        scrollX += window.pageXOffset;
	        scrollY += window.pageYOffset;
	    }
	    
	    var windowWidth = getInsideWindowWidth();
	    var windowHeight = getInsideWindowHeight();

	    var x = Math.round((windowWidth - getObjectWidth(obj)) / 2) + scrollX;
	    var y = Math.round((windowHeight - getObjectHeight(obj)) / 2) + scrollY;
	        
        obj.style.left = x + "px";
        obj.style.top  = y + "px";
	}
	
	function showWindow(elemId) {
		var w = document.getElementById(elemId);

		w.style.zIndex = "1";
		w.style.position = "absolute";
		w.style.left = "-8000px";
		w.style.top  = "-8000px";
		w.style.display = "block";
		
		centerOnWindow(elemId);
	}

	function closeWindow(elemId) {
		var w = document.getElementById(elemId);
		w.style.display = "none";
	}
	

   function validarEmail(valor) {
	  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
	   alert("La dirección de email " + valor    + " es correcta.") 
	   return (true)
	  } else {
	   alert("La dirección de email es incorrecta.");
	   return (false);
	  }
   }
