﻿disableTracker = true;

if(window.location.href.indexOf("?designer=") != -1)
{
    if(detectFlash())
    {
        window.location.href = window.location.href.replace("?designer=", "#/").toLowerCase() + "?i=i";
    }
}

function pageload()
{
    // Override function to overcome hashmark issues
    Sys._Application.prototype._setState = function() {}

    if(window.location.hash != "")
    {
        var name = "";
        if(window.location.hash.indexOf("?") == -1) {
            // IE 6
            name = window.location.hash.substr(2);
        }else  {
            // Modern browsers
            name = window.location.hash.substr(2, window.location.hash.indexOf("?")-2);
        }
        var param = "name;"+name;
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endCallback);
        Sys.WebForms.PageRequestManager.getInstance()._doPostBack(main_clientid(), param);
        Sys.WebForms.PageRequestManager.getInstance()._doPostBack(productlist_clientid(), param);
    }
}

function callback(string)
{
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endCallback);
    Sys.WebForms.PageRequestManager.getInstance()._doPostBack(main_clientid(), string);
}

function endCallback()
{
    document.getElementById('content').className = "hidden1.changed";
    toggleVideoShortcut();
    $(document).scrollTo(500, 800);
    initSifrAfterPartialPostback();
}

function hideContent()
{
    document.getElementById('content').className = "hidden1";
}
