﻿// JScript File
    function nav(){
this.li="";this.lit="";this.lurl="default.aspx?AID=UA_101";
this.un="";this.eml="";this.iml="";this.lo="";this.stz="35";this.usz="50";
    }
    
ns = new nav();

    function prmen(){
document.getElementById("cart").innerHTML =  lBuildNS("v","Your Cart","default.aspx?AID=CT_101","cart1.gif","21","19");   
document.getElementById("lShow").innerHTML =  lstBld("g","Your Lists","lView()","todo1.jpg","21","21");   
document.getElementById("gift").innerHTML =  lBuildNS("g","Your Gift List","default.aspx?AID=g_101","gift2.jpg","19","19");   
document.getElementById("wish").innerHTML =  lBuildNS("w","Your Wish List","default.aspx?AID=w_101","wish2.jpg","19","19");   
document.getElementById("articles").innerHTML =  lBuildNS("a","Your Articles","default.aspx?AID=a_101","article.gif","19","19");   
document.getElementById("account").innerHTML =  lBuildNS("lg",ns.lit,ns.lurl,ns.iml,"21","21");   
if(ns.li=="R") document.getElementById("logOut").innerHTML =  lBuildNS("w","Log Out",ns.lo,"logout1.jpg","21","19");   
fsz("height",ns.stz);
    }
    
        function lstBld(nm,alt,md,img,wt,ht){
 btn = "<span id=\"sp_" + nm + "\"><img hspace=\"3\" imgVar=\"M\" id=\"ct_" + nm + "\" name=\"" + nm + "\" alt=\"" + alt + "\" unSelectable=\"On\" OnMouseDown=\"" + md + "\"   border=\"0\" src=\"../CMS/Inc/Images/" + img + "\" width=\"" + wt + "\" height=\"" + ht + "\" /><a style=\"color:#483d8b;cursor:pointer;font-size:10pt;font-family:Tahoma;\" OnClick=\"" + md + "\" >" + alt + "</a></span><br /><br />";
 return btn;  
        }   
    
    function navGo(){
user();setter();prmen();
window.top.document.getElementById("tfr_nspan").style.display = "inline"; 
         try{  
window.top.document.getElementById("pbd_bottomNav").style.display = "none";
         }
         catch(er){}
    }
    
    function navStart(){
cst = new String(GetCookie("clientData"));
lcs = new String(window.top.location.href);
lcs = lcs.toUpperCase();
fdi = lcs.indexOf("CMSPATH");
if(fdi<10) bprd();
if(cst.length>16) navGo()
//alert(ns.stz)
    }
    
    function bprd(){
str = new String(window.location.href);
arv = str.split("nav.htm");
//window.top.location.href = arv[0] + window.top.location.search;    
    }
    
    function setter(){
ns.lo=window.top.location.href + "&lg=e";ns.lit = (ns.li=="R") ? "Your Account" : "Login";
ns.iml = (ns.li=="R") ? "login1.jpg" : "login2.jpg";
ns.stz = (ns.li=="R") ? "35" : "35";   
    }
        
    
       function user(){
        try{
ustr = GetCookie("clientData").toString();ua = ustr.split("**"); 
if(ua[7]!="0") ns.un = ua[6] + " " + ua[7]; 
if(ua[7]!="0") ns.eml =  ua[8];rv = 1;ns.li=ua[2];
        }
        catch(er){
rv = 0;
        }   
    }
 
     function lView(){
dv = document.getElementById("lists").style.display
document.getElementById("lShow").innerHTML = (dv=="none") ? lstBld("g","Close Lists","lView()","close.gif","17","15") : lstBld("g","Your Lists","lView()","todo1.jpg","21","21");    
document.getElementById("lists").style.display = (dv=="inline") ? "none" : "inline";    
sz = (dv=="none") ? "290" : ns.stz;fsz("height",sz);

document.getElementById("account").style.display = (dv=="none") ? "none" : "inline";    
document.getElementById("cart").style.display = (dv=="none") ? "none" : "inline";    
if(ns.li=="R") document.getElementById("logOut").style.display = (dv=="none") ? "none" : "inline";    

    }
 
        function lBuildNS(nm,alt,md,img,wt,ht){
 btn = "<a href=\"" + md + "\" target=\"_top\"><span id=\"sp_" + nm + "\"><img align=\"left\"  hspace=\"3\" imgVar=\"M\" id=\"ct_" + nm + "\" name=\"" + nm + "\" alt=\"" + alt + "\" unSelectable=\"On\" border=\"0\" src=\"../CMS/Inc/Images/" + img + "\" width=\"" + wt + "\" height=\"" + ht + "\" /></a> <a class=\"linkTxt3\" href=\"" + md + "\" target=\"_top\" >" + alt + "</a></span><br /><br />";
 return btn;  
        } 
   
        function fsz(el,v){
            try{
window.top.document.getElementById("tfr_nav").setAttribute(el,v);
            }
            catch(er){
           //alert(er.message) 
            }        
        }
