 

             function selectAllFiltroPressFloatTextBox__(textbox,varSelectedName)
             {
                var textbox=document.getElementById('ControlPrincipal1_MyContentControlASPcontrolbuscarinmueble_ascx_TabControl1_TAB_PAGE0_txtPrecioMin');
                var range=document.selection.createRange();  

                if (!eval(varSelectedName) ) 
                {
                    range.moveStart('textedit');
                    range.expand('textedit');
                    
                }else
                {
                    range.moveStart('textedit');
                }
                range.select();
                eval(varSelectedName+'=!'+varSelectedName+';');
             }
             function floatFormatoTextBox__ (textbox)
             {
                
                var i;
                var cuenta=0;
                var res='';

                
                while (textbox.value.indexOf('.')!=-1)
                    textbox.value=textbox.value.replace('.','');

                
                while(textbox.value.length >1 && textbox.value.charAt(0)=='0') 
                {
                    if (textbox.value.charAt(1)!=',')
                        textbox.value=textbox.value.replace('0','');
                    else
                        break;
                }
                var l=textbox.value.length;
                var posComa=textbox.value.indexOf(',');
                var tieneComa=posComa!=-1;
                var puedeContar=!tieneComa;

                for (i=l-1;i>=0;i--) 
                {
                    if (textbox.value.charAt(i)!=',' && puedeContar)
                        cuenta++;
                    if (textbox.value.charAt(i)==',')
                        puedeContar=true;
                    res=textbox.value.charAt(i)+res;
                    if (cuenta==3 && i!=0 ) {
                        res='.'+res;
                        cuenta=0;
                    }
                }
                //if (res=='')
                    //res=0;
                textbox.value=res;
                
                
               
            }

            function floatFiltroPressTextBox__(textbox,varSelectedName,e)
            {   
              //  debugger;
                if (e.keyCode=='.'.charCodeAt(0))
                    window.event.keyCode=e.keyCode=44;
                if (!((e.keyCode>=48 && e.keyCode<=57) || (e.keyCode==','.charCodeAt(0) && textbox.value.indexOf(',')==-1) ))                    
                    e.returnValue= false;
                if (!((textbox.value.indexOf(',')!=-1 && textbox.value.length-textbox.value.indexOf(',')<3) ||textbox.value.indexOf(',')==-1 || textSelected____Page))
                    e.returnValue= false;
                eval(varSelectedName+'=false;');
            }var textSelected____Page=false;var textSelected____Page=false;
            function RequestCombo_ControlPrincipal1_MyContentControlASPcontrolbuscarinmueble_ascx_TabControl1_TAB_PAGE0_CtrlUbicacion1(idRegionPadre,combo)
            {
                combo.length=0;
                if (idRegionPadre>0)
                {
                    combo.options[0]=new Option('(Por favor espere......)',0);
                    CtrlUbicacion.GetSubRegiones(idRegionPadre,LlenarCombo_ControlPrincipal1_MyContentControlASPcontrolbuscarinmueble_ascx_TabControl1_TAB_PAGE0_CtrlUbicacion1,combo);
                }else
                  if (combo.onchange != null)combo.onchange();;
            }
            function LlenarCombo_ControlPrincipal1_MyContentControlASPcontrolbuscarinmueble_ascx_TabControl1_TAB_PAGE0_CtrlUbicacion1(valor)
            {
                var regiones=valor.value;
                var combo=valor.context;
                var offSet=(true?1:0);
                var i=0;
                var indice=0;
                combo.length=0;
                
                if (offSet==1)
                {
                    combo.options[0]=new Option('Todos','-2');
                }
                for (i=offSet;i<(regiones.length/2)+offSet;i++)
                {
                    combo.options[i]=new Option(regiones[indice++],regiones[indice++]);
                }
                if (false && regiones.length>0)
                    combo.options[i]=new Option('Otra','-1');
            
                if (combo.onchange != null)combo.onchange();;
            }
                function setMaxHeight(control,value)
                {
                    control.style.height=0;
                    if (control.offsetHeight>value)
                        control.style.height=value;
                }
            function CenterX()
            {
                var scrollXT=0;
                var clientWidth=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollXT = window.pageXOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollXT = document.body.scrollLeft;
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollXT = document.body.scrollLeft; 
	            } 
	            if (document.body.clientHeight){
	                clientWidth=document.body.clientWidth;
	            }
	            else if (window.innerHeight){
	                clientWidth=window.innerWidth;
	            }
                return (scrollXT)+clientWidth/2;
            }
            
            function CenterY()
            {
                var scrollYT=0;
                var clientHeight=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollYT = window.pageYOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollYT = document.documentElement.scrollTop; 
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollYT = document.body.scrollTop; 
	            } 
	            if (document.body.clientHeight){
	                clientHeight=document.body.clientHeight;
	            }
	            else if (window.innerHeight){
	                clientHeight=window.innerHeight;
	            }
                return (scrollYT)+clientHeight/2;
            }
            
            function ClientTop()
            {
                var scrollYT=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollYT = window.pageYOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollYT = document.documentElement.scrollTop; 
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollYT = document.body.scrollTop; 
	            } 
                return (scrollYT);
            }
            
            function ClientLeft()
            {
                var scrollXT=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollXT = window.pageXOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollXT = document.body.scrollLeft;
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollXT = document.body.scrollLeft; 
	            } 
                return (scrollXT);
            }
            
            function ClientRight()
            {
                var scrollXT=0;
                var clientWidth=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollXT = window.pageXOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollXT = document.body.scrollLeft;
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollXT = document.body.scrollLeft; 
	            } 
	            if (document.body.clientHeight){
	                clientWidth=document.body.clientWidth;
	            }
	            else if (window.innerHeight){
	                clientWidth=window.innerWidth;
	            }
                return (scrollXT)+clientWidth;
            }
            
            function ClientBottom()
            {
                var scrollYT=0;
                var clientHeight=0;
                if (typeof(window.pageYOffset) == 'number') { 
		            scrollYT = window.pageYOffset; 
	            } 
	            else if (document.body && document.documentElement && document.documentElement.scrollTop) { 
		            scrollYT = document.documentElement.scrollTop; 
	            }
	            else if (document.body && typeof(document.body.scrollTop) == 'number') { 
		            scrollYT = document.body.scrollTop; 
	            } 
	            if (document.body.clientHeight){
	                clientHeight=document.body.clientHeight;
	            }
	            else if (window.innerHeight){
	                clientHeight=window.innerHeight;
	            }
                return (scrollYT)+clientHeight;
            }
            
            var msgBoxZIndex=8000;
            function MessageBox(id,msg,titulo,icon,navigateTo,hideBack)
            {
                myId=id;
                var iframe=document.createElement('iframe');
                var table=document.createElement('table');
                var tableTapa=document.createElement('table');

                var rowSup=table.insertRow(0);
                var cellText=rowSup.insertCell(0);
                var cellIcon=rowSup.insertCell(0);
                var rowInf = table.insertRow(table.rows.length);
                var cellBoton=rowInf.insertCell(0);

                rowTableTapa =tableTapa.insertRow(0).insertCell(0);

                table.style.position='absolute';

                table.style.left=iframe.style.left=0;
                table.style.top=iframe.style.top=0;
                table.style.width=400;
                table.style.height=130;
                table.style.zIndex=(msgBoxZIndex+=3);
                table.style.backgroundColor='white';

                table.style.borderWidth='1px';
                table.style.borderStyle='solid';
                table.style.borderColor='gainsboro';

                table.style.fontFamily='Arial';
                table.style.fontSize='12px';
                table.id=myId;
                table.navigateTo=navigateTo;
                table.iFrame=iframe;
                table.tableTapa=tableTapa;

                tableTapa.style.position='absolute';
                tableTapa.style.zIndex=table.style.zIndex-1; 
                if (!hideBack)
                    tableTapa.style.backgroundImage='url(img/transparent.gif)';
                else
                    tableTapa.style.backgroundColor='white';

                iframe.style.position='absolute';
                iframe.style.zIndex=table.style.zIndex-2; 
                iframe.style.filter='alpha(opacity=1)';             

                cellBoton.colSpan=2;
                cellBoton.align='center';

                var img=document.createElement('img');
                img.src=icon;
                cellIcon.appendChild(img);
                
                var spanTitle=document.createElement('span');
                spanTitle.style.fontWeight='bold';
                spanTitle.innerHTML=titulo+'<br>';
                cellText.appendChild(spanTitle);

                var spanText=document.createElement('span');
                spanText.innerHTML=msg;
                cellText.appendChild(spanText);
                cellText.style.width='100%';

                var btnAceptar=document.createElement('input');
                btnAceptar.type='button';
                btnAceptar.value='Aceptar';
                btnAceptar.id='Aceptar';
                btnAceptar.msgBoxTable=table;
                btnAceptar.onclick=function()
                {
                    var table=this.msgBoxTable;
                    if (table.navigateTo!=null && table.navigateTo!='')
                        window.location=table.navigateTo;
                    else
                    {
                        table.tableTapa.style.display='none';
                        table.iFrame.style.display='none';
                        table.style.display='none';
                    }
                }
                cellBoton.appendChild(btnAceptar);

                document.body.insertBefore(table, document.body.firstChild);
                document.body.insertBefore(iframe, table);
                document.body.insertBefore(tableTapa, iframe);
                centerMessageBox(id);
         
                document.getElementById('Aceptar').focus();
                var messageBoxShowing=true;
 
                return myId;
            }
            
            function showSelects(value)
            {
	            var oSelects=document.getElementsByTagName('select');
	            for(var i=0;i<oSelects.length;i++)
		            oSelects[i].style.display=(value?'':'none');
            }

            function centerMessageBox(id)
            {
                var msgBox=document.getElementById(id);
                msgBox.style.left=CenterX()-msgBox.offsetWidth/2;
                msgBox.style.top=CenterY()-msgBox.offsetHeight/2;
                msgBox.tableTapa.style.top=msgBox.iFrame.style.top=ClientTop();
                msgBox.tableTapa.style.left=msgBox.iFrame.style.left=ClientLeft();
                msgBox.tableTapa.style.width=msgBox.iFrame.style.width=ClientRight() - ClientLeft();
                msgBox.tableTapa.style.height=msgBox.iFrame.style.height=ClientBottom() - ClientTop();
            }

            