// marketingklick voting functions v1_170308
function vote(id, dir){
var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
        var file = 'vote.php?id='; 
    xmlhttp.open('GET', file + id + '&dir=' + dir , true); 
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) { 
                var content = xmlhttp.responseText; 
                if( content != 'n' ){ 
                      content = content.replace('y', ''); 
                                          document.getElementById('vote_' + id).innerHTML = content; 
                }
				if( content == 'n' ) {
					alert('Du hast für diese Frage schon abgestimmt!');
				}
        }
        }
        xmlhttp.send(null) 
return;
}