src/console/socket.io.js
function FABridge__bridgeInitialized(bridgeName) {
    var objects = document.getElementsByTagName("object");
    var ol = objects.length;
    var activeObjects = [];
    if (ol > 0) {
		for (var i = 0; i < ol; i++) {
			if (typeof objects[i].SetVariable != "undefined") {
				activeObjects[activeObjects.length] = objects[i];
			}
		}
	}
    var embeds = document.getElementsByTagName("embed");
    var el = embeds.length;
    var activeEmbeds = [];
    if (el > 0) {
		for (var j = 0; j < el; j++) {
			if (typeof embeds[j].SetVariable != "undefined") {
            	activeEmbeds[activeEmbeds.length] = embeds[j];
            }
        }
    }
    var aol = activeObjects.length;
    var ael = activeEmbeds.length;
    var searchStr = "bridgeName="+ bridgeName;
    if ((aol == 1 && !ael) || (aol == 1 && ael == 1)) {
    	FABridge.attachBridge(activeObjects[0], bridgeName);	 
    }
    else if (ael == 1 && !aol) {
    	FABridge.attachBridge(activeEmbeds[0], bridgeName);
        }
    else {
                var flash_found = false;
		if (aol > 1) {
			for (var k = 0; k < aol; k++) {
				 var params = activeObjects[k].childNodes;
				 for (var l = 0; l < params.length; l++) {
					var param = params[l];
					if (param.nodeType == 1 && param.tagName.toLowerCase() == "param" && param["name"].toLowerCase() == "flashvars" && param["value"].indexOf(searchStr) >= 0) {
						FABridge.attachBridge(activeObjects[k], bridgeName);
                            flash_found = true;
                            break;
                        }
                    }
                if (flash_found) {
                    break;
                }
            }
        }
		if (!flash_found && ael > 1) {
			for (var m = 0; m < ael; m++) {
				var flashVars = activeEmbeds[m].attributes.getNamedItem("flashVars").nodeValue;
				if (flashVars.indexOf(searchStr) >= 0) {
					FABridge.attachBridge(activeEmbeds[m], bridgeName);
					break;
    }
            }
        }
    }
    return true;
}
function FABridge__bridgeInitialized(bridgeName) {
    var objects = document.getElementsByTagName("object");
    var ol = objects.length;
    var activeObjects = [];
    if (ol > 0) {
		for (var i = 0; i < ol; i++) {
			if (typeof objects[i].SetVariable != "undefined") {
				activeObjects[activeObjects.length] = objects[i];
			}
		}
	}
    var embeds = document.getElementsByTagName("embed");
    var el = embeds.length;
    var activeEmbeds = [];
    if (el > 0) {
		for (var j = 0; j < el; j++) {
			if (typeof embeds[j].SetVariable != "undefined") {
            	activeEmbeds[activeEmbeds.length] = embeds[j];
            }
        }
    }
    var aol = activeObjects.length;
    var ael = activeEmbeds.length;
    var searchStr = "bridgeName="+ bridgeName;
    if ((aol == 1 && !ael) || (aol == 1 && ael == 1)) {
    	FABridge.attachBridge(activeObjects[0], bridgeName);	 
    }
    else if (ael == 1 && !aol) {
    	FABridge.attachBridge(activeEmbeds[0], bridgeName);
        }
    else {
                var flash_found = false;
		if (aol > 1) {
			for (var k = 0; k < aol; k++) {
				 var params = activeObjects[k].childNodes;
				 for (var l = 0; l < params.length; l++) {
					var param = params[l];
					if (param.nodeType == 1 && param.tagName.toLowerCase() == "param" && param["name"].toLowerCase() == "flashvars" && param["value"].indexOf(searchStr) >= 0) {
						FABridge.attachBridge(activeObjects[k], bridgeName);
                            flash_found = true;
                            break;
                        }
                    }
                if (flash_found) {
                    break;
                }
            }
        }
		if (!flash_found && ael > 1) {
			for (var m = 0; m < ael; m++) {
				var flashVars = activeEmbeds[m].attributes.getNamedItem("flashVars").nodeValue;
				if (flashVars.indexOf(searchStr) >= 0) {
					FABridge.attachBridge(activeEmbeds[m], bridgeName);
					break;
    }
            }
        }
    }
    return true;
}
function FABridge__bridgeInitialized ( bridgeName ) { var objects = document . getElementsByTagName ( "object" ) ; var ol = objects . length ; var activeObjects = [ ] ; if ( ol > 0 ) { for ( var i = 0 ; i < ol ; i ++ ) { if ( typeof objects [ i ] . SetVariable != "undefined" ) { activeObjects [ activeObjects . length ] = objects [ i ] ; } } } var embeds = document . getElementsByTagName ( "embed" ) ; var el = embeds . length ; var activeEmbeds = [ ] ; if ( el > 0 ) { for ( var j = 0 ; j < el ; j ++ ) { if ( typeof embeds [ j ] . SetVariable != "undefined" ) { activeEmbeds [ activeEmbeds . length ] = embeds [ j ] ; } } } var aol = activeObjects . length ; var ael = activeEmbeds . length ; var searchStr = "bridgeName=" + bridgeName ; if ( ( aol == 1 && ! ael ) || ( aol == 1 && ael == 1 ) ) { FABridge . attachBridge ( activeObjects [ 0 ] , bridgeName ) ; } else if ( ael == 1 && ! aol ) { FABridge . attachBridge ( activeEmbeds [ 0 ] , bridgeName ) ; } else { var flash_found = false ; if ( aol > 1 ) { for ( var k = 0 ; k < aol ; k ++ ) { var params = activeObjects [ k ] . childNodes ; for ( var l = 0 ; l < params . length ; l ++ ) { var param = params [ l ] ; if ( param . nodeType == 1 && param . tagName . toLowerCase ( ) == "param" && param [ "name" ] . toLowerCase ( ) == "flashvars" && param [ "value" ] . indexOf ( searchStr ) >= 0 ) { FABridge . attachBridge ( activeObjects [ k ] , bridgeName ) ; flash_found = true ; break ; } } if ( flash_found ) { break ; } } } if ( ! flash_found && ael > 1 ) { for ( var m = 0 ; m < ael ; m ++ ) { var flashVars = activeEmbeds [ m ] . attributes . getNamedItem ( "flashVars" ) . nodeValue ; if ( flashVars . indexOf ( searchStr ) >= 0 ) { FABridge . attachBridge ( activeEmbeds [ m ] , bridgeName ) ; break ; } } } } return true ; }
updated for changes to SWFObject2
updated for changes to SWFObject2