		
			//
			// getPageSize()
			// Returns array with page width, height and window width, height
			// Core code from - quirksmode.org
			// Edit for Firefox by pHaez
			//
			function getPageSize(){
				
				var xScroll, yScroll;
				
				if (window.innerHeight && window.scrollMaxY) {	
					xScroll = document.body.scrollWidth;
					yScroll = window.innerHeight + window.scrollMaxY;
				} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
					xScroll = document.body.scrollWidth;
					yScroll = document.body.scrollHeight;
				} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
					xScroll = document.body.offsetWidth;
					yScroll = document.body.offsetHeight;
				}
				
				var windowWidth, windowHeight;
				if (self.innerHeight) {	// all except Explorer
					windowWidth = self.innerWidth;
					windowHeight = self.innerHeight;
				} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
					windowWidth = document.documentElement.clientWidth;
					windowHeight = document.documentElement.clientHeight;
				} else if (document.body) { // other Explorers
					windowWidth = document.body.clientWidth;
					windowHeight = document.body.clientHeight;
				}	
				
				// for small pages with total height less then height of the viewport
				if(yScroll < windowHeight){
					pageHeight = windowHeight;
				} else { 
					pageHeight = yScroll;
				}
			
				// for small pages with total width less then width of the viewport
				if(xScroll < windowWidth){	
					pageWidth = windowWidth;
				} else {
					pageWidth = xScroll;
				}
			
			
				arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
				return arrayPageSize;
			}
			//
			// getPageScroll()
			// Returns array with x,y page scroll values.
			// Core code from - quirksmode.org
			//
			function getPageScroll(){
			
				var yScroll;
			
				if (self.pageYOffset) {
					yScroll = self.pageYOffset;
				} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
					yScroll = document.documentElement.scrollTop;
				} else if (document.body) {// all other Explorers
					yScroll = document.body.scrollTop;
				}
			
				arrayPageScroll = new Array('',yScroll) 
				return arrayPageScroll;
			}
 
			// ---------------------------------------------------
			function showSelectBoxes(){
				selects = document.getElementsByTagName("select");
				for (i = 0; i != selects.length; i++) {
					//selects[i].style.visibility = "visible";
					selects[i].disabled = false;
				}
			}
			
			// ---------------------------------------------------
			function hideSelectBoxes(){
				selects = document.getElementsByTagName("select");
				for (i = 0; i != selects.length; i++) {
//					selects[i].style.visibility = "hidden";
					selects[i].disabled = true;
				}
			}
			// ---------------------------------------------------
			function showInputBoxes(){
				inputs = document.getElementsByTagName("input");
				for (i = 0; i != inputs.length; i++) {
					inputs[i].disabled = false;
				}
			}
			
			// ---------------------------------------------------
			function hideInputBoxes(){
				inputs = document.getElementsByTagName("input");
				for (i = 0; i != inputs.length; i++) {
					inputs[i].disabled = true;					
				}
			}
			
			function onRequestStart() 
			{ 
				//--- Obtener medidas de la pantalla
				var arrayPageSize = getPageSize();
				var arrayPageScroll = getPageScroll();
				
				//--- Poner medidas en capa y mostrarla
				$('cargando').style.width = arrayPageSize[0];
				$('cargando').style.height = arrayPageSize[1];
				$('cargando').style.display='block';
				//--- Si no existe imagen cargando, crearla dentro de la capa
				if($('cargando').childNodes[0]==null) {
					imgCargando=document.createElement('img');				
					imgCargando.style.display='block';	
					imgCargando.style.position='absolute';	
					imgCargando.style.top = (arrayPageSize[1]/2)-32;
					imgCargando.style.left = (arrayPageSize[0]/2)-32;
					imgCargando.src = '_aux_imatges/cargando.gif';
					$('cargando').appendChild(imgCargando);
				}
				//--- Sirve para no mantener focus en ningun textbox para que no se pueda escribir nada
				$('drpDwnMunicipios').focus();
				//--- Desactibar selects y textbox
				hideSelectBoxes();	
				hideInputBoxes();
			} 
			function onResponseEnd() 
			{ 
				//--- Volver a activar selects y textbox
				showSelectBoxes();
				showInputBoxes();
				//--- Ocultar capa cargando
				$('cargando').style.display='none'; 
			} 