var path = "";
if (document.getElementById("contextPathJsp")) {
    path = document.getElementById("contextPathJsp").value
}
function trim(B) {
    var A = B;
    return A.replace(/^\s+/, "").replace(/\s+$/, "")
}
function makeRequest(B, D) {
    var A;
    if (window.XMLHttpRequest) {
        A = new XMLHttpRequest();
        if (A.overrideMimeType) {
            A.overrideMimeType("text/xml")
        }
    } else {
        if (window.ActiveXObject) {
            try {
                A = new ActiveXObject("Msxml2.XMLHTTP")
            } catch (C) {
                try {
                    A = new ActiveXObject("Microsoft.XMLHTTP")
                } catch (C) {}
            }
        }
    }
    if (!A) {
        return false
    }
    A.onreadystatechange = function () {
        alertContents(A)
    };
    A.open("POST", B, true);
    A.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    A.send(D)
}
function alertContents(m) {
    if (m.readyState == 4) {
        if (m.status == 200) {
            var AA = m.responseText;
            var AA = trim(AA);
            if (AA.match("notSame") == "notSame" && AA.match("discussProd") == "discussProd") {
                alert("Please enter a security code matching with provided image.");
                document.commentDesc.captchafield.focus()
            } else {
                if (AA.match("same") == "same" && AA.match("discussProd") == "discussProd") {
                    startId = AA.indexOf("+");
                    if (startId != -1) {
                        newString = AA.substring(startId + 1);
                        endId = newString.indexOf("+")
                    }
                    if (startId != -1 && endId != -1) {
                        prodId = newString.substring(0, endId)
                    }
                    submitProdComment(prodId)
                } else {
                    if (AA.match("helpFulReview") == "helpFulReview") {
                        startId = AA.indexOf("+");
                        if (startId != -1) {
                            newString = AA.substring(startId + 1);
                            endId = newString.indexOf("+")
                        }
                        if (startId != -1 && endId != -1) {
                            userRevId = newString.substring(0, endId);
                            newText = newString.substring(endId + 1)
                        }
                        var b = document.getElementById("reviewText" + userRevId);
                        document.getElementById("reviewHelpful" + userRevId).style.visibility = "hidden";
                        b.innerHTML = newText
                    } else {
                        if (AA.match("sellerHelpFulReview") == "sellerHelpFulReview") {
                            startId = AA.indexOf("+");
                            if (startId != -1) {
                                newString = AA.substring(startId + 1);
                                endId = newString.indexOf("+")
                            }
                            if (startId != -1 && endId != -1) {
                                sellerRevId = newString.substring(0, endId);
                                newText = newString.substring(endId + 1)
                            }
                            var b = document.getElementById("sellerReviewText" + sellerRevId);
                            document.getElementById("sellerReviewHelpful" + sellerRevId).style.visibility = "hidden";
                            b.innerHTML = newText
                        } else {
                            if (AA.match("reportAbuse") == "reportAbuse" && AA.match("discussProduct") == "discussProduct") {
                                startId = AA.indexOf("+");
                                if (startId != -1) {
                                    newString = AA.substring(startId + 1);
                                    endId = newString.indexOf("+")
                                }
                                if (startId != -1 && endId != -1) {
                                    b = newString.substring(0, endId);
                                    disProdId = newString.substring(endId + 1)
                                }
                                if (document.getElementById("comment" + disProdId)) {
                                    document.getElementById("comment" + disProdId).style.display = "none"
                                } else {
                                    discussProductFlag = "show";
                                    showTab("5")
                                }
                            } else {
                                if (AA.match("reportAbuse") == "reportAbuse" && AA.match("userReview") == "userReview") {
                                    startId = AA.indexOf("+");
                                    if (startId != -1) {
                                        newString = AA.substring(startId + 1);
                                        endId = newString.indexOf("+")
                                    }
                                    if (startId != -1 && endId != -1) {
                                        b = newString.substring(0, endId);
                                        userRevId = newString.substring(endId + 1)
                                    }
                                    if (document.getElementById("review" + userRevId)) {
                                        document.getElementById("review" + userRevId).style.display = "none"
                                    } else {
                                        userReviewFlag = "show";
                                        showTab("4")
                                    }
                                } else {
                                    if (AA.match("reportAbuse") == "reportAbuse" && AA.match("userSellerReview") == "userSellerReview") {
                                        startId = AA.indexOf("+");
                                        if (startId != -1) {
                                            newString = AA.substring(startId + 1);
                                            endId = newString.indexOf("+")
                                        }
                                        if (startId != -1 && endId != -1) {
                                            b = newString.substring(0, endId);
                                            sellerRevId = newString.substring(endId + 1)
                                        }
                                        if (document.getElementById("sellerReview" + sellerRevId)) {
                                            document.getElementById("sellerReview" + sellerRevId).style.display = "none"
                                        } else {
                                            sellerReviewReportAbuse()
                                        }
                                    } else {
                                        if (AA.match("submitUserReview") == "submitUserReview") {
                                            startId = AA.indexOf("+");
                                            if (startId != -1) {
                                                prodId = AA.substring(startId + 1)
                                            }
                                            if (document.getElementById("ur")) {
                                                document.getElementById("ur").styleClass = "selected";
                                                msUserReviewPage(prodId)
                                            } else {
                                                userReviewFlag = "show";
                                                showTab("4")
                                            }
                                        } else {
                                            if (AA.match("submitProductComment") == "submitProductComment") {
                                                startId = AA.indexOf("+");
                                                if (startId != -1) {
                                                    prodId = AA.substring(startId + 1)
                                                }
                                                if (document.getElementById("dp")) {
                                                    document.getElementById("dp").styleClass = "selected";
                                                    msDiscussProductPage(prodId)
                                                } else {
                                                    discussProductFlag = "show";
                                                    showTab("5")
                                                }
                                            } else {
                                                if (AA.match("submitUserSellerReview") == "submitUserSellerReview") {
                                                    pageType = null;
                                                    var n = "";
                                                    startId = AA.indexOf("+");
                                                    if (startId != -1) {
                                                        newString = AA.substring(startId + 1);
                                                        endId = newString.indexOf("+")
                                                    }
                                                    if (startId != -1 && endId != -1) {
                                                        sellId = newString.substring(0, endId);
                                                        newText = newString.substring(endId + 1);
                                                        newId = newText.indexOf("+");
                                                        tcontentId = newText.substring(0, newId);
                                                        lastText = newText.substring(newId + 1);
                                                        lastId = lastText.indexOf("+");
                                                        if (lastId) {
                                                            prodId = lastText.substring(0, lastId);
                                                            n = lastText.substring(lastId + 1)
                                                        } else {
                                                            prodId = newText.substring(newId + 1)
                                                        }
                                                    }
                                                    if (tcontentId == "tcontent1") {
                                                        if (document.getElementById("os")) {
                                                            document.getElementById("os").styleClass = "selected"
                                                        }
                                                    } else {
                                                        if (tcontentId == "tcontent2") {}
                                                    }
                                                    if (n == "msSeller") {
                                                        msSellerReviewPage(sellId, tcontentId, prodId, "", n)
                                                    } else {
                                                        sellerReviewPage(sellId, tcontentId, prodId, "", n)
                                                    }
                                                } else {
                                                    if (AA.match("userReviewSignInSubmit") == "userReviewSignInSubmit") {
                                                        startId = AA.indexOf("+");
                                                        if (startId != -1) {
                                                            newString = AA.substring(startId + 1);
                                                            endId = newString.indexOf("+")
                                                        }
                                                        if (startId != -1 && endId != -1) {
                                                            prodId = newString.substring(0, endId);
                                                            newstr = newString.substring(endId + 1);
                                                            newId = newstr.indexOf("+");
                                                            userId = newstr.substring(0, newId)
                                                        }
                                                        if (userId != "") {
                                                            doRequestAsync("changeHeader", path + "/faces/jsp/cspLogin.jsp", null, null, null, true);
                                                            submitUserReviewData(userId)
                                                        } else {
                                                            error2 = document.getElementById("ur_error_signin");
                                                            error2.innerHTML = "Invalid emailId or password"
                                                        }
                                                    } else {
                                                        if (AA.match("userSellerReviewSignInSubmit") == "userSellerReviewSignInSubmit") {
                                                            startId = AA.indexOf("+");
                                                            if (startId != -1) {
                                                                newString = AA.substring(startId + 1);
                                                                endId = newString.indexOf("+")
                                                            }
                                                            if (startId != -1 && endId != -1) {
                                                                prodId = newString.substring(0, endId);
                                                                newstr = newString.substring(endId + 1);
                                                                newId = newstr.indexOf("+");
                                                                userId = newstr.substring(0, newId)
                                                            }
                                                            if (userId != "") {
                                                                doRequestAsync("changeHeader", path + "/faces/jsp/cspLogin.jsp", null, null, null, true);
                                                                submitUserSellerReviewData(userId)
                                                            } else {
                                                                errorN = document.getElementById("ursl_error_signin");
                                                                errorN.innerHTML = "Invalid emailId or password"
                                                            }
                                                        } else {
                                                            if (AA.match("userReviewSignUpSubmit") == "userReviewSignUpSubmit") {
                                                                startId = AA.indexOf("+");
                                                                if (startId != -1) {
                                                                    valid = AA.substring(startId + 1);
                                                                    endId = valid.indexOf("+")
                                                                }
                                                                if (valid == "done") {
                                                                    myWindow = window.open("", "_self", "");
                                                                    myWindow.document.write("Your Registration is Successful", "<p><input type='button' name='Close Window' value='Close Window' onclick='window.close();'></p>");
                                                                    myWindow.focus()
                                                                } else {
                                                                    errors7 = document.getElementById("ur_error_signup");
                                                                    errors7.innerHTML = "User Already exists."
                                                                }
                                                            } else {
                                                                if (AA.match("changePassword") == "changePassword") {
                                                                    startId = AA.indexOf("+");
                                                                    if (startId != -1) {
                                                                        p = AA.substring(startId + 1);
                                                                        endId = p.indexOf("+")
                                                                    }
                                                                    document.getElementById("changePasswordMessage").style.display = "";
                                                                    document.getElementById("changePasswordMessage").innerHTML = "<font color=red>" + p + "</font>"
                                                                } else {
                                                                    if (AA.match("removeFavoriteProfile") == "removeFavoriteProfile") {
                                                                        startId = AA.indexOf("+");
                                                                        if (startId != -1) {
                                                                            userId = AA.substring(startId + 1);
                                                                            endId = userId.indexOf("+")
                                                                        }
                                                                        showOnlyOneDiv("MyProfile2", "noMsg")
                                                                    } else {
                                                                        if (AA.match("removeFavoriteProduct") == "removeFavoriteProduct") {
                                                                            startId = AA.indexOf("+");
                                                                            if (startId != -1) {
                                                                                userId = AA.substring(startId + 1);
                                                                                endId = userId.indexOf("+")
                                                                            }
                                                                            showOnlyOneDiv("MyProfile3", "noMsg")
                                                                        } else {
                                                                            if (AA.match("removeBrowse_History") == "removeBrowse_History") {
                                                                                startId = AA.indexOf("+");
                                                                                if (startId != -1) {
                                                                                    userId = AA.substring(startId + 1);
                                                                                    endId = userId.indexOf("+")
                                                                                }
                                                                                invokeBrowsingHistory(userId)
                                                                            } else {
                                                                                if (AA.match("removeBrowsingHistory") == "removeBrowsingHistory") {
                                                                                    startId = AA.indexOf("+");
                                                                                    if (startId != -1) {
                                                                                        userId = AA.substring(startId + 1);
                                                                                        endId = userId.indexOf("+")
                                                                                    }
                                                                                    showOnlyOneDiv("MyProfile4", "noMsg")
                                                                                } else {
                                                                                    if (AA.match("removeSearchHistory") == "removeSearchHistory") {
                                                                                        startId = AA.indexOf("+");
                                                                                        if (startId != -1) {
                                                                                            userId = AA.substring(startId + 1);
                                                                                            endId = userId.indexOf("+")
                                                                                        }
                                                                                        showOnlyOneDiv("MyProfile5", "noMsg")
                                                                                    } else {
                                                                                        if (AA.match("removeSearch_History") == "removeSearch_History") {
                                                                                            startId = AA.indexOf("+");
                                                                                            if (startId != -1) {
                                                                                                userId = AA.substring(startId + 1);
                                                                                                endId = userId.indexOf("+")
                                                                                            }
                                                                                            invokeSearchHistory(userId)
                                                                                        } else {
                                                                                            if (AA.match("addProfileToMyFavorite") == "addProfileToMyFavorite") {
                                                                                                startId = AA.indexOf("+");
                                                                                                if (startId != -1) {
                                                                                                    flag = AA.substring(startId + 1);
                                                                                                    endId = flag.indexOf("+")
                                                                                                }
                                                                                                if (flag == "success") {
                                                                                                    showOnlyOneDiv("MyProfile1")
                                                                                                }
                                                                                            } else {
                                                                                                if (AA.match("saveEditProfile") == "saveEditProfile") {
                                                                                                    startId = AA.indexOf("+");
                                                                                                    if (startId != -1) {
                                                                                                        flag = AA.substring(startId + 1);
                                                                                                        endId = flag.indexOf("+")
                                                                                                    }
                                                                                                    if (flag == "Edited") {
                                                                                                        showOnlyOneDiv("MyProfile1", "Your profile has been modified successfully")
                                                                                                    }
                                                                                                } else {
                                                                                                    if (AA.match("statesforcountry") == "statesforcountry") {
                                                                                                        startId = AA.indexOf("+");
                                                                                                        if (startId != -1) {
                                                                                                            newStr = AA.substring(startId + 1);
                                                                                                            newId = newStr.indexOf("+")
                                                                                                        }
                                                                                                        if (startId != -1 && newId != -1) {
                                                                                                            formName = newStr.substring(0, newId);
                                                                                                            valid = newStr.substring(newId + 1);
                                                                                                            endId = valid.indexOf("+");
                                                                                                            listSize = valid.substring(0, endId);
                                                                                                            stateId = valid.substring(endId + 1)
                                                                                                        }
                                                                                                        var W;
                                                                                                        var D;
                                                                                                        var C;
                                                                                                        var e;
                                                                                                        var v = 0;
                                                                                                        var N;
                                                                                                        var s;
                                                                                                        var AB = new Array(listSize);
                                                                                                        var y = new Array(listSize);
                                                                                                        var F = valid.indexOf("+", 0);
                                                                                                        var W = valid.substring(F + 1, valid.length);
                                                                                                        for (x = 0; x < listSize; ++x) {
                                                                                                            e = W.indexOf(".", 0);
                                                                                                            D = W.substring(e + 1, valid.length);
                                                                                                            C = W.substring(0, e);
                                                                                                            W = D;
                                                                                                            if (C != null) {
                                                                                                                var s = C.indexOf("+", 0);
                                                                                                                var N = C.substring(0, s);
                                                                                                                var a = C.substring(s + 1, C.length);
                                                                                                                AB[v] = N;
                                                                                                                y[v] = a;
                                                                                                                ++v
                                                                                                            }
                                                                                                        }
                                                                                                        var q = document.forms[formName].country;
                                                                                                        var AE = document.forms[formName].state;
                                                                                                        var X = document.forms[formName].otherState;
                                                                                                        var r = document.forms[formName].otherCity;
                                                                                                        AE.options.length = 0;
                                                                                                        AE.options[0] = new Option("Select State", "0");
                                                                                                        for (var U = 0; U < AB.length; ++U) {
                                                                                                            AE.options[AE.options.length] = new Option(y[U], AB[U])
                                                                                                        }
                                                                                                        X.disabled = true;
                                                                                                        X.value = "";
                                                                                                        r.disabled = true;
                                                                                                        r.value = "";
                                                                                                        var P = document.forms[formName].city;
                                                                                                        P.options.length = 0;
                                                                                                        P.options.length = 1;
                                                                                                        P.options[0] = new Option("Select City", "0");
                                                                                                        if (q.options[q.options.selectedIndex].value == "0") {
                                                                                                            AE.options.length = 1;
                                                                                                            AE.options[0] = new Option("Select State", "0");
                                                                                                            P.options.length = 1;
                                                                                                            P.options[0] = new Option("Select City", "0")
                                                                                                        }
                                                                                                    } else {
                                                                                                        if (AA.match("cityforstate") == "cityforstate") {
                                                                                                            startId = AA.indexOf("+");
                                                                                                            if (startId != -1) {
                                                                                                                newStr = AA.substring(startId + 1);
                                                                                                                newId = newStr.indexOf("+")
                                                                                                            }
                                                                                                            if (startId != -1 && newId != -1) {
                                                                                                                formName = newStr.substring(0, newId);
                                                                                                                valid = newStr.substring(newId + 1);
                                                                                                                endId = valid.indexOf("+");
                                                                                                                listSize = valid.substring(0, endId);
                                                                                                                stateId = valid.substring(endId + 1)
                                                                                                            }
                                                                                                            var W;
                                                                                                            var D;
                                                                                                            var C;
                                                                                                            var e;
                                                                                                            var v = 0;
                                                                                                            var N;
                                                                                                            var s;
                                                                                                            var AB = new Array(listSize);
                                                                                                            var y = new Array(listSize);
                                                                                                            var F = valid.indexOf("+", 0);
                                                                                                            var W = valid.substring(F + 1, valid.length);
                                                                                                            for (x = 0; x < listSize; ++x) {
                                                                                                                e = W.indexOf(".", 0);
                                                                                                                D = W.substring(e + 1, valid.length);
                                                                                                                C = W.substring(0, e);
                                                                                                                W = D;
                                                                                                                if (C != null) {
                                                                                                                    var s = C.indexOf("+", 0);
                                                                                                                    var N = C.substring(0, s);
                                                                                                                    var a = C.substring(s + 1, C.length);
                                                                                                                    AB[v] = N;
                                                                                                                    y[v] = a;
                                                                                                                    ++v
                                                                                                                }
                                                                                                            }
                                                                                                            var P = document.forms[formName].city;
                                                                                                            var AE = document.forms[formName].state;
                                                                                                            var X = document.forms[formName].otherState;
                                                                                                            var r = document.forms[formName].otherCity;
                                                                                                            P.options.length = 0;
                                                                                                            if (AB.length < 1) {
                                                                                                                P.options.length = 1;
                                                                                                                P.options[0] = new Option("Select City", "0")
                                                                                                            } else {
                                                                                                                P.options[0] = new Option("Select City", "0");
                                                                                                                for (var U = 0; U < AB.length; ++U) {
                                                                                                                    P.options[P.options.length] = new Option(y[U], AB[U])
                                                                                                                }
                                                                                                                if (AE.options[AE.options.selectedIndex].text == "Other") {
                                                                                                                    X.disabled = false;
                                                                                                                    X.focus()
                                                                                                                } else {
                                                                                                                    X.disabled = true;
                                                                                                                    X.value = ""
                                                                                                                }
                                                                                                            }
                                                                                                            if (AE.options[AE.options.selectedIndex].value == "0") {
                                                                                                                P.options.length = 1;
                                                                                                                P.options[0] = new Option("Select City", "0");
                                                                                                                r.disabled = true;
                                                                                                                r.value = ""
                                                                                                            }
                                                                                                        } else {
                                                                                                            if (AA.match("SaveToMyFavorites") == "SaveToMyFavorites") {
                                                                                                                document.getElementById("checkToSaveProfile").innerHTML = "Product added to favorite"
                                                                                                            } else {
                                                                                                                if (AA.match("userFavorites") == "userFavorites") {
                                                                                                                    startId = AA.indexOf("+");
                                                                                                                    if (startId != -1) {
                                                                                                                        text1 = AA.substring(startId + 1);
                                                                                                                        endId1 = text1.indexOf("+");
                                                                                                                        isdone = text1.substring(0, endId1);
                                                                                                                        prodId = text1.substring(endId1 + 1)
                                                                                                                    }
                                                                                                                    if (isdone == "done") {
                                                                                                                        favorite_up = "favoriteup" + prodId;
                                                                                                                        added_up = "addedup" + prodId;
                                                                                                                        favorite_down = "favoritedown" + prodId;
                                                                                                                        added_down = "addeddown" + prodId;
                                                                                                                        document.getElementById(favorite_up).style.visibility = "hidden";
                                                                                                                        document.getElementById(favorite_up).style.display = "none";
                                                                                                                        document.getElementById(added_up).style.visibility = "visible";
                                                                                                                        document.getElementById(added_up).style.display = "block";
                                                                                                                        document.getElementById(favorite_down).style.visibility = "hidden";
                                                                                                                        document.getElementById(favorite_down).style.display = "none";
                                                                                                                        document.getElementById(added_down).style.visibility = "visible";
                                                                                                                        document.getElementById(added_down).style.display = "block"
                                                                                                                    } else {
                                                                                                                        alert("Not successful,Try Again.")
                                                                                                                    }
                                                                                                                } else {
                                                                                                                    if (AA.match("sellerSellMoreProducts") == "sellerSellMoreProducts") {
                                                                                                                        var A = new Array();
                                                                                                                        startId = AA.indexOf("+");
                                                                                                                        if (startId != -1) {
                                                                                                                            var k = true;
                                                                                                                            var x = 0;
                                                                                                                            while (k) {
                                                                                                                                text1 = AA.substring(startId + 1);
                                                                                                                                endId1 = text1.indexOf("+");
                                                                                                                                if (endId1 != -1) {
                                                                                                                                    isdone = text1.substring(0, endId1);
                                                                                                                                    A[x] = isdone;
                                                                                                                                    AA = text1;
                                                                                                                                    startId = endId1;
                                                                                                                                    x++
                                                                                                                                } else {
                                                                                                                                    A[x] = text1.substring(endId1 + 1);
                                                                                                                                    k = false
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                        var c = "";
                                                                                                                        var Q = true;
                                                                                                                        var x = 1;
                                                                                                                        var v = 1;
                                                                                                                        if (A[0] == "subCategory") {
                                                                                                                            hideDiv("subCategoryDiv");
                                                                                                                            hideDiv("subsubCategoryDiv");
                                                                                                                            hideDiv("brandNameDiv");
                                                                                                                            hideDiv("uploadProductBulk");
                                                                                                                            var AD = document.getElementById("subCategoryDiv");
                                                                                                                            var c = "<table cellpadding='0' cellspacing='0'><tr><td class='textnormal_12' align='right' width='130'><span style='font-weight:bold;'>Sub-Category&nbsp;:&nbsp;</span></td><td align='left'><select name=\"subCategory\" id=\"subCategory\" onchange=\"getAllNames(this.value,'subsubCategory');\"><option value=''>Select-SubCategory</option>";
                                                                                                                            while (x < A.length) {
                                                                                                                                c = c + "<option value=" + A[x] + ">" + A[++x] + "</option>";
                                                                                                                                v++;
                                                                                                                                x++
                                                                                                                            }
                                                                                                                            c = c + "</select></td></tr></table>";
                                                                                                                            AD.innerHTML = c;
                                                                                                                            AD.style.visibility = "visible";
                                                                                                                            AD.style.display = "block";
                                                                                                                            x = 1;
                                                                                                                            v = 1
                                                                                                                        } else {
                                                                                                                            if (A[0] == "subsubCategory") {
                                                                                                                                hideDiv("brandNameDiv");
                                                                                                                                hideDiv("uploadProductBulk");
                                                                                                                                var O = document.getElementById("subsubCategoryDiv");
                                                                                                                                var c = "<table cellpadding='0' cellspacing='0'><tr><td class='textnormal_12' align='right' width='130'><span style='font-weight:bold;'>Sub-Sub-Category&nbsp;:&nbsp;</span></td><td align='left'><select name=\"subsubCategory\" id=\"subsubCategory\" onchange=\"getAllNames(this.value,'brandName');\"><option value=''>Select-Sub-Sub-Category</option>";
                                                                                                                                while (x < A.length) {
                                                                                                                                    c = c + "<option value=" + A[x] + ">" + A[++x] + "</option>";
                                                                                                                                    v++;
                                                                                                                                    x++
                                                                                                                                }
                                                                                                                                c = c + "</select></td></tr></table>";
                                                                                                                                O.innerHTML = c;
                                                                                                                                O.style.visibility = "visible";
                                                                                                                                O.style.display = "block";
                                                                                                                                x = 1;
                                                                                                                                v = 1
                                                                                                                            } else {
                                                                                                                                if (A[0].match("brandName") == "brandName") {
                                                                                                                                    var V = null;
                                                                                                                                    if (A[0] == "brandNameHideSubSubCategory") {
                                                                                                                                        hideDiv("subsubCategoryDiv");
                                                                                                                                        V = document.getElementById("subCategory").value
                                                                                                                                    } else {
                                                                                                                                        V = document.getElementById("subsubCategory").value
                                                                                                                                    }
                                                                                                                                    hideDiv("uploadProductBulk");
                                                                                                                                    var z = document.getElementById("brandNameDiv");
                                                                                                                                    var c = "<table cellpadding='0' cellspacing='0'><tr><td class='textnormal_12' align='right' width='130'><span style='font-weight:bold;'>BrandName&nbsp;:&nbsp;</span></td><td align='left'><select name=\"brandNames\" id=\"brandNames\" onchange=\"getAllBrandProducts(this.value,'allProductNames','" + V + "');\"><option value=''>Select-BrandName</option>";
                                                                                                                                    while (x < A.length) {
                                                                                                                                        c = c + "<option value=" + A[x] + " id=" + A[x] + ">" + A[++x] + "</option>";
                                                                                                                                        v++;
                                                                                                                                        x++
                                                                                                                                    }
                                                                                                                                    c = c + "</select></td></tr></table>";
                                                                                                                                    z.innerHTML = c;
                                                                                                                                    z.style.visibility = "visible";
                                                                                                                                    z.style.display = "block";
                                                                                                                                    x = 1;
                                                                                                                                    v = 1
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    } else {
                                                                                                                        if (AA.match("removeConnection") == "removeConnection") {
                                                                                                                            var A = new Array();
                                                                                                                            startId = AA.indexOf("+");
                                                                                                                            if (startId != -1) {
                                                                                                                                var k = true;
                                                                                                                                var x = 0;
                                                                                                                                while (k) {
                                                                                                                                    text1 = AA.substring(startId + 1);
                                                                                                                                    endId1 = text1.indexOf("+");
                                                                                                                                    if (endId1 != -1) {
                                                                                                                                        isdone = text1.substring(0, endId1);
                                                                                                                                        A[x] = isdone;
                                                                                                                                        AA = text1;
                                                                                                                                        startId = endId1;
                                                                                                                                        x++
                                                                                                                                    } else {
                                                                                                                                        A[x] = text1.substring(endId1 + 1);
                                                                                                                                        k = false
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                            var l = document.getElementById(A[0] + "OldMsg");
                                                                                                                            var o = document.getElementById(A[0] + "NewMsg");
                                                                                                                            if (l) {
                                                                                                                                l.style.visibility = "hidden";
                                                                                                                                l.style.display = "none";
                                                                                                                                o.style.visibility = "visible";
                                                                                                                                o.style.display = "block"
                                                                                                                            }
                                                                                                                        } else {
                                                                                                                            if (AA.match("linegraph") == "linegraph") {
                                                                                                                                var A = new Array();
                                                                                                                                startId = AA.indexOf("+");
                                                                                                                                if (startId != -1) {
                                                                                                                                    var k = true;
                                                                                                                                    var x = 0;
                                                                                                                                    while (k) {
                                                                                                                                        text1 = AA.substring(startId + 1);
                                                                                                                                        endId1 = text1.indexOf("+");
                                                                                                                                        if (endId1 != -1) {
                                                                                                                                            isdone = text1.substring(0, endId1);
                                                                                                                                            A[x] = isdone;
                                                                                                                                            AA = text1;
                                                                                                                                            startId = endId1;
                                                                                                                                            x++
                                                                                                                                        } else {
                                                                                                                                            A[x] = text1.substring(endId1 + 1);
                                                                                                                                            k = false
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                                var AC = new line_graph();
                                                                                                                                var x = 0;
                                                                                                                                var t = 0;
                                                                                                                                var I = 0;
                                                                                                                                var R = document.getElementById("lineCanvas");
                                                                                                                                R.innerHTML = "";
                                                                                                                                var K = document.getElementById("clicks");
                                                                                                                                var J = document.getElementById("avg");
                                                                                                                                if (A.length > 1) {
                                                                                                                                    while (x < A.length) {
                                                                                                                                        AC.add(A[x], A[++x]);
                                                                                                                                        t = t + parseInt(A[x]);
                                                                                                                                        x++
                                                                                                                                    }
                                                                                                                                    AC.render("lineCanvas", "Line Graph")
                                                                                                                                } else {
                                                                                                                                    lineCanvas.innerHTML = "<b>No Data available in selected date</b>"
                                                                                                                                }
                                                                                                                                K.innerHTML = t;
                                                                                                                                if (t != 0) {
                                                                                                                                    I = String(t / (x / 2));
                                                                                                                                    var w = I.indexOf(".");
                                                                                                                                    I = I.substring(0, w + 3)
                                                                                                                                }
                                                                                                                                J.innerHTML = I
                                                                                                                            } else {
                                                                                                                                if (AA.match("getLoggedId") == "getLoggedId") {
                                                                                                                                    var A = new Array();
                                                                                                                                    startId = AA.indexOf("+");
                                                                                                                                    if (startId != -1) {
                                                                                                                                        var k = true;
                                                                                                                                        var x = 0;
                                                                                                                                        while (k) {
                                                                                                                                            text1 = AA.substring(startId + 1);
                                                                                                                                            endId1 = text1.indexOf("+");
                                                                                                                                            if (endId1 != -1) {
                                                                                                                                                isdone = text1.substring(0, endId1);
                                                                                                                                                A[x] = isdone;
                                                                                                                                                AA = text1;
                                                                                                                                                startId = endId1;
                                                                                                                                                x++
                                                                                                                                            } else {
                                                                                                                                                A[x] = text1.substring(endId1 + 1);
                                                                                                                                                k = false
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                    for (var x = 0; x < A.length; x++) {}
                                                                                                                                    if (A[0] == "done") {
                                                                                                                                        favorite_up = "favoriteup" + A[2];
                                                                                                                                        added_up = "addedup" + A[2];
                                                                                                                                        favorite_down = "favoritedown" + A[2];
                                                                                                                                        added_down = "addeddown" + A[2];
                                                                                                                                        document.getElementById(favorite_up).style.visibility = "hidden";
                                                                                                                                        document.getElementById(favorite_up).style.display = "none";
                                                                                                                                        document.getElementById(added_up).style.visibility = "visible";
                                                                                                                                        document.getElementById(added_up).style.display = "block";
                                                                                                                                        document.getElementById(favorite_down).style.visibility = "hidden";
                                                                                                                                        document.getElementById(favorite_down).style.display = "none";
                                                                                                                                        document.getElementById(added_down).style.visibility = "visible";
                                                                                                                                        document.getElementById(added_down).style.display = "block"
                                                                                                                                    }
                                                                                                                                } else {
                                                                                                                                    if (AA.match("LoggedUserIdFound") == "LoggedUserIdFound") {
                                                                                                                                        startId = AA.indexOf("+");
                                                                                                                                        if (startId != -1) {
                                                                                                                                            newString = AA.substring(startId + 1);
                                                                                                                                            newId = newString.indexOf("+");
                                                                                                                                            userId = newString.substring(0, newId);
                                                                                                                                            str = newString.substring(newId + 1);
                                                                                                                                            endId = str.indexOf("+");
                                                                                                                                            prodId = str.substring(0, endId);
                                                                                                                                            lastStr = str.substring(endId + 1);
                                                                                                                                            lastId = lastStr.indexOf("+");
                                                                                                                                            sellerEmail = lastStr.substring(0, lastId);
                                                                                                                                            lastestStr = lastStr.substring(lastId + 1);
                                                                                                                                            lastestId = lastestStr.indexOf("+");
                                                                                                                                            forPage = lastestStr.substring(0, lastestId);
                                                                                                                                            linkId = lastestStr.substring(lastestId + 1)
                                                                                                                                        }
                                                                                                                                        if (userId != "null" && forPage == "addtoFavorite") {
                                                                                                                                            addToFavorites(prodId, "", userId, false, sellerEmail)
                                                                                                                                        }
                                                                                                                                        if (sellerEmail != "null" && forPage == "saveProduct") {
                                                                                                                                            sellThisProduct(prodId, userId, false, sellerEmail, linkId)
                                                                                                                                        } else {
                                                                                                                                            if (userId == "null" && forPage == "addtoFavorite") {
                                                                                                                                                addToFavorites(prodId, "", userId, true, sellerEmail)
                                                                                                                                            } else {
                                                                                                                                                if (sellerEmail == "null" && forPage == "saveProduct") {
                                                                                                                                                    sellThisProduct(prodId, userId, true, sellerEmail, linkId)
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    } else {
                                                                                                                                        if (AA.match("productSold") == "productSold") {
                                                                                                                                            startId = AA.indexOf("+");
                                                                                                                                            if (startId != -1) {
                                                                                                                                                newString = AA.substring(startId + 1);
                                                                                                                                                endId = newString.indexOf("+");
                                                                                                                                                matshStr = newString.substring(0, endId);
                                                                                                                                                nextStr = newString.substring(endId + 1);
                                                                                                                                                nextId = nextStr.indexOf("+");
                                                                                                                                                newId = nextStr.substring(0, nextId);
                                                                                                                                                prodId = nextStr.substring(nextId + 1)
                                                                                                                                            }
                                                                                                                                            if (matshStr == "match") {
                                                                                                                                                alert("Selected product is aready in your product list. If you want to update price, Please go to Seller Account ");
                                                                                                                                                var B = document.getElementById(trim(newId) + trim(prodId));
                                                                                                                                                if (B) {
                                                                                                                                                    B.innerHTML = "<span class='MyFavorite'>Product already listed by you</span>"
                                                                                                                                                }
                                                                                                                                            } else {
                                                                                                                                                if (matshStr == "nomatch") {
                                                                                                                                                    var A = new Array();
                                                                                                                                                    A.productId = prodId;
                                                                                                                                                    A.newId = newId;
                                                                                                                                                    doRequest("request:saveSellProduct", newId + prodId, A)
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        } else {
                                                                                                                                            if (AA.match("naaptolFeedBack") == "naaptolFeedBack") {
                                                                                                                                                var p = "";
                                                                                                                                                startId = AA.indexOf("+");
                                                                                                                                                if (startId != -1) {
                                                                                                                                                    p = AA.substring(startId + 1)
                                                                                                                                                }
                                                                                                                                                var Z = document.getElementById("feedbackmsg");
                                                                                                                                                var H = document.getElementById("naaptol_feedback");
                                                                                                                                                var G = document.getElementById("successfull");
                                                                                                                                                if (p == "feedBackStore") {
                                                                                                                                                    H.style.visibility = "hidden";
                                                                                                                                                    H.style.display = "none";
                                                                                                                                                    G.style.visibility = "visible";
                                                                                                                                                    G.style.display = "block"
                                                                                                                                                } else {
                                                                                                                                                    Z.innerHTML = "System Exception! Please Try Later."
                                                                                                                                                }
                                                                                                                                                var L = document.getElementById("feedbackbt");
                                                                                                                                                L.disabled = false
                                                                                                                                            } else {
                                                                                                                                                if (AA.match("removeProductBySeller") == "removeProductBySeller") {
                                                                                                                                                    startId = AA.indexOf("+");
                                                                                                                                                    if (startId != -1) {
                                                                                                                                                        sellerId = AA.substring(startId + 1);
                                                                                                                                                        endId = sellerId.indexOf("+")
                                                                                                                                                    }
                                                                                                                                                    showOnlyOneDiv("MyProfile3", "noMsg")
                                                                                                                                                } else {
                                                                                                                                                    if (AA.match("suggessionBoxPageId") == "suggessionBoxPageId") {
                                                                                                                                                        var M = document.getElementById("suggesstionBox");
                                                                                                                                                        var A = new Array();
                                                                                                                                                        startId = AA.indexOf("+");
                                                                                                                                                        if (startId != -1) {
                                                                                                                                                            var k = true;
                                                                                                                                                            var x = 0;
                                                                                                                                                            while (k) {
                                                                                                                                                                text1 = AA.substring(startId + 1);
                                                                                                                                                                endId1 = text1.indexOf("+");
                                                                                                                                                                if (endId1 != -1) {
                                                                                                                                                                    isdone = text1.substring(0, endId1);
                                                                                                                                                                    A[x] = isdone;
                                                                                                                                                                    AA = text1;
                                                                                                                                                                    startId = endId1;
                                                                                                                                                                    x++
                                                                                                                                                                } else {
                                                                                                                                                                    A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                    k = false
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                        var c = "";
                                                                                                                                                        var x = 0;
                                                                                                                                                        var f = 0;
                                                                                                                                                        var u = null;
                                                                                                                                                        var T = trim((document.getElementById("searchtxt").value));
                                                                                                                                                        var S = T.length;
                                                                                                                                                        var Y = T.substring(0, 3);
                                                                                                                                                        if (!searchSuggestionHashMap.containsKey(Y)) {
                                                                                                                                                            searchSuggestionHashMap.put(Y, A)
                                                                                                                                                        }
                                                                                                                                                        if (A.length > 6) {
                                                                                                                                                            f = 100;
                                                                                                                                                            u = "auto"
                                                                                                                                                        } else {
                                                                                                                                                            f = "";
                                                                                                                                                            u = "hidden"
                                                                                                                                                        }
                                                                                                                                                        while (x < A.length) {
                                                                                                                                                            c += "<tr><td width='50%' onmouseOver=\"this.style.backgroundColor='#F8FBF0';\" onmouseOut=\"this.style.backgroundColor='#ffffff';\" style=\"padding-left:5px;\"><div style='visibility:hidden;display:block;position:absolute;'>" + A[x] + "</div><a href=\"javascript:selectedSuggestion('" + A[x] + "');\" onmouseOver=\"this.style.color='#71A115';\" onmouseOut=\"this.style.color='#006699';\" style='cursor:pointer;font-size:12px;color:#006699;'><span style='font-weight:bold;'\">" + A[x].substring(0, S) + "</span><span>" + A[x].substring(S, A[x].length) + "</span></a></td><td width='50%' onmouseOver=\"this.style.backgroundColor='#F8FBF0';\" onmouseOut=\"this.style.backgroundColor='#ffffff';\" style=\"padding-left:5px;\">";
                                                                                                                                                            if (A[x + 1] != null && A[x + 1] != "") {
                                                                                                                                                                x++;
                                                                                                                                                                c += "<div style='visibility:hidden;display:block;position:absolute;'>" + A[x] + "</div><a href=\"javascript:selectedSuggestion('" + A[x] + "');\" style='cursor:pointer;font-size:12px;color:#006699;' onmouseOver=\"this.style.color='#71A115';\" onmouseOut=\"this.style.color='#006699';\"><span style='font-weight:bold;'>" + A[x].substring(0, S) + "</span><span>" + A[x].substring(S, A[x].length) + "</span></a>"
                                                                                                                                                            }
                                                                                                                                                            c += "</td></tr>";
                                                                                                                                                            x++
                                                                                                                                                        }
                                                                                                                                                        var d = "";
                                                                                                                                                        var Q = true;
                                                                                                                                                        if (A.length == 1 && A[0] == "") {
                                                                                                                                                            M.style.visibility = "hidden";
                                                                                                                                                            M.style.display = "none";
                                                                                                                                                            Q = false
                                                                                                                                                        } else {
                                                                                                                                                            d = c
                                                                                                                                                        }
                                                                                                                                                        var d = "<table id='tab11' border='0' width='100%' cellspacing='0' cellpadding='0'><tr><th width='50%' align='left'>Search suggestions:</th><th width='50%' align='right' ><a href=\"javascript:hideSuggestionBox('suggesstionBox');\" style='cursor:pointer;'><img src='" + contextPath + "/naaptolImages/Bt_Remove.gif'></a></th></tr><tr><td valign='top' colspan='2' style='margin: auto;'><div id='test' style='overflow:" + u + ";height:" + f + "px;margin-top:0px;'><table id='suggestionTable' width='100%' border='0' cellspacing='0' cellpadding='0'>" + d + "</table></div></td></tr></table>";
                                                                                                                                                        if (Q) {
                                                                                                                                                            M.innerHTML = d;
                                                                                                                                                            M.style.visibility = "visible";
                                                                                                                                                            M.style.display = "block"
                                                                                                                                                        }
                                                                                                                                                    } else {
                                                                                                                                                        if (AA.match("SellerEditPrice") == "SellerEditPrice") {
                                                                                                                                                            var A = new Array();
                                                                                                                                                            startId = AA.indexOf("+");
                                                                                                                                                            if (startId != -1) {
                                                                                                                                                                var k = true;
                                                                                                                                                                var x = 0;
                                                                                                                                                                while (k) {
                                                                                                                                                                    text1 = AA.substring(startId + 1);
                                                                                                                                                                    endId1 = text1.indexOf("+");
                                                                                                                                                                    if (endId1 != -1) {
                                                                                                                                                                        isdone = text1.substring(0, endId1);
                                                                                                                                                                        A[x] = isdone;
                                                                                                                                                                        AA = text1;
                                                                                                                                                                        startId = endId1;
                                                                                                                                                                        x++
                                                                                                                                                                    } else {
                                                                                                                                                                        A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                        k = false
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                            if (A[0] == "success") {
                                                                                                                                                                invoke(path + "/faces/seller/sellerMyProducts.jsp?catIds=" + A[1] + "&brandNames=" + A[2] + "&pager.offset=" + A[3] + "&maxItemsPerPage=" + A[4] + "&pageNumber=" + A[5] + "&confMessage=Edit", "sellerFilterResult")
                                                                                                                                                            }
                                                                                                                                                        } else {
                                                                                                                                                            if (AA.match("SellerProductDelete") == "SellerProductDelete") {
                                                                                                                                                                var A = new Array();
                                                                                                                                                                startId = AA.indexOf("+");
                                                                                                                                                                if (startId != -1) {
                                                                                                                                                                    var k = true;
                                                                                                                                                                    var x = 0;
                                                                                                                                                                    while (k) {
                                                                                                                                                                        text1 = AA.substring(startId + 1);
                                                                                                                                                                        endId1 = text1.indexOf("+");
                                                                                                                                                                        if (endId1 != -1) {
                                                                                                                                                                            isdone = text1.substring(0, endId1);
                                                                                                                                                                            A[x] = isdone;
                                                                                                                                                                            AA = text1;
                                                                                                                                                                            startId = endId1;
                                                                                                                                                                            x++
                                                                                                                                                                        } else {
                                                                                                                                                                            A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                            k = false
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                                if (A[0] == "success") {
                                                                                                                                                                    invoke(path + "/faces/seller/sellerMyProducts.jsp?catIds=" + A[1] + "&brandNames=" + A[2] + "&pager.offset=" + A[3] + "&maxItemsPerPage=" + A[4] + "&pageNumber=" + A[5] + "&confMessage=Delete", "sellerFilterResult")
                                                                                                                                                                }
                                                                                                                                                            } else {
                                                                                                                                                                if (AA.match("bulkUpload") == "bulkUpload") {
                                                                                                                                                                    var A = new Array();
                                                                                                                                                                    startId = AA.indexOf("+");
                                                                                                                                                                    if (startId != -1) {
                                                                                                                                                                        var k = true;
                                                                                                                                                                        var x = 0;
                                                                                                                                                                        while (k) {
                                                                                                                                                                            text1 = AA.substring(startId + 1);
                                                                                                                                                                            endId1 = text1.indexOf("+");
                                                                                                                                                                            if (endId1 != -1) {
                                                                                                                                                                                isdone = text1.substring(0, endId1);
                                                                                                                                                                                A[x] = isdone;
                                                                                                                                                                                AA = text1;
                                                                                                                                                                                startId = endId1;
                                                                                                                                                                                x++
                                                                                                                                                                            } else {
                                                                                                                                                                                A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                                k = false
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                    var E = document.getElementById("bulkErrorMsg");
                                                                                                                                                                    if (A[0] == "done") {
                                                                                                                                                                        E.innerHTML = "Your Products upload Successfully.";
                                                                                                                                                                        E.style.visibility = "visible";
                                                                                                                                                                        E.style.display = "block"
                                                                                                                                                                    } else {
                                                                                                                                                                        if (A[0] == "notdone") {
                                                                                                                                                                            E.innerHTML = "Your Products upload Un-Successfully.";
                                                                                                                                                                            E.style.visibility = "visible";
                                                                                                                                                                            E.style.display = "block"
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                } else {
                                                                                                                                                                    if (AA.match("updateSEO") == "updateSEO") {
                                                                                                                                                                        var A = new Array();
                                                                                                                                                                        startId = AA.indexOf("+");
                                                                                                                                                                        if (startId != -1) {
                                                                                                                                                                            var k = true;
                                                                                                                                                                            var x = 0;
                                                                                                                                                                            while (k) {
                                                                                                                                                                                text1 = AA.substring(startId + 1);
                                                                                                                                                                                endId1 = text1.indexOf("+");
                                                                                                                                                                                if (endId1 != -1) {
                                                                                                                                                                                    isdone = text1.substring(0, endId1);
                                                                                                                                                                                    A[x] = isdone;
                                                                                                                                                                                    AA = text1;
                                                                                                                                                                                    startId = endId1;
                                                                                                                                                                                    x++
                                                                                                                                                                                } else {
                                                                                                                                                                                    A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                                    k = false
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                        var E = document.getElementById("errorUpdateSEO");
                                                                                                                                                                        if (A[0] == "true") {
                                                                                                                                                                            E.innerHTML = "<b>Data Successfully updated.</b>"
                                                                                                                                                                        } else {
                                                                                                                                                                            E.innerHTML = "<b>Data not updated.Try again...</b>"
                                                                                                                                                                        }
                                                                                                                                                                        E.style.visibility = "visible";
                                                                                                                                                                        E.style.display = "block"
                                                                                                                                                                    } else {
                                                                                                                                                                        if (AA.match("campaigniplTicketSignIn") == "campaigniplTicketSignIn") {
                                                                                                                                                                            var A = new Array();
                                                                                                                                                                            startId = AA.indexOf("+");
                                                                                                                                                                            if (startId != -1) {
                                                                                                                                                                                var k = true;
                                                                                                                                                                                var x = 0;
                                                                                                                                                                                while (k) {
                                                                                                                                                                                    text1 = AA.substring(startId + 1);
                                                                                                                                                                                    endId1 = text1.indexOf("+");
                                                                                                                                                                                    if (endId1 != -1) {
                                                                                                                                                                                        isdone = text1.substring(0, endId1);
                                                                                                                                                                                        A[x] = isdone;
                                                                                                                                                                                        AA = text1;
                                                                                                                                                                                        startId = endId1;
                                                                                                                                                                                        x++
                                                                                                                                                                                    } else {
                                                                                                                                                                                        A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                                        k = false
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                            var E = document.getElementById("ErrMsgSignIn");
                                                                                                                                                                            if (A[0] == "valid") {
                                                                                                                                                                                document.getElementById("searchtxt").focus();
                                                                                                                                                                                document.body.scrollTop;
                                                                                                                                                                                E.innerHTML = "";
                                                                                                                                                                                E.style.visiblility = "hidden";
                                                                                                                                                                                E.style.display = "none";
                                                                                                                                                                                var B = document.getElementById("signInSuccess");
                                                                                                                                                                                B.style.visibility = "visible";
                                                                                                                                                                                B.style.display = "block";
                                                                                                                                                                                setTimeout("showWelComeMsgSignIn();", 4000)
                                                                                                                                                                            } else {
                                                                                                                                                                                if (A[0] == "Invalid") {
                                                                                                                                                                                    E.innerHTML = "Invalid UserId or Password.Try again!";
                                                                                                                                                                                    document.getElementById("signInemailId").value = "";
                                                                                                                                                                                    document.getElementById("signInpassword").value = "";
                                                                                                                                                                                    document.getElementById("signInemailId").focus()
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        } else {
                                                                                                                                                                            if (AA.match("campaigniplTicketSignUp") == "campaigniplTicketSignUp") {
                                                                                                                                                                                var A = new Array();
                                                                                                                                                                                startId = AA.indexOf("+");
                                                                                                                                                                                if (startId != -1) {
                                                                                                                                                                                    var k = true;
                                                                                                                                                                                    var x = 0;
                                                                                                                                                                                    while (k) {
                                                                                                                                                                                        text1 = AA.substring(startId + 1);
                                                                                                                                                                                        endId1 = text1.indexOf("+");
                                                                                                                                                                                        if (endId1 != -1) {
                                                                                                                                                                                            isdone = text1.substring(0, endId1);
                                                                                                                                                                                            A[x] = isdone;
                                                                                                                                                                                            AA = text1;
                                                                                                                                                                                            startId = endId1;
                                                                                                                                                                                            x++
                                                                                                                                                                                        } else {
                                                                                                                                                                                            A[x] = text1.substring(endId1 + 1);
                                                                                                                                                                                            k = false
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                                var E = document.getElementById("ErrMsgSignUp");
                                                                                                                                                                                if (A[0] == "done") {
                                                                                                                                                                                    E.innerHTML = "";
                                                                                                                                                                                    E.style.visiblility = "hidden";
                                                                                                                                                                                    E.style.display = "none";
                                                                                                                                                                                    if (A[1] != null) {
                                                                                                                                                                                        window.location.href = path + "/events/confirmation.jsp?campaign=" + A[2]
                                                                                                                                                                                    }
                                                                                                                                                                                } else {
                                                                                                                                                                                    if (A[0] == "notdone") {
                                                                                                                                                                                        document.getElementById("searchtxt").focus();
                                                                                                                                                                                        document.body.scrollTop;
                                                                                                                                                                                        E.innerHTML = "Registration is not successfully.Please Try again!"
                                                                                                                                                                                    } else {
                                                                                                                                                                                        if (A[0] == "userExists") {
                                                                                                                                                                                            E.innerHTML = "This email id is already registered.Please Try again!"
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (AA.match("anotherUserProfile") == "anotherUserProfile") {
                usrurl = AA.substring(AA.indexOf("+") + 1, AA.length);
                window.open(usrurl, "_self")
            } else {
                if (AA.match("NewPassword") == "NewPassword") {
                    var A = new Array();
                    startId = AA.indexOf("+");
                    if (startId != -1) {
                        var k = true;
                        var x = 0;
                        while (k) {
                            text1 = AA.substring(startId + 1);
                            endId1 = text1.indexOf("+");
                            if (endId1 != -1) {
                                isdone = text1.substring(0, endId1);
                                A[x] = isdone;
                                AA = text1;
                                startId = endId1;
                                x++
                            } else {
                                A[x] = text1.substring(endId1 + 1);
                                k = false
                            }
                        }
                    }
                    var E = document.getElementById("ErrMsgSignIn");
                    if (A[0] == "isdone") {
                        document.getElementById("password").value = "";
                        document.getElementById("repassword").value = "";
                        var E = document.getElementById("ErrMsgSignUp");
                        E.innerHTML = "Your Password has been changed sucessfully"
                    } else {
                        if (A[0] == "notdone") {
                            document.getElementById("password").value = "";
                            document.getElementById("repassword").value = "";
                            var E = document.getElementById("ErrMsgSignUp");
                            E.innerHTML = "Your Password has not been changed sucessfully"
                        }
                    }
                }
            }
        }
    }
}
function createRequestObject() {
    var A;
    try {
        A = new XMLHttpRequest()
    } catch (B) {
        try {
            A = new ActiveXObject("Msxml2.XMLHTTP")
        } catch (B) {
            try {
                A = new ActiveXObject("Microsoft.XMLHTTP")
            } catch (B) {
                alert("Your browser is not IE 5 or higher, or Firefox or Safari or Opera")
            }
        }
    }
    return A
}
var http = createRequestObject();

function sendRequest(D, B, C, A) {
    if (D == "get" || D == "GET") {
        http.open(D, B + "?" + C, true);
        http.onreadystatechange = function () {
            handleResponse(A)
        };
        http.send(null)
    }
}
function handleResponse(A) {
    if (http.readyState == 4 && http.status == 200) {
        var B = http.responseText;
        if (B) {
            document.getElementById(A).innerHTML = B
        }
    }
}
function onComponentChange(B, E, D) {
    var A;
    if (window.XMLHttpRequest) {
        A = new XMLHttpRequest();
        if (A.overrideMimeType) {
            A.overrideMimeType("text/xml")
        }
    } else {
        if (window.ActiveXObject) {
            try {
                A = new ActiveXObject("Msxml2.XMLHTTP")
            } catch (C) {
                try {
                    A = new ActiveXObject("Microsoft.XMLHTTP")
                } catch (C) {}
            }
        }
    }
    if (!A) {
        alert("Giving up :( Cannot create an XMLHTTP instance");
        return false
    }
    A.onreadystatechange = function () {
        processResponse(A, D)
    };
    A.open("POST", B, true);
    A.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    A.send(E)
}
function processResponse(A, B) {
    if (A.readyState == 4) {
        if (A.status == 200) {
            processComponentResponse(A.responseText, B)
        } else {}
    }
}
function parseStringResponse(A) {
    var B;
    if (document.implementation && document.implementation.createDocument) {
        B = document.implementation.createDocument("", "", null);
        B.async = "false";
        B.loadXML(A)
    } else {
        if (window.ActiveXObject) {
            B = new ActiveXObject("Microsoft.XMLDOM");
            B.async = "false";
            B.loadXML(A)
        }
    }
    return B
}
function getHTTPObject() {
    var A;
    if (window.XMLHttpRequest) {
        A = new XMLHttpRequest()
    } else {
        if (window.ActiveXObject) {
            A = new ActiveXObject("Microsoft.XMLHTTP")
        }
    }
    return A
}
function map() {
    var C = new Array();
    var B = new Array();
    this.keys = C;
    this.values = B;
    this.size = 0;
    this.put = A;
    this.get = E;
    this.containsKey = D;

    function A(F, G) {
        C[C.length] = F;
        B[B.length] = G;
        this.size++
    }
    function E(G) {
        for (var F = 0; F < this.size; F++) {
            if (C[F] == G) {
                return B[F]
            }
        }
        return ""
    }
    function D(G) {
        for (var F = 0; F < this.size; F++) {
            if (C[F] == G) {
                return true
            }
        }
        return false
    }
};
