
/////////////////////////////////////////
// Redirect
var oWin
function redirect(tcURL,tlNew,tlLog)
{
    if (tlNew)
    {
        oWin = window.open(tcURL, 'detail');
    }
    else
    {
        oWin = window.location(tcURL);
    }
   if (oWin) { 
	   if (oWin.focus) oWin.focus(); 
	   if (tlLog) Gals.logRedirect(tcURL, SucceededCallback, FailedCallback);  
	   return false; 
   } 
   oWin = null; 
}

//  Display any errors that occur
function FailedCallback(tcResult)
{
}

// This is the callback function that 
// processes the value returned by the Web service.
function SucceededCallback(tcResult)
{
}

function limitText(limitField, limitNum) 
{ 
  if (limitField.value.length >= limitNum) 
  {
      limitField.value = limitField.value.substring(0, limitNum - 1);
      alert("Maximum # of characters reached");
   } 
}



//////////////////////////////////////////


// Used by Animation to Popup a info window
function AnimPopup(bottom, top, ignoreSize) {
    var location = Sys.UI.DomElement.getLocation(bottom);
    top.style.position = 'absolute';
    top.style.top = location.y + 'px';
    top.style.left = location.x + 'px';
    if (!ignoreSize) {
        top.style.height = bottom.offsetHeight + 'px';
        top.style.width = bottom.offsetWidth + 'px';
    }
}

