// ============================================= // swfir! // ============================================= // Copyright 2006, 2007 Jon Aldinger, Mark Huot // and Dan Mall // // This software is licensed under the CC-GNU LGPL // http://creativecommons.org/licenses/LGPL/2.1/ // --------------------------------------------- // ============================================= // Get DOM Elements with CSS Selectors // ============================================= // Use this function to call DOM elements by // passing in a CSS selector such as 'p .date' // --------------------------------------------- function getAllChildren(e) { return e.all ? e.all : e.getElementsByTagName('*'); } function checkToken(hint, element, context) { /* If we're not limiting */ if(hint == "") return true; /* Descendant Selector */ else if(hint == ">") { context = context.firstChild; while(context) { if(context == element) return true; context = context.nextSibling; } } /* First Child Selector */ else if(hint == "first-child") { context = context.firstChild; while(context.nodeName == "#text") { if(context.firstChild) { context = context.firstChild; } else { context = context.nextSibling; } } if(context == element) return true; } /* :link selector */ else if(hint == "a") { if(element.nodeName == "A") return true; } /* Adjacent Selector */ else if(hint == "+") { context = context.nextSibling; while(context) { if(context == element) return true; context = context.nextSibling; } } /* Attribute Selector */ else if(hint.length > 0) { if(element.getAttribute(hint[1])) { if(hint[2] == "" && element.getAttribute(hint[1]) == hint[3]) return true; else if((hint[2] == "~" || hint[2] == "|") && element.getAttribute(hint[1]).indexOf(hint[3]) > -1) return true; } } return false; } getElementsBySelector = document.getElementsBySelector = function(selector) { /* Error Checking */ if(!document.getElementsByTagName || typeof(selector) != "string") { return Array(); } /* Local Variables */ var resultElements = new Array(); /* Split the Selectors */ var selectors = selector.split(","); for(var i=0; i") > -1) { nextTokenHint = ">"; continue; } else if(token.indexOf(":first-child") > -1) { nextTokenHint = "first-child"; token = token.replace(/:first-child/g, ""); } else if(token.indexOf(":link") > -1) { nextTokenHint = "a"; token = token.replace(":link",""); } else if(token.indexOf("+") > -1) { nextTokenHint = "+"; continue; } else if (token.match(/^([a-zA-Z*]+)\[([a-zA-Z]+)([~\|]?)=.([^\]"]*).\]$/)) { // token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/) parts = token.match(/^([a-zA-Z*]+)\[([a-zA-Z]+)([~\|]?)=.([^\]"]*).\]$/); nextTokenHint = new Array("attribute", parts[2], parts[3], parts[4]); token = parts[1]; } /* Activity Selectors*/ token = token.replace(":visited","").replace(":active","").replace(":hover","").replace(":focus",""); /* ID Tokens */ if (token.indexOf("#") > -1) { /* Split the Token */ var pieces = token.split("#"); /* Error Out Gracefully */ if(pieces[1] == "") { return Array(); } /* Check for Universal Selectors */ if(pieces[0] == "") { pieces[0] = "*"; } var foundElements = new Array(); for(var k=0; k -1) { /* Split the Token */ var pieces = token.split("."); /* Error Out Gracefully */ if(pieces[1] == "") { return Array(); } /* Check for Universal Selectors */ if(pieces[0] == "") { pieces[0] = "*"; } var foundElements = new Array(); for(var k=0; k0){_19+="flashvars=\""+_1c+"\"";}_19+="/>"; }else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} _19=""; _19+=""; var _1d=this.getParams(); for(var key in _1d){_19+="";} var _1f=this.getVariablePairs().join("&"); if(_1f.length>0){_19+="";}_19+="";} return _19; },write:function(_20){ if(this.getAttribute("useExpressInstall")){ var _21=new deconcept.PlayerVersion([6,0,65]); if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){ this.setAttribute("doExpressInstall",true); this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl"))); document.title=document.title.slice(0,47)+" - Flash Player Installation"; this.addVariable("MMdoctitle",document.title);}} if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){ var n=(typeof _20=="string")?document.getElementById(_20):_20; n.innerHTML=this.getSWFHTML();return true; }else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}} return false;}}; deconcept.SWFObjectUtil.getPlayerVersion=function(){ var _23=new deconcept.PlayerVersion([0,0,0]); if(navigator.plugins&&navigator.mimeTypes.length){ var x=navigator.plugins["Shockwave Flash"]; if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));} }else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");} catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";} catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");} catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}} return _23;}; deconcept.PlayerVersion=function(_27){ this.major=_27[0]!=null?parseInt(_27[0]):0; this.minor=_27[1]!=null?parseInt(_27[1]):0; this.rev=_27[2]!=null?parseInt(_27[2]):0; }; deconcept.PlayerVersion.prototype.versionIsValid=function(fv){ if(this.majorfv.major){return true;} if(this.minorfv.minor){return true;} if(this.rev