<!--//
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	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++;
		}
	}
	return classElements;
}
function trim(sString) {
	while (sString.substring(0,1) == ' ') {
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ') {
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
}
function goTo(url) {
	window.location = url;
}
function showUp(url,width,height) {
	eval("page_open = window.open('" + url + "','','width=" + width + ",height=" + height + "');");
}
function isOk(msg) {
	goOn = confirm(msg);
	return goOn;
}
function switchClass(o,c) {
	o.className = c;
}
function isValidEmail(email) {
	ok = true;
	len = email.length;

	if (email.indexOf('@') == -1 || email.indexOf('@') == 0)
		ok = false;
	if (email.indexOf('@') == len)
		ok = false;

	if (email.indexOf('.') == -1 || email.indexOf('.') == 0)
		ok = false;
	if (email.indexOf('.') == len)
		ok = false;
	
	return ok;
}
function makeRequest(url_href) {
	url_href += "&rnd=" + Math.random();
	if (window.XMLHttpRequest) {
		http_request = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		http_request = new ActiveXObject("Microsoft.XMLHTTP");
	}
	http_request.onreadystatechange = getResult;
	http_request.open('GET', url_href, true);
	http_request.send(null);
}
function getResult() {
	if (http_request.readyState == 4) {
		if (http_request.status == 200) {
			res = http_request.responseText.split(":");
			parseResults(res);
		} else {
			alert("Impossible to connect to the server. Please check your internet connection."); 
		}
	}
}
//-->