﻿/* base.js */
var G={w:window,d:document,g:navigator.product=='Gecko',start:new Date(),
init:function(){for(var n in G)if(G[n].init)G[n].init()},
set:function(a,b){for(var o in b)a[o]=b[o];return a},
next:function(a){setTimeout(a,0)},
time:function(a){return (a||new Date()).getTime()},
create:function(a,b,c,d){var o=(d||G.d).createElement(a);G.set(o,b);G.set(o.style,c);return o},
append:function(a,b,c,d){var o=b.tagName?b:G.create(b,c,d);a.appendChild(o)},
_:function(){return G.w.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP')},
load:function(a,b){var o=G._();o.open('GET',a,false);o.send(null);return b?o.responseText:o.responseXML},
get:function(a){return G.load(a,1)},
xml:function(a){
	if(G.g)return new DOMParser().parseFromString(a,'text/xml')
	var o=new ActiveXObject('Microsoft.XMLDOM');o.async=false;o.loadXML(a);return o
},
string:function(a,b){
	if(G.g){
		if(b){var o=new XSLTProcessor();o.importStylesheet(b);a=o.transformToFragment(a,G.d)}
		return new XMLSerializer().serializeToString(a)
	}
	return b?a.transformNode(b):a.xml
},
text:function(a){return (a.text)?a.text:a.textContent}
},
$=function(a,b){return (b||G.d).getElementById(a)},
$$=function(a,b){return (b||G.d).getElementsByTagName(a)},
$a=function(a,b){return a.getAttribute(b)}
G.w.onload=G.init

