function AdTags()	{ tick=2000; // adtag0.wbi

//AdTxt(hr,'-2','http://www.fahrzeugmarkt.ch/','/cgi/click.pl?tick','Startseite www.fahrzeugmarkt.ch');

AdTxt(1000,-2,'www.fahrzeugmarkt.ch/','_fz_ch.gif','Startseite www.fahrzeugmarkt.ch');
AdTxt(200,6,'leasing.htm','rech_k.gif','Leasing - Kredit - Finanzierung','Leasingrechner');
AdTxt(200,7,'kosten.htm','_sau_k.gif','Was kostet Ihr Auto pro Jahr oder km ?','Auto-Betriebskosten');
AdTxt(150,0,'autowert.htm','audis4k4.gif','Wieviel ist Ihr Auto Wert ?','Gratis-Autobewertung','');
AdTxt(150,0,'autowert.htm','mee200x8.gif','Wieviel ist Ihr Auto Wert ?','Gratis-Autobewertung','');
AdTxt(150,0,'autowert.htm','mesk09c4.gif','Wieviel ist Ihr Auto Wert ?','Gratis-Autobewertung','');
AdTxt(150,0,'autowert.htm','vwpassk1.gif','Wieviel ist Ihr Auto Wert ?','Gratis-Autobewertung','');
//AdTxt(1500,-3,'fzm-menu', '<small><a href="autowert.htm">Autobewertung</A> &nbsp; &nbsp; &nbsp; <a href="leasing.htm">Leasingrechner</A> &nbsp; &nbsp; &nbsp; <a href="kosten.htm">Auto-Betriebskosten</a> &nbsp; &nbsp; &nbsp; <a href="cgi/map.pl">CH-Karte</A></small><BR><a href="http://www.fahrzeugmarkt.ch/" Target="_top"><img src="pic/_fz_ch.gif" BORDER=0></a>');
//AdTxt(1000,8,'ubs.htm','rrsilve1.gif',"sFr 67'800'000'000.-","$ 600'000'000'000");


}
fz_menu='<TABLE BORDER=1 WIDTH=468 CELLPADDING=0 CELLSPACING=0 BGCOLOR="#ffffff"><TR><TH VALIGN=BOTTOM><small><a href="autowert.htm?ad">Autobewertung</A> - <a href="leasing.htm?ad">Leasingrechner</A> - <a href="kosten.htm?ad">Auto-Betriebskosten</a> - <a href="cgi/map.pl">CH-Karte</A> - <a href="cgi/picdsp.pl">Bildergalerie</A></small></TH></TR></TABLE>';
target=count=total=0;

function AdTxt(impressions, bg, file, carpic, text1, titel, text2)
{
//	target=-200000;
count += impressions;
if((count >= target)  )//  ||( (parseInt(file) > 10000) && (AdType == parseInt(file.substring(1,7)) ) ) )
    {
    imgcnt='<IMG SRC="/_adcount.gif?' + file + '&0&' + impressions + '&' + target + '" WIDTH=2 HEIGHT=2>';
    linkpath='http://www.fahrzeugmarkt.ch/';
    if(top.location.href.indexOf("file")==0)	{ linkpath='';}
    picpath= linkpath + 'pic/';
    if(bg < 0 )
	{
	toptarget='"';
	if(bg < -1) {toptarget='" TARGET="_top"';}
	if( bg == -3)
	  {
	  outstring= '<TABLE BORDER=0 WIDTH=470 HEIGHT=66 CELLPADDING=0 CELLSPACING=0><TR><TD VALIGN=BOTTOM ALIGN=CENTER>' + carpic + '<BR>' + imgcnt + '</TD></TR></TABLE>' ;
	  }
	else
	  {
          outstring= '<TABLE BORDER=0 WIDTH=470 HEIGHT=66 CELLPADDING=0 CELLSPACING=0><TR><TD VALIGN=BOTTOM><A HREF="http://' +file + toptarget + '><IMG SRC="'+ picpath + carpic +'"WIDTH=468 HEIGHT=60 BORDER=0 ALT="' + text1 + '"></A>' +imgcnt+ '</TR></TD></TABLE>'; 
	  }
	}
    else
      {
      if(bg==0) {bg=Math.ceil(1+Math.random()*6.99); }
      if(carpic != '-') 
	{
	if(!(text2))	{text2=titel +' &nbsp; '+ text1; }
	if(text2== '')	{text2=text1; }
	while(text2.indexOf('<BR>')>=0)
		{
		text2= text2.substring(0,text2.indexOf('<BR>'))+ ' - ' + text2.substring(4+text2.indexOf('<BR>'),text2.length );
		text2= text2.substring(0,text2.indexOf('<SMALL>'))+ ' ' + text2.substring(7+text2.indexOf('<SMALL>'),text2.length );
		text2= text2.substring(0,text2.indexOf('<\/SMALL>'))+ ' ' + text2.substring(8+text2.indexOf('<\/SMALL>'),text2.length );
		}
	carpic= '<IMG SRC="'+ picpath + carpic + '" BORDER=0 ALT="' + text2 +'">'; 
	}
      else { carpic=text2; }
      outstring='<TABLE BORDER=0 WIDTH=470 HEIGHT=66 CELLPADDING=0 CELLSPACING=0 BACKGROUND="' + picpath +'_wbg0'
	+bg	+'.gif" >'
		 +'<TR BACKGROUND="' + picpath +'_wbg0'
	+bg	+'.gif" >'
		 +'<TD BACKGROUND="' + picpath +'_wbg0'
	+bg	+'.gif" ALIGN=CENTER VALIGN=CENTER><A HREF="'+linkpath
	+file	+'"><H2><SMALL>'
	+text1	+'<BR></SMALL>'
	+titel	+'</H2></TD>'
		+'<TD BACKGROUND="' + picpath +'_wbg0'
	+bg	+'.gif" ALIGN=CENTER VALIGN=CENTER><A HREF="'+linkpath
	+file	+'"><SMALL>'
	+carpic	+'</SMALL></A>'
	+imgcnt	+'</TD></TR></TABLE>' ;
      }
    count = -100000;
    if(target < 0) outstring= outstring + impressions +' &nbsp; <SMALL>' + Math.floor(( tick / imptotal)*impressions) + '</SMALL><BR><BR>\n';
    outstring+=fz_menu;
    document.writeln(outstring);
    }
}
timdat=new Date(); md =timdat.getDate(); mon=1+ timdat.getMonth(); today=(mon * 0.01)+ ( md * 0.000099999999);
hr=timdat.getHours(); if((hr > 22)||(hr < 12)) {hr+=100;}
count=-1000000;
AdTags();
imptotal=Math.floor(count)+1000000;
target=Math.random() * (count + 1000000);
count=1;
if(self == top) count=1000000;
AdTags();

