function getObj(objID) 
{
    if (document.getElementById) {return document.getElementById(objID);}
    else if (document.all) {return document.all[objID];}
    else if (document.layers) {return document.layers[objID];}
}

function isdefined( variable)
{
    return (typeof(window[variable]) == "undefined")?  false: true;
}


function showdiv(obj)
{
     
  if(getObj(obj).style.visibility == 'visible') 
  {
     getObj(obj).style.visibility = 'hidden'; 
     getObj(obj).style.display = 'none';
  } 
  else
  {
     getObj(obj).style.visibility = 'visible'; 
     getObj(obj).style.display = 'block';
  } 

}

function getsite(str)
{

   theleft = str.indexOf("?") + 1;

   theleft = str.lastIndexOf("=") + 1;

   return(str.substring(theleft));
}

function getsite2(str)
{

   theleft = str.indexOf("//") + 2;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   return(str.substring(theleft, theleft + 4))

}


function getpage(str)
{

   theleft = str.indexOf("//") + 2;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   theright = str.lastIndexOf("/");

   return(str.substring(theleft,theright));

}

function isSearch(str)
{

   theleft = str.indexOf("//") + 2;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   theright = str.lastIndexOf("/");

   return(str.substring(theleft,theright));

}

function isPassword(str)
{

   theleft = str.indexOf("//") + 2;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   str = str.substring(theleft);

   theleft = str.indexOf("/") + 1;

   theright = str.lastIndexOf("/");

   return(str.substring(theleft));

}



function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

/* how fast do you want the filmstrip to move? */
filmstripMove = 0;

//filmStrip values you can override:
rightMoves = -5;
leftMoves = 5;
