PageSourceSearch

https://providencephoenix.com/js/AC_RunActiveContent.js

js providencephoenix.com collected 2026-10-02 10:19:38 UTC 31,205 bytes, 894 lines download raw bytes

1//v1.0
2//Copyright 2006 Adobe Systems, Inc. All rights reserved.
3function AC_AddExtension(src, ext)
4{
5  if (src.indexOf('?') != -1)
6    return src.replace(/\?/, ext+'?'); 
7  else
8    return src + ext;
9}
10
11function AC_Generateobj(objAttrs, params, embedAttrs) 
12{ 
13  var str = '<object ';
14  for (var i in objAttrs)
15    str += i + '="' + objAttrs[i] + '" ';
16  str += '>';
17  for (var i in params)
18    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
19  str += '<embed ';
20  for (var i in embedAttrs)
21    str += i + '="' + embedAttrs[i] + '" ';
22  str += ' ></embed></object>';
23
24  document.write(str);
25}
26
27function AC_FL_RunContent(){
28  var ret = 
29    AC_GetArgs
30    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
31     , "application/x-shockwave-flash"
32    );
33  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
34}
35
36function AC_SW_RunContent(){
37  var ret = 
38    AC_GetArgs
39    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
40     , null
41    );
42  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
43}
44
45function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
46  var ret = new Object();
47  ret.embedAttrs = new Object();
48  ret.params = new Object();
49  ret.objAttrs = new Object();
50  for (var i=0; i < args.length; i=i+2){
51    var currArg = args[i].toLowerCase();    
52
53    switch (currArg){	
54      case "classid":
55        break;
56      case "pluginspage":
57        ret.embedAttrs[args[i]] = args[i+1];
58        break;
59      case "src":
60      case "movie":	
61        args[i+1] = AC_AddExtension(args[i+1], ext);
62        ret.embedAttrs["src"] = args[i+1];
63        ret.params[srcParamName] = args[i+1];
64        break;
65      case "onafterupdate":
66      case "onbeforeupdate":
67      case "onblur":
68      case "oncellchange":
69      case "onclick":
70      case "ondblClick":
71      case "ondrag":
72      case "ondragend":
73      case "ondragenter":
74      case "ondragleave":
75      case "ondragover":
76      case "ondrop":
77      case "onfinish":
78      case "onfocus":
79      case "onhelp":
80      case "onmousedown":
81      case "onmouseup":
82      case "onmouseover":
83      case "onmousemove":
84      case "onmouseout":
85      case "onkeypress":
86      case "onkeydown":
87      case "onkeyup":
88      case "onload":
89      case "onlosecapture":
90      case "onpropertychange":
91      case "onreadystatechange":
92      case "onrowsdelete":
93      case "onrowenter":
94      case "onrowexit":
95      case "onrowsinserted":
96      case "onstart":
97      case "onscroll":
98      case "onbeforeeditfocus":
99      case "onactivate":
100      case "onbeforedeactivate":
101      case "ondeactivate":
102      case "type":
103      case "codebase":
104        ret.objAttrs[args[i]] = args[i+1];
105        break;
106      case "width":
107      case "height":
108      case "align":
109      case "vspace": 
110      case "hspace":
111      case "class":
112      case "title":
113      case "accesskey":
114      case "name":
115      case "id":
116      case "tabindex":
117        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
118        break;
119      default:
120        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
121    }
122  }
123  ret.objAttrs["classid"] = classid;
124  if (mimeType) ret.embedAttrs["type"] = mimeType;
125  return ret;
126}
127
128function cleanPHX(uid){
129	return uid.replace("#","").replace("#","").replace(".flv","");
130}
131
132function phxVid(uid){
133	uid = cleanPHX(uid);
134	//AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','496','height','380','src',uid,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',uid);
135//document.write("phxVid");
136}
137
138function phxAudio(uid){
139	uid = cleanPHX(uid);
140	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','77','height','69','src','/assets/audio/player?mp3=' + uid,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','loop','false','wmode','transparent','menu','false','bgcolor','#F
140FFFFF','movie','/assets/audio/player?mp3=' + uid,'FlashVars','&mp3=' + uid);
141}
142
143function btvVid(uid){
144	uid = cleanPHX(uid);
145	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','422','height','525','src','http://www.boston.tv/beta2/flash/BTVsyndicate?SETTINGSDESCRIPTOR=http://www.boston.tv/beta2/xml/settings.xml&pid=W-eRNESrXJCVsb1O90tfI7_AdyhBOo4t&id=' + uid,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','loop','false','menu','false','bgcolor','#000000','movie','http://www.boston.tv/beta2/flash/BTVsyndicate?SETTINGSDESCRIPTOR=http://www.boston.tv/beta2/xml/settings.xml&pid=W-eRNESrXJCVsb1O90tfI7_AdyhBOo4t&id=' + uid,'FlashVars','&SETTINGSDESCRIPTOR=http://www.boston.tv/beta2/xml/settings.xml&pid=W-eRNESrXJCVsb1O90tfI7_AdyhBOo4t&id=' + uid);
146}
147
148function youtubeVid(uid){
149	uid = cleanPHX(uid);
150	yturl = 'http://www.youtube.com/v/' + uid;
151	//AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','425','height','350','src','http://www.youtube.com/v/' + uid,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','wmode','transparent','movie','http://www.youtube.com/v/' + uid);
152	document.write("<div align=\"center\">");
153	document.write('<OBJECT height=350 width=425><PARAM NAME="movie" VALUE="' + yturl + '"><PARAM NAME="wmode" VALUE="transparent"><embed src="' + yturl + '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></OBJECT>');
154	document.write("</div>");
155}
156
157function phxCinema(uid){
158	document.write("<div align=\"center\">");
159	uid = cleanPHX(uid);
160	flashvar = "file=" + uid;
161	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','425','height','283','src','http://thephoenix.com/assets/embed/player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://thephoenix.com/assets/embed/player','flashvars',flashvar);
162	document.write("</div>");
163}
164
165function phxCinemaFull(){
166	flashvar = "fullscreenmode=true&showfsbutton=true&autostart=true";
167	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','850','height','564','src','http://thephoenix.com/assets/embed/player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://thephoenix.com/assets/embed/player','flashvars',flashvar);
168}
169
170function phxCinemaFull(uid){
171	document.write("<div align=\"center\">");
172	uid = cleanPHX(uid);
173	flashvar = "file=" + uid + "&showdigits=false&autostart=true&showfsbutton=false&repeat=false";
174	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','850','height','564','src','http://thephoenix.com/assets/embed/player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://thephoenix.com/assets/embed/player','flashvars',flashvar);
175	document.write("</div>");
176}
177
178
179function phxCinemaOLD(uid){
180	document.write("<div align=\"center\">");
181	uid = cleanPHX(uid);
182	flashvar = "file=" + uid + ".flv&overstretch=true&showdigits=false&autostart=false&showfsbutton=true&repeat=false";
183	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','425','height','283','src','http://thephoenix.com/assets/trailer/player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://thephoenix.com/assets/trailer/player','flashvars',flashvar);
184	document.write("</div>");
185//	document.write("<br />Download trailer: <a href=\"/assets/trailer/download/" + uid + ".mov\">Quicktime</a> | <a href=\"/assets/trailer/ipod/" + uid + ".m4v\">iPod</a>");
186}
187
188function phxCinemaFullOLD(){
189	flashvar = "fullscreenmode=true&showfsbutton=true&autostart=true";
190	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','850','height','564','src','http://thephoenix.com/assets/trailer/player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://thephoenix.com/assets/trailer/player','flashvars',flashvar);
191//	document.write("<br />Download trailer: <a href=\"/assets/trailer/download/" + uid + ".mov\">Quicktime</a> | <a href=\"/assets/trailer/ipod/" + uid + ".m4v\">iPod</a>");
192}
193
194function phxSlideshow(uid){
195	uid = cleanPHX(uid);
196	AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','475','height','475','src','/assets/slideshow/' + uid + '/soundslider?size=2','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','wmode','transparent','movie','/assets/slideshow/' + uid + '/soundslider?size=2');
197}
198
199function phxBrightCove(uid){
200uid = cleanPHX(uid);
201 /* By use of this code snippet, I agree to the Brightcove Publisher T and C */
202 /* found at http://corp.brightcove.com/legal/terms_publisher.cfm. */
203 var config = new Array();
204 /* 
205 * feel free to edit these configurations
206 * to modify the player experience
207 */
208
209 config["videoId"] = null; /*the default video loaded into the player*/
210 config["videoRef"] = null; /*the default video loaded into the player by ref id specified in console*/
211 config["lineupId"] = null; /*the default lineup loaded into the player*/
212 config["playerTag"] = null; /*player tag used for identifying this page in brightcove reporting*/
213 config["autoStart"] = false; /*tells the player to start playing video on load*/
214 config["preloadBackColor"] = "#FFFFFF"; /*background color while loading the player*/
215
216
217if (IsNumeric(uid)){
218	config["videoId"] = uid;
219}else{
220	config["videoRef"] = uid;
221}
222
223config["continuousPlay"] = "false";
224config["maximized"] = "true";
225
226	config["videoId"] = 1209604037;
227
228config["width"] = 520;
229 config["height"] = 520;
230 
231 /* do not edit these config items */
232 config["playerId"] = 1213934661; /*1235290166;*/
233
234 createExperience(config, 8);
235}
236
237
238function IsNumeric(sText)
239{
240   var ValidChars = "0123456789";
241   var IsNumber=true;
242   var Char;
243
244 
245   for (i = 0; i < sText.length && IsNumber == true; i++) 
246      { 
247      Char = sText.charAt(i); 
248      if (ValidChars.indexOf(Char) == -1) 
249         {
250         IsNumber = false;
251         }
252      }
253   return IsNumber;
254   
255   }
256
257
258/*BRIGHTCOVE JAVASCRIPT*/
259var playerIndex;
260var flashId;
261function createExperience(config, flashVersion) {
262   // default version to 7 for backwards compatability
263   if (flashVersion == undefined) var flashVersion = 7;
264   // Config parameters to pass into the SWF file.
265   var servicesURL = "http://services.brightcove.com/services";
266   var viewerSecureGatewayURL = "https://services.brightcove.com/services/amfgateway";
267   var cdnURL = "http://admin.brightcove.com";
268
269   var bgcolor = config["preloadBackColor"];
270   var externalAds = (typeof(playAd) != "undefined");
271   var sendReports = (typeof(reportEvent) != "undefined");
272   
273   var width = config["width"];
274   var height = config["height"];
275   if (width == null) {
276    width = "100%";    
277   }
278   if (height == null) {
279    height = "100%";    
280   }
281  //specify version required Flash version
282  if (config["requireFlash8"] || flashVersion == 8){
283    requiredMajorVersion = 8;
284  } else{
285	//mac requires flash 8
286	requiredMajorVersion = 7;
287	var isMac = navigator.appVersion.toLowerCase().indexOf("mac") > 0;
288	if (isMac) requiredMajorVersion = 8;
289  }
290  var requiredMinorVersion = 0;
291  var requiredRevision = 0;
292  
293  var hasRightVersion = DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);
294  if(hasRightVersion) { 
295  
296	var pid = getParameter("bcpid");
297	if(pid.length < 1  || (pid == config["playerId"]))  {
298		var titleParam = getParameter("bctid");
299		if (titleParam.length > 0) {
300		  config["videoId"] = titleParam;
301		  config["autoStart"] = true;
302		  config["fromLink"] = true;
303		}
304		var lineupParam = getParameter("bclid");
305		if (lineupParam.length > 0) {
306		  config["lineupId"] = lineupParam;
307		}
308	}
309  
310    if (playerIndex == undefined){
311		playerIndex = 0;
312	}else{
313		playerIndex++;
314	}	
315
316    if (config["flashId"] == undefined) {
317      flashId = "flashObj" + playerIndex;
318    } else {
319      flashId = escapeValue(config["flashId"]) + playerIndex;
320    }
321
322    var configItems = "";
323    for (var i in config) {
324       if (i == "flashId") continue;
325       if (typeof(config[i]) == "function" || typeof(config[i]) == "object") continue;
326       
327       configItems += "&" + i + "=" + escapeValue(config[i]);
328    }
329
330    // Hook for Internet Explorer.
331    if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
332	document.write('<script language=\"VBScript\"\>\n');
333	document.write('On Error Resume Next\n');
334	document.write('Sub ' + flashId + '_FSCommand(ByVal command, ByVal args)\n');
335	document.write('	Call onFSCommand(command, args)\n');
336	document.write('End Sub\n');
337	document.write('</script\>\n');
338    }
339
340    var swfFile = "federated.swf";
341    if (flashVersion == 8) {
342      swfFile = "federated_f8.swf";
343    }
344
345    var file = cdnURL + "/viewer/" + swfFile + "?flashId="+flashId+
346         "&servicesURL="+escapeValue(servicesURL)+
347         "&viewerSecureGatewayURL="+escapeValue(viewerSecureGatewayURL)+
348         "&cdnURL="+escapeValue(cdnURL)+
349         configItems+
350         "&externalAds="+escapeValue(externalAds)+
351         "&sendReports="+escapeValue(sendReports)+
352         "&buildNumber=" + 89 +
353         "&ranNum=" + Math.floor(Math.random()*1000000);   
354
355    if (!DetectFlashVer(8,0,0)) {
356      file += "&domain=" + getDomain();
357    }
358    
359    wmode = config["wmode"];
360	if (wmode == null) wmode = "window";
361	
362    version = "7,0,0,0"; // why write 7 always??
363    quality = "high";
364    document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + version + "\" id=\""+flashId+"\" width=\""+width+"\" height=\""+height+"\">");
365    document.write("  <param name=\"allowScriptAccess\" value=\"always\"/>");
366    document.write("  <param name=\"allowFullScreen\" value=\"true\"/>");
367    document.write("  <param name=\"movie\" value=\""+file+"\"/>");
368    document.write("  <param name=\"wmode\" value=\""+wmode+"\"/>");
369    document.write("  <param name=\"quality\" value=\""+quality+"\"/>");
370    document.write("  <param name=\"bgcolor\" value=\"" + bgcolor + "\"/>");
371    document.write("  <param name=\"base\" value=\""+cdnURL+"/viewer/\"/>");
372    document.write("  <param name=\"SeamlessTabbing\" value=\"false\"/>");
373    document.write("  <embed src=\""+file+"\" base=\""+cdnURL+"/viewer/\" quality=\""+quality+"\" bgcolor=\""+bgcolor+"\" allowScriptAccess=\"always\" name=\""+flashId+"\" width=\""+width+"\" height=\""+height+"\" wmode=\""+wmode+"\" seamlesstabbing=\"false\" type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>");
374    document.write("</object>"); 
375    
376  } else {  // flash is too old or we can't detect the plugin 
377    document.write("<table width='" + width + "' height='" + height + "' border='0' bgcolor='"+bgcolor+"'>");
378    document.write("<tr><td align='center' valign='middle'>");
379    document.write("<a href='http://www.macromedia.com/go/getflashplayer/' target='_blank'><img src='"+cdnURL+"/viewer/upgrade_flash_player.gif' alt='Get Flash Player' width='314' height='200' border='0'></a>");
380    document.write("</td></tr></table>");      
381   }
382
383   return flashId;
384}
385
386function escapeValue(str) {
387  return encodeURIComponent(str);
388}
389
390function getDomain() {
391  var domain = window.location.href;
392  if (domain.substring(0, 7) == "http://") {
393    domain = domain.substring(7, domain.length);
394  }
395  var i = domain.indexOf("/");
396  if (i != -1) {
397    domain = domain.substring(0, i);
398  }
399  i = domain.indexOf(":");
400  if (i != -1) {
401    domain = domain.substring(0, i);
402  }
403  return domain;
404}
405var ID_DELIM = "|||";
406
407function onFSCommand(command, args) {
408  if (command == "eval"){
409    eval(args);
410    return;
411  }
412  if (this[command] == null) return;
413  var obj = convertToObject(unescape(args));
414  if (obj != null) {
415    var callback = obj.callback;
416    var flashId = obj.flashId;
417    if (obj.flashId != null && callback != null) {
418      callback = obj.flashId + ID_DELIM + callback;
419    }
420    if (obj.args == null) {
421      eval(command + "(callback);");
422    } else {
423      eval(command + "(obj.args, callback);");
424    }
425  } else {
426    eval(command + "();");
427  }
428}
429
430var flashCallback;
431var flashCallbacks = [];
432function setAPICallback(id, callback) {
433  flashCallback = callback;
434  flashCallbacks[id] = callback;
435}
436
437function callFlash() {
438  var method = arguments[0];
439  var params = [];
440  for (var i = 1; i < arguments.length; i++) {
441    params.push(arguments[i]);
442  }
443  callbackFlash(flashCallback, {method:method, params:params});
444}
445
446function callFlashInstance() {
447  var flashId = arguments[0];
448  var method = arguments[1];
449  var params = [];
450  for (var i = 2; i < arguments.length; i++) {
451    params.push(arguments[i]);
452  }
453  var callback = flashCallbacks[flashId];
454  callbackFlash(callback, {method:method, params:params});
455}
456
457function callbackFlash(callback, returnValue) {
458  var flashId = "flashObj";
459
460  var arry = callback.split(ID_DELIM);
461  
462  if (arry.length > 1) {
463    if (arry[0].length > 0) {
464      flashId = arry[0];
465    }
466    callback = arry[1];
467  }
468
469  var fo = document[flashId];
470  if (fo == null) fo = document.embeds[flashId];
471  if (fo == null) fo = document.getElementById(flashId);
472
473  if (fo[callback] != null) {
474    return fo[callback](convertToXML(returnValue, "js2flash"));
475  } else {
476    try {
477      fo.SetVariable(callback, convertToXML(returnValue, "js2flash"));
478    } catch (e) {}
479  }
480}
481
482
483function convertToXML(obj, rootName) {
484	if (obj instanceof Function) return "";
485  	var type = getType(obj);
486  	var xml = "<"+type.name+rootName+">";
487  
488	if(type.sub) {
489  		for (var i in obj) {
490 		  xml += convertToXML(obj[i], i);
491    	}
492	}
493	else if (type.name == "str") {
494		obj = replaceEntities(obj);
495		xml += obj;
496	} 
497	else {
498		  xml += obj;
499	}
500	xml += "</"+type.name+rootName+">";
501	return xml;
502}
503
504function replaceEntities(obj) {
505	obj = obj.replace("&", "&amp;");
506	obj = obj.replace("<", "&lt;");
507	obj = obj.replace(">", "&gt;");	
508	return obj;
509}
510
511var s_xml_types = new Array();	
512s_xml_types.push({name:"str",type:String,sub:false});
513s_xml_types.push({name:"boo",type:Boolean,sub:false});
514s_xml_types.push({name:"num", type:Number,sub:false});
515//s_xml_types.push({name:"date", type:Date,sub:false});
516s_xml_types.push({name:"arr", type:Array,sub:true});
517s_xml_types.push({name:"cda", type:CData, sub:false});
518s_xml_types.push({name:"obj", type:Object,sub:true});
519
520function getType(obj) {
521        switch (typeof(obj)) {
522		case "boolean":
523			return {name:"boo",type:Boolean,sub:false};
524		case "string":
525			return {name:"str",type:String,sub:false};
526		case "number":
527			return {name:"num",type:Number,sub:false};
528	}
529	for (var i = 0; i < s_xml_types.length; i++) {
530	  if (obj instanceof s_xml_types[i].type) {
531	    return s_xml_types[i];
532	  }
533	}
534	return {name:"obj", type:Object,sub:true};
535}
536function getTypeClass(name) {
537  if (name == null) return null;
538
539  name = name.toLowerCase();
540	for (var i = 0; i < s_xml_types.length; i++) {
541	  if (name == s_xml_types[i].name) {
542	    return s_xml_types[i].type;
543	  }
544	}
545	return null;
546}
547
548function convertToObject(node) {
549//  try {
550    if (node == null) {
551      return;
552    }
553    
554    if (node.substring != null) {
555      node = parseXML(node);
556    }
557	  
558	  if (node == null || node.childNodes == null || node.childNodes.length == 0) {
559	    return null;
560	  }
561
562	  var type = getTypeClass(node.nodeName.substring(0,3));
563	  if (type == null) {
564	    type = Object;
565	  }
566
567		if (node.firstChild.nodeType == 3 || node.firstChild.nodeType == 4) {
568			return getObjectForNode(type, node);
569
570		} else {
571		
572  		var obj = new type();
573	  	var children = node.childNodes;
574		  for (var i = 0; i < children.length; i++) {
575		    var name = children[i].nodeName;
576		    name = name.substring(3, name.length);
577			  obj[name] = convertToObject(children[i]);
578	  	}
579		  return obj;
580		}
581//	} catch (e) {
582//    alert("Error creating object:" + e.message);
583//	  return null;
584//	}
585}
586
587function getObjectForNode(type, node) {
588	if (type == Boolean) {
589		if (node.firstChild.nodeValue == "true") {
590			return new Boolean(1);
591		}
592		else {
593			return new Boolean(0);
594		}
595	}
596	else {
597		return new type(node.firstChild.nodeValue);
598	}
599}
600
601function parseXML(str) {
602  if (window.ActiveXObject) {
603    var xmldoc = new ActiveXObject("Microsoft.XMLDOM");
604    try {
605      xmldoc.setProperty("SelectionLanguage", "XPath");
606    } catch (e) {} // i.e. 5 doesn't like setting the selection language
607    xmldoc.async = false;
608
609    xmldoc.loadXML(str);
610    return xmldoc.documentElement;  
611  } else if (DOMParser) {
612
613    var parser = new DOMParser();
614    var doc = parser.parseFromString(str, "text/xml");
615    
616    return doc.firstChild;
617    
618  } else {
619    return makeXMLNode(str);
620  }
621}
622
623
624function makeXMLNode(str) {
625  var node = {};
626  var nodeName = node.nodeName = getNodeName(str);
627  node.nodeType = 1;
628  node.childNodes = [];
629  node.firstChild = null;
630  var startTagEndIndex = nodeName.length + 2;
631  var endTagIndex = str.lastIndexOf("</" + nodeName);
632  var nodeData = str.substring(startTagEndIndex, endTagIndex);
633  if (nodeData.substring(0, 9) == "<![CDATA[") {
634    var child = {};
635    child.nodeName = null;
636    child.nodeType = 4;
637    child.nodeValue = getCDATA(nodeName, str.substring(startTagEndIndex, str.length));
638    node.childNodes = [child];
639  } else if (nodeData.indexOf("<") > -1) {
640    node.childNodes = getChildNodes(nodeData);
641  } else if (nodeData.length == 0) {
642    //do nothing, we want 0 children here
643  } else {
644    var child = {};
645    child.nodeName = null;
646    child.nodeType = 3;
647    child.nodeValue = getNodeValue(nodeName, nodeData);
648    node.childNodes = [child];
649  }
650  if (node.childNodes.length > 0) {
651    node.firstChild = node.childNodes[0];
652  }
653  return node;
654}
655
656function getNodeName(str) {
657  return str.substring(str.indexOf("<")+1, str.indexOf(">"));
658}
659
660function getChildNodes(nodeData) {
661  var childNodes = [];
662  var nodeName;
663  var nextIndex;
664  var endIndex;
665  var dataLength;
666  var nameLength;
667  var startNodesArray;
668  var endNodesArray;
669  var startNodesLength;
670  var endNodesLength;
671  var endNodes;
672  var startNodes;
673  var endNode;
674  var i;
675  var j;
676  while (nodeData.length > 0) {
677    nodeName = getNodeName(nodeData);
678    nameLength = nodeName.length;
679    nextIndex = nodeData.indexOf("<"+nodeName, nameLength);
680    endIndex = nodeData.indexOf("</"+nodeName, nameLength);
681    if (endIndex < 0) return childNodes;
682    if (nextIndex < 0 || endIndex < nextIndex) {
683      dataLength = endIndex+nodeName.length+3;
684      childData = nodeData.substr(0, dataLength);
685      nodeData = nodeData.substr(dataLength);
686      childNodes.push(makeXMLNode(childData));
687    } else {
688      endNodes = 0;
689      startNodes = 0;
690      startNodesArray = nodeData.split("<" + nodeName + ">");
691      startNodesLength = startNodesArray.length;
692      endNode = "</" + nodeName + ">";
693      for (i = 0; i < startNodesLength; i++) {
694        startNodes++;
695        startNodesStr = startNodesArray[i];
696        if (startNodesStr.indexOf(endNode) > -1) {
697          endNodesArray = startNodesStr.split("</" + nodeName + ">");
698          endNodesLength = endNodesArray.length;
699          for (j = 0; j < endNodesLength; j++) {
700            if (++endNodes == startNodes) {
701              childData = startNodesArray.slice(0, startNodes).join("");
702              dataLength = childData.length;
703              nodeData = nodeData.substr(dataLength);
704              childNodes.push(makeXMLNode(childData));
705              return childNodes;
706            }
707          }
708        }
709      }
710      childNodes.push(makeXMLNode(nodeData));
711      nodeData = "";
712    }
713  }
714  return childNodes;
715}
716
717function getCDATA(nodeName, nodeData) {
718  var endCDATA = nodeData.indexOf("]]>", 9);
719  if (endCDATA < 0) {
720    return null;
721  } else {
722    return getNodeValue(nodeName, nodeData.substring(9, endCDATA));
723  }
724}
725
726function getNodeValue(nodeName, nodeValue) {
727  switch (nodeName.substr(0, 3)) {
728    case "boo":
729      return (nodeValue=="true");
730    case "num":
731      return Number(nodeValue);
732    case "str":
733      return String(nodeValue);
734    default:
735      return nodeValue;
736  }
737}
738
739function CData(str) {
740  this.data = str;
741}
742
743CData.prototype.toString = function() {
744  return "<![CDATA[" + this.data + "]]>";
745}
746
747/*
748var chunks = {}
749function chunkCall(id, total, index, chunk) {
750  if (chunks[id] == undefined) chunks[id] = [];
751  chunks[id][index] = chunk;
752  if (index == total) {
753    eval(chunks[id].join(""));
754    delete chunks[id];
755  }
756}
757*/
758//Flash Detection
759var isIE  = (navigator.appVersion.indexOf("MSIE") != -1 && /opera/i.test(navigator.userAgent) == false) ? true : false;
760var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
761var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
762// JavaScript helper required to detect Flash Player PlugIn version information
763function JSGetSwfVer(i){
764	if (navigator.plugins != null && navigator.plugins.length > 0) {
765		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
766			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
767      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
768			descArray = flashDescription.split(" ");
769			tempArrayMajor = descArray[2].split(".");
770			versionMajor = tempArrayMajor[0];
771			versionMinor = tempArrayMajor[1];
772			if ( descArray[3] != "" ) {
773				tempArrayMinor = descArray[3].split("r");
774			} else {
775				tempArrayMinor = descArray[4].split("r");
776			}
777      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
778            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
779      	} else {
780			flashVer = -1;
781		}
782	}
783	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
784	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
785	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
786	else {		
787		flashVer = -1;
788	}
789	return flashVer;
790} 
791// If called with no parameters this function returns a floating point value 
792// which should be the version of the Flash Player or 0.0 
793// ex: Flash Player 7r14 returns 7.14
794// If called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
795function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
796{
797 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
798   	for (i=25;i>0;i--) {	
799		if (isIE && isWin && !isOpera) {
800			versionStr = VBGetSwfVer(i);
801		} else {
802			versionStr = JSGetSwfVer(i);		
803		}
804		if (versionStr == -1 ) { 
805			return false;
806		} else if (versionStr != 0) {
807			if(isIE && isWin && !isOpera) {
808				tempArray         = versionStr.split(" ");
809				tempString        = tempArray[1];
810				versionArray      = tempString .split(",");				
811			} else {
812				versionArray      = versionStr.split(".");
813			}
814			versionMajor      = versionArray[0];
815			versionMinor      = versionArray[1];
816			versionRevision   = versionArray[2];
817			
818			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
819			versionNum        = parseFloat(versionString);
820    		if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
821				return true;
822			} else {
823				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
824			}
825		}
826	}	
827	return (reqVer ? false : 0.0);
828}
829
830// Visual basic helper required to detect Flash Player ActiveX control version information
831if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
832	document.write('<script language=\"VBScript\"\>\n');
833	document.write('Function VBGetSwfVer(i)\n');
834	document.write('  on error resume next\n');
835	document.write('  Dim swControl, swVersion\n');
836	document.write('  swVersion = 0  \n');
837	document.write('  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
838	document.write('  if (IsObject(swControl)) then\n');
839	document.write('    swVersion = swControl.GetVariable("$version")\n');
840	document.write('  end if\n');
841	document.write('  VBGetSwfVer = swVersion\n');
842	document.write('End Function\n');
843	document.write('</script\>\n');
844}
845// Hook for Internet Explorer.
846if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
847	document.write('<script language=\"VBScript\"\>\n');
848	document.write('On Error Resume Next\n');
849	document.write('Sub flashObj_FSCommand(ByVal command, ByVal args)\n');
850	document.write('	Call onFSCommand(command, args)\n');
851	document.write('End Sub\n');
852	document.write('</script\>\n');
853}
854// Functions to parse query string parameters
855// version: 1.0
856// written by Kevin Langdon
857
858
859// #############################################
860// function returns the query string part of url
861// everything followed by the '?'
862function getQueryString() {
863    var urlStr = document.location.href;
864    var i = urlStr.indexOf("?");
865    if (i != -1) {
866        return urlStr.substring(i, urlStr.length - 1);
867    }
868    return null;
869}
870
871
872// #############################################
873// function parses the query string and returns each
874// parameter and value seperated by '&'
875function getParameter(name, defaultValue) {
876    if (defaultValue == null) {
877        defaultValue = "";
878    }
879
880    var url = document.location.href;
881    var i = url.indexOf(name + "=");
882    if (i != -1) {
883        var valuestart = i+name.length+1;
884        var valueend = url.length;
885
886        i = url.indexOf("&", valuestart)
887        if (i != -1) {
888            valueend = i;
889        }
890
891        return unescape(url.substring(valuestart, valueend));
892    }
893    return defaultValue;
894}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.