  // 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 + ";yes;path=/;" ; // onOkUK create cookies
    } 

  // onOkUK in when you click on the disclaimer accept buttom and it will redirect to the UK website
  function onOkUK(href,target,cookieName)
    {

         if(href.indexOf("/") == 0 ){
            href = href.substring(1);
          }
         if (target != null && target == '_blank') {
           window.open(href);
         }
         else {
              window.location = href;
         }
         document.cookie = cookieName+"="+cookieName + ",path=/;" ; // onOkUK 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;
            } 
        }
}

 
