﻿function funShowSmartSearch() { }
function funCheckDdl(b) {
    try {
        if (void 0 != $("ddlCtg1")) "-1" == $F("ddlCtg1") && alert("Select Level 1 Category"); else if ("-1" == $F("ddlCtg2")) alert("Select Level 2 Category"); else {
            strText = $A($("ddlCtg2").options).find(function(a) { return a.selected }).text.replace(/ /gi, "-").toLowerCase(); var a = $("chkExp").checked ? "express-shipping/" : ""; switch (b) {
                case "0-100": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-below-100-c-" + $F("ddlCtg2") + ".html "; break; case "101-200": window.location.href =
$F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-101-200-c-" + $F("ddlCtg2") + ".html "; break; case "201-300": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-201-300-c-" + $F("ddlCtg2") + ".html "; break; case "301-500": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-301-500-c-" + $F("ddlCtg2") + ".html "; break; case "501-1000": window.location.href = $F("hdnAppPath").toLowerCase() +
strText + "/" + a + Currency.toLowerCase() + "-price-above-500-c-" + $F("ddlCtg2") + ".html "; break; case "0-1000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-below-1000-c-" + $F("ddlCtg2") + ".html "; break; case "1001-3000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-1001-3000-c-" + $F("ddlCtg2") + ".html "; break; case "3001-5000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() +
"-price-between-3001-5000-c-" + $F("ddlCtg2") + ".html "; break; case "5001-10000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-5001-10000-c-" + $F("ddlCtg2") + ".html "; break; case "10001-20000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-above-10000-c-" + $F("ddlCtg2") + ".html "; break; case "0-50": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-below-50-c-" +
$F("ddlCtg2") + ".html "; break; case "51-100": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-51-100-c-" + $F("ddlCtg2") + ".html "; break; case "101-200": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-101-200-c-" + $F("ddlCtg2") + ".html "; break; case "201-400": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-201-400-c-" + $F("ddlCtg2") + ".html ";
                    break; case "401-1000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-above-401-c-" + $F("ddlCtg2") + ".html "; break; case "0-800": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-below-800-c-" + $F("ddlCtg2") + ".html "; break; case "801-1600": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-801-1600-c-" + $F("ddlCtg2") + ".html "; break; case "1601-2400": window.location.href =
$F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-1601-2400-c-" + $F("ddlCtg2") + ".html "; break; case "2401-4000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-between-2401-4000-c-" + $F("ddlCtg2") + ".html "; break; case "4001-10000": window.location.href = $F("hdnAppPath").toLowerCase() + strText + "/" + a + Currency.toLowerCase() + "-price-above-4001-c-" + $F("ddlCtg2") + ".html "
            } 
        } 
    } catch (c) { alert("@ funCheckDdl") } 
} CursorStyle = "hand";
function findObj(b) { var a = null; document.getElementById ? a = document.getElementById(b) : document.all && (a = document.all[b]); return a } function hideAll() { var b, a = null, a = ""; for (b = 1; 9 >= b; b++) if (a = b, a = findObj(a)) a.style.display = "none" }
function showHide(b) { if (b = findObj(b)) { var a = null, a = b.style; "none" == a.display ? a.display = "block" : "block" == a.display && (a.display = "none"); window.curOpenDiv ? window.curOpenDiv != b && (a = window.curOpenDiv.style, "block" == a.display && (a.display = "none"), window.curOpenDiv = b) : window.curOpenDiv = b } return !1 } menu_status = []; var currentOpenItemName = ""; function CBMenuShow(b) { document.getElementById(b).className = "CBMenushow"; menu_status[b] = "CBMenushow"; currentOpenItemName = b }
function CBMenuHide(b) { document.getElementById(b).className = "CBMenuhide"; menu_status[b] = "CBMenuhide"; currentOpenItemName = "" } funClrSearch = function() { "Product Search" == $F("txtProductSearch") && ($("txtProductSearch").value = "") }; funChkPrdSearch = function() { return "" == $F("txtProductSearch") || "Product Search" == $F("txtProductSearch") || !1 == funInvalidText($F("txtProductSearch")) ? (alert("Search Keyword Missing / Invalid"), !1) : !0 };
funGo = function() { !0 == funChkPrdSearch() && (window.location.href = $F("hdnAppPath") + "search/" + $F("txtProductSearch").trim().replace(/ /gi, "-").toLowerCase() + ".html") }; funInvalidText = function(b) { flg = 0; arw = spc = str = ""; for (var a = 0; a < b.length; a++) cmp = "<>?;'%$~`@#^&*()_-=+[]{}|:;,./", tst = b.substring(a, a + 1), -1 < cmp.indexOf(tst) ? (flg++, str += " " + tst, spc += tst, arw += "^") : arw += " "; if (0 != flg) return -1 < spc.indexOf(" ") && (str += " and a space"), !1 };
funDefaultSearch = function(b) { var a; try { return a = b.which ? b.which : b.keyCode, 13 == a && $("btnGo").focus(), !0 } catch (c) { alert("@ funDefaultSearch") } }; String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, "") }; String.prototype.ltrim = function() { return this.replace(/^\s+/, "") }; String.prototype.rtrim = function() { return this.replace(/\s+$/, "") }; function s(b) { document.getElementById(b).style.display = "block" } function h(b) { document.getElementById(b).style.display = "none" }
function DivPosition(b) { b = document.getElementById(b); null != b && (b.style.display = "block", browserSize = getBrowserSize(), b.style.position = "absolute", b.style.left = browserSize[0] / 2 - b.offsetWidth / 2, b.style.top = browserSize[1] / 8 - b.offsetHeight / 8) }
function getBrowserSize() { var b = 0, a = 0; if ("number" == typeof window.innerWidth) b = window.innerWidth, a = window.innerHeight; else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) b = document.documentElement.clientWidth, a = document.documentElement.clientHeight; else if (document.body && (document.body.clientWidth || document.body.clientHeight)) b = document.body.clientWidth, a = document.body.clientHeight; return [b, a] }
function funHideSmartSearch() { try { $("divCatalogs").style.display = "none" } catch (b) { alert("@ funHideSmartSearch") } } function funCurrChange(b) { try { new Ajax.Request($F("hdnAppPath") + "GenetricHandler/SmartSearch.ashx?qStr=Curr|" + b, { method: "get", onSuccess: funCurrChangeSuccess, onFailure: funCurrChangeFailure }) } catch (a) { alert("@ funCurrChange") } } function funCurrChangeSuccess(b) { try { "Y" == b.responseText && (window.location.href = document.location.href) } catch (a) { alert("@ funSSuccess") } }
function funCurrChangeFailure() { try { alert(OrigionalRequest.responseText) } catch (b) { alert("@ funSFailure") } } function funEmailSignUp() { try { new Ajax.Request($F("hdnAppPath") + "GenetricHandler/SmartSearch.ashx?qStr=SignUp|" + $F("txtEmailSignUp"), { method: "get", onSuccess: funEmailSignUpSuccess, onFailure: funEmailSignUpFailure }) } catch (b) { alert("@ funEmailSignUp") } }
function funEmailSignUpSuccess(b) { try { "Y" == b.responseText ? (alert("Thanks for your query. We will contact you soon."), document.getElementById("txtEmailSignUp").value = "") : "N" == b.responseText && (alert("You are already registered with us..."), document.getElementById("txtEmailSignUp").value = "") } catch (a) { alert("@ funSSuccess") } } function funEmailSignUpFailure() { try { alert(OrigionalRequest.responseText) } catch (b) { alert("@ funSFailure") } }
function funValidateEmail(b) { if (!1 == /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(b)) return !1 } function emailCheck(b) { var a = 0, a = b.length; if (1 > b.indexOf("@") || 1 > b.indexOf(".") || b.indexOf(".") == a - 1) return !1 }
function funChkValidSignUp() { var b = ""; if ("" == document.getElementById("txtEmailSignUp").value || !1 == emailCheck(document.getElementById("txtEmailSignUp").value) || !1 == funValidateEmail(document.getElementById("txtEmailSignUp").value)) b = "\n Email Id is Missing/Invalid"; if ("" != b) return alert(b), !1; funEmailSignUp(); return !0 }
function divShowHideLeftMenu(b, a, c) {
    var e = navigator.appName; if ("show" == a) { a = document.getElementById(c); c = document.getElementById(b); c.at_position = "x"; for (var d = "y" == c.at_position ? a.offsetHeight + 2 : 0; a; a = a.offsetParent) d += a.offsetTop; "Microsoft Internet Explorer" == e.match("Microsoft Internet Explorer") && (document.getElementById(b).className = ""); c.style.display = "block"; c.style.position = "absolute"; c.style.top = d + "px"; c.style.left = "190px"; c.style.visibility = "visible"; c.style.zIndex = "10" } else "hide" == a &&
(document.getElementById(b).style.display = "none", document.getElementById(b).style.visibility = "hidden", document.getElementById(c))
}
function funSortBy(b, a, c, e) {
    void 0 != e ? $("hdnCurrPage").value = "a_" + e : void 0 == e && ($("hdnCurrPage").value = "a_1"); $("hdnStPage").value = a; $("hdnEndPage").value = c; void 0 != e ? $("hdnCurrPage2").value = "a2_" + e : void 0 == e && ($("hdnCurrPage2").value = "a2_1"); try {
        if ($("dvProducts").innerHTML = '<center><img id="imgLoading" src="/image/EsLoading.gif" alt="Loading..." /></center>', "N" != b) {
            $("hdnSortBy").value = b; var b = $("hdnSortBy").value, d = ""; switch ($F("hdnMode")) {
                case "Def": d = "PrdsV2|" + b + "|Def|" + $F("hdnCtg1id") + "|" +
$F("hdnCtg2id") + "|" + $F("hdnCtg3id") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "shopby": d = "PrdsV2|" + b + "|shopby|" + $F("hdnPrdType") + "|" + $F("hdnSBClass") + "|" + $F("hdnSBSubClass") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "shopby-price": d = "PrdsV2|" + b + "|shopby-price|" + $F("hdnPrdType") + "|" + $F("hdnStPrice") + "|" + $F("hdnEndPrice") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-new": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value +
"|"; break; case "fltser-sale": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-express": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-customSize": d = "PrdsV2|" + b + "|customSize|" + $F("hdnPrdType") + "|" + $F("hdnSize") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "bstslr": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break;
                case "mstvwd": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "clrnsale": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "ftrprd": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "ser": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $F("hdnSerVal") + "|" + $("hdnPrdsCnt").value + "|"; break; case "wsh": d = "PrdsV2|" +
b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "new": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|new|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "DeleDate": $("hdnMode").value = "DeleDate"; d = "PrdsV2|" + b + "|DeleDate|" + $F("hdnPrdType") + "|" + DeleDate + "|" + a + "|" + c + "|" + $("hdnCurrPage").value + "|" + $("hdnPrdsCnt").value + "|"; break; case "RMPrdSize": $("hdnMode").value = "RMPrdSize"; d = "PrdsV2|" + b + "|RMPrdSize|" + $F("hdnPrdType") + "|" + RMPrdSize + "|" + a + "|" + c + "|" + $("hdnCurrPage").value +
"|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-offer": d = "PrdsV2|" + b + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"
            } funCallHandlerPrdsV2(d)
        } else if ("N" == b) {
            d = ""; switch ($F("hdnMode")) {
                case "Def": d = "PrdsV2|" + $("hdnSortBy").value + "|Def|" + $F("hdnCtg1id") + "|" + $F("hdnCtg2id") + "|" + $F("hdnCtg3id") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "shopby": d = "PrdsV2|" + $("hdnSortBy").value + "|shopby|" + $F("hdnPrdType") + "|" + $F("hdnSBClass") + "|" + $F("hdnSBSubClass") + "|" + a + "|" +
c + "|" + $("hdnPrdsCnt").value + "|"; break; case "shopby-price": d = "PrdsV2|" + $("hdnSortBy").value + "|shopby-price|" + $F("hdnPrdType") + "|" + $F("hdnStPrice") + "|" + $F("hdnEndPrice") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-new": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-sale": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-express": d =
"PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-customSize": d = "PrdsV2|" + $("hdnSortBy").value + "|customSize|" + $F("hdnPrdType") + "|" + $F("hdnSize") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "bstslr": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "mstvwd": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" +
c + "|" + $("hdnPrdsCnt").value + "|"; break; case "clrnsale": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "ftrprd": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "ser": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $F("hdnSerVal") + "|" + $("hdnPrdsCnt").value + "|"; break; case "wsh": d = "PrdsV2|" + $("hdnSortBy").value +
"|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "new": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|new|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "DeleDate": $("hdnMode").value = "DeleDate"; d = "PrdsV2|" + $("hdnSortBy").value + "|DeleDate|" + $F("hdnPrdType") + "|" + DeleDate + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"; break; case "RMPrdSize": $("hdnMode").value = "RMPrdSize"; d = "PrdsV2|" + $("hdnSortBy").value + "|RMPrdSize|" + $F("hdnPrdType") + "|" + RMPrdSize + "|" +
a + "|" + c + "|" + $("hdnCurrPage").value + "|" + $("hdnPrdsCnt").value + "|"; break; case "fltser-offer": d = "PrdsV2|" + $("hdnSortBy").value + "|" + $F("hdnMode") + "|" + $F("hdnPrdType") + "|" + a + "|" + c + "|" + $("hdnPrdsCnt").value + "|"
            } funCallHandlerPrdsV2(d)
        } 
    } catch (f) { alert("@ funShortBy") } 
} function funGenDtl(b, a, c) { try { funCallHandlerPrdsV2("Gen|" + b + "|" + a + "|" + c) } catch (e) { alert("@ funGenDtl") } }
function funWishlistOpr(b, a) { try { var c = ""; if ("wsh-del" == a) if (c = confirm("Are you sure to remove this product from your wish list")) funCallHandlerPrdsV2("PrdsV2||wsh-del|" + b + "|1|20|0"); else return !1; if ("wsh-add" == a) if (c = confirm("Are you sure to add this product in your wish list")) funCallHandlerPrdsV2("PrdsV2||wsh-add|" + b + "|1|20|0"); else return !1 } catch (e) { alert("@ funWishlistOpr") } }
function funCallHandlerPrdsV2(b) { try { new Ajax.Request($F("hdnAppPath") + "GenetricHandler/SmartSearch.ashx?qStr=" + b, { method: "get", onSuccess: funPrdsV2Success, onFailure: funPrdsV2Failure }) } catch (a) { alert("@ funCallHandlerPrdsV2") } }
function funPrdsV2Success(b) {
    try {
        var a = [], a = b.responseText.split("|"); if (0 < a.length) {
            "Gen" != a[0] && "wshopr" != a[0] && "Req" != a[0] && "B2B" != a[0] && "NoPrds" != a[0] ? ($("dvProducts").innerHTML = b.responseText.split("|")[0], funLazyLoad(), $j(function() { $j(".scrlTop").click(function() { $j("html, body").animate({ scrollTop: "50px" }, 1500); return !1 }) }), -1 != window.location.href.search(/c-hi.html/) ? ($("dvPrdTabDtl").style.display = "block", void 0 != $("dvPrdTabDtl") && new Spry.Widget.TabbedPanels("dvPrdTabDtl")) : -1 == window.location.href.search(/c-hi.html/) &&
-1 != window.location.href.search(/homeindia/) && ($("dvPrdTabDtl").style.display = "none")) : "NoPrds" == a[0] && ($("dvProducts").innerHTML = b.responseText.split("|")[1], funLazyLoad(), $j(function() { $j(".scrlTop").click(function() { $j("html, body").animate({ scrollTop: "50px" }, 1500); return !1 }) })); "Gen" == a[0] && ($(a[1]).innerHTML = a[2].toString(), $(a[1]).style.display = "block"); "wshopr" == a[0] && (window.location.href = window.location.href); void 0 != $F("hdnCurrPage") && "" != $F("hdnCurrPage") && ($($F("hdnCurrPage")).className =
"active", $($F("hdnCurrPage2")).className = "active"); void 0 != $F("hdnCurrPage2") && "" != $F("hdnCurrPage2") && ($($F("hdnCurrPage2")).className = "active", $($F("hdnCurrPage")).className = "active"); "Req" == a[0] && alert("Your request has been sent for the product code: " + a[1]); "B2B" == a[0] && ("Y" != a[1] ? alert(a[1]) : "Y" == a[1] && (window.location.href = document.location.href)); var c = $F("hdnCurrency"); Cur = document.getElementsByName("CtgCurrency"); for (b = 0; b < Cur.length; b++) if (Cur[b].value == c) { Cur[b].checked = !0; break } if ("Gen" !=
a[0] && "B2B" != a[0] && "wshopr" != a[0] && "NoPrds" != a[0]) switch ($F("hdnSortBy")) {
                case "PRICE-LH": $("priceLtoH").replace("<span>$$ low-high</span>"); break; case "PRICE-HL": $("priceHtoL").replace("<span>high-low</span>"); break; case "NEWYN": case "CREATEDATE": $("newarrivals").replace("<span>what\u2019s new</span>"); break; case "READY": $("expressship").replace("<span>Ready to Ship</span>"); break; case "SALE": $("sale").replace("<span>Sale</span>"); break; case "EXCLU": $("exclusive").replace('<span style="border-left:0px">Exclusive</span>');
                    break; case "OFFER3F2": $("offer3f2").replace("<span>3 For 2 Offer</span>")
            } 
        } window.location = window.location.href
    } catch (e) { } 
} function funPrdsV2Failure(b) { try { alert(b.responseText) } catch (a) { alert("@ funPrdsV2Failure") } }
function funImgPosition(b, a, c, e) { try { $(e).src = "http://www.chennaibazaar.com/image/EsLoadingSmall.gif"; var d = document.getElementById ? !0 : !1, f = !document.all && d || window.opera ? !0 : !1, g = "CSS1Compat" == document.compatMode ? document.documentElement : document.body, i = f ? b.pageX : window.event.clientX + g.scrollLeft, j = f ? window.innerWidth - 20 + window.pageXOffset : g.clientWidth + g.scrollLeft; i + 400 > j && ($(a).style.left = j - (i + 400) + "px"); $j("#" + a).show("slow"); $(e).src = c } catch (k) { alert("@ funImgPosition") } }
function funOpenSare(b) { switch (b) { case "fb": window.open("http://www.facebook.com/share.php?u=" + window.location.href, "mywindow"); break; case "tr": window.open("http://twitter.com/home?status=Enjoy this stunning outfit at " + window.location.href, "mywindow"); break; case "bz": window.open("http://buzz.yahoo.com/buzz?targetUrl=" + window.location.href, "mywindow"); break; case "dg": window.open("http://digg.com/submit?url=" + window.location.href, "mywindow") } }
function funOSRequest(b, a) { try { $("dvOSReqForm").style.display = "block", $("spnReqPrdCode").innerHTML = b, $("hdnReqPCode").value = b, $("hdnReqCtgId").value = a } catch (c) { aletr("@ funOSRequest") } }
function funOSRequestMail() {
    var b = ""; try {
        "" == $F("txtPRName") && (b = "\nName"); if ("" == $F("txtPREmailId") || !1 == emailCheck($F("txtPREmailId"))) b += "\nEmail Id Missing/Invalid"; "" == $F("txtPRCountry") && (b += "\nCountry"); if ("" != b) return alert("Please submit the below required details.\r\n-------------------------------------------------\r" + b), !1; vQStr = "PrdsV2||PrdOsReq|" + $F("hdnReqPCode") + "|" + $F("hdnReqCtgId") + "|" + $F("txtPREmailId") + "|" + $F("txtCmts") + "^" + $F("txtPRName") + "^" + $F("txtPREmailId") + "^" + $F("txtPRPhone") +
"^" + $F("txtPRCountry") + "|"; $("dvOSReqForm").hide(); funCallHandlerPrdsV2(vQStr)
    } catch (a) { alert("@ funOSRequestMail") } 
} var DeleDate = ""; function funDeleDate(b, a) { try { if ("" == a) return alert("Enter the date"), !1; if (isDate(a)) { DeleDate = a; $("hdnMode").value = "DeleDate"; $("hdnPrdType").value = b; var c = "PrdsV2|" + $("hdnSortBy").value + "|DeleDate|" + b + "|" + a + "|1|20|"; funCallHandlerPrdsV2(c) } } catch (e) { alert("@ funDeleDate") } } var RMPrdSize = "";
function funRMPrdSize(b, a) { try { RMPrdSize = a; $("hdnMode").value = "RMPrdSize"; $("hdnPrdType").value = b; var c = "PrdsV2|" + $("hdnSortBy").value + "|RMPrdSize|" + b + "|" + a + "|1|20|"; funCallHandlerPrdsV2(c) } catch (e) { alert("@ funRMPrdSize") } } var dtCh = "/", minYear = 1900, maxYear = 2100; function isInteger(b) { var a; for (a = 0; a < b.length; a++) { var c = b.charAt(a); if ("0" > c || "9" < c) return !1 } return !0 } function stripCharsInBag(b, a) { var c, e = ""; for (c = 0; c < b.length; c++) { var d = b.charAt(c); -1 == a.indexOf(d) && (e += d) } return e }
function daysInFebruary(b) { return 0 == b % 4 && (0 != b % 100 || 0 == b % 400) ? 29 : 28 } function DaysArray(b) { for (var a = 1; a <= b; a++) { this[a] = 31; if (4 == a || 6 == a || 9 == a || 11 == a) this[a] = 30; 2 == a && (this[a] = 29) } return this }
function isDate(b) {
    var a = DaysArray(12), c = b.indexOf(dtCh), e = b.indexOf(dtCh, c + 1), d = b.substring(0, c), f = b.substring(c + 1, e), g = b.substring(e + 1); strYr = g; "0" == f.charAt(0) && 1 < f.length && (f = f.substring(1)); "0" == d.charAt(0) && 1 < d.length && (d = d.substring(1)); for (var i = 1; 3 >= i; i++) "0" == strYr.charAt(0) && 1 < strYr.length && (strYr = strYr.substring(1)); month = parseInt(d); day = parseInt(f); year = parseInt(strYr); if (-1 == c || -1 == e) return alert("The date format should be : mm/dd/yyyy"), !1; if (1 > d.length || 1 > month || 12 < month) return alert("Please enter a valid month"),
!1; if (1 > f.length || 1 > day || 31 < day || 2 == month && day > daysInFebruary(year) || day > a[month]) return alert("Please enter a valid day"), !1; if (4 != g.length || 0 == year || year < minYear || year > maxYear) return alert("Please enter a valid 4 digit year between " + minYear + " and " + maxYear), !1; return -1 != b.indexOf(dtCh, e + 1) || !1 == isInteger(stripCharsInBag(b, dtCh)) ? (alert("Please enter a valid date"), !1) : !0
}
function divShowRequest(b, a, c, e, d) {
    var f = navigator.appName; if ("show" == b) {
        $("txtCmts").value = ""; $("txtPRName").value = ""; $("txtPREmailId").value = ""; $("txtPRPhone").value = ""; $("txtPRCountry").value = ""; $("spnReqPrdCode").innerHTML = c; $("hdnReqPCode").value = c; $("hdnReqCtgId").value = e; b = document.getElementById(a); a = document.getElementById("dvOSReqForm"); c = document.getElementById ? !0 : !1; c = !document.all && c || window.opera ? !0 : !1; e = "CSS1Compat" == document.compatMode ? document.documentElement : document.body; d = c ? d.pageX :
window.event.clientX + e.scrollLeft; e = c ? window.innerWidth - 20 + window.pageXOffset : e.clientWidth + e.scrollLeft; a.at_position = "x"; c = "y" == a.at_position ? b.offsetHeight + 2 : 0; for (d = d + 550 > e ? e - (d + 400) + "px" : "x" == a.at_position ? b.offsetWidth - 11 : 0; b; b = b.offsetParent) c += b.offsetTop, d += b.offsetLeft; "Microsoft Internet Explorer" == f.match("Microsoft Internet Explorer") && document.getElementById("dvOSReqForm"); a.style.display = "block"; a.style.position = "absolute"; a.style.top = c + "px"; a.style.left = d + "px"; a.style.visibility = "visible";
        a.style.zIndex = "10"
    } 
}
function funDefSortBy() {
    "" != $F("hdnCurrPage") && ($($F("hdnCurrPage")).className = "active"); "" != $F("hdnCurrPage2") && ($($F("hdnCurrPage2")).className = "active"); switch ($F("hdnSortBy")) {
        case "PRICE-LH": null != $("priceLtoH") && $("priceLtoH").replace("<span>$$ low-high</span>"); break; case "PRICE-HL": null != $("priceHtoL") && $("priceHtoL").replace("<span>high-low</span>"); break; case "NEWYN": case "CREATEDATE": null != $("newarrivals") && $("newarrivals").replace("<span>what\u2019s new</span>"); break; case "READY": null !=
$("expressship") && $("expressship").replace("<span>Ready to Ship</span>"); break; case "SALE": $("sale").replace("<span>Sale</span>"); break; case "EXCLU": null != $("exclusive") && $("exclusive").replace('<span style="border-left:0px">Exclusive</span>'); break; case "OFFER3F2": null != $("offer3f2") && $("offer3f2").replace("<span>3 For 2 Offer</span>")
    } -1 != window.location.href.search(/c-hi.html/) ? ($("dvPrdTabDtl").style.display = "block", void 0 != $("dvPrdTabDtl") && new Spry.Widget.TabbedPanels("dvPrdTabDtl")) : -1 == window.location.href.search(/c-hi.html/) &&
-1 != window.location.href.search(/homeindia/) && ($("dvPrdTabDtl").style.display = "none"); funPrdsPageLoad()
} function funMarginPos(b, a) { try { var c = document.getElementById ? !0 : !1, e = !document.all && c || window.opera ? !0 : !1, d = "CSS1Compat" == document.compatMode ? document.documentElement : document.body, f = e ? b.pageX : window.event.clientX + d.scrollLeft, g = e ? window.innerWidth - 20 + window.pageXOffset : d.clientWidth + d.scrollLeft; f + 400 > g && $j("#" + a).css("left", g - (f + 400)); $j("#" + a).show("slow") } catch (i) { alert("@ funMarginPos") } }
var vCnt = 0; function funSortByBackToPage() { try { alert(vCnt) } catch (b) { } }
function funB2BFestivalValid() {
    try {
        var b = ""; "" == document.getElementById("txtName").value && (b += "\n Name "); "" == document.getElementById("txtStoreName").value && (b += "\n Store / Bussiness Name "); "" == document.getElementById("txtAddr1").value && (b += "\n Address 1 "); "" == document.getElementById("txtCountry").value && (b += "\n Country "); "" == document.getElementById("txtState").value && (b += "\n State "); "" == document.getElementById("txtCity").value && (b += "\n City "); "" == document.getElementById("txtPhone").value && (b +=
"\n Phone "); if ("" == document.getElementById("txtEmail").value || !1 == emailCheck(document.getElementById("txtEmail").value) || !1 == funValidateEmail(document.getElementById("txtEmail").value)) b += "\n Email-ID Missing/Invalid"; if ("" != b) return alert("Please submit the below required details.\r\n-------------------------------------------------\r" + b), !1; funCallHandlerB2BFestival(); return !0
    } catch (a) { } 
}
function funCallHandlerB2BFestival() { try { var b = "", b = "B2BFestival|" + $F("txtName") + "|" + $F("txtStoreName") + "|" + $F("txtAddr1") + "|" + $F("txtAddr2") + "|" + $F("txtCountry") + "|" + $F("txtState") + "|" + $F("txtCity") + "|" + $F("txtPinCode") + "|" + $F("txtPhone") + "|" + $F("txtMobile") + "|" + $F("txtEmail") + "|"; new Ajax.Request("/GenetricHandler/SmartSearch.ashx?qStr=" + b, { method: "get", onSuccess: funB2BFestivalSuccess, onFailure: funB2BFestivalFailure }) } catch (a) { alert("@ funCallHandlerB2BFestival") } }
function funB2BFestivalSuccess(b) { try { var a = [], a = b.responseText.split("|"); 0 < a.length && (alert("Hi " + a[1] + " you have successfully registered!..."), window.location.href = "http://wholesale.cbazaar.com/") } catch (c) { } } function funB2BFestivalFailure(b) { try { alert(b.responseText) } catch (a) { alert("@ funB2BFestivalFailure") } }
function funClrLogin(b) { try { "focus" == b ? "Login Id" == $F("txtExistLogin") && ($("txtExistLogin").value = "") : "lost-focus" == b && "" == $F("txtExistLogin") && ($("txtExistLogin").value = "Login Id") } catch (a) { alert("@ funClrLogin") } } function funClrLoginPwd(b) { try { "focus" == b ? "Password" == $F("txtExistPwd") && ($("txtExistPwd").value = "") : "lost-focus" == b && "" == $F("txtExistPwd") && ($("txtExistPwd").value = "Password") } catch (a) { alert("@ funClrLogin") } }
function funHI(b) {
    var a = "", c = ""; switch (b) {
        case "HILogin": "" == $("txtExistLogin").value.trim() && (a = "\n Login-ID Missing/Invalid"); "" == $("txtExistPwd").value.trim() && (a += "\n Password"); if ("" != a) return alert("Please submit the below required details.\r\n------------------------------------------\r" + a), !1; b = "0"; null != $("chkRememberMe") && (b = $("chkRememberMe").checked ? "1" : "0"); c = "HI|HILogin|" + $F("txtExistLogin") + "|" + $F("txtExistPwd") + "|" + b + "|"; break; case "HIRegistration": a = ""; if ("" == $("txtHILogin").value ||
!1 == emailCheck($("txtHILogin").value) || !1 == InvalidLogin($("txtHILogin").value)) a = "\n Login-ID Missing/Invalid"; if ("" == $("txtHIName").value || !1 != numericCheck($("txtHIName").value) || !1 == funInvalidSplSymbols($("txtHIName").value)) a = a += "\n Name Missing/Invalid"; 50 < $("txtHIName").value.length && (a = a += "\n Name should not exceed 50 characters"); "" == $("txtHIPassword").value && (a = a += "\n Password"); "" == $("txtHIConfirmPassword").value && (a = a += "\n Confirm Password"); if ("" != a) return alert("Please submit the below required details.\r\n-------------------------------------------------\r" +
a), !1; c = "HI|HIRegistration|" + $F("txtHILogin") + "|" + $F("txtHIName") + "|" + $F("txtHIPassword") + "|"
    } funHICallHandler(c)
} function funChkHIPwdMisMtch() { document.getElementById("txtHIPassword").value != document.getElementById("txtHIConfirmPassword").value && alert("Password Mismatch") } function funChkHIPwdLen() { var b; b = document.getElementById("txtHIPassword").value; (6 > b.length || 20 < b.length) && alert("Password should be minimum of 6 & maximum of 20 characters") }
function funHICallHandler(b) { var a; try { a = -1 < window.location.href.indexOf("EStoreUI") ? "/EStoreUI" : "", new Ajax.Request(a + "/GenetricHandler/SmartSearch.ashx?qStr=" + b, { method: "get", onSuccess: funHISuccess, onFailure: funHIFailure }) } catch (c) { alert("@ funHICallHandler") } }
function funHISuccess(b) { try { var a = [], a = b.responseText.split("|"); if (0 < a.length) if ("B2C" == a[0]) { if ("Y" == a[1]) return alert("Hi, " + a[2]), window.location.href = "/default.aspx", !0; if ("N" == a[1]) return alert("Hi, " + a[2]), !0 } else if ("HIRegistration" == a[0]) return "Exists" == a[1] ? alert("Hi, " + a[2]) : "NotExists" == a[1] && (alert("Hi, " + a[2]), window.location.href = "/default.aspx"), !0 } catch (c) { } } function funHIFailure(b) { try { alert(b.responseText) } catch (a) { alert("@ funHIFailure") } }
function funShowHide(b, a, c, e) {
    try {
        "S" == a ? (document.getElementById(c).style.display = "block", document.getElementById(c).style.position = "absolute", document.getElementById(c).style.top = "28px") : "H" == a ? (document.getElementById(c).style.display = "none", document.getElementById("liSaree").className = "tabmenu", document.getElementById("liSalwar").className = "tabmenu", document.getElementById("liKurti").className = "tabmenu", document.getElementById("liKids").className = "tabmenu", document.getElementById("liLehenga").className =
"tabmenu", document.getElementById("liMensWear").className = "tabmenu", document.getElementById("liJewelry").className = "tabmenu") : "OnlyShow" == a && (document.getElementById(c).style.display = "block", document.getElementById(e).className = "liHover")
    } catch (d) { alert("@ funShowHide") } 
}
function funRemoveClassification(b) { try { var a = b.replace(/ /gi, "_").toLowerCase(); window.location.href = window.location.href.replace(a, "").replace("/-", "/").replace("--", "-").replace("-/c-sb.html", "/c-sb.html").replace("//c-sb.html", "/c-sb.html") } catch (c) { alert("@ funRemoveClassification") } }
function funCustSizeUrl(b) {
    try {
        if (1 < window.location.href.indexOf("c-sb.html")) {
            var a = ""; 1 < window.location.href.indexOf("-price-") && -1 == window.location.href.indexOf("delivery_days") ? (a = window.location.href.slice(0, window.location.href.indexOf("-price-") - 3), a = a + (b + "-") + window.location.href.slice(window.location.href.indexOf("-price-") - 3, window.location.href.lastIndexOf(".html") + 5), window.location.href = a.replace("/-", "/").replace("-/", "/")) : -1 == window.location.href.indexOf("-price-") && 1 < window.location.href.indexOf("delivery_days") ?
(a += window.location.href.replace(window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5), b + "-" + window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5)), window.location.href = a.replace("/-", "-").replace("-/", "-")) : 1 < window.location.href.indexOf("-price-") && 1 < window.location.href.indexOf("delivery_days") ? (a = window.location.href.slice(0, window.location.href.indexOf("-price-") -
3), a = a + (b + "-") + window.location.href.slice(window.location.href.indexOf("-price-") - 3, window.location.href.lastIndexOf(".html") + 5), window.location.href = a.replace("/-", "/").replace("-/", "/")) : window.location.href = -1 == window.location.href.indexOf("-price-") && -1 == window.location.href.indexOf("delivery_days") && (-1 < window.location.href.indexOf("occasion") || -1 < window.location.href.indexOf("color") || -1 < window.location.href.indexOf("fabric") || -1 < window.location.href.indexOf("films") || -1 < window.location.href.indexOf("celebrities") ||
-1 < window.location.href.indexOf("style") || -1 < window.location.href.indexOf("art_style") || -1 < window.location.href.indexOf("speciality")) ? window.location.href.replace("/c-sb.html", "-" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/") : window.location.href.replace("/c-sb.html", "/" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/")
        } else-1 == window.location.href.indexOf("c-sb.html") && (window.location.href = "/" + $F("hdnPrdType").replace(" ", "-") + "/" + b + "/c-sb.html")
    } catch (c) { alert("@ funCustSizeUrl") } 
}
function funRMSizeUrl(b, a) {
    try {
        if (1 < window.location.href.indexOf("c-sb.html")) {
            var c = ""; 1 < window.location.href.indexOf("-price-") && -1 == window.location.href.indexOf("delivery_days") ? (c = window.location.href.slice(0, window.location.href.indexOf("-price-") - 3), c = c + (a + "-") + window.location.href.slice(window.location.href.indexOf("-price-") - 3, window.location.href.lastIndexOf(".html") + 5), window.location.href = c.replace("/-", "/").replace("-/", "/")) : -1 == window.location.href.indexOf("-price-") && 1 < window.location.href.indexOf("delivery_days") ?
(c += window.location.href.replace(window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5), a + "-" + window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5)), window.location.href = c.replace("/-", "-").replace("-/", "-")) : 1 < window.location.href.indexOf("-price-") && 1 < window.location.href.indexOf("delivery_days") ? (c = window.location.href.slice(0, window.location.href.indexOf("-price-") -
3), c = c + (a + "-") + window.location.href.slice(window.location.href.indexOf("-price-") - 3, window.location.href.lastIndexOf(".html") + 5), window.location.href = c.replace("/-", "/").replace("-/", "/")) : window.location.href = -1 == window.location.href.indexOf("-price-") && -1 == window.location.href.indexOf("delivery_days") && (-1 < window.location.href.indexOf("occasion") || -1 < window.location.href.indexOf("color") || -1 < window.location.href.indexOf("fabric") || -1 < window.location.href.indexOf("films") || -1 < window.location.href.indexOf("celebrities") ||
-1 < window.location.href.indexOf("style") || -1 < window.location.href.indexOf("art_style") || -1 < window.location.href.indexOf("speciality")) ? window.location.href.replace("/c-sb.html", "-" + a + "/c-sb.html").replace("/-", "/").replace("-/", "/") : window.location.href.replace("/c-sb.html", "/" + a + "/c-sb.html").replace("/-", "/").replace("-/", "/")
        } else-1 == window.location.href.indexOf("c-sb.html") && (window.location.href = "/" + $F("hdnPrdType").replace(" ", "-") + "/" + a + "/c-sb.html")
    } catch (e) { alert("@ funRMSizeUrl") } 
}
function funDeliDaysUrl(b) {
    try {
        1 < window.location.href.indexOf("c-sb.html") ? window.location.href = 0 < window.location.href.indexOf("occasion") || 0 < window.location.href.indexOf("color") || 0 < window.location.href.indexOf("fabric") || 0 < window.location.href.indexOf("style") || 0 < window.location.href.indexOf("art_style") || 0 < window.location.href.indexOf("celebrities") || 0 < window.location.href.indexOf("films") || 0 < window.location.href.indexOf("size") || 0 < window.location.href.indexOf("price") ? window.location.href.replace("/c-sb.html",
"-" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/") : window.location.href.replace("/c-sb.html", "/" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/") : -1 == window.location.href.indexOf("c-sb.html") && (window.location.href = "/" + $F("hdnPrdType").replace(" ", "-") + "/" + b + "/c-sb.html")
    } catch (a) { alert("@ funDeliDaysUrl") } 
}
function funPriceUrl(b) {
    try {
        if (1 < window.location.href.indexOf("c-sb.html")) if ((0 < window.location.href.indexOf("occasion") || 0 < window.location.href.indexOf("color") || 0 < window.location.href.indexOf("fabric") || 0 < window.location.href.indexOf("style") || 0 < window.location.href.indexOf("art_style") || 0 < window.location.href.indexOf("celebrities") || 0 < window.location.href.indexOf("films") || 0 < window.location.href.indexOf("size")) && -1 == window.location.href.indexOf("delivery_days")) window.location.href = window.location.href.replace("/c-sb.html",
"-" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/"); else if (0 < window.location.href.indexOf("occasion") || 0 < window.location.href.indexOf("color") || 0 < window.location.href.indexOf("style") || 0 < window.location.href.indexOf("style") || 0 < window.location.href.indexOf("art_style") || 0 < window.location.href.indexOf("celebrities") || 0 < window.location.href.indexOf("films") || 0 < window.location.href.indexOf("size") && 0 < window.location.href.indexOf("delivery_days")) {
            var a; a = "" + window.location.href.replace(window.location.href.slice(window.location.href.indexOf("delivery_days") -
3, window.location.href.lastIndexOf(".html") + 5), b + "-" + window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5)); window.location.href = a.replace("/-", "-").replace("-/", "-")
        } else 0 < window.location.href.indexOf("delivery_days") ? (a = "" + window.location.href.replace(window.location.href.slice(window.location.href.indexOf("delivery_days") - 3, window.location.href.lastIndexOf(".html") + 5), b + "-" + window.location.href.slice(window.location.href.indexOf("delivery_days") -
3, window.location.href.lastIndexOf(".html") + 5)), window.location.href = a.replace("/-", "-").replace("-/", "-")) : window.location.href = window.location.href.replace("/c-sb.html", "/" + b + "/c-sb.html").replace("/-", "/").replace("-/", "/"); else-1 == window.location.href.indexOf("c-sb.html") && (window.location.href = "/" + $F("hdnPrdType").replace(" ", "-") + "/" + b + "/c-sb.html")
    } catch (c) { alert("@ funPriceUrl") } 
}
function funPrdsPageLoad() {
    try {
        0 < window.location.href.indexOf("size") && null != $("CollapsiblePanelCustSize") && ($("CollapsiblePanelCustSize").style.display = "none"), 0 < window.location.href.indexOf("delivery_days") && null != $("CollapsiblePanelDeliDays") && ($("CollapsiblePanelDeliDays").style.display = "none"), 0 < window.location.href.indexOf("-price-") && null != $("CollapsiblePanelPrice") && ($("CollapsiblePanelPrice").style.display = "none"), 0 < window.location.href.indexOf("rmsize") && null != $("CollapsiblePanelRMSize") &&
($("CollapsiblePanelRMSize").style.display = "none")
    } catch (b) { alert("@ funPrdsPageLoad") } 
}
function funMultipleSearch() {
    var b = "", a = "", c = "", e = "", b = $F("hdnPrdType"); "-- Select Price Range --" == $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value ? c = "" : "-- Select Price Range --" != $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value && (c = $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value); "-- Select Delivery Days --" == $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value ? e = "" : "-- Select Delivery Days --" != $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value &&
(e = $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value); "-- Select Color --" != $F("ddColor") && (a = $A($("ddColor").options).find(function(a) { return a.selected }), a = a.text.replace(/ /gi, "_").toLowerCase() + "-color-"); "-- Select Color --" != $F("ddColor") || "" != c || "" != e ? (a = a + c + e, -1 < window.location.href.indexOf("EStoreUI") && (window.location.href = ("/EStoreUI/" + b + "/" + a + "/c-sb.html").replace("--", "-").replace("-/", "/").replace("/-", "/").replace("//", "/")), -1 == window.location.href.indexOf("EStoreUI") &&
(window.location.href = ("/" + b + "/" + a + "/c-sb.html").replace("--", "-").replace("-/", "/").replace("/-", "/").replace("//", "/"))) : "-- Select Color --" == $F("ddColor") && "" == c && "" == e && alert("Select any of the above option...")
}
function funMultipleGblSearch() {
    var b = ""; null != $("ddlPrdType") && (b = $("ddlPrdType").options[$("ddlPrdType").selectedIndex].value); var a = "", c = "", e = ""; "-- Select Price Range --" == $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value ? c = "" : "-- Select Price Range --" != $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value && (c = $("ddPriceRange").options[$("ddPriceRange").selectedIndex].value); "-- Select Delivery Days --" == $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value ?
e = "" : "-- Select Delivery Days --" != $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value && (e = $("ddlDeliDays").options[$("ddlDeliDays").selectedIndex].value); "-- Select Color --" != $F("ddColor") && (a = $A($("ddColor").options).find(function(a) { return a.selected }), a = a.text.replace(/ /gi, "_").toLowerCase() + "-color-"); ("-- Select Color --" != $F("ddColor") || "" != c || "" != e) && "-- Select Product Type --" != b ? (a = a + c + e, -1 < window.location.href.indexOf("EStoreUI") && (window.location.href = ("/EStoreUI/" + b + "/" +
a + "/c-sb.html").replace("--", "-").replace("-/", "/").replace("/-", "/").replace("//", "/")), -1 == window.location.href.indexOf("EStoreUI") && (window.location.href = ("/" + b + "/" + a + "/c-sb.html").replace("--", "-").replace("-/", "/").replace("/-", "/").replace("//", "/"))) : "-- Select Color --" == $F("ddColor") && "" == c && "" == e && "" != b && "-- Select Product Type --" == b ? alert("Select any of the above option with product type...") : ("-- Select Color --" == $F("ddColor") || "" == c || "" == e) && "-- Select Product Type --" != b && alert("Select any of the above option with product type...")
}
function funCallForSortBy(b) { try { new Ajax.Request("/GenetricHandler/SmartSearch.ashx?qStr=PrdsV2||SortBy|" + b + "|", { method: "get", onSuccess: "", onFailure: "" }) } catch (a) { alert("@ funCallForSortBy") } }
function funCheckLoginV2(b, a) {
    try {
        switch (b) {
            case "B2BLogin": "B2B" == $F("hdnBussType") && "0" == $F("hdnUsrId") && ($("dvb2blogin").style.display = "block", $("dvb2blogin").style.visibility = "visible"); break; case "ReturnsLogin": if (0 < a) return window.location.href = "/returns-v2.aspx", !0; $("dvLoginParent").style.display = "block"; $("dvLoginParent").style.visibility = "visible"; $("dvLoginParent").style.zIndex = "1000001"; $("dvLoginParent").style.minHeight = "100%"; $("dvLoginParent").style.position = "fixed"; $("dvLoginParent").style.width =
"100%"; $("dvLoginParent").style.left = "25%"
        } 
    } catch (c) { } 
}
function funChkLoginV2(b) {
    try {
        var a = "", c = ""; if ("" == $("txtLogin").value || !1 == emailCheck($("txtLogin").value) || !1 == funValidateEmail($("txtLogin").value)) a = "\n Login-ID Missing/Invalid"; "" == $("txtPwd").value && (a += "\n Password"); if ("" != a) return alert("Please submit the below required details.\r\n-------------------------------------------------\r" + a), !1; switch (b) {
            case "B2BLogin": c = "PrdsV2||B2BLogin|" + $("txtLogin").value + "|" + $("txtPwd").value + "|||||"; funCallHandlerPrdsV2(c); break; case "ReturnsLogin": c =
"PrdsV2||ReturnsLogin|" + $("txtLogin").value + "|" + $("txtPwd").value + "|||||", funCallHandlerLogOn(c)
        } 
    } catch (e) { alert("funChkB2BLoginV2") } 
} function funCallHandlerLogOn(b) { try { new Ajax.Request($F("hdnAppPath") + "GenetricHandler/SmartSearch.ashx?qStr=" + b, { method: "get", onSuccess: funLogOnSuccess, onFailure: funLogOnFailure }) } catch (a) { alert("@ funCallHandlerPrdsV2") } }
function funLogOnSuccess(b) { try { var a = [], a = b.responseText.split("|"); if (0 < a.length) { switch (a[0]) { case "ReturnsLogOn": "N" == a[1] ? alert("You have no order to return to us") : "Y" == a[1] && (window.location.href = "/returns-v2.aspx"); break; case "ReturnsLogin": "You have logged on" == a[1] ? window.location.href = "/returns-v2.aspx" : "You have logged on" != a[1] && alert(a[1]) } return !0 } } catch (c) { alert("@ funLogOnSuccess") } } function funLogOnFailure(b) { try { alert(b.ResponseText) } catch (a) { alert("@ funLogOnSuccess") } }
function funCallVisitedPrdHtry(b, a) { try { qStr = "PrdsV2||VisitedPrdHtry|" + b + "|" + a, new Ajax.Request($F("hdnAppPath") + "GenetricHandler/SmartSearch.ashx?qStr=" + qStr, { method: "get", onSuccess: funCallVisitedPrdHtrySuccess, onFailure: funCallVisitedPrdHtryFailure }) } catch (c) { alert("@ funCallHandlerPrdsV2") } }
function funCallVisitedPrdHtrySuccess(b) { try { var a = [], a = b.responseText.split("|"); if (0 < a.length) { switch (a[0]) { case "VisitedPrdHtry": "Y" == a[1] && (window.location.href = window.location.href) } return !0 } } catch (c) { alert("@ funCallVisitedPrdHtrySuccess") } } function funCallVisitedPrdHtryFailure(b) { try { alert(b.ResponseText) } catch (a) { alert("@ funCallVisitedPrdHtryFailure") } } $j(document).ready(function() { $j(".menu ul li").hover(navHoverOver, navHoverOff); $j(".flyDown").each(function() { }) });
function navHoverOver() { $j(this).addClass("current1"); $j(this).find(".flyDown").stop().fadeTo("fast", 1, function() { $j(this).show() }) } function navHoverOff() { $j(this).removeClass("current1"); $j(this).find(".flyDown").stop().fadeTo("fast", 0, function() { $j(this).hide() }) }
function funAnniversaryShow() { $j("#overlay").fadeIn(1E3); $("overlay").style.display = "block"; $("overlay").style.visibility = "visible"; $("overlay").style.zIndex = "1000001"; $("overlay").style.position = "absolute"; $("overlay").style.width = "430px"; $("overlay").style.border = "1px solid #ccc"; $("overlay").style.top = "95px"; $("overlay").style.left = "19%" }
function funLowPriceShow() { $j("#LowPrice").fadeIn(1E3); $("LowPrice").style.display = "block"; $("LowPrice").style.visibility = "visible"; $("LowPrice").style.zIndex = "1000001"; $("LowPrice").style.position = "absolute"; $("LowPrice").style.width = "430px"; $("LowPrice").style.border = "1px solid #ccc"; $("LowPrice").style.top = "80px"; $("LowPrice").style.left = "35%" } funClrSearch1 = function() { "Product Search" == $F("txtPrdSer") && ($("txtPrdSer").value = "") };
funChkPrdSearch1 = function() { return "" == $F("txtPrdSer") || "Product Search" == $F("txtPrdSer") || !1 == funInvalidText($F("txtPrdSer")) ? (alert("Search Keyword Missing / Invalid"), !1) : !0 }; funGo1 = function() { !0 == funChkPrdSearch1() && (window.location.href = $F("hdnAppPath") + "search/" + $F("txtPrdSer").trim().replace(/ /gi, "-").toLowerCase() + ".html") };
$j(document).ready(function() { $j(".currency img.flag").addClass("flagvisibility"); $j(".currency dt a").click(function() { $j(".currency dd ul").toggle() }); $j(".currency dd ul li a").click(function() { var b = $j(this).html(); $j(".currency dt a span").html(b); $j(".currency dd ul").hide() }); $j(document).bind("click", function(b) { $j(b.target).parents().hasClass("currency") || $j(".currency dd ul").hide() }) });
function funManageSubs() { try { $("dvManageSubs").style.display = "block", new Ajax.Request("/GenetricHandler/SmartSearch.ashx?qStr=PrdsV2||ManageSubs|", { method: "get", onSuccess: funManageSubsSuccess, onFailure: funManageSubsFailure }) } catch (b) { alert("@ funManageSubs") } }
function funManageSubsSuccess(b) { try { var a = [], a = b.responseText.split("|"); "Y" == a[0] ? (document.getElementById("rbMailerY").checked = !0, document.getElementById("rbMailerN").checked = !1) : (document.getElementById("rbMailerN").checked = !0, document.getElementById("rbMailerY").checked = !1); "Y" == a[1] ? (document.getElementById("rbSMSY").checked = !0, document.getElementById("rbSMSN").checked = !1) : (document.getElementById("rbSMSN").checked = !0, document.getElementById("rbSMSY").checked = !1) } catch (c) { alert("@ funManageSubsSuccess") } }
function funManageSubsFailure() { try { alert("@ funManageSubsSuccess") } catch (b) { alert("@ funManageSubsSuccess") } } function funLazyLoad() { $j(".jquery-lazyload").lazyload({ placeholder: "http://www.cbazaar.com/image/lazyloading.gif", effect: "fadeIn" }) };
