
timer=null;
text="";
ll=0;
ii=0;

function start1(cc)
{
        text=cc;
        ll=text.length;
        ii=0;
        lauf();
}

function lauf()
{
        document.lauftext.ticker.value=text.substring(ii,ll)+" "+text.substring(0,ii)
        ii++;
        if(ii>ll)ii=0;
        timer=setTimeout("lauf()",200);
}

function opensite()
{
        F1 = open("sitemap.html","Fenster1","width=500,height=300,screenX=0,screenY=0");
}


function chk_form_eingabe(DBAnfrage)
{
	if (DBAnfrage.stichwort.value == "" && DBAnfrage.raum.value == "" && DBAnfrage.jahr.value == "" &&  DBAnfrage.jahrbis.value == "")
	{
	alert("Sie haben kein Feld ausgefuellt! Bitte beachten Sie, dass mindestens ein Feld ausgefüllt sein muß!");
	DBAnfrage.stichwort.focus(); 
	return (false);
	}
	return (true);
}

function sendliteratur(dsid, cookie_yes, PHPSESSID)
{
        strcat = "litid="+dsid+"&cookie_yes="+cookie_yes+"&PHPSESSID="+PHPSESSID;
        F1 = window.open("geo_sendlit.php4?"+strcat,"Versenden","width=530,height=370,screenX=0,screenY=0");
}

function buch_titelcover(dsid, cookie_yes, PHPSESSID)
{
        strcat = "dsid="+dsid+"&cookie_yes="+cookie_yes+"&PHPSESSID="+PHPSESSID;
        F1 = window.open("geo_buch.php4?"+strcat,"Buchcover","width=530,height=370,screenX=0,screenY=0");
}

function getAmazonData(page, totalPages, totalRecords){
    // Methode mit der die Daten von Amazon angefordert werden
    // sendXmlHttpCall(url, parameters, callback, mimetype, tagname, action, resultString, requestHeader);
    if(page > totalPages){
       page=totalPages;
    }
    if(page < 1){
    	page=1;
    }
    var param= "&p=" + page + "&tp=" +totalPages + "&tr=" + totalRecords;
    sendXmlHttpCall('stichwortsuche.php5', "?" + param + "&" + session, callbackAmazonRequest, null, "dbContent", null, "xml", null);
}

function callbackAmazonRequest(tagName, action, resultString, resultType){
   var object = document.getElementById(tagName);
   object.innerHTML= resultString;
}

function getWebMappingBooks(page){
   var param= "&p=" + page;
   sendXmlHttpCall('webmappingBuecher.php5', "?" + param + "&" + session, callbackWebMappingBooks, null, "rightSideContent", null, "xml", null);
}

function callbackWebMappingBooks(tagName, action, resultString, resultType){
   var object = document.getElementById(tagName);
   object.innerHTML= resultString;
}
