
var util = {

/* ---------------------------------------------------------------------------- */
// stringBuilder CLASS
/* ---------------------------------------------------------------------------- */
		stringBuilder: function(){
		
			this.strings = new Array();
			
			this.append = function(value)	{
				if (value)	{	this.strings.push(value);	}
			}
			this.clear = function()	{
				this.strings.length = 1;
			}
			this.toString = function(split)	{
				if (!split)
					return this.strings.join("");
				else
					return this.strings.join(split);
			}

			this.test = function(){};
		}
/* ---------------------------------------------------------------------------- */

}//end util

function $() {
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1)
      return element;

    elements.push(element);
  }

  return elements;
}

function $q(name){
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return "";
	else
		return results[1];
}

function getNode(x){
	var nodeCount=0;
	var temp = x.cloneNode(false);
	var childNodes = x.childNodes;
	for (var i=0; i<childNodes.length; i++){
		if (childNodes[i].nodeType==1)
		{
			nodeCount++;
			temp.appendChild(childNodes[i].cloneNode(true));
		}
	}
	alert('fired!');
	return temp;
}

