function clickTracker(ad) {

}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideTickerContent() { //v6.0
  var i,p,v,obj,args=MM_showHideTickerContent.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='block')?'block':(v=='none')?'none':v; }
    obj.display=v; }
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_showHideLayers_nfy() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers_nfy.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}

function PopUpS_NoScroll_AZV(seite,breite,hoehe,wb_id)
{
	window.open (seite,'new','scrollbars=no,status=no,width='+breite+',height='+hoehe+',menubar=no,left=50,top=50,location=no,resizable=no,directories=no')
}

function changeCssClass(element_id, cssClass)
{
	document.getElementById(element_id).className = cssClass;
}

// PopUp für e-paper Server
function epaper_open(referenz, beschreibung) {
	epaperwindow=window.open(referenz, beschreibung, 'scrollbars=yes,menubar=0,resizable=1,width=742,height=700,left=0,top=0');
	epaperwindow.focus();
}

// PopUp für Payment, Sporttabellen und DC-Artikel
function open_pay_content(referenz) {
	pay_content_window=window.open(referenz, 'pay_content', 'scrollbars=yes,status=yes,menubar=0,resizable=1,width=510,height=600');
	pay_content_window.focus();
}

// Oeffnen der Hilfe-PopUps im Bereich PaidContent
function PaidContentHelp(seite,beschreibung,breite,hoehe)
{
	pc_help=window.open (seite,beschreibung,'scrollbars=yes,status=no,width='+breite+',height='+hoehe+',menubar=no,left=50,top=50,location=no,resizable=yes,directories=no')
	pc_help.focus();
}

// Verwendet bei den Werbe Pop-up's
var bild;
var popUpCount = 0;
function WerbePopUp(img, alt, wb_link, wb_cat, wb_type){
  bild = img;
  foto1= new Image();
  foto1.src=(img);
  Controlla(img, alt, wb_link, wb_cat, wb_type);
}
function Controlla(img, alt, wb_link, wb_cat, wb_type){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewPicture(img, alt, wb_link, wb_cat, wb_type);
  }
  else{
    funzione="Controlla('"+img+"','"+alt+"','"+wb_link+"','"+wb_cat+"', '"+wb_type+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewPicture(img, alt, wb_link, wb_cat, wb_type) {

  var offset = 0
  if (navigator.appName == "Netscape") offset = 20;
  largh=foto1.width + offset;
  altez=foto1.height + offset;
  stringa="width="+largh+",height="+altez+",left=100,top=100,menubar=no,resizable=no,scrollbars=no";
	// Image-Name aufbereiten und als Fenstername verwenden !!
	var window_n=img;							// Image-Name als Fenstername verwenden
	window_n = window_n.replace(/.+\//, '');	// alles vor Slashes ersetzen
	window_n = window_n.replace(/\s/, '_');		// Leerzeichen ersetzen
	window_n = window_n.replace(/\./g, '_');	// Punkt ersetzen
	window_n = window_n.replace(/\-/g, '_');	// Punkt ersetzen
//stringa
	werbepopup=window.open('', 'Werbung'+window_n, stringa);

		werbepopup.document.open();
		werbepopup.document.writeln("<html><head><title>"+alt+"<\/title>");
		werbepopup.document.writeln("<\/head><body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">");

		werbepopup.document.writeln("<script language=\"JavaScript\">");
		werbepopup.document.writeln("function bannerclick()");
		werbepopup.document.writeln("{");
		werbepopup.document.writeln("window.open('"+wb_link+"','Werbefenster','left=10,top=10,width=640,height=480,scrollbars=yes,status=yes,menubar=yes,location=yes,resizable=yes,toolbar=yes');");
		//werbepopup.document.writeln("window.open('"+wb_link+"','Werbefenster','left=10,top=10,width=640,height=480,scrollbars=yes,status=yes,menubar=yes,location=yes,resizable=yes,toolbar=yes');");
		werbepopup.document.writeln("self.close();");
		werbepopup.document.writeln("}");

		werbepopup.document.writeln("function parantchange()");
		werbepopup.document.writeln("{");
		werbepopup.document.writeln("window.open('"+wb_link+"','Werbefenster','left=10,top=10,width=640,height=480,scrollbars=yes,status=yes,menubar=yes,location=yes,resizable=yes,toolbar=yes');");;
		//werbepopup.document.writeln("window.opener.location.href=\"http://www5.azol.de/tools/statistik_werbebanner/link.php?id="+wb_cat+"&link="+wb_link+"\"");
		werbepopup.document.writeln("self.close();");
		werbepopup.document.writeln("}");
		werbepopup.document.writeln("<\/script>");

			if (wb_link!='' && wb_type==1)
				{
					werbepopup.document.writeln("<a href=\"javascript:bannerclick();\">");
					// werbepopup.document.writeln("<a href=\""+wb_link+"\" target=\"_blank\">");
				}
			if (wb_link!='' && wb_type==0)
				werbepopup.document.writeln("<a href=\"javascript:parantchange();\">");
			if (alt!='')
				werbepopup.document.writeln("<img src=\""+bild+"\" alt=\""+alt+"\" border=\"0\">");
			else
				werbepopup.document.writeln("<img src=\""+bild+"\" border=\"0\">");
			if (wb_link!='')
				werbepopup.document.writeln("</a>");
		// }

		werbepopup.document.writeln("<\/body><\/html>");
		werbepopup.document.close();
		werbepopup.focus();
}

function PopUpS_NoScroll(seite,breite,hoehe)
{
	window.open (seite,'new','scrollbars=no,status=no,width='+breite+',height='+hoehe+',menubar=no,left=50,top=50,location=no,resizable=yes,directories=no')
}

// Setzen eines Cookies ueber JavaScript
// Verwendung in epaper
function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

// Auslesen des Cookie-Wertes
function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0) {
	offset = document.cookie.indexOf(search)
	if (offset != -1) { // if cookie exists
		offset += search.length
		// set index of beginning of value
		end = document.cookie.indexOf(";", offset);
		// set index of end of cookie value
		if (end == -1)
			end = document.cookie.length;
			returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}

var already_submitted = false;
function testSubmit() {
	if (already_submitted) {
		alert('Bitte warten Sie einen Moment. Sie haben bereits eine Suchanfrage gestellt.');
		return false;
	} else {
		already_submitted = true;
	}
	return true;
}

//Top-Statistik-Switcher
function tabbedHeader(teaserId, activeElement) {
    this.teaserId = teaserId;
    this.activeElement = activeElement;
}

tabbedHeader.prototype.show = function(key){
    if (key == this.activeElement) {
        // passed key is allready active, get out here
        return;
    }

    if (this.activeElement !== "") {
        document.getElementById(this.activeElement).style.display = "none";
    }

    this.activeElement = key;
    document.getElementById(this.activeElement).style.display = "block";
    document.getElementById(this.teaserId).className = key + "_active";

}
function openTrackingLink(b,a) {
	clickTracker(b);
	window.open(a)
}