// <![CDATA[
var XMLHTTP = null;

if (window.XMLHttpRequest) {
	XMLHTTP = new XMLHttpRequest();
} else if (window.ActiveXObject) {
	try {
		XMLHTTP = new ActiveXObjext("Msxml2.XMLHTTP");
	} catch (ex) {
		try {
			XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (ex) {
		}
	}
}

function rate(id, rating)
{
	XMLHTTP.open("GET", "http://www.sms-messaging.eu/class/rate.class.php?id=" + id + "&rating=" + rating, true);
	XMLHTTP.onreadystatechange = function() { exe_rate(id); };
	XMLHTTP.send(null);
}

function exe_rate(id)
{
	if (XMLHTTP.readyState == 4) {
		var m = document.getElementById("vote" + id);
		m.innerHTML = XMLHTTP.responseText;
	}
}
// ]]>

function clearSearch()
{
	if(document.formSearch.inputSearch.value=='Suchen...') {
		document.formSearch.inputSearch.value='';
	}
}
function clearLogin()
{
	if(document.formLogin.username.value=='Benutzername'
	|| document.formLogin.password.value=='Passwort') {
		document.formLogin.username.value='';
		document.formLogin.password.value='';
	}
}
function switchDisplay(id) {
	if(document.getElementById(id).style.display=='block') {
		document.getElementById(id).style.display='none';
	} else {
		document.getElementById(id).style.display='block';
	}
}
