function currentWeb(){
   var temp1 = new String(location.pathname);
   return temp1.substring(1,temp1.indexOf('/',1));
   }

function currentWebAbs(){
   var temp1 = new String(location.pathname);
   return temp1.substring(0,temp1.indexOf('/',1));
   }

function ReturnWebServer() {
   temp = new String(document.referrer);            // get page we came from
   temp = temp.substring(7,temp.length);            // strip off http://
   temp = temp.substring(0,temp.indexOf('/',1)+1);  // strip off suffix, leave server 
   return "http://"+temp;
   }

// Extract and return the web page in the given url removing any
// parameters and paths.
//
function GetWebPage(szHref) {
   var szTmp,
       idx;
   szTmp = new String(szHref);
   
   szTmp = szTmp.substring( szTmp.lastIndexOf('/')+1, szTmp.length);
   idx = szTmp.indexOf('?');
   if (idx > -1) {
      szTmp = szTmp.substring(0, szTmp.indexOf('?') );
      }
   return szTmp;
}