		//
		// JavaScript
		// **********
		//



		// Funcion para para formatear una cantidad a moneda. euroFormat
		function redondear(cantidad, decimales){
			var cantidad = parseFloat(cantidad);
			var decimales = parseFloat(decimales);
			decimales = (!decimales ? 2 : decimales);
			return Math.round(cantidad * Math.pow(10, decimales)) / Math.pow(10, decimales);
		};

		function euroFormat(pC){
			var num = pC.replace(',',".");
			var c = ""+ redondear(num,2);
			var p = c.indexOf('.');
			if(p<0){
				return c +",00";
			}else{
				c+='00';
				return c.substring(0,p) +','+ c.substring(p+1,p+3);
			};
		};

		//Objeto oNumero
		function oNumero(numero){
			//Propiedades
			this.valor = numero || 0
			this.dec = -1;
			//Métodos
			this.formato = numFormat;
			this.ponValor = ponValor;
			//Definición de los métodos
			function ponValor(cad)
			{
			if (cad =='-' || cad=='+') return
			if (cad.length ==0) return
			if (cad.indexOf('.') >=0)
				this.valor = parseFloat(cad);
			else
				this.valor = parseInt(cad);
			}
			function numFormat(dec, miles)
			{
			var num = this.valor, signo=3, expr;
			var cad = ""+this.valor;
			var ceros = "", pos, pdec, i;
			for (i=0; i < dec; i++)
			ceros += '0';
			pos = cad.indexOf('.')
			if (pos < 0)
				cad = cad+"."+ceros;
			else
				{
				pdec = cad.length - pos -1;
				if (pdec <= dec)
					{
					for (i=0; i< (dec-pdec); i++)
						cad += '0';
					}
				else
					{
					num = num*Math.pow(10, dec);
					num = Math.round(num);
					num = num/Math.pow(10, dec);
					cad = new String(num);
					}
				}
			pos = cad.indexOf('.')
			if (pos < 0) pos = cad.lentgh
			if (cad.substr(0,1)=='-' || cad.substr(0,1) == '+')
				   signo = 4;
			if (miles && pos > signo)
				do{
					expr = /([+-]?\d)(\d{3}[\.\,]\d*)/
					cad.match(expr)
					cad=cad.replace(expr, RegExp.$1+','+RegExp.$2)
					}
			while (cad.indexOf(',') > signo)
				if (dec<0) cad = cad.replace(/\./,'')
					return cad;
			}
		}//Fin del objeto oNumero:

		String.prototype.unpoco = function(pn){
			if(this.length > pn){
				var s, c, up;
				for(var n=0; n<=pn; n++) up = (this.charAt(n)==" ")? n : up;
				return this.substr(0,up) +" ...";
			}else{
				return this;
			};
		};

		// wordWrap - Ajuste de texto
		//+ Jonas Raoni Soares Silva
		//@ http://jsfromhell.com/string/wordwrap [v1.0]
		String.prototype.wordWrap = function(m, b, c){
			var i, j, l, s, r;
			if(m < 1)
				return this;
			for(i = -1, l = (r = this.split("\n")).length; ++i < l; r[i] += s)
				for(s = r[i], r[i] = ""; s.length > m; r[i] += s.slice(0, j) + ((s = s.slice(j)).length ? b : ""))
					j = c == 2 || (j = s.slice(0, m + 1).match(/\S*(\s)?$/))[1] ? m : j.input.length - j[0].length
					|| c == 1 && m || j.input.length + (j = s.slice(m).match(/^\S*/)).input.length;
			return r.join("\n");
		};

		/**
		*  UTF-8 data encode / decode
		*  http://www.webtoolkit.info/
		**/
		var Utf8 = {
		
			// public method for url encoding
			encode : function (string) {
				string = string.replace(/\r\n/g,"\n");
				var utftext = "";
		
				for (var n = 0; n < string.length; n++) {
		
					var c = string.charCodeAt(n);
		
					if (c < 128) {
						utftext += String.fromCharCode(c);
					}
					else if((c > 127) && (c < 2048)) {
						utftext += String.fromCharCode((c >> 6) | 192);
						utftext += String.fromCharCode((c & 63) | 128);
					}
					else {
						utftext += String.fromCharCode((c >> 12) | 224);
						utftext += String.fromCharCode(((c >> 6) & 63) | 128);
						utftext += String.fromCharCode((c & 63) | 128);
					}
		
				}
		
				return utftext;
			},
		
			// public method for url decoding
			decode : function (utftext) {
				var string = "";
				var i = 0;
				var c = c1 = c2 = 0;
		
				while ( i < utftext.length ) {
		
					c = utftext.charCodeAt(i);
		
					if (c < 128) {
						string += String.fromCharCode(c);
						i++;
					}
					else if((c > 191) && (c < 224)) {
						c2 = utftext.charCodeAt(i+1);
						string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
						i += 2;
					}
					else {
						c2 = utftext.charCodeAt(i+1);
						c3 = utftext.charCodeAt(i+2);
						string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
						i += 3;
					}
		
				}
		
				return string;
			}
		
		}

		function ignoreWhite(pT){
			var t = pT;
			t = t.replace(/\s/g," ");
			return t
		}

		// Asignar un Valor a un DIV por ID.
		function set2ID(pID, pValor){
			try{ getEID(pID).innerHTML = pValor; }catch(e){}
		}

		// Localizar un elemento.
		function getEID(pID) {
			var temp = document.getElementById(pID);
			if (temp == null){
				return false;
			}else{
				return temp;
			}
		}

		function validarEmail(valor) {
			if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(valor)){
				return (true)
			} else {
				return (false);
			}
		}

		//
		function MM_findObj(n, d) { //v4.01
			var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
			if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
			for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
			if(!x && d.getElementById) x=d.getElementById(n); return x;
		}
		//
		function MM_showHideLayers() { //v6.0
//			alert("a")
			var i,p,v,obj,args=MM_showHideLayers.arguments;
			for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
			if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
			obj.visibility=v; }
		}
		//
		var overFilaProductoActual;
		overFilaProductoActual = "";
		
		//
		function overFilaProducto(fila){
			overFilaProductoActual = fila.className;
			fila.className = 'overFilaProducto';
		}
		//
		function pressFilaProducto(fila){
			fila.className = 'pressFilaProducto';
		}
		//
		function outFilaProducto(fila){
			fila.className = overFilaProductoActual;
		}
		//
		function win(theURL,winName,ancho,alto,barras) {
			var winl = (screen.width - ancho) / 2;
			var wint = (screen.height - alto) / 2;
			var paramet='top='+wint+',left='+winl+',width='+ancho+',height='+alto+',scrollbars='+barras+'';
			var splashWin=window.open(theURL,winName,paramet);
			splashWin.focus();
		}
		//
		function popc(a){
			var enlace = a.getAttribute("href");
			var nombre = a.getAttribute("nombre");
			var ancho = a.getAttribute("ancho");
			var alto = a.getAttribute("alto");
			var barras = a.getAttribute("barras");
			if(isNaN(ancho)) ancho = 300;
			if(isNaN(alto)) alto = 250;
			if(isNaN(barras)) barras = 0;
			win(enlace,nombre,ancho,alto,barras);
		}

		/*
		function noEnFrames() {
			if(self.location != top.location)
				top.location = self.location;
		}
		
		// Gracias: Marc Palaueb.com
		try{
			if ("" + frames_no_libera == "1"){
				void noEnFrames();
			}
		} catch(unerror){}
		*/



/*
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/