function checkSize()
{
    var w = 768;
    var h = 475;
    window.resizeTo(w,h);
    h = 2 * h - document.body.clientHeight;
    w = 2 * w - document.body.clientWidth;
    window.resizeTo(w,h);

/* OLD FUNCTION 
   var maxHeight = 610;
   var maxWidth = 795;
   var height = screen.height;
   var width = screen.width;

   if (height > maxHeight || width > maxWidth)
   { 
      var newHeight = height < maxHeight ? height : maxHeight;
      var newWidth  = width  < maxWidth ? width  : maxWidth; 

      window.resizeTo(newWidth, newHeight);
   }
   */
} // end of checkSize()

// This function is to check whether
// string s is an integer.
function isInteger(s)
{
  var validChars = "0123456789";

  for (var i = 0; i < s.length; i++) {
    var c = s.charAt(i);
    if (validChars.indexOf(c) == -1) {
      return false;
    }
  }
  return true;
} // end of isInteger()

// Returns true if string s is English letters 
// (A .. Z, a..z) and numbers only.
function isAlphanumeric(s)
{   
  var reLetterOrDigit = /^([a-zA-Z]|\d)$/;

  for (var i = 0; i < s.length; i++) {
    var c = s.charAt(i);
    if (!reLetterOrDigit.test(c))
      return false;
  }
  return true;
} // end of isLetterOrDigit()


function startCheckSize()
{
    checkSize();
   //window.setInterval("checkSize()", 500);
} // end of startCheckSize()

//-------------------------------------------------
//Language:     Javascript                        -
//Author  :     Joseph B Bates                    -
//Date    :     10/29/2001                        -
//Purpose :     Strip out any illegal characters  _
//        :     That might cause either the search-
//        :     Engine or talkback problems       _
//-------------------------------------------------
function stripIll(value)
{
   var Counter=0;
   var newString="";

   // removes the leading and trailing spaces
   value = trim(value);

   // replaces commas with space
   value = value.replace(/,/g, ' ');

   // replaces newline with space
   value = value.replace(/\n/g, ' ');

   while(Counter<=value.length)
   {
      if(value.substring(Counter,Counter+1)=="<" ||
         value.substring(Counter,Counter+1)==">" ||
         value.substring(Counter,Counter+1)=="!" ||
         value.substring(Counter,Counter+1)=="{" ||
         value.substring(Counter,Counter+1)=="}")
      {
         newString=newString;
      }
      else if(value.substring(Counter,Counter+1)=="[" ||
              value.substring(Counter,Counter+1)=="]" ||
              value.substring(Counter,Counter+1)=="^" ||
              value.substring(Counter,Counter+1)=="*")
      {
         newString=newString;
      }
      else if(value.substring(Counter,Counter+1)=="~" ||
              value.substring(Counter,Counter+1)=="+" ||
              value.substring(Counter,Counter+1)=="$" ||
              value.substring(Counter,Counter+1)=="(" ||
              value.substring(Counter,Counter+1)==")")
      {
         newString=newString;
      }
      else if(value.substring(Counter,Counter+1)=="%" ||
              value.substring(Counter,Counter+1)=="=" ||
              value.substring(Counter,Counter+1)==";" ||
              value.substring(Counter,Counter+1)==":" ||
              value.substring(Counter,Counter+1)=='"')
      {
         newString=newString;
      }
      else
      {
         newString=newString+value.substring(Counter,Counter+1);
      }
      Counter=Counter+1;
   }

   return newString;
}

//-------------------------------------------------
// Purpose : Trims leading and trailing white spaces.
//-------------------------------------------------
function trim(value)
{
   value = value.replace(/^\s+/, '');
   value = value.replace(/\s+$/, '');

   return value;
}
   

function onHelpselect()
     {

       var landingUrl =  "./EnablingActiveXControlsinIE.htm";

       window.open(landingUrl, "RoadRunnerActivation","location=0,status=0,scrollbars=1,width=600,height=420");
     //  top.gExpectedClose = true;
      //sma_Close();
     }
   
function onHelpselectForTech()
{
 var landingUrl =  "./EnablingActiveXControlsinIEforTech.htm";

 window.open(landingUrl, "RoadRunnerActivation","location=0,status=0,scrollbars=1,width=600,height=420");
}
function onHelpselect2()
     {

       var landingUrl =  "http://help.rr.com/migration";

       window.open(landingUrl, "RoadRunnerActivation","resizable=1,location=0,status=0,scrollbars=1,width=800,height=600");
     //  top.gExpectedClose = true;
      //sma_Close();
     }

function onHelpselect3(param)
     {

       var landingUrl =  "/smartaccess/smatwc/asp/outlook_account_remove.asp?provider=" + param;

       window.open(landingUrl, "RoadRunnerActivation","resizable=1,location=0,status=0,scrollbars=1,width=800,height=600");
     //  top.gExpectedClose = true;
      //sma_Close();
     }

function onDivisionListSelect()
     {

       var landingUrl =  "/sdcadmin/asp/divisionlist.asp"

       window.open(landingUrl, "RoadRunnerActivation","location=0,status=0,scrollbars=1,width=450,height=420");
     //  top.gExpectedClose = true;
      //sma_Close();
     }

function onUserNameRetrieveSelect()
     {

       var landingUrl =  "https://help.rr.com/urt"

       window.open(landingUrl, "RoadRunnerActivation","location=0,status=0,scrollbars=1,width=800,height=420");
     //  top.gExpectedClose = true;
      //sma_Close();
     }

function onSpanishSelect()
     {

       var landingUrl =  "./spanish_help.htm";

       window.open(landingUrl, "RoadRunnerActivation","location=0,status=0,scrollbars=1,width=650,height=420");
     //  top.gExpectedClose = true;
      //sma_Close();
     }
