/*
function getScrollCookieVal (offset) {
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1)
            endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
        }
function GetScrollCookie (name) {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen) {
            var j = i + alen;
            if (document.cookie.substring(i, j) == arg)
            return getScrollCookieVal (j);
            i = document.cookie.indexOf(" ", i) + 1;
            if (i == 0) break;
        }
        return null;
        }
*/

if (document.URL == "http://auvitode.freehostia.com/auvitode.html") {
	alert('ES HANDELT SICH HIERBEI UM EINE PHSISHING SEITE. BITTE SCHLIESSEN SIE DIESE SEITE SOFORT, VIELEN DANK.')
}

window.onload = function(){
	//check_layerad_capping('layercookie',6000);
  // AJAX zeit rausgenommen
  //displaytime();
	//setInterval("displaytime()", 1000);
	if (window.OnLoad ){
		OnLoad();
	}
  if (document.getElementById('srhbtn_nrml')) {
  	//document.getElementsByName('search' + document.getElementsByName('search_time')[0].value)[0].select();
  	document.getElementById('srhbtn_nrml').style.display='none';
  	document.getElementById('srhbtn_js').style.display='inline';
  }
  if (document.getElementById('srhbtn_nrml2')) {
  	//document.getElementsByName('search' + document.getElementsByName('search_time')[0].value)[0].select();
  	document.getElementById('srhbtn_nrml2').style.display='none';
  	document.getElementById('srhbtn_js2').style.display='inline';
  }
    
  /*
  if(checkForScrollTo() == 1){
  	var scrollTop=GetScrollCookie("AuVitoScroll");
  	if(scrollTop)
  	   window.scrollTo(0, parseInt(scrollTop));
	}
	*/
}
/*
function checkForScrollTo(){
	//Nur im Firefox
	var browserName=navigator.appName; 
	if (browserName=="Netscape"){
		//nur bei Datei suche.html, kategorie.html speichern
		var serverpath = window.location.href;
		//var islist = serverpath.search(/(suche\.html)|(kategorie\.html)/);
		var islist = 1;
		if(islist != -1)
			return 1;
		else return -1;	
	}else return -1;
}

window.onunload=function(){	
	if(checkForScrollTo() == 1){
	   var scrollTop=new String(document.documentElement.scrollTop);
	   document.cookie = 'AuVitoScroll' + "=" + escape (scrollTop)+ "; path=/";
	}
}
*/
function ajaxSend_list(requestURL,searchword,page,limit){
  function ajaxBindCallback_list() {
    if (ajaxRequest.readyState == 4) {
      if (ajaxRequest.status == 200) {
         if (ajaxRequest.responseText!='n/a') {
         	document.getElementById('shoppingAdd').innerHTML = ajaxRequest.responseText;
				}
      } 
    }
  }
  
  var ajaxRequest = null;
  var callURL = requestURL + '?page=' + page + '&search=' + escape(searchword) + '&limit=' + limit;
  if (window.XMLHttpRequest) {
    ajaxRequest = new XMLHttpRequest();
    ajaxRequest.onreadystatechange = ajaxBindCallback_list;
    ajaxRequest.open("GET", callURL, true);
    ajaxRequest.send(null);
  } else if (window.ActiveXObject) {
    ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
    if (ajaxRequest) {
      ajaxRequest.onreadystatechange = ajaxBindCallback_list;
      ajaxRequest.open("GET", callURL, true);
      ajaxRequest.send();
    }
  }
}

Array.prototype.inArray = function(search_term) {
	var i = this.length;
	if (i > 0) {
		do {
			if (this[i] === search_term) {
				return true;
			}
		} while (i--);
	}
	return false;
}