

var xmlHttp = false;

// Internet Explorer
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
// Mozilla, Opera und Safari
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}


loadData();


function loadData(){
 if (xmlHttp) {
     xmlHttp.open('GET', 'get_entry.php', true);
     xmlHttp.onreadystatechange = function () {
         if (xmlHttp.readyState == 4) {
             document.getElementById("entrys").innerHTML = xmlHttp.responseText;
         }
     };
     xmlHttp.send(null);
 }
}


function saveData(){
	//var emailcheck=0;
	//if(document.body.gb.showmail.checked==true){ emailcheck='30'} else { emailcheck='20' }
	if (xmlHttp) {
		xmlHttp.open('POST', 'send_entry.php');
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		
		xmlHttp.send('name='+document.gb.name.value+'&subject='+document.gb.subject.value+'&mail='+document.gb.mail.value+'&showmail='0+'&message='+document.gb.message.value);
	}
document.gb.name.value = '';
document.gb.subject.value = '';
document.gb.mail.value = '';
document.gb.showmail.checked = false;
document.gb.message.value = '';
showbox('entry');


}

setInterval("loadData()",3000);