tagProt = "http"
if (document.location.protocol.indexOf('https') > -1)
{  tagProt = "https"; }
var ES = "28~sonypictures";
var RN = 0;
var e5 = document.URL.toLowerCase();
RN=Math.floor(Math.random()*10000);
var TR = document.referrer.toLowerCase();
DI = e5.indexOf("//");
if (DI != -1)
{  chkDom = e5.substring (DI + 2);
   DI = chkDom.indexOf ("/");
   if (DI != -1) { chkDom = chkDom.substring(0,DI) }
   var TR = document.referrer.toLowerCase();
   if (TR != "" && ((TR.indexOf (chkDom) == -1) || (TR.indexOf (chkDom) > 15)))
   {   TR = escape (TR); SI = TR.indexOf ("/");
   while (SI  >= 0)
   {  st = TR.substring (0,SI); en = TR.substring (SI+1);
      TR = st + "%2F" + en; SI = TR.indexOf ("/"); }
   ES = ES + "~2~" + TR; } }

if (window.RegExp) 
{   if (e5.match(/(http|https)\:\/\/www\./) == null)
   { e5 = e5.replace (/(http|https)\:\/\//,"$1://www."); }
   if (e5.match (/(http|https)\:\/\/.*\/.*/) == null)
   { e5 = e5 + "/"; } } 
else 
{   if (e5.indexOf("http://www.") == -1)
   {   e5 = "http://www." + e5.substring(7);  }
   if (e5.indexOf("/",8) == -1)
   {   e5 = e5 + "/";  } }
ES = "5~" + escape (e5) + "~" + ES;
if (ES != "") {  ES = "&event=" + ES; }
document.write ("<img src='" + tagProt + "://wvw.sonypictures.com/spacer.gif?random=" + RN + ES + "' border=0 height=1 width=1>");