OVA/fuentes de energia/configuracion/libreria.js
// Cross-browser dynamic SWF creation
Cross-browser dynamic SWF creation
Cross - browser dynamic SWF creation
function createSWF(attObj, parObj, id) {
	var r;
	if (agente.wk && agente.wk < 312) { return r; }
	if (typeof attObj.id == "undefined") { 
		attObj.id = id;
	}
	if (agente.ie && agente.win) { 
		var att = "";
		for (var i in attObj) {
			if (attObj[i] != Object.prototype[i]) { 
				if (i.toLowerCase() == "data") {
					parObj.movie = attObj[i];
				}
				else if (i.toLowerCase() == "styleclass") { 
					att += ' class="' + attObj[i] + '"';
				}
				else if (i.toLowerCase() != "classid") {
					att += ' ' + i + '="' + attObj[i] + '"';
				}
			}
		}
		var par = "";
		for (var j in parObj) {
			if (parObj[j] != Object.prototype[j]) { 
				par += '<param name="' + j + '" value="' + parObj[j] + '" />';
			}
		}
		r = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
	}
	else { 
		var att = "";
		for (var m in attObj) {
			if (attObj[m] != Object.prototype[m]) { 
				if (m.toLowerCase() == "styleclass") { 
					att+=' class="'+attObj[m]+'"';
				}
				else if (m.toLowerCase() != "classid") { 
					att+=' '+m+'="'+attObj[m]+'"';
				}
			}
		}
		var par = "";
		for (var n in parObj) {
			if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") {  and IE specific param element
				par += '<param name="' + n + '" value="' + parObj[n] + '" />';
			}
		}
		r = '<object type="application/x-shockwave-flash"'+att+'>' + par + '</object>';
	}
	return r;
}
function createSWF ( attObj , parObj , id ) { var r ; if ( agente . wk && agente . wk < 312 ) { return r ; } if ( typeof attObj . id == "undefined" ) { attObj . id = id ; } if ( agente . ie && agente . win ) { var att = "" ; for ( var i in attObj ) { if ( attObj [ i ] != Object . prototype [ i ] ) { if ( i . toLowerCase ( ) == "data" ) { parObj . movie = attObj [ i ] ; } else if ( i . toLowerCase ( ) == "styleclass" ) { att += ' class="' + attObj [ i ] + '"' ; } else if ( i . toLowerCase ( ) != "classid" ) { att += ' ' + i + '="' + attObj [ i ] + '"' ; } } } var par = "" ; for ( var j in parObj ) { if ( parObj [ j ] != Object . prototype [ j ] ) { par += '<param name="' + j + '" value="' + parObj [ j ] + '" />' ; } } r = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>' ; } else { var att = "" ; for ( var m in attObj ) { if ( attObj [ m ] != Object . prototype [ m ] ) { if ( m . toLowerCase ( ) == "styleclass" ) { att += ' class="' + attObj [ m ] + '"' ; } else if ( m . toLowerCase ( ) != "classid" ) { att += ' ' + m + '="' + attObj [ m ] + '"' ; } } } var par = "" ; for ( var n in parObj ) { if ( parObj [ n ] != Object . prototype [ n ] && n . toLowerCase ( ) != "movie" ) { par += '<param name="' + n + '" value="' + parObj [ n ] + '" />' ; } } r = '<object type="application/x-shockwave-flash"' + att + '>' + par + '</object>' ; } return r ; }
Cross-browser dynamic SWF creation
Cross - browser dynamic SWF creation
// if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML // filter out prototype additions from other potential libraries // 'class' is an ECMA4 reserved keyword // filter out prototype additions from other potential libraries // well-behaving browsers // filter out prototype additions from other potential libraries // 'class' is an ECMA4 reserved keyword // filter out IE specific attribute // filter out prototype additions from other potential libraries and IE specific param element