/* 
  ================================================
 Original function from PVII Uberlink Script
  Copyright (c) 2006 Project Seven Development
  www.projectseven.com  Version: 1.0.0
  ================================================
*/
function pg_current(cl,divTagId,tee){
    var i,ob,anchorTag,here= document.location.href;
    //var homepage="http://199.247.130.28";
    var homepage="http://199.247.130.28";

    if(document.getElementById){
        ob=(divTagId)?document.getElementById(divTagId):document;
       // alert("Before ob HERE: " + here );
        if(ob){
            anchorTag=ob.getElementsByTagName('a');

            for(i=0;i < anchorTag.length;i++){
                if(here==anchorTag[i]){  // direct match
                   // alert( "Anchor: " + anchorTag[i] + "\n  path HERE: " + here);
                    anchorTag[i].className=cl;
                } else {
                    if (tee) {
                       // assuming path has *.html within it
                        last = here.lastIndexOf("/");
                        here_pathname = here.substr(0, last)
                    
                        if (here_pathname != homepage) {
                            last_anc = anchorTag[i].href.lastIndexOf("/");
                            here_pathname = here.substr(0, last) + "/index.html";
                            //anc_pathname = anchorTag[i].href.substr(0,last_anc) + "/index.html";
                            anc_pathname = anchorTag[i].href;
                            // if you take off the *.html and are left with the homepage, do nothing
                            if (here_pathname.indexOf(anc_pathname)!=-1){
                               // alert( "In else statement\nAnchor: " + anchorTag[i] + "\n  path HERE: " + here);
                               anchorTag[i].className=cl;
                            } 
                        } // end not homepage
                    }// end if tee
                } // end else statement
            } 
        }
    }    
} // close function