/* 
 * Reroute the user for Flash Deep-linking
 */
function swfreroute ( homeValue, flashversion ) {
    if ((swfobject.hasFlashPlayerVersion( flashversion )) && (!window.location.hash)) {
        if (homeValue){
            if (window.location.pathname == "/") {
                newURL = window.location.protocol + "//" + window.location.host + "/#/" + homeValue;
            } else {
                newURL = window.location.protocol + "//" + window.location.host + "/#" + window.location.pathname;
            }
            this.location.href = newURL;
        } else {
            if (window.location.pathname != "/") {
                newURL = window.location.protocol + "//" + window.location.host + "/#" + window.location.pathname;
                this.location.href = newURL;
            } else {
                newURL = window.location.protocol + "//" + window.location.host + "/#/";
                this.location.href = newURL;
            }
        }
    } else if ((!swfobject.hasFlashPlayerVersion( flashversion )) && (window.location.hash)) {
        hashValue = window.location.hash.substring(1,window.location.hash.length + 1);
        newURL = window.location.protocol + "//" + window.location.host + "" + hashValue;
        this.location.href = newURL;
    }
}

