
	function myToggleNew(divIdContador){
		try {
			if (eval('divId' + divIdContador + '.style.display == (\'none\')'))
			{
				eval('divId' + divIdContador + '.style.display = (\'block\')');
			}
			else
			{
				eval('divId' + divIdContador + '.style.display = (\'none\')');
			}
			}
		catch(theErr){
		}
	}

	function ayuda(pagina, ancho, alto){
		tamano = "width="+ancho+",height="+alto;                                
		window.open(pagina,'parent','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,'+tamano)
	}

	function newrecord(pagina, ancho, alto){
		tamano = "width="+ancho+",height="+alto;                                
		window.open(pagina,'parent','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,'+tamano)
	}

	function newWindow(pagina, ancho, alto){
		tamano = "width="+ancho+",height="+alto;                                
		window.open(pagina,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,'+tamano)
	}

	function showModal(pagina, ancho, alto){
		tamano = "dialogWidth:" + ancho + ", dialogHeight:" + alto;
		window.showModalDialog(pagina, '_parent', tamano)
	}

	function goBasket(){
		parent.frames("footer").location.href="basket.asp";
	} 

	function goResBasket(){ 
		parent.frames("footer").location.href="res_basket.asp";
	} 

	function goURL(my_url){ 
		location.href=my_url;
	} 

	function goURLNew(my_url, ancho, alto, params){
		tamano = "width="+ancho+",height="+alto;                                
		window.open(my_url,'parent','');
	}
		
	function mOvr(src,clrOver){
		if (!src.contains(event.fromElement)){
			src.style.cursor = 'hand';
			src.bgColor = clrOver;
		}
	}

	function mOut(src,clrIn){
		if (!src.contains(event.toElement)){
			src.style.cursor = 'default';
			src.bgColor = clrIn;
		}
	}

	function mClk(src){
		if(event.srcElement.tagName=='TD'){
			src.children.tags('A')[0].click();
		}
	}
	
	function Mid(String, Start, Length){
		 if (String == null)
			return (false);
		 if (Start > String.length)
			return '';
		 if (Length == null || Length.length == 0)
			return (false);
			return String.substr((Start - 1), Length);
	}

	function Left(String, Length){
		 if (String == null)
		 return (false);
		 return String.substr(0, Length);
	}

	function jsCalculaDuracionFechasGenericNew(theDateIni, theDateFin, theInterval){
		var d, r, t1, t2, t3, date1, date2, yr1, mo1, dy1, yr2, mo2, dy2;
		var MinMilli = 1000 * 60;
		var HrMilli = MinMilli * 60;
		var DyMilli = HrMilli * 24;
		var WeekMilli = DyMilli * 7;
		var MonthMilli = DyMilli * 30;
		var YearMilli = DyMilli * 365;
		date1 = new Date(theDateIni);
		date2 = new Date(theDateFin);
		t1 = Date.UTC(date1.getUTCFullYear(), date1.getUTCMonth() + 1, date1.getUTCDate());
		t2 = Date.UTC(date2.getUTCFullYear(), date2.getUTCMonth() + 1, date2.getUTCDate());
		t3 = t2 - t1;
		//if (t3 < 0){t3 = (t3 * (-1));}
		if (theInterval == 'd' || theInterval == ''){r = Math.round(t3 / DyMilli);}
		if (theInterval == 's'){r = Math.round(t3 / WeekMilli);}
		if (theInterval == 'm'){r = Math.round(t3 / MonthMilli);}
		return (r);
	}


