	var cargadoEditor = false;
	var noCargarTituloSite = false
	var indArray = 0
	var BrowserDetect = {
		init: function () {
			this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
			this.version = this.searchVersion(navigator.userAgent)
				|| this.searchVersion(navigator.appVersion)
				|| "an unknown version";
			this.OS = this.searchString(this.dataOS) || "an unknown OS";
		},
		searchString: function (data) {
			for (var i=0;i<data.length;i++)	{
				var dataString = data[i].string;
				var dataProp = data[i].prop;
				this.versionSearchString = data[i].versionSearch || data[i].identity;
				if (dataString) {
					if (dataString.indexOf(data[i].subString) != -1)
						return data[i].identity;
				}
				else if (dataProp)
					return data[i].identity;
			}
		},
		searchVersion: function (dataString) {
			var index = dataString.indexOf(this.versionSearchString);
			if (index == -1) return;
			return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
		},
		dataBrowser: [
			{
				string: navigator.userAgent,
				subString: "Chrome",
				identity: "Chrome"
			},
			{ 	string: navigator.userAgent,
				subString: "OmniWeb",
				versionSearch: "OmniWeb/",
				identity: "OmniWeb"
			},
			{
				string: navigator.vendor,
				subString: "Apple",
				identity: "Safari",
				versionSearch: "Version"
			},
			{
				prop: window.opera,
				identity: "Opera"
			},
			{
				string: navigator.vendor,
				subString: "iCab",
				identity: "iCab"
			},
			{
				string: navigator.vendor,
				subString: "KDE",
				identity: "Konqueror"
			},
			{
				string: navigator.userAgent,
				subString: "Firefox",
				identity: "Firefox"
			},
			{
				string: navigator.vendor,
				subString: "Camino",
				identity: "Camino"
			},
			{		// for newer Netscapes (6+)
				string: navigator.userAgent,
				subString: "Netscape",
				identity: "Netscape"
			},
			{
				string: navigator.userAgent,
				subString: "MSIE",
				identity: "Explorer",
				versionSearch: "MSIE"
			},
			{
				string: navigator.userAgent,
				subString: "Gecko",
				identity: "Mozilla",
				versionSearch: "rv"
			},
			{ 		// for older Netscapes (4-)
				string: navigator.userAgent,
				subString: "Mozilla",
				identity: "Netscape",
				versionSearch: "Mozilla"
			}
		],
		dataOS : [
			{
				string: navigator.platform,
				subString: "Win",
				identity: "Windows"
			},
			{
				string: navigator.platform,
				subString: "Mac",
				identity: "Mac"
			},
			{
				   string: navigator.userAgent,
				   subString: "iPhone",
				   identity: "iPhone/iPod"
			},
			{
				string: navigator.platform,
				subString: "Linux",
				identity: "Linux"
			}
		]
	
	};
	BrowserDetect.init();


	function popup(pag, nombre, parametros){
	    var ven = window.open(pag,nombre,parametros)
	    ven.focus();
	}

	function ventana(url,targe,ancho,alto) {
		var ven
		posh=(Math.round(screen.height-(alto))/2)//centra la ventana a lo alto
		posv=(Math.round(screen.width-(ancho))/2)//centra a lo ancho

		if (ven && !ven.closed){ven.close();}
		ven = window.open(url,targe,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=" + ancho + "px,height=" + alto + "px,left=" + posv + ",top=" + posh + ",resizable=no");

		ven.focus()
	}
	
	function ventanaScroll(url,targe,ancho,alto) {
		var ven
		posh=(Math.round(screen.height-(alto))/2)//centra la ventana a lo alto
		posv=(Math.round(screen.width-(ancho))/2)//centra a lo ancho

		if (ven && !ven.closed){ven.close();}
		ven = window.open(url,targe,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,width=" + ancho + "px,height=" + alto + "px,left=" + posv + ",top=" + posh + ",resizable=no");

		ven.focus()
	}
	
	function OpenWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}

	function LTrim(str){
	   var whitespace = new String(" \t\n\r");

	   var s = new String(str);

	   if (whitespace.indexOf(s.charAt(0)) != -1) {
	      var j=0, i = s.length;
	      while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
	         j++;
	      s = s.substring(j, i);
	   }
	   return s;
	}


	function RTrim(str){
	   var whitespace = new String(" \t\n\r");

	   var s = new String(str);

	   if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
	      var i = s.length - 1;
	      while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
	         i--;
	      s = s.substring(0, i+1);
	   }

	   return s;
	}

	function Trim(str){
	   return RTrim(LTrim(str));
	}

	function isArray(obj){
		return(typeof(obj.length)=="undefined")?false:true;
	}

	function txtBlanco(elemento, msg){
	   valor = Trim(elemento.value);
	   if(valor==""){
	      if(elemento.type!="hidden")
	      	elemento.focus();
	      alert(msg);
	      return false;
	   }
	   elemento = valor;
	   return true;
	}

	function validacbo (elemento, msg){
		valor = elemento.selectedIndex;
		if(valor==-1){
			alert(msg);
	    elemento.focus();
	    return false;
		}
	   return true;
	}

	function validacboBlanco (elemento, msg){
		valor = elemento.options[elemento.selectedIndex].value;
		if(valor==""){
			alert(msg);
	    //elemento.focus();
	    return false;
		}
	   return true;
	}

	function replaceStr(str, strBuscar, strSustituir){
		var regExpresion = new RegExp(strBuscar, 'gi');
		return str.replace(regExpresion,strSustituir)
	}

	function validaMoneda(elemento, msg){
		elemento.value = replaceStr(elemento.value, ",", ".")
		valor = Trim(elemento.value);
		if(valor != "" && isNaN(valor)){
			alert(msg);
		    elemento.focus();
		    return false;
		}
	   return true;
	}

	function validaNumero(elemento, msg){
		valor = Trim(elemento.value);
		if(valor != "" && isNaN(valor)){
			alert(msg);
	    elemento.focus();
	    return false;
		}
	 	return true;
	}

	function posimgY(obj){
		if(browser.ie4 || browser.ie5 || browser.dom) return wipeGetOffset(obj,"Top");
	 	if(browser.ns4) return obj.y;
	}

	function posimgX(obj){
		if(browser.ie4 || browser.ie5 || browser.dom) return wipeGetOffset(obj,"Left");
	  	if(browser.ns4) return obj.x;
	}

	function wipeGetOffset(obj, coord) {
		var val = obj["offset"+coord] ;
		while ((obj = obj.offsetParent )!=null) {
			val += obj["offset"+coord];
			if (obj.border && obj.border != 0) val++;
		}
		return val;
	}

	function div(nombre, imgRef){		
		if (browser.ns4){
	    		var tmpLayer = new Layer(127);
	  	}
	 	if (browser.dom || browser.ie4){			
			var tmpLayer = browser.dom?document.getElementById(nombre):document.all(nombre);
	  	}
	  	if(imgRef != ""){
			objRef = document.images[imgRef];
			this.xRef = posimgX(objRef);
			this.yRef = posimgY(objRef);
		}else{
			this.xRef = 0;
			this.yRef = 0;
		}		
	  	this.containerLayer = tmpLayer;
	  	this.desplazaX = desplazaX;
	  	this.desplazaY = desplazaY;
	  	this.escribeDiv = escribeDiv;
	  	this.visible = visible;
	  	this.display = display;
	  	this.muestraContenido = contenido;		
	}

	function contenido(){
		if (browser.ie4 || browser.dom)
			return this.containerLayer.innerHTML
	}

	function visible(valor){
		if (browser.ie4 || browser.dom){
			divmenu = this.containerLayer.style
			switch(valor){
		 		case 0:
		 			nuevo_estado = "hidden";
		 			break;
		 		case 1:
		 			nuevo_estado = "visible";
			}
		}else{
			if (browser.ns4){
			 	divmenu = this.containerLayer;
			 	switch(valor){
			 		case 0:
			 			nuevo_estado = "hide";
			 			break;
			 		case 1:
			 			nuevo_estado = "show";
				}
			}
		}

		divmenu.visibility = nuevo_estado
	}

	function display(valor){		
		if ((browser.ie4 || browser.dom) && isObject(this.containerLayer)){			
			divmenu = this.containerLayer.style
			switch(valor){
		 		case 0:
		 			nuevo_estado = "none";
		 			break;
		 		case 1:
		 			nuevo_estado = "block";
			}			
			divmenu.display = nuevo_estado
		}
	}

	function escribeDiv(str){
		if (browser.ie4)
			this.containerLayer.innerHTML = str;
		else
			if (browser.dom)
				this.containerLayer.innerHTML = str;
			else
				if(browser.ns4){
					this.containerLayer.document.open();
					this.containerLayer.document.write(str);
					this.containerLayer.document.close();
				}
	}

	function desplazaX(x){
		if (browser.dom || browser.ie4)
			this.containerLayer.style.left = x + "px";
		if(browser.ns4)
			this.containerLayer.left = x;
	}

	function desplazaY(y){
		if (browser.dom || browser.ie4)
			this.containerLayer.style.top = y + "px";
		if(browser.ns4)
			this.containerLayer.top = y;
	}

	function isObject(a){
     return (typeof a == 'object' && !!a) || isFunction(a);
 	}

 	function isFunction(a) {
    	return typeof a == 'function';
	}	
	
	function isUndefined(a) {
    	return typeof a == 'undefined';
	}

	$(document).ready(function(){							
		
		$('#cboUtilidades').change(function(){ 					
			if($(this).val()!="")
				document.location = $(this).val()
			else
				$("#cboUtilidades option:eq(0)").attr("selected","selected"); 
		});										 							
																				
	});	