/**
 * @author julio
 */

/*
// not used
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array(); var j;
	if ( node == null ) node = document;
	if ( tag == null ) tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)');
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
*/
function replaceClassInTags (tag, oldclass, newclass, node) {
	if ( node == null ) node = document;
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	for (var i = 0; i < elsLen; i++) {
		if (els[i].className == oldclass)
			els[i].className = newclass;
	}
}

function byId (e) { return document.getElementById(e); }

/* Google Analytics */

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17896073-1'],
    ['_setSessionCookieTimeout', 7600000],
    ['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

