// This file contains intellectual property and artistic creations 
// by Dennis Sandow and is copyright 2000-2010 by the author. 
// For use only on websites maintained by Dennis Sandow, or with
// specific permission.  Do not remove this notice.

// trueUpURL(allowsubdir)
function trueUpURL(arg){
// alert(arg)
  if (! isWeb ) return;
  wlHref=window.location.href;
  if (wlHref.indexOf('/'+arg) <0 && wlHref.indexOf('/cgi-local') <0 ) return ;
  if ( typeof basURL == 'undefined' ) return ;
  basURLRoot=basURL.toLowerCase().replace( 'http://','').replace('www.','').replace(/\..*$/,'');
  wlHrefRoot=wlHref.toLowerCase().replace( 'http://','').replace('www.','').replace(/\..*$/,'');
  pgName=wlHref.replace(/^.*\//,'');
// alert ( wlHref+' wlHrefRoot='+wlHrefRoot +' basURLRoot='+ basURLRoot )
  if ( wlHrefRoot != basURLRoot ) {
    if (wlHref.indexOf('/cgi-local') >=0 ) qq = basURL+'/cgi-local/'+pgName;
    if (wlHref.indexOf('/cgi-local/admin') >=0 ) qq = basURL+'/cgi-local/admin/'+pgName;
    if (wlHref.indexOf('/cgi-local/adminsr') >=0 ) qq = basURL+'/cgi-local/adminsr/'+pgName;
    if (wlHref.indexOf('/cgi-local/adminrec') >=0 ) qq = basURL+'/cgi-local/adminrec/'+pgName;
    if (wlHref.indexOf('/'+arg) >=0 ) qq = basURL+'/'+arg+'/'+pgName;
// alert ( wlHref+' wlHrefRoot='+wlHrefRoot +' basURLRoot='+ basURLRoot +' '+qq)
    if (qq ) window.location.href = qq
  };
  return ;
};

function openercide() {
return;
//alert(isWeb+' x '+typeof opener+' x '+ opener+' x '+typeof opener.closed +' x '+opener.closed)
  if ( ! isWeb ||
       typeof opener == udf || opener == null ||
       typeof opener.closed == udf || opener.closed 
     ) return;
//alert( opener.location.href)
  if( typeof opener.location.href != udf &&
      opener.location.href.indexOf('/lht/') <0 &&
      opener.location.href.indexOf('/djs/') <0
     ) { opener.location = self.location; self.close(); };
  return;
};
