// JavaScript Document

function f_confirmDelete(strUrlRedir)
{
	 var objConfirm = confirm('*** WARNING ***\n\nAre you sure you want to\nDelete this item?');
	 if (objConfirm)
		{
			window.location.href=strUrlRedir
		}
}

function f_clearSubPrices()
{
	document.forms['frmSubscription'].SUB_Price.value='';
	document.forms['frmSubscription'].SUB_SetupFee.value='';
	document.forms['frmSubscription'].SUB_SendPPP.value='';
	document.forms['frmSubscription'].SUB_ReceivePPP.value='';
}

function openWindow(strURL, strName, lngHeight, lngWidth)
{
  var strFeatures = "resizable=no,height=" + lngHeight.toString() + 
    ",width=" + lngWidth.toString();
  rVal = top.window.open(strURL, strName, strFeatures);
  if (!rVal.opener) rVal.opener = self;
  rVal.focus();
}

function openScrollingWindow(strURL, strName, lngHeight, lngWidth)
{
  var strFeatures = "resizable=no,scrollbars=yes,height=" + lngHeight.toString() + 
    ",width=" + lngWidth.toString();
  rVal = top.window.open(strURL, strName, strFeatures);
  if (!rVal.opener) rVal.opener = self;
  rVal.focus();
}



function f_Right(str, n)
/***
				IN: str - the string we are RIGHTing
						n - the number of characters we want to return

				RETVAL: n characters from the right side of the string
***/
{
				if (n <= 0)     // Invalid bound, return blank string
					 return "";
				else if (n > String(str).length)   // Invalid bound, return
					 return str;                     // entire string
				else { // Valid bound, return appropriate substring
					 var iLen = String(str).length;
					 return String(str).substring(iLen, iLen - n);
				}
}
