
//	alert(location.href.indexOf("m/fzm/")+ " =  " + location.href + " : "+ document.title);
if(( location.href.indexOf("m/fzm/") >0 )||(document.title == "KILLED"))
	{
	top.location.href="http://www.fahrzeugmarkt.ch/";
	}
else
  {
  if(self == top)
    {
//    if((location.href).lastIndexOf("file") < 0)
      {
//	alert(self.location.href +" >> "+ location.href);
      k =location.href;
      if(k.indexOf("?") > 0)
	{
	k=location.href.substring(0, location.href.indexOf("?"))
	}
      i =k.lastIndexOf("/")+1;
      x=location.href.substring(0,i-1);
      z=location.href.substring(i, location.href.indexOf(".",i));
      y="";
//	alert(i +" "+ z +" >> "+x);
      for(j=0; j < document.links.length; j++)
	{
//	alert(document.links[j].href);
	if(document.links[j].href.lastIndexOf("google.c") > 0)
		{
//		y='google';
//		document.write('<NOSCRIPT>');
		break;
		}
	if((j>1)&&(document.links[j].href.lastIndexOf("/") > 8)&&(document.links[j].href.lastIndexOf(".htm?ad") < 1))
	  {
	  if(x == document.links[j].href.substring(0, document.links[j].href.lastIndexOf("/") ) )
	    {
	    if(	   (y == "") && (x == document.links[j].href.substring(0, document.links[j].href.lastIndexOf("/") ) ) && (document.links[j].href.substring(i, document.links[j].href.indexOf(".", i )) != z))
	      {
	      y="." + document.links[j].href.substring(i, document.links[j].href.indexOf(".", i ));
	      if(y == ".faxhlp") y=".garagen";
	      y="";
	      }  
	    else if( (document.links[j].href.substring(document.links[j].href.indexOf("?",i),document.links[j].href.length)).length == 4)
	      {
	      y="";
	      break;
	      }
	    }
	  }
	}
      if(y!='google')
	{
//	a =(location.href).substring(0,i) + "main.htm?" + (location.href).substring(i,(location.href.lastIndexOf("."))) + y;
//	a = "http://www.fahrzeugmarkt.ch/main.htm?" + (location.href).substring(i,(location.href.lastIndexOf("."))) + y;
	a = "/main.htm?" + (location.href).substring(i,(location.href.lastIndexOf("."))) + y;
	if(document.images)
		location.replace(a);
	else
    		location.href= (a);
	}
      }
    }
  else
    {
    if(document.forms.fahrzeuge)
      {
      i=location.href.substring(location.href.lastIndexOf("/")+1, location.href.lastIndexOf(".htm")) - 71944250;
      if((i >= 0) && (i < document.forms.fahrzeuge.auswahl.length))
	{
	document.forms.fahrzeuge.auswahl.selectedIndex=i;
	}
      }
    if(top.PIC)
	{
	if(location.href.lastIndexOf("?") > 0) 
          {
          if(top.PIC.carselect)
            {
//	    top.PIC.AddHistory();
            }
	  }
        if(top.PIC.AddMail)
	  {
          top.PIC.AddMail();
	  }
	}
    }
  }
