function footerzeigen() {
var name = "sitecheck";
var domain = "beesign.com";
var ausgabe = "chio maisriml";
document.write('site-check.cc ist ein privates projekt von <a href="mailto:' + name + '@' + domain + '">');
document.write(ausgabe + '</a>');
document.write('<br/>powered by <a href="http://www.websitebaker2.org" target="_blank">websitebaker cms</a>');
}

function extraszeigen() {
/*w = top.document.body.clientWidth;
bild = '<img src="http://www.bw-zelte.de/nopics/scrw' + w + '.gif" width="1" height="1" border="0">';
document.write(bild);*/
}


function webmaster() {
var name = "sitecheck";
var domain = "beesign.com";
var ausgabe = "Chio Maisriml";
document.write('<a href="mailto:' + name + '@' + domain + '">' + ausgabe + '</a>');
}


function externlink(teil1, teil2) {
 window.open('http://' + teil1 + teil2);
}

function showloginbox() {
	document.getElementById("showlogin").style.display = 'none';
	document.getElementById("login-box").style.display = 'block';
}


var suchbegriff = '';
var qtimer;

function initsuggestion(q) {
	suchbegriff = q;
	window.clearTimeout(qtimer);
	qtimer = window.setTimeout(suchen, 100);
}

function suchen() {
	xmlhttpPostLink(xmlhttpPostLinkURL);
}

function wegdamit() {
	window.clearTimeout(qtimer);
	 document.getElementById("suggestbox").innerHTML = '';
	
}


//Ajax Script based on http://www.degraeve.com/reference/simple-ajax-example.php

function xmlhttpPostLink(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatesearchresults(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getthesearchresults());
}

function getthesearchresults() {   
	qstr = 'q=' + escape(suchbegriff); // NOTE: no '?' before querystring
    return qstr;
}

function updatesearchresults(str){
    document.getElementById("suggestbox").innerHTML = '<div class="ajax">'+str+'</div>';
}


//-------------------------------------------------------------

function showloginbox() {
	document.getElementById("showlogin").style.display = 'none';
	document.getElementById("login-box").style.display = 'block';
}

