function BaseLibrary(){
	var t = this;
	var d = document;
	t.winOpen = function(){
		var a = arguments;
		var n,f,s,w,h,t,l;
		var tmpWidth = parseInt(a[2],10);
		n = (a[1]) ? a[1] : 'child';
		f = (a[6]) ? a[6].toString() : null;
		s = (f && f.search(/scrollbars=(1|true)/) != -1);
		w = ((tmpWidth<=0)?100:tmpWidth);
		h = a[3];
		t = (a[4]) ? a[4] : 0;
		l = (a[5]) ? a[5] : 0;
		child = window.open(a[0],n,'width='+w+',height='+h+',top='+t+',left='+l+',directories=0,'+f);
		setTimeout('child.focus();',100);
		if(f && f.search(/temp=(1|true)/)!=-1) window.onfocus = function(){if(window.child) child.close(); child = null};
		if(document.all && window.event) {
		    window.event.cancelBubble = true;
		}
	}	

	t.ge = function(theId){return document.getElementById(theId);}
	t.geByName = function(theName){return document.getElementsByName(theName);}
	t.geByTag = function(theTag){return document.getElementsByTagName(theTag);}
	t.isValidObj = function(theObject) {return (typeof theObject != 'undefined') && (theObject != null);}
	t.isValidId = function(theId){return base.isValidObj(base.ge(theId));}
	t.cancelEvent = function (e){
		e.returnValue = false;
		e.cancelBubble = true;		
		if (e.preventDefault){e.preventDefault();}
		if (e.stopPropagation){e.stopPropagation();}
		return false;
	}
	t.collectionToArray = function(col) {
		a = new Array();
		for (i = 0; i < col.length; i++)
			a[a.length] = col[i];
		return a;
	}
	t.createElements = function( args ){  
		var el;  
		if( typeof(args) == "string" ) {  
			el = document.createTextNode(args);  
		} else if ( typeof(args) == "object" ) {  
			try{
				tagString = '<' + args.tag + ' name="' + args.attributes["name"] + '" class="'+ args.attributes["class"] +'">';
				el = document.createElement(tagString);
			}catch(e){
				el = document.createElement(args.tag);  
			}
			if ( args.attributes ) {  
				for ( i in args.attributes ) {  
					el.setAttribute(i, args.attributes[i]);  
				}  
			}  
			if ( args.style ) {  
				for ( i in args.style ) {  
					el.style[i] = args.style[i];  
				}  
			}  
			if ( args.children ) {  
				for ( var i = 0; i < args.children.length; i++ ) {
					el.appendChild( this.createElements( args.children[i] ) );  
				}  
			}
		}
		return el;  
	}
	
	t.queryStringArguments = {};
}
var base = new BaseLibrary();

if(window.location.search != ""){
	args = window.location.search.split("?")[1].split("&");
	for(var i = 0;i < args.length;i ++){
		argName = args[i].split("=")[0];
		argValue = args[i].split("=")[1];
		base.queryStringArguments[argName] = argValue ;
	}
}


Array.prototype.iterate = function(fn){
	for(var i = 0;i<this.length;i++){
		fn(this[i],i);
	}
}
