
   var allcookie = document.cookie;
   var pos = allcookie.indexOf("GALE_AUTH");
   var val = "cps0400";
   if (pos != -1) {
      var start = pos + 8;
      var end = allcookie.indexOf("User_Title", start);
      if (end == -1) end = allcookie.length;
      val = allcookie.substring(start,end);
      var fin = val.lastIndexOf("%3A");
      var rem = fin +3;
      var end2 = val.length - 3;
      var val = val.substring(rem,end2);
   }
var pass = val.substr(3,4);

//alert (pass);
if (location.href.indexOf("ggtest") > 0) {
   if (location.href.indexOf("_SP03") > 0)
   {
      location.replace("http://www.litfinder.com/login.asp?UserName=" + val + "&password=" + val + "&submit=true");
   }

   if (location.href.indexOf("_SP04") > 0)
   {
      location.replace("http://infotrac.qa.ggtest.com/itweb/" + val + "j?db=SRC&id=" + pass);
   }

} else {

   if (location.href.indexOf("_SP01") > 0)
   {
      location.replace("http://www.litfinder.com/login.asp?UserName=" + val + "&password=" + val + "&submit=true");
   }

   if (location.href.indexOf("_SP02") > 0)
   {
      location.replace("http://infotrac.galegroup.com/itweb/" + val + "j?db=SRC&id=" + pass);
   }

}
