Deltopia DeltaWalker Comparison Report

Produced by Deltopia DeltaWalker on Mi Aug 20 15:43:22 2008. See www.deltopia.com for information about DeltaWalker.

Compared

RolePath
AncestorFile
First/Users/cric/Documents/Geschäft/RapidIdeas/Themes/PROThemes/blendit/versions/2.1.0/CABlendit.rwtheme/Contents/javascript.js
Second/Users/cric/Documents/Geschäft/RapidIdeas/Themes/PROThemes/blendit/versions/2.5.0/CABlendit.rwtheme/Contents/javascript.js

Preferences

Character caseDifferences in character case are significant
Line delimitersDifferences in line delimiters are ignored
WhitespaceDifferences in whitespace within lines are significant
Difference countsShown in the comparison details

Active File Comparison Filters

No file comparison filters were active.

Comparison

Summaries

  BlocksLines
Same4438
Different12
Added113
Deleted24

Details

1/*
2 * RapidWeaver 3.5.0 theme functions.
3 * Script Version 2.1
4 * Updated 26 May 2006.
5 */
9/*
10 * Function to generate "open in new window" link as W3C compliant
11 */
13function externalLinks() {
14if (!document.getElementsByTagName) return;
15var anchors = document.getElementsByTagName("a");
16for (var i=0; i<anchors.length; i++) {
17var anchor = anchors[i];
18if (anchor.getAttribute("href") &&
19anchor.getAttribute("rel") == "external")
20anchor.target = "_blank";
21}
22}
1/*
2 * RapidWeaver 3.5.0 theme functions.
3 * Script Version 2.1
4 * Updated 26 May 2006.
5 */
9/*
10 * Function to generate "open in new window" link as W3C compliant
11 */
13function externalLinks() {
14if (!document.getElementsByTagName) return;
15var anchors = document.getElementsByTagName("a");
16for (var i=0; i<anchors.length; i++) {
17var anchor = anchors[i];
18if (anchor.getAttribute("href") &&
19anchor.getAttribute("rel") == "external")
20anchor.target = "_blank";
21}
22}
23window.onload = externalLinks;
 
 
28/*
29 * Functions to generate OBJECT and EMBED tags for Flash content.
30 * Resource: http://blog.deconcept.com/swfobject/
31 *
32 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
33 * http://www.opensource.org/licenses/mit-license.php
34 */
36if(typeof deconcept == "undefined") var deconcept = new Object();
37if(typeof deconcept.util == "undefined") deconcept.util = new Object();
38if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
39deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
40 if (!document.createElement || !document.getElementById) { return; }
41 this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
42 this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
43 this.params = new Object();
44 this.variables = new Object();
45 this.attributes = new Array();
46 if(swf) { this.setAttribute('swf', swf); }
47 if(id) { this.setAttribute('id', id); }
48 if(w) { this.setAttribute('width', w); }
49 if(h) { this.setAttribute('height', h); }
50 if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
51 this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
52 if(c) { this.addParam('bgcolor', c); }
53 var q = quality ? quality : 'high';
54 this.addParam('quality', q);
55 this.setAttribute('useExpressInstall', useExpressInstall);
56 this.setAttribute('doExpressInstall', false);
57 var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
58 this.setAttribute('xiRedirectUrl', xir);
59 this.setAttribute('redirectUrl', '');
60 if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
61}
62deconcept.SWFObject.prototype = {
63 setAttribute: function(name, value){
64 this.attributes[name] = value;
65 },
66 getAttribute: function(name){
67 return this.attributes[name];
68 },
69 addParam: function(name, value){
70 this.params[name] = value;
71 },
72 getParams: function(){
73 return this.params;
74 },
75 addVariable: function(name, value){
76 this.variables[name] = value;
77 },
78 getVariable: function(name){
79 return this.variables[name];
80 },
81 getVariables: function(){
82 return this.variables;
83 },
84 getVariablePairs: function(){
85 var variablePairs = new Array();
86 var key;
87 var variables = this.getVariables();
88 for(key in variables){
89 variablePairs.push(key +"="+ variables[key]);
90 }
91 return variablePairs;
92 },
93 getSWFHTML: function() {
94 var swfNode = "";
95 if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
96 if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
97 swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
98 swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
99 var params = this.getParams();
100 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
101 var pairs = this.getVariablePairs().join("&");
102 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
103 swfNode += '/>';
104 } else { // PC IE
105 if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX");
106 swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
107 swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
108 var params = this.getParams();
109 for(var key in params) {
110 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
111 }
112 var pairs = this.getVariablePairs().join("&");
113 if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
114 swfNode += "</object>";
115 }
116 return swfNode;
117 },
118 write: function(elementId){
119 if(this.getAttribute('useExpressInstall')) {
120 // check to see if we need to do an express install
121 var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
122 if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
123 this.setAttribute('doExpressInstall', true);
124 this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
125 document.title = document.title.slice(0, 47) + " - Flash Player Installation";
126 this.addVariable("MMdoctitle", document.title);
127 }
128 }
129 if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
130 var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
131 n.innerHTML = this.getSWFHTML();
132 return true;
133 }else{
134 if(this.getAttribute('redirectUrl') != "") {
135 document.location.replace(this.getAttribute('redirectUrl'));
136 }
137 }
138 return false;
139 }
140}
142/* ---- detection functions ---- */
143deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){
144 var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
145 if(navigator.plugins && navigator.mimeTypes.length){
146 var x = navigator.plugins["Shockwave Flash"];
147 if(x && x.description) {
148 PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
149 }
150 }else{
151 try{
152 var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
153 for (var i=3; axo!=null; i++) {
154 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
155 PlayerVersion = new deconcept.PlayerVersion([i,0,0]);
156 }
157 }catch(e){}
158 if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection
159 // this only does the minor rev lookup if the user's major version
160 // is not 6 or we are checking for a specific minor or revision number
161 // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
162 if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) {
163 try{
164 PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
165 }catch(e){}
166 }
167 }
168 return PlayerVersion;
169}
170deconcept.PlayerVersion = function(arrVersion){
171 this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0;
172 this.minor = parseInt(arrVersion[1]) || 0;
173 this.rev = parseInt(arrVersion[2]) || 0;
174}
175deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
176 if(this.major < fv.major) return false;
177 if(this.major > fv.major) return true;
178 if(this.minor < fv.minor) return false;
179 if(this.minor > fv.minor) return true;
180 if(this.rev < fv.rev) return false;
181 return true;
182}
183/* ---- get value of query string param ---- */
184deconcept.util = {
185 getRequestParameter: function(param){
186 var q = document.location.search || document.location.hash;
187 if(q){
188 var startIndex = q.indexOf(param +"=");
189 var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
190 if (q.length > 1 && startIndex > -1) {
191 return q.substring(q.indexOf("=", startIndex)+1, endIndex);
192 }
193 }
194 return "";
195 }
196}
197/* fix for video streaming bug */
198deconcept.SWFObjectUtil.cleanupSWFs = function() {
199 var objects = document.getElementsByTagName("OBJECT");
200 for (var i=0; i < objects.length; i++) {
201 for (var x in objects[i]) {
202 if (typeof objects[i][x] == 'function') {
203 objects[i][x] = null;
204 }
205 }
206 }
207}
208if (typeof window.onunload == 'function') {
209 var oldunload = window.onunload;
210 window.onunload = function() {
211 deconcept.SWFObjectUtil.cleanupSWFs();
212 oldunload();
213 }
214} else {
215 window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
216}
217/* add Array.push if needed (ie5) */
218if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
220/* add some aliases for ease of use/backwards compatibility */
221var getQueryParamValue = deconcept.util.getRequestParameter;
222var FlashObject = deconcept.SWFObject; // for legacy support
223var SWFObject = deconcept.SWFObject;
229/*
230 * Functions to generate OBJECT and EMBED tags for QuickTime content.
231 * Resource: http://developer.apple.com/internet/ieembedfix.html
232 */
234/************** LOCALIZABLE GLOBAL VARIABLES ****************/
236var gArgCountErr = 'The "%%" function requires an even number of arguments.'
237 + '\nArguments should be in the form "atttributeName", "attributeValue", ...';
239/******************** END LOCALIZABLE **********************/
241var gTagAttrs = null;
242var gQTGeneratorVersion = 1.0;
244function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
246function _QTComplain(callingFcnName, errMsg)
247{
248 errMsg = errMsg.replace("%%", callingFcnName);
249 alert(errMsg);
250}
252function _QTAddAttribute(prefix, slotName, tagName)
253{
254 var value;
256 value = gTagAttrs[prefix + slotName];
257 if ( null == value )
258 value = gTagAttrs[slotName];
260 if ( null != value )
261 {
262 if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
263 tagName = slotName.substring(prefix.length);
264 if ( null == tagName )
265 tagName = slotName;
266 return tagName + '="' + value + '" ';
267 }
268 else
269 return "";
270}
272function _QTAddObjectAttr(slotName, tagName)
273{
274 // don't bother if it is only for the embed tag
275 if ( 0 == slotName.indexOf("emb#") )
276 return "";
278 if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
279 tagName = slotName.substring(4);
281 return _QTAddAttribute("obj#", slotName, tagName);
282}
284function _QTAddEmbedAttr(slotName, tagName)
285{
286 // don't bother if it is only for the object tag
287 if ( 0 == slotName.indexOf("obj#") )
288 return "";
290 if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
291 tagName = slotName.substring(4);
293 return _QTAddAttribute("emb#", slotName, tagName);
294}
297function _QTAddObjectParam(slotName, generateXHTML)
298{
299 var paramValue;
300 var paramStr = "";
301 var endTagChar = (generateXHTML) ? ' />' : '>';
303 if ( -1 == slotName.indexOf("emb#") )
304 {
305 // look for the OBJECT-only param first. if there is none, look for a generic one
306 paramValue = gTagAttrs["obj#" + slotName];
307 if ( null == paramValue )
308 paramValue = gTagAttrs[slotName];
310 if ( 0 == slotName.indexOf("obj#") )
311 slotName = slotName.substring(4);
312
313 if ( null != paramValue )
314 paramStr = ' <param name="' + slotName + '" value="' + paramValue + '"' + endTagChar + '\n';
315 }
317 return paramStr;
318}
320function _QTDeleteTagAttrs()
321{
322 for ( var ndx = 0; ndx < arguments.length; ndx++ )
323 {
324 var attrName = arguments[ndx];
325 delete gTagAttrs[attrName];
326 delete gTagAttrs["emb#" + attrName];
327 delete gTagAttrs["obj#" + attrName];
328 }
329}
331
333// generate an embed and object tag, return as a string
334function _QTGenerate(callingFcnName, generateXHTML, args)
335{
336 // is the number of optional arguments even?
337 if ( args.length < 4 || (0 != (args.length % 2)) )
338 {
339 _QTComplain(callingFcnName, gArgCountErr);
340 return "";
341 }
342
343 // allocate an array, fill in the required attributes with fixed place params and defaults
344 gTagAttrs = new Array();
345 gTagAttrs["src"] = args[0];
346 gTagAttrs["width"] = args[1];
347 gTagAttrs["height"] = args[2];
348 gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
349 gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";
351 // set up codebase attribute with specified or default version before parsing args so
352 // anything passed in will override
353 var activexVers = args[3]
354 if ( (null == activexVers) || ("" == activexVers) )
355 activexVers = "6,0,2,0";
356 gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;
358 var attrName,
359 attrValue;
361 // add all of the optional attributes to the array
362 for ( var ndx = 4; ndx < args.length; ndx += 2)
363 {
364 attrName = args[ndx].toLowerCase();
365 attrValue = args[ndx + 1];
367 // "name" and "id" should have the same value, the former goes in the embed and the later goes in
368 // the object. use one array slot
369 if ( "name" == attrName || "id" == attrName )
370 gTagAttrs["name"] = attrValue;
372 else
373 gTagAttrs[attrName] = attrValue;
374 }
376 // init both tags with the required and "special" attributes
377 var objTag = '<object '
378 + _QTAddObjectAttr("classid")
379 + _QTAddObjectAttr("width")
380 + _QTAddObjectAttr("height")
381 + _QTAddObjectAttr("codebase")
382 + _QTAddObjectAttr("name", "id")
383 + _QTAddObjectAttr("tabindex")
384 + _QTAddObjectAttr("hspace")
385 + _QTAddObjectAttr("vspace")
386 + _QTAddObjectAttr("border")
387 + _QTAddObjectAttr("align")
388 + _QTAddObjectAttr("class")
389 + _QTAddObjectAttr("title")
390 + _QTAddObjectAttr("accesskey")
391 + _QTAddObjectAttr("noexternaldata")
392 + '>\n'
393 + _QTAddObjectParam("src", generateXHTML);
394 var embedTag = ' <embed '
395 + _QTAddEmbedAttr("src")
396 + _QTAddEmbedAttr("width")
397 + _QTAddEmbedAttr("height")
398 + _QTAddEmbedAttr("pluginspage")
399 + _QTAddEmbedAttr("name")
400 + _QTAddEmbedAttr("align")
401 + _QTAddEmbedAttr("tabindex");
403 // delete the attributes/params we have already added
404 _QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
405 "hspace","vspace","border","align","noexternaldata","class","title","accesskey");
407 // and finally, add all of the remaining attributes to the embed and object
408 for ( var attrName in gTagAttrs )
409 {
410 attrValue = gTagAttrs[attrName];
411 if ( null != attrValue )
412 {
413 embedTag += _QTAddEmbedAttr(attrName);
414 objTag += _QTAddObjectParam(attrName, generateXHTML);
415 }
416 }
418 // end both tags, we're done
419 return objTag + embedTag + '> </em' + 'bed>\n</ob' + 'ject' + '>';
420}
422// return the object/embed as a string
423function QT_GenerateOBJECTText()
424{
425 return _QTGenerate("QT_GenerateOBJECTText", false, arguments);
426}
428function QT_GenerateOBJECTText_XHTML()
429{
430 return _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
431}
433function QT_WriteOBJECT()
434{
435 document.writeln(_QTGenerate("QT_WriteOBJECT", false, arguments));
436}
438function QT_WriteOBJECT_XHTML()
439{
440 document.writeln(_QTGenerate("QT_WriteOBJECT_XHTML", true, arguments));
441}
24/*
25 * Functions to generate OBJECT and EMBED tags for Flash content.
26 * Resource: http://blog.deconcept.com/swfobject/
27 *
28 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
29 * http://www.opensource.org/licenses/mit-license.php
30 */
32if(typeof deconcept == "undefined") var deconcept = new Object();
33if(typeof deconcept.util == "undefined") deconcept.util = new Object();
34if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
35deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
36 if (!document.createElement || !document.getElementById) { return; }
37 this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
38 this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
39 this.params = new Object();
40 this.variables = new Object();
41 this.attributes = new Array();
42 if(swf) { this.setAttribute('swf', swf); }
43 if(id) { this.setAttribute('id', id); }
44 if(w) { this.setAttribute('width', w); }
45 if(h) { this.setAttribute('height', h); }
46 if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
47 this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
48 if(c) { this.addParam('bgcolor', c); }
49 var q = quality ? quality : 'high';
50 this.addParam('quality', q);
51 this.setAttribute('useExpressInstall', useExpressInstall);
52 this.setAttribute('doExpressInstall', false);
53 var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
54 this.setAttribute('xiRedirectUrl', xir);
55 this.setAttribute('redirectUrl', '');
56 if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
57}
58deconcept.SWFObject.prototype = {
59 setAttribute: function(name, value){
60 this.attributes[name] = value;
61 },
62 getAttribute: function(name){
63 return this.attributes[name];
64 },
65 addParam: function(name, value){
66 this.params[name] = value;
67 },
68 getParams: function(){
69 return this.params;
70 },
71 addVariable: function(name, value){
72 this.variables[name] = value;
73 },
74 getVariable: function(name){
75 return this.variables[name];
76 },
77 getVariables: function(){
78 return this.variables;
79 },
80 getVariablePairs: function(){
81 var variablePairs = new Array();
82 var key;
83 var variables = this.getVariables();
84 for(key in variables){
85 variablePairs.push(key +"="+ variables[key]);
86 }
87 return variablePairs;
88 },
89 getSWFHTML: function() {
90 var swfNode = "";
91 if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
92 if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
93 swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
94 swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
95 var params = this.getParams();
96 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
97 var pairs = this.getVariablePairs().join("&");
98 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
99 swfNode += '/>';
100 } else { // PC IE
101 if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX");
102 swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
103 swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
104 var params = this.getParams();
105 for(var key in params) {
106 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
107 }
108 var pairs = this.getVariablePairs().join("&");
109 if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
110 swfNode += "</object>";
111 }
112 return swfNode;
113 },
114 write: function(elementId){
115 if(this.getAttribute('useExpressInstall')) {
116 // check to see if we need to do an express install
117 var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
118 if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
119 this.setAttribute('doExpressInstall', true);
120 this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
121 document.title = document.title.slice(0, 47) + " - Flash Player Installation";
122 this.addVariable("MMdoctitle", document.title);
123 }
124 }
125 if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
126 var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
127 n.innerHTML = this.getSWFHTML();
128 return true;
129 }else{
130 if(this.getAttribute('redirectUrl') != "") {
131 document.location.replace(this.getAttribute('redirectUrl'));
132 }
133 }
134 return false;
135 }
136}
138/* ---- detection functions ---- */
139deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){
140 var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
141 if(navigator.plugins && navigator.mimeTypes.length){
142 var x = navigator.plugins["Shockwave Flash"];
143 if(x && x.description) {
144 PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
145 }
146 }else{
147 try{
148 var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
149 for (var i=3; axo!=null; i++) {
150 axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
151 PlayerVersion = new deconcept.PlayerVersion([i,0,0]);
152 }
153 }catch(e){}
154 if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection
155 // this only does the minor rev lookup if the user's major version
156 // is not 6 or we are checking for a specific minor or revision number
157 // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
158 if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) {
159 try{
160 PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
161 }catch(e){}
162 }
163 }
164 return PlayerVersion;
165}
166deconcept.PlayerVersion = function(arrVersion){
167 this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0;
168 this.minor = parseInt(arrVersion[1]) || 0;
169 this.rev = parseInt(arrVersion[2]) || 0;
170}
171deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
172 if(this.major < fv.major) return false;
173 if(this.major > fv.major) return true;
174 if(this.minor < fv.minor) return false;
175 if(this.minor > fv.minor) return true;
176 if(this.rev < fv.rev) return false;
177 return true;
178}
179/* ---- get value of query string param ---- */
180deconcept.util = {
181 getRequestParameter: function(param){
182 var q = document.location.search || document.location.hash;
183 if(q){
184 var startIndex = q.indexOf(param +"=");
185 var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
186 if (q.length > 1 && startIndex > -1) {
187 return q.substring(q.indexOf("=", startIndex)+1, endIndex);
188 }
189 }
190 return "";
191 }
192}
193/* fix for video streaming bug */
194deconcept.SWFObjectUtil.cleanupSWFs = function() {
195 var objects = document.getElementsByTagName("OBJECT");
196 for (var i=0; i < objects.length; i++) {
197 for (var x in objects[i]) {
198 if (typeof objects[i][x] == 'function') {
199 objects[i][x] = null;
200 }
201 }
202 }
203}
204if (typeof window.onunload == 'function') {
205 var oldunload = window.onunload;
206 window.onunload = function() {
207 deconcept.SWFObjectUtil.cleanupSWFs();
208 oldunload();
209 }
210} else {
211 window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
212}
213/* add Array.push if needed (ie5) */
214if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
216/* add some aliases for ease of use/backwards compatibility */
217var getQueryParamValue = deconcept.util.getRequestParameter;
218var FlashObject = deconcept.SWFObject; // for legacy support
219var SWFObject = deconcept.SWFObject;
225/*
226 * Functions to generate OBJECT and EMBED tags for QuickTime content.
227 * Resource: http://developer.apple.com/internet/ieembedfix.html
228 */
230/************** LOCALIZABLE GLOBAL VARIABLES ****************/
232var gArgCountErr = 'The "%%" function requires an even number of arguments.'
233 + '\nArguments should be in the form "atttributeName", "attributeValue", ...';
235/******************** END LOCALIZABLE **********************/
237var gTagAttrs = null;
238var gQTGeneratorVersion = 1.0;
240function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
242function _QTComplain(callingFcnName, errMsg)
243{
244 errMsg = errMsg.replace("%%", callingFcnName);
245 alert(errMsg);
246}
248function _QTAddAttribute(prefix, slotName, tagName)
249{
250 var value;
252 value = gTagAttrs[prefix + slotName];
253 if ( null == value )
254 value = gTagAttrs[slotName];
256 if ( null != value )
257 {
258 if ( 0 == slotName.indexOf(prefix) && (null == tagName) )
259 tagName = slotName.substring(prefix.length);
260 if ( null == tagName )
261 tagName = slotName;
262 return tagName + '="' + value + '" ';
263 }
264 else
265 return "";
266}
268function _QTAddObjectAttr(slotName, tagName)
269{
270 // don't bother if it is only for the embed tag
271 if ( 0 == slotName.indexOf("emb#") )
272 return "";
274 if ( 0 == slotName.indexOf("obj#") && (null == tagName) )
275 tagName = slotName.substring(4);
277 return _QTAddAttribute("obj#", slotName, tagName);
278}
280function _QTAddEmbedAttr(slotName, tagName)
281{
282 // don't bother if it is only for the object tag
283 if ( 0 == slotName.indexOf("obj#") )
284 return "";
286 if ( 0 == slotName.indexOf("emb#") && (null == tagName) )
287 tagName = slotName.substring(4);
289 return _QTAddAttribute("emb#", slotName, tagName);
290}
293function _QTAddObjectParam(slotName, generateXHTML)
294{
295 var paramValue;
296 var paramStr = "";
297 var endTagChar = (generateXHTML) ? ' />' : '>';
299 if ( -1 == slotName.indexOf("emb#") )
300 {
301 // look for the OBJECT-only param first. if there is none, look for a generic one
302 paramValue = gTagAttrs["obj#" + slotName];
303 if ( null == paramValue )
304 paramValue = gTagAttrs[slotName];
306 if ( 0 == slotName.indexOf("obj#") )
307 slotName = slotName.substring(4);
308
309 if ( null != paramValue )
310 paramStr = ' <param name="' + slotName + '" value="' + paramValue + '"' + endTagChar + '\n';
311 }
313 return paramStr;
314}
316function _QTDeleteTagAttrs()
317{
318 for ( var ndx = 0; ndx < arguments.length; ndx++ )
319 {
320 var attrName = arguments[ndx];
321 delete gTagAttrs[attrName];
322 delete gTagAttrs["emb#" + attrName];
323 delete gTagAttrs["obj#" + attrName];
324 }
325}
327
329// generate an embed and object tag, return as a string
330function _QTGenerate(callingFcnName, generateXHTML, args)
331{
332 // is the number of optional arguments even?
333 if ( args.length < 4 || (0 != (args.length % 2)) )
334 {
335 _QTComplain(callingFcnName, gArgCountErr);
336 return "";
337 }
338
339 // allocate an array, fill in the required attributes with fixed place params and defaults
340 gTagAttrs = new Array();
341 gTagAttrs["src"] = args[0];
342 gTagAttrs["width"] = args[1];
343 gTagAttrs["height"] = args[2];
344 gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
345 gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/";
347 // set up codebase attribute with specified or default version before parsing args so
348 // anything passed in will override
349 var activexVers = args[3]
350 if ( (null == activexVers) || ("" == activexVers) )
351 activexVers = "6,0,2,0";
352 gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers;
354 var attrName,
355 attrValue;
357 // add all of the optional attributes to the array
358 for ( var ndx = 4; ndx < args.length; ndx += 2)
359 {
360 attrName = args[ndx].toLowerCase();
361 attrValue = args[ndx + 1];
363 // "name" and "id" should have the same value, the former goes in the embed and the later goes in
364 // the object. use one array slot
365 if ( "name" == attrName || "id" == attrName )
366 gTagAttrs["name"] = attrValue;
368 else
369 gTagAttrs[attrName] = attrValue;
370 }
372 // init both tags with the required and "special" attributes
373 var objTag = '<object '
374 + _QTAddObjectAttr("classid")
375 + _QTAddObjectAttr("width")
376 + _QTAddObjectAttr("height")
377 + _QTAddObjectAttr("codebase")
378 + _QTAddObjectAttr("name", "id")
379 + _QTAddObjectAttr("tabindex")
380 + _QTAddObjectAttr("hspace")
381 + _QTAddObjectAttr("vspace")
382 + _QTAddObjectAttr("border")
383 + _QTAddObjectAttr("align")
384 + _QTAddObjectAttr("class")
385 + _QTAddObjectAttr("title")
386 + _QTAddObjectAttr("accesskey")
387 + _QTAddObjectAttr("noexternaldata")
388 + '>\n'
389 + _QTAddObjectParam("src", generateXHTML);
390 var embedTag = ' <embed '
391 + _QTAddEmbedAttr("src")
392 + _QTAddEmbedAttr("width")
393 + _QTAddEmbedAttr("height")
394 + _QTAddEmbedAttr("pluginspage")
395 + _QTAddEmbedAttr("name")
396 + _QTAddEmbedAttr("align")
397 + _QTAddEmbedAttr("tabindex");
399 // delete the attributes/params we have already added
400 _QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex",
401 "hspace","vspace","border","align","noexternaldata","class","title","accesskey");
403 // and finally, add all of the remaining attributes to the embed and object
404 for ( var attrName in gTagAttrs )
405 {
406 attrValue = gTagAttrs[attrName];
407 if ( null != attrValue )
408 {
409 embedTag += _QTAddEmbedAttr(attrName);
410 objTag += _QTAddObjectParam(attrName, generateXHTML);
411 }
412 }
414 // end both tags, we're done
415 return objTag + embedTag + '> </em' + 'bed>\n</ob' + 'ject' + '>';
416}
418// return the object/embed as a string
419function QT_GenerateOBJECTText()
420{
421 return _QTGenerate("QT_GenerateOBJECTText", false, arguments);
422}
424function QT_GenerateOBJECTText_XHTML()
425{
426 return _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments);
427}
429function QT_WriteOBJECT()
430{
431 document.writeln(_QTGenerate("QT_WriteOBJECT", false, arguments));
432}
434function QT_WriteOBJECT_XHTML()
435{
436 document.writeln(_QTGenerate("QT_WriteOBJECT_XHTML", true, arguments));
437}
 
438function addLoadEvent(func) {
439 var oldonload = window.onload;
440 if (typeof window.onload != 'function') {
441 window.onload = func;
442 } else {
443 window.onload = function() {
444 if (oldonload) {
445 oldonload();
446 }
447 func();
448 }
449 }
450}