Array.prototype.unique = function()
{
var o = {};
for(var i = 0 ; i < this.length; i++)
o[this[i]] = true;
var tmp = new Array();
for(var i in o) tmp[tmp.length] = i;
return tmp;
}
var Root = "/regio";
var Root_AH = "autobedrijven/";
var AS24Domain = "www.autoscout24.nl";
var TrackingLink = "http://tracking.quisma.com/c.cfs?pid=510543294S900402T&qulink=http://altfarm.mediaplex.com/ad/ck/7921-62579-17315-1?mpro=";
var OmnitureTracking = "&extcidm=7921a0041173150";
var country = "NL";
function RemoveCityListe(){
for (var i = document.form_ah.stadt.length; document.form_ah.stadt.length > 0; --i){
document.form_ah.stadt.options[i] = null;
}
return true;
}
function CityListe(BL,ABC,CityName){
var arrTmp = new Array();
var T1 = new Array();
var T2 = new Array();
var T3 = new Array();
var j = 0;
var k = 0;
var l = 0;
var NeuerEintrag = new Object();
var pfad = "";
/*
arrCitys[692] = "Erlbach|E|BY|bayern|erlbach|0";
*/
if(BL != ""){
for (var i = 0; i < arrCitys.length; ++i){
arrTmp = arrCitys[i].split("|");
if(arrTmp[2] == BL && arrTmp[1] != ""){//Buchstabe
T1[j] = arrTmp[1];
j=j+1;
if(ABC == ""){
ABC = T1[0];
}
}
if(arrTmp[2] == BL && arrTmp[1] == ABC){ // St�dte bei Buchstabe
//document.write(arrTmp[2]+"
");
T2[k] = arrTmp[0];
pfad = "";
pfad = "/"+arrTmp[3]+"/"+arrTmp[4]+"/"+Root_AH;
T3[k] = arrTmp[0];
//if(arrTmp[4] == CityName){
if(arrTmp[4] == CityName){
//alert(CityName + ": " + arrCitys[i]);
if(arrTmp[5] == "0"){
//pfad += "/suche";
}else{
}
NeuerEintrag = new Option(T2[k], T3[k], true, true);
}else{
NeuerEintrag = new Option(T2[k], T3[k], false, false);
}
document.form_ah.stadt.options[document.form_ah.stadt.length] = NeuerEintrag;
k=k+1;
}
}
var arrABC = T1.unique(); // Doppelte Buchstaben entfernen
arrABC.sort();
for (var i = 0; i < arrABC.length; ++i){
if(arrABC[i] != "undefined"){
if(arrABC[i] == ABC){
NeuerEintrag = new Option(arrABC[i], arrABC[i], true, true);
}else{
NeuerEintrag = new Option(arrABC[i], arrABC[i], false, false);
}
document.form_ah.buchstabe.options[document.form_ah.buchstabe.length] = NeuerEintrag;
}
}
}else{
arrCitys.sort();
for (var i = 0; i < arrCitys.length; ++i){
arrTmp = arrCitys[i].split("|");
if(arrTmp[0] != "" && arrTmp[1] != "" && arrTmp[1] != "-"){//Buchstabe
T1[j] = arrTmp[1];
j=j+1;
if(ABC == ""){
ABC = T1[0];
}
}
if(arrTmp[0] != "" && arrTmp[1] == ABC){ // St�dte bei Buchstabe
//document.write(arrTmp[2]+"
");
T2[k] = arrTmp[0];
pfad = "";
if(arrTmp[5] == "0"){
//pfad += "/suche";
}
pfad += "/"+arrTmp[3]+"/"+arrTmp[4]+"/"+Root_AH;
T3[k] = arrTmp[0];
//arrCitys[0] = "Assen|A|01|drenthe|assen|0";
if(arrTmp[4] == CityName){
NeuerEintrag = new Option(T2[k], T3[k], true, true);
}else{
NeuerEintrag = new Option(T2[k], T3[k], false, false);
}
document.form_ah.stadt.options[document.form_ah.stadt.length] = NeuerEintrag;
k=k+1;
}
}
var arrABC = T1.unique(); // Doppelte Buchstaben entfernen
for (var i = 0; i < arrABC.length; ++i){
if(arrABC[i] != "undefined"){
if(arrABC[i] == ABC){
NeuerEintrag = new Option(arrABC[i], arrABC[i], true, true);
}else{
NeuerEintrag = new Option(arrABC[i], arrABC[i], false, false);
}
document.form_ah.buchstabe.options[document.form_ah.buchstabe.length] = NeuerEintrag;
}
}
}
return;
}
function AH_submit(){
var Tracking
var custcity=document.form_ah.stadt.options[document.form_ah.stadt.selectedIndex].value; // stadt
var custname=document.form_ah.ahname.value; // H�ndlername
//var LinkTo = "http://" + AS24Domain + "/CustomerList.aspx?custcity="+custcity+"&country=" + country + "&custname="+custname+"&results=20&zipcountry=" + country + "&page=1&";
var LinkTo = "http://" + AS24Domain + "/CustomerList.aspx?custcity="+custcity+"&country=" + country + "&custname="+custname+"&results=20&zipcountry=" + country + "&page=1";
var TrLinkTo = TrackingLink + escape(LinkTo + OmnitureTracking);
//document.form_ah.action = Root + document.form_ah.stadt.options[document.form_ah.stadt.selectedIndex].value;
//document.form_ah.action = document.form_ah.stadt.options[document.form_ah.stadt.selectedIndex].value;
document.form_ah.action = LinkTo;
document.form_ah.submit();
}
function AH_submit2D(){
var Tracking
var custcity=document.form_ah.stadt.options[document.form_ah.stadt.selectedIndex].text; // stadt
var custname=document.form_ah.ahname.value; // H�ndlername
var LinkTo = "http://" + AS24Domain + "/CustomerList.aspx?custcity="+custcity+"&country=" + country + "&custname="+custname+"&results=20&zipcountry=" + country + "&page=1";
var TrLinkTo = TrackingLink + escape(LinkTo + OmnitureTracking);
document.form_ah.action = LinkTo;
document.form_ah.submit();
}
function AH_submit2(){
var Tracking
var custcity=document.form_ah_q.stadt.value; // stadt
var custname=document.form_ah_q.ahname.value; // H�ndlername
var cplz=document.form_ah_q.zip.value; // plz
var LinkTo = "http://" + AS24Domain + "/CustomerList.aspx?custcity="+custcity+"&country=" + country + "&custname="+custname+"&results=20&zipcountry=" + country + "&page=1";
var TrLinkTo = TrackingLink + escape(LinkTo + OmnitureTracking);
document.form_ah_q.action = TrLinkTo;
document.form_ah_q.submit();
}
var uplz;