    /**
     * Set the anchor to the document.location. Useful for ajax features trackback and reload
     */
    function setAnchor(anchor){
        document.location = document.location.toString().split("#")[0]+"#"+anchor;
    }
    
    /**
     * Get the value of the anchor
     */
     function getAnchor(anchor){
        if(hasAnchor()) return document.location.toString().split("#")[1];
        else return null;
    }
    
    /**
     * Returns true if the document has an anchor, false otherwise.
     */
    function hasAnchor(){
        return (document.location.toString().indexOf("#")>=0);
    }
    
