﻿var path = "";
//var Num = 0;
function ReadCookie(cookieName) {
           var theCookie=""+document.cookie;
           var ind=theCookie.indexOf(cookieName);
           if (ind==-1 || cookieName=="") return ""; 
           var ind1=theCookie.indexOf(';',ind);
           if (ind1==-1) ind1=theCookie.length; 
           return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
        }

function fnonloadtest(pos)
{  
  document.cookie = "Page="+pos; 
  var Data = ReadCookie('Record');
  if(pos!=Data)
    window.location.href="legaldisclaimer.aspx"; 
  
 // if(pos!=Data)
   // window.location.href="legaldisclaimer.aspx";  
}

function Setdata(ResultFlag)
{
if(ResultFlag=='OURFUNDS')
  {
   if(document.getElementById("link1")!=null)
     { 
        //document.getElementById("link1").href = "ourfunds.aspx";
        document.cookie = "Record=OURFUNDS";
     }
  }
  else
  {
    if(document.getElementById("link1")!=null)
      { 
        document.getElementById("link1").href = "ourclient.aspx";
        document.cookie = "Record=OURCLIENTS"; 
      }
  }
}


function fndisclaimer()  // check whether link is clicked or not
{
  ResultPage =  ReadCookie('Setinitial');
  if(ResultPage!="true")
  {
    window.location.href = "legaldisclaimer.aspx";
  }    
}

function fnSetinitial()  // Set first visited in this page
{
  document.cookie = "Setinitial=true"  ;  
}
