  // onok in when you click on the disclaimer accept buttom
  function onOk(href,target,cookieName)
    {
              
         if(href.indexOf("/") == 0 ){
            href = href.substring(1);
          }
         if (target != null && target == '_blank') {
           window.open(base_path + href);
         }
         else {
              window.location = base_path + href;
         }
         document.cookie = cookieName+"="+cookieName; // onok create cookies
    } 
    //this is called when you click on the document link
    function CallDisplay(behaviourID,link,target,cookieName,cookieValue)
    {
     
        if((cookieIndex = document.cookie.indexOf(cookieName)) == -1){
            // show the popup extender page disclaimer
            DisplayModalPopup(behaviourID);
        }else{
            // Cookie already  exist to just open the document 
            if (target != null && target == '_blank') {
                window.open(link);
            }
            else {
               window.location.href = link;
            } 
        }
}