// JavaScript Document
var vNumCartItems2 = getCookie("cartItems");
document.write(' <script language="javascript">');
document.write(' var securePages = "home.w,address.w,profile.w,change-password.w,address-select.w,select-contacts.w";');
document.write('  var vColor=new Array();');
document.write('function golink(vLink,vTarget,vStatic)');
document.write('{');
document.write('  var hostUrl  = "http://www.statononline.com";');
document.write('  var sHostUrl = "https://www.statononline.com";');
document.write('  var host     = "";');
document.write('  var sPages   = securePages.split(",");');
document.write('  var vParams=""; ');
document.write('  var vStart=vLink.indexOf("?") + 1; ');
document.write('  var vEnd=vLink.length; ');
document.write('  if (vStart>0 && vEnd>vStart && vLink.indexOf("?") != -1)');
document.write(' {');
document.write('   vParams = vLink.substring(vLink.indexOf("?") + 1,vLink.length); ');
document.write('   vLink = vLink.substring(0,vLink.indexOf("?")); ');
document.write('  }');
document.write('  for (var i=0; i< sPages.length; i++)');
document.write('  {');
document.write('     if (vLink.indexOf(sPages[i]) > -1)');
document.write('     {');
document.write('        host = sHostUrl;');
document.write('        break;');
document.write('     }');
document.write('  }');
document.write('  if (host == "")');
document.write('     host = hostUrl;');
document.write('  if(vParams.indexOf("=")!=-1)');
document.write('     vParams = vParams + "&frames=no&target=" + vTarget; ');
document.write('  else ');
document.write('     vParams = vParams + "frames=no&target=" + vTarget; ');
document.write('  vParams = vParams + "&sponsor=000009";');
document.write('  if (vStatic != "" && vStatic != null)');
document.write('  {');
document.write('     vParams = vParams + "&static=" + vStatic;');
document.write('  }');
document.write('  if(vTarget=="top")');
document.write('  {');
document.write('     document.location.href = host + "/cgi-bin/livew/" + vLink + "?" + vParams; ');
document.write('  }');
document.write('  else');
document.write('  {');
document.write('     if ("http://www.statononline.com" != host)');
document.write('        top.document.location.href = host + "/cgi-bin/livew/site.w?location=" + vLink + "&" + vParams;');
document.write('     else');
document.write('        document.location.href = host + "/cgi-bin/livew/site.w?location=" + vLink + "&" + vParams;');
document.write('  }');
document.write(' }');
document.write('function goReplace(vLink,vTarget)');
document.write('{');
document.write(' var vParams=""; ');
document.write('  var vStart=vLink.indexOf("?") + 1; ');
document.write('  var vEnd=vLink.length; ');
document.write('  if (vStart>0 && vEnd>vStart && vLink.indexOf("?") != -1)');
document.write(' {');
document.write('   vParams = vLink.substring(vLink.indexOf("?") + 1,vLink.length); ');
document.write('   vLink = vLink.substring(0,vLink.indexOf("?")); ');
document.write('  }');
document.write('  if(vParams.indexOf("=")!=-1)');
document.write('     vParams = vParams + "&frames=no&target=" + vTarget; ');
document.write('  else ');
document.write('     vParams = vParams + "frames=no&target=" + vTarget; ');
document.write('  vParams = vParams + "&sponsor=000009";');
document.write('  if(vTarget=="top")');
document.write('     document.location.replace("http://www.statononline.com/cgi-bin/livew/" + vLink + "?" + vParams); ');
document.write('  else');
document.write('   document.location.replace("http://www.statononline.com/cgi-bin/livew/site.w?location=" + vLink + "&" + vParams);');
document.write(' }');
document.write(' function addToCart(vProduct,vColor,vSize,vLinkProduct) ');
document.write('{');
document.write('  var vColorObj=eval("document.siteForm.color" + vProduct);');
document.write('  if (vColorObj.selectedIndex==0)');
document.write(' {');
document.write('   alert("Please enter a color to continue.");');
document.write('   return;');
document.write('  }');
document.write('  if (document.siteForm.qty!=null)');
document.write('      var vQty = document.siteForm.qty.value;');
document.write('  else var vQty = 1;');
document.write('  if(document.siteForm.price!=null) ');
document.write('    var vPrice=document.siteForm.price.value;');
document.write('  else var vPrice=0;');
document.write('  document.location.href="http://www.statononline.com/cgi-bin/livew/site.w?sponsor=000009&frames=no&target=main&location=olc/cobrand-product.w&addtocart=yes&product=" + vLinkProduct + "&color" + vProduct + "=" + vColor + "&size" + vProduct + "=" + vSize + "&qty=" + vQty + "&price=" + vPrice;');
document.write(' }');
document.write(' function setPrice(vName)');
document.write('{');
document.write('  if(vName!=="none")');
document.write(' {');
document.write('   var vObj=eval("document.siteForm.sc" + vName); ');
document.write('   document.siteForm.price.value=vObj.value;');
document.write('  }');
document.write(' }');
document.write(' function externalAdd(vLink,vProduct,vCookie,vLinkProduct,vColor) ');
document.write('{');
document.write('  deleteCookie(vCookie); ');
document.write('  var colorObj;');
document.write('  var vColorParam = "";');
document.write('  var vStyleParam = "";');
document.write('  var vSponsorParam = "";');
document.write('  var nv = "";');
document.write('  var nameValue = "";');
document.write('  if (document.siteForm.color!=null)');
document.write(' {');
document.write('   colorObj=eval("document.siteForm.color" + vProduct);');
document.write('   vColorParam="%26color%3D" + colorObj[colorObj.selectedIndex].value; ');
document.write('  }');
document.write('  else');
document.write(' {');
document.write('   vColorParam = "%26color%3D" + vColor;');
document.write('  }');
document.write('  vStyleParam   = "%3Fstyle%3D";');
document.write('  vSponsorParam = "%26sponsor%3D000009";');
document.write('  nv = vLink.substring(vLink.indexOf("?") + 1);');
document.write('  if (nv.indexOf("?") > -1)');
document.write('  {');
document.write('     nameValue = nv.substring(0,nv.indexOf("?"));');
document.write('     for (var i=nv.indexOf("?"); i<nv.length; i++)');
document.write('     {');
document.write('        if (nv.substring(i,i+1) == "?")');
document.write('           nameValue = nameValue + "%3F";');
document.write('        else if (nv.substring(i,i+1) == "=")');
document.write('           nameValue = nameValue + "%3D";');
document.write('        else if (nv.substring(i,i+1) == "&")');
document.write('           nameValue = nameValue + "%26";');
document.write('        else');
document.write('           nameValue = nameValue + nv.substring(i,i+1);');
document.write('     }');
document.write('  }');
document.write('  else');
document.write('     nameValue = nv;');
document.write('  top.document.location.href= vLink.substring(0,vLink.indexOf("?") + 1) + nameValue + vStyleParam + vLinkProduct + vColorParam + vSponsorParam;');
document.write(' }');
document.write(' function selectColor(vColor) ');
document.write('{');
document.write('   var colorObj=eval("document.siteForm.color");');
document.write('  if(colorObj!=null)');
document.write(' {');
document.write('   for (var i=0; i<colorObj.length; i++)');
document.write('  {');
document.write('    if(colorObj[i].value==vColor) ');
document.write('    {');
document.write('      colorObj.selectedIndex=i;');
document.write('      if(document.siteForm.size!=null)');
document.write('         validateSizes("",true);');
document.write('     }');
document.write('   }');
document.write('  }');
document.write(' }');
document.write('</script>');

//Login Script Information
document.write('<script language="javascript">');
document.write('function setAction()');
document.write('{');
document.write('document.leftMenu.action = "https://www.statononline.com/cgi-bin/livew/login.w?location=site.w%3Fsponsor%3D000009%26target%3Dmain%26location%3Db2c/home.w%3Ffrom%3D" + escape(document.leftMenu.from.value);');
document.write('}');
document.write('function showPasshint(pHint)');
document.write('{');
document.write('if (pHint.length < 1)');
document.write('{');
document.write('alert("Warning: Username cannot be left blank. Please enter a value");');
document.write('document.leftMenu.struserid.focus();');
document.write('return;');
document.write('}');
document.write('var showHelp = window.open("/live/statichtml/new-password.htm?userid=" + pHint,"","toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,height=300,width=780");');
document.write('}');
document.write('function getSavedLogin()');
document.write('{');
document.write('if(top.getCookie("saveLoginsta97liv")!="" && top.getCookie("saveLoginsta97liv")!=";")');
document.write('{');
document.write('var tempString=getCookie("saveLoginsta97liv");');
document.write('if(tempString!=null)');
document.write('{');
document.write('var login_password=tempString.split("|");');
document.write('document.leftMenu.struserid.value=login_password[0];');
document.write('document.leftMenu.strpassword.value=login_password[1];');
document.write('document.leftMenu.remember.checked=true;');
document.write('}');
document.write('}');
document.write('}');
document.write('function updateLogin(vChecked)');
document.write('{');
document.write('if(vChecked)');
document.write('{');
document.write('var expirydate = new Date();');
document.write('expirydate.setTime( expirydate.getTime() + (3650 * 24 * 60 * 60 * 1000) );');
document.write('var tempString=getCookie("saveLoginsta97liv");');
document.write('if(tempString!="")');
document.write('{ top.deleteCookie("saveLoginsta97liv", "?", document.domain.substring(document.domain.lastIndexOf(".",document.domain.lastIndexOf(".") - 1), document.domain.length), null); }');
document.write('top.setCookie("saveLoginsta97liv", document.leftMenu.struserid.value + "|" + document.leftMenu.strpassword.value, expirydate, "/", null, null);');
document.write('}');
document.write('else');
document.write('{');
document.write('top.deleteCookie("saveLoginsta97liv", "/",null, null);');
document.write('}');
document.write('}');
document.write('</script>');

