var http_request = false;
function getList(cid,type) {
http_request = false;
if (window.XMLHttpRequest) {
http_request = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}}}
if (!http_request) { return false; }
http_request.open('GET', '/ajax.php?cid=' + cid + '&type=' + type, true);
http_request.onreadystatechange = alertInhalt;
http_request.send(null);}

function alertInhalt() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
var answer = http_request.responseText;
if(document.getElementById("anbieterliste").innerHTML != answer){
document.getElementById("anbieterliste").innerHTML = answer;
}else{ document.getElementById("anbieterliste").innerHTML = "";} } } }

function redirect(form) { var myindex=form.sel.selectedIndex; if (form.sel.options[myindex].value != "0") { location=form.sel.options[myindex].value; } }

function getCode(id,code) { alert("Ihr Gutscheincode lautet:\n\n" + code + "\n\nSie werden jetzt direkt zum Anbieter weitergeleitet."); document.getElementById('gc' + id).innerHTML = '<a href="/link/gutscheine/' + id + '/">' + code + '</a>'; window.open('/link/gutscheine/' + id + '/'); }

function showCode(id,code) { document.getElementById('gc' + id).innerHTML = '<div class="gbcode"><img src="http://www.gutscheinbox.de/gfx/tag_blue.png" alt="" /> Ihr Gutscheincode: ' + code + '</div>'; document.getElementById('gi' + id).innerHTML = '<br />Die Website wurde direkt hinter Ihrem aktuellen Fenster ge\u00f6ffnet. Geben Sie den Gutscheincode <b>' + code + '</b> einfach beim Bezahlvorgang ein.'; nwin = window.open('/link/gutscheine/' + id + '/', '_blank','toolbar=1,location=1,directories=1,scrollbars=1,resizable=1,status=1,menubar=1'); nwin.blur(); window.focus(); }

function inputHelp(name,wert) { sin = document.getElementById(name); if(sin.value==wert) sin.value=''; sin.style.color='black'}

function showBargeld() { document.getElementById('klick-bargeld').style.backgroundColor='#dff4ff'; document.getElementById('klick-gutschein').style.backgroundColor='#fff'; document.getElementById('top-bargeld').style.display='block'; document.getElementById('top-gutschein').style.display='none'; }

function showGutschein() { document.getElementById('klick-gutschein').style.backgroundColor='#dff4ff'; document.getElementById('klick-bargeld').style.backgroundColor='#fff'; document.getElementById('top-gutschein').style.display='block'; document.getElementById('top-bargeld').style.display='none'; }