<!--
	function ToggleItem(Item) 
	{
		this.Item = Item;
		var objItem;
		
		if (document.getElementById) objItem = document.getElementById(this.Item);
		if (document.all) objItem = document.all(this.Item);
		
		if (objItem.style.display == 'none')
		{
			objItem.style.display = '';
		}
		else
		{
 			objItem.style.display = 'none';
		}
	}
	
	
	function ToggleLayer(Item) 
	{
		this.Item = Item;
		var objItem;
		
		if (document.getElementById) objItem = document.getElementById(this.Item);
		if (document.all) objItem = document.all(this.Item);		
		
		if (objItem.style.visibility == 'hidden')
		{
			objItem.style.visibility = 'visible';
		}
		else
		{
 			objItem.style.visibility = 'hidden';
		}
	}	
	
	function SetWinStatus(StatusText)
	{
		this.StatusText = StatusText;
		window.status = this.StatusText;
	}
	
	
	function CheckABMRadiobuttons(ControlToCheck, AffectedControlsArray)
	{
		this.ControlToCheck = ControlToCheck;
		this.AffectedControlsArray = AffectedControlsArray;
		var isValid;
		var i;
		
		if(this.ControlToCheck)
		{
			if (!this.ControlToCheck.length)
			{
				isValid = this.ControlToCheck.checked;
			}
			else
			{
				for (i = 0; i < this.ControlToCheck.length; i++)
				{
					if (this.ControlToCheck[i].checked == true)
					{
						isValid = true;
						break;
					}
					else
					{
						isValid = false;
					}
				}
			}
		}
		else
		{
			isValid = false;
		}
		
		if (isValid)
		{
			EnableControls(this.AffectedControlsArray);
		}
		else
		{
			DisableControls(this.AffectedControlsArray);
		}
	}
	
	
	function CheckABMListBox(ControlToCheck, AffectedControlsArray)
	{
		this.ControlToCheck = ControlToCheck;
		this.AffectedControlsArray = AffectedControlsArray;
		var isValid;
		var i;
		
		if(this.ControlToCheck)
		{		
			for (i = 0; i < this.ControlToCheck.options.length; i++)
			{
				if (this.ControlToCheck.options[i].selected == true)
				{
					isValid = true;
					break;
				}
				else
				{
					isValid = false;
				}
			}
		}
		else
		{
			isValid = false;
		}		
		
		if (isValid)
		{
			EnableControls(this.AffectedControlsArray);
		}
		else
		{
			DisableControls(this.AffectedControlsArray);
		}
	}	
	
	function CheckABMCheckboxes(ControlToCheck, AffectedControlsArray)
	{
		
		this.ControlToCheck = ControlToCheck;
		this.AffectedControlsArray = AffectedControlsArray;
		var isValid;
		var i;
			
		if(this.ControlToCheck)
		{				
			if (!this.ControlToCheck.length)
			{
				isValid = this.ControlToCheck.checked;
			}
			else
			{
				for (i = 0; i < this.ControlToCheck.length; i++)
				{
					if (this.ControlToCheck[i].checked == true)
					{
						isValid = true;
						break;
					}
					else
					{
						isValid = false;
					}
				}
			}
		}
		else
		{
			isValid = false;
		}
		
		if (isValid)
		{
			EnableControls(this.AffectedControlsArray);
		}
		else
		{
			DisableControls(this.AffectedControlsArray);
		}
	}
	
	function EnableControls(AffectedControlsArray)
	{
		this.AffectedControlsArray = AffectedControlsArray;
		
		for (var i = 0; i < this.AffectedControlsArray.length; i++)
		{
			this.AffectedControlsArray[i].disabled = false;
		}		
	}
	
	function DisableControls(AffectedControlsArray)
	{
		this.AffectedControlsArray = AffectedControlsArray;
		
		for (var i = 0; i < this.AffectedControlsArray.length; i++)
		{
			this.AffectedControlsArray[i].disabled = true;
		}	
	}
	
	function OpenWindow(theUrl, theWinName, theWidth, theHeight, theFeatures)
	{
		this.theUrl       = theUrl;
		this.theWinName   = theWinName;
		this.theWidth     = theWidth;
		this.theHeight    = theHeight;
		this.theFeatures  = theFeatures;
		
		var theLeft       = (window.screen.width - this.theWidth ) / 2;
		var theTop        = (window.screen.height - this.theHeight) / 2;
		var Features      = 'left='+theLeft+',top='+theTop+',width='+this.theWidth+',height='+this.theHeight;	
		if (this.theFeatures.replace(/ /gi, "").length > 0) Features = Features + ',' + this.theFeatures;			

		hWnd = window.open (this.theUrl, this.theWinName, Features);
		hWnd.focus();
	}	
	
	function RollOn(elemento)
	{	
		this.elemento = elemento;	
		document.getElementById(this.elemento.id).className = document.getElementById(this.elemento.id).className + '_Over';
	}


	function RollOff(elemento)
	{
		this.elemento = elemento;
		var theString;
		theString = document.getElementById(this.elemento.id).className;
		document.getElementById(this.elemento.id).className = theString.substring(0, theString.length - 5);
	}


	function MoveListElement(theList, theDirection)
	{	
		this.theDirection = theDirection;
		this.theList = theList;
		
		var theSelectedText;
		var theSelectedValue;
		var theSelectedIndex;
		var theTargetText;
		var theTargetValue;
		var theTargetIndex;
		var blnSwapItems = false;
		
		theSelectedIndex = this.theList.selectedIndex;
		
		switch (this.theDirection)
		{
			case 'up':
				if (theSelectedIndex > 0)
				{
					theSelectedText = this.theList.options[this.theList.selectedIndex].text;
					theSelectedValue = this.theList.options[this.theList.selectedIndex].value;
					
					theTargetText = this.theList.options[this.theList.selectedIndex - 1].text;
					theTargetValue = this.theList.options[this.theList.selectedIndex - 1].value;
					theTargetIndex = theSelectedIndex - 1;	
					
					blnSwapItems = true;
				}
				break;
			
			case 'down':
				if (theSelectedIndex < this.theList.options.length - 1)
				{
					theSelectedText = this.theList.options[this.theList.selectedIndex].text;
					theSelectedValue = this.theList.options[this.theList.selectedIndex].value;
						
					theTargetText = this.theList.options[this.theList.selectedIndex + 1].text;
					theTargetValue = this.theList.options[this.theList.selectedIndex + 1].value;
					theTargetIndex = theSelectedIndex + 1;		
					
					blnSwapItems = true;		
				}		
		}
		
		if (blnSwapItems)
		{
			this.theList.options[theSelectedIndex].text  = theTargetText;
			this.theList.options[theSelectedIndex].value = theTargetValue;
			this.theList.options[theTargetIndex].text    = theSelectedText;
			this.theList.options[theTargetIndex].value   = theSelectedValue;
			
			this.theList.options[theTargetIndex].selected = true;
		}
	}
	
	
	function SelectAllListElements(theList, theSelection)
	{
		this.theList = theList;
		this.theSelection = theSelection;

		for (var i = 0; i < this.theList.options.length; i++)
		{
			this.theList.options[i].selected = this.theSelection;
		}
	}
	
	
	function DependencyListObject(theID, theName, theParentID)
	{
		this.theID = theID;
		this.theName = theName;
		this.theParentID = theParentID;
	}
	
	function GetListSelectedOption(theList)
	{
		selectedOption = parseInt(-1);
		for (var i = 0; i < theList.options.length; i++)
				{
				if(theList.options[i].selected) 
						{
						selectedOption = parseInt(i);
						}
				}
		return selectedOption;
	}

	function addcero(num)
	{
	if(parseInt(num)<10){return '0'+Math.round(num);}else{return Math.round(num);}
	}


/*
==================================================================
LTrim(string) : Returns a copy of a string without leading spaces.
==================================================================
*/
function LTrim(str)
/*
   PURPOSE: Remove leading blanks from our string.
   IN: str - the string we want to LTrim
*/
{
   var whitespace = new String(" \t\n\r");

   var s = new String(str);

   if (whitespace.indexOf(s.charAt(0)) != -1) {
      // We have a string with leading blank(s)...

      var j=0, i = s.length;

      // Iterate from the far left of string until we
      // don't have any more whitespace...
      while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
         j++;

      // Get the substring from the first non-whitespace
      // character to the end of the string...
      s = s.substring(j, i);
   }
   return s;
}

/*
==================================================================
RTrim(string) : Returns a copy of a string without trailing spaces.
==================================================================
*/
function RTrim(str)
/*
   PURPOSE: Remove trailing blanks from our string.
   IN: str - the string we want to RTrim

*/
{
   // We don't want to trip JUST spaces, but also tabs,
   // line feeds, etc.  Add anything else you want to
   // "trim" here in Whitespace
   var whitespace = new String(" \t\n\r");

   var s = new String(str);

   if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
      // We have a string with trailing blank(s)...

      var i = s.length - 1;       // Get length of string

      // Iterate from the far right of string until we
      // don't have any more whitespace...
      while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
         i--;


      // Get the substring from the front of the string to
      // where the last non-whitespace character is...
      s = s.substring(0, i+1);
   }

   return s;
}

/*
=============================================================
Trim(string) : Returns a copy of a string without leading or trailing spaces
=============================================================
*/
function Trim(str)
/*
   PURPOSE: Remove trailing and leading blanks from our string.
   IN: str - the string we want to Trim

   RETVAL: A Trimmed string!
*/
{
   return RTrim(LTrim(str));
}


/*
document.oncontextmenu = function(){return false}

if(document.layers)
{
	window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = function(e){if(e.button==2)return false;}
}
else 
{
    document.onmousedown = function(e){if(e.button==2)return false;}
}
*/
//-->