// check js version
document.write("<scr"+"ipt language=\"javascript\">var jsversion=\"1.0\"<\/scr"+"ipt>");
document.write("<scr"+"ipt language=\"javascript1.1\">var jsversion=\"1.1\"<\/scr"+"ipt>");
document.write("<scr"+"ipt language=\"javascript1.2\">var jsversion=\"1.2\"<\/scr"+"ipt>");

var subdomain = WPCODE.dev_mode ? 'jscode-dev' : 'jscode';
//var WPCODE.vc_user_id=parseInt(WPCODE.vc_user_id);
if (jsversion != 1.2) { 
    document.write("<scr" + "ipt type='text/javascript' src='http://"+subdomain+".veracart.com/cart/oldbrowser.html?id="+WPCODE.vc_user_id+"'><\/scr" + "ipt>"); 
    document.write("<center><table border=1 cellpadding=5 cellspacing=0><tr bgcolor=ff0000><td><font color=ffffff size=4>Your browser is too old to view this page. </td></tr><tr><td><b>You can download a new browser for free: </b><br><br><a href=http://www.mozilla.com rel=nofollow>Download Firefox (Recommended)</a><br><a href=http://microsoft.com/windows/ie rel=nofollow>Download Internet Explorer</a></td></tr></table>"); 
} else {
    var vcjRef = this.location.href; 
    var vcjSrc = vcjRef; 
    var inq = vcjRef.indexOf('?');
    if (inq > -1) { 
        vcjSrc = vcjRef.substring(0,inq); 
        vcjRef = vcjRef.substring(inq);
    } else {
        vcjRef = "?";
    } 
    var vera_s;
    var vcCki = document.cookie;
    function getSess() {
        var index = vcCki.indexOf("vera_sess=");
        if(index == -1) vera_s = null;
        index = vcCki.indexOf("=",index)+1;
        var endstr = vcCki.indexOf(";",index);
        if(endstr == -1) endstr = vcCki.length;
        vera_s = unescape(vcCki.substring(index, endstr)); 
    };
    getSess();
    var vsess = "";
    if(vera_s) {
        vsess = "&VCS="+vera_s;
    }

    document.write("<script type='text/javascript' src='http://"+subdomain+".veracart.com/cart" +vcjRef+vsess+"&id="+WPCODE.vc_user_id+"&vcjs=1&Src="+ vcjSrc+"'><\/script>");
    //alert(WPCODE.vc_user_id)
    //setSess();
    //document.write(vcjStylCode);    
}
 
function vcCatalog() {
    document.write(vcjCtlgCode);
};
function vcCart() {
    document.write(vcjCartCode);
};
function vcMiniCart() {
    document.write(vcjMiniCartCode);
};
function vcCatalogList() {
    document.write(vcjCtgyCode);
};
function vcCatalogDropDown() {
    document.write(vcjCDrpCode);
};
function vcCatalogCategoryTable() {
    document.write(vcjCTblCode);
};
function vcFavorites() {
    document.write(vcjFavoriteCode);
};
function vcSearch() {
    document.write(vcjSrchCode);
};
function vcAdvanceSearch() {
    document.write(vcjAdvSrchCode);
};
function vcDynamicMenu() {
    vcjDynMenus();
};
function vcFeedBackForm() {
    document.write(vcjFBCode);
};
function vcPromotions() {
    document.write(vcjPrmoCode);
};
function vcCurrency() {
    document.write(vcjCurrencySelector);
};
function vcCheckoutButton() {
    document.write(vcjCheckoutBtn);
};

