rem: fleegix.uri = new function() { var self = this;  this.params = {};  this.getParamHash = function() { var query = self.getQuery(); var arr = []; var params = []; var ret = null; var pat = /(\S+?)=(\S+?)&/g; if (query) { query += '&'; while (arr = pat.exec(query)) { params[arr[1]] = arr[2]; } } return params; }; this.getParam = function(name) { return self.params[name]; }; this.getQuery = function() { return location.href.split('?')[1]; }; this.params = this.getParamHash(); 
add: fleegix.xml = new function(){  var self = this;    this.parse = function(xmlDocElem, tagItemName) { var xmlElemArray = new Array; var xmlElemRow; var objArray = [];   if (xmlDocElem.hasChildNodes()) { xmlElemArray = xmlDocElem.getElementsByTagName(tagItemName); xmlElemRow = xmlElemArray[0];  for (var j = 0; j < xmlElemArray.length; j++) { xmlElemRow = xmlElemArray[j]; objArray[j] = self.xmlElem2Obj(xmlElemArray[j]); } } return objArray; };   this.xmlElem2Obj = function(xmlElem) { var ret = new Object(); self.setPropertiesRecursive(ret, xmlElem); return ret; };  this.setPropertiesRecursive = function(obj, node) { if (node.childNodes.length > 0) { for (var i = 0; i < node.childNodes.length; i++) { if (node.childNodes[i].nodeType == 1 && node.childNodes[i].firstChild) {   if(node.childNodes[i].childNodes.length == 1) { obj[node.childNodes[i].tagName] = node.childNodes[i].firstChild.nodeValue; }   else { obj[node.childNodes[i].tagName] = [];   self.setPropertiesRecursive( obj[node.childNodes[i].tagName], node.childNodes[i]); } } } } };  this.cleanXMLObjText = function(xmlObj) { var cleanObj = xmlObj; for (var prop in cleanObj) { cleanObj[prop] = cleanText(cleanObj[prop]); } return cleanObj; };  this.cleanText = function(str) { var ret = str; ret = ret.replace(/\n/g, ''); ret = ret.replace(/\r/g, ''); ret = ret.replace(/\'/g, "\\'"); ret = ret.replace(/\[CDATA\[/g, ''); ret = ret.replace(/\]]/g, ''); return ret; };  this.rendered2Source = function(str) {     var proc = str; proc = proc.replace(/</g, '&lt;'); proc = proc.replace(/>/g, '&gt;'); return '<pre>' + proc + '</pre>'; };  /* Works with embedded XML document structured like this: ===================== <div id="xmlThingDiv" style="display:none;"> <xml> <thinglist> <thingsection sectionname="First Section o' Stuff"> <thingitem> <thingproperty1>Foo</thingproperty1> <thingproperty2>Bar</thingproperty2> <thingproperty3> <![CDATA[Blah blah ...]]> </thingproperty3> </thingitem> <thingitem> <thingproperty1>Free</thingproperty1> <thingproperty2>Beer</thingproperty2> <thingproperty3> <![CDATA[Blah blah ...]]> </thingproperty3> </thingitem> </thingsection> <thingsection sectionname="Second Section o' Stuff"> <thingitem> <thingproperty1>Far</thingproperty1> <thingproperty2>Boor</thingproperty2> <thingproperty3> <![CDATA[Blah blah ...]]> </thingproperty3> </thingitem> </thingsection> </thinglist> </xml> </div>  Call the function like this: var xmlElem = getXMLDocElem('xmlThingDiv', 'thinglist'); -------- xmlDivId: For IE to pull using documentElement xmlNodeName: For Moz/compat to pull using getElementsByTagName */   this.getXMLDocElem = function(xmlDivId, xmlNodeName) { var xmlElemArray = []; var xmlDocElem = null; if (document.all) { var xmlStr = document.getElementById(xmlDivId).innerHTML; var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.loadXML(xmlStr); xmlDocElem = xmlDoc.documentElement; }  else { xmlElemArray = window.document.body.getElementsByTagName(xmlNodeName); xmlDocElem = xmlElemArray[0]; ; } return xmlDocElem; }; 
context: fleegix.uri = new function() {  var self = this;    this.params = {};    this.getParamHash = function() {    var query = self.getQuery();    var arr = [];    var params = [];    var ret = null;    var pat = /(\S+?)=(\S+?)&/g;    if (query) {      query += '&';      while (arr = pat.exec(query)) {        params[arr[1]] = arr[2];      }    }    return params;  };  this.getParam = function(name) {    return self.params[name];  };  this.getQuery = function() {    return location.href.split('?')[1];  };  this.params = this.getParamHash();}
meta: 10428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10428/f0576f65a7b0341560eac2493956030db69acdc9/fleegix.js.uncompressed.js/clean/fleegix.js.uncompressed.js