
	var camperSearchUrl = i5.extend({
	    	// 85 * 25 * NEngines = 2125 * NENGINES
    	i6:88,
    	MAXMOTORMODELS:50,
  	    init:function(baseUrl,name){
  			this.$.init.call(this,baseUrl,name);
	  	    this.l9[this.a1]["stradale"] = "stradale";
	  	    this.l9[this.a1]["cross"] = "cross";
	  	    this.l9[this.a1]["trial"] = "trial";
	  	    this.v8[this.a1]["benzina"] = "benzina";

	  	    this.l2[this.a1] = new Array(this.i6);

		}
	});

	var SMCamperEngine = camperSearchUrl.extend({

  	    construct:function(baseUrl,name){
  			this.$.init.call(this,baseUrl,name);
  			this.n3[this.a1]["un`agenzia"] = "0";
  			this.n3[this.a1]["un privato"] = "1";
			this.l2[this.a1]["ADRIA"]=1;
			this.l2[this.a1]["ADRIATIK"]=2;
			this.l2[this.a1]["AIESISTEM"]=4;
			this.l2[this.a1]["ALLCAR"]="95";
			this.l2[this.a1]["ALPITRAILER"]="5";
			this.l2[this.a1]["ALTRO"]="95";
			this.l2[this.a1]["ARCA"]="6";
			this.l2[this.a1]["ARK DESIGN"]="7";
			this.l2[this.a1]["AUTOROLLER"]="8";
			this.l2[this.a1]["AZ SYSTEM"]="10";
			this.l2[this.a1]["BAVARIA"]="96";
			this.l2[this.a1]["BENIMAR"]="13";
			this.l2[this.a1]["BIMOBIL"]="14";
			this.l2[this.a1]["BLUCAMP"]="15";
			this.l2[this.a1]["BURSTNER"]="16";
			this.l2[this.a1]["CAMPERTRE"]="19";
			this.l2[this.a1]["CARAVANS INTERNATIONAL"]="20";
			this.l2[this.a1]["CARAVELAIR"]="21";
			this.l2[this.a1]["CARTHAGO"]="22";
			this.l2[this.a1]["CHALLENGER"]="23";
			this.l2[this.a1]["CHATEAU"]="24";
			this.l2[this.a1]["CHAUSSON"]="25";
			this.l2[this.a1]["CI"]="26";
			this.l2[this.a1]["CONCORDE SKV"]="28";
			this.l2[this.a1]["CRISTALL"]="29";
			this.l2[this.a1]["DEHLER"]="30";
			this.l2[this.a1]["DETHLEFFS"]="32";
			this.l2[this.a1]["DREAM"]="33";
			this.l2[this.a1]["DUEERRE"]="34";
			this.l2[this.a1]["EIFELLAND"]="35";
			this.l2[this.a1]["ELNAGH"]="36";
			this.l2[this.a1]["EURAMOBIL"]="38";
			this.l2[this.a1]["EVM SYSTEM"]="39";
			this.l2[this.a1]["FENDT"]="41";
			this.l2[this.a1]["FIAT"]="44";
			this.l2[this.a1]["FORD"]="46";
			this.l2[this.a1]["FRANKIA"]="47";
			this.l2[this.a1]["GIOTTILINE"]="48";
			this.l2[this.a1]["GRANDUCA"]="49";
			this.l2[this.a1]["HOBBY"]="50";
			this.l2[this.a1]["HYMER"]="51";
			this.l2[this.a1]["JOINT CAMPING CAR"]="54";
			this.l2[this.a1]["KENTUCKY CAMP"]="56";
			this.l2[this.a1]["KNAUS"]="57";
			this.l2[this.a1]["LAIKA"]="58";
			this.l2[this.a1]["LMC"]="61";
			this.l2[this.a1]["MC LOUIS"]="62";
			this.l2[this.a1]["MERCEDES"]="63";
			this.l2[this.a1]["MILLER"]="64";
			this.l2[this.a1]["MIRAGE"]="65";
			this.l2[this.a1]["MOBILVETTA"]="66";
			this.l2[this.a1]["MONCAYO"]="68";
			this.l2[this.a1]["NEW FLORENCECAMPER"]="69";
			this.l2[this.a1]["NIESMANN-BISCHOFF"]="70";
			this.l2[this.a1]["OVERCAR"]="71";
			this.l2[this.a1]["PILOTE"]="73";
			this.l2[this.a1]["POSSL"]="74";
			this.l2[this.a1]["RAPIDO"]="75";
			this.l2[this.a1]["RIMOR"]="76";
			this.l2[this.a1]["ROLLER TEAM"]="77";
			this.l2[this.a1]["S.E.A."]="78";
			this.l2[this.a1]["SHARKY"]="79";
			this.l2[this.a1]["STERCKEMAN"]="80";
			this.l2[this.a1]["SUN LIVING"]="81";
			this.l2[this.a1]["TABBERT"]="83";
			this.l2[this.a1]["TRIGANO"]="85";
			this.l2[this.a1]["USA ENTERPRISE"]="86";
			this.l2[this.a1]["VAS"]="87";
			this.l2[this.a1]["VOLKSWAGEN"]="89";
			this.l2[this.a1]["WEINSBERG"]="90";
			this.l2[this.a1]["WESTFALIA"]="91";
			this.l2[this.a1]["WILK"]="92";
			this.l2[this.a1]["WINGAMM"]="93";
			this.l2[this.a1]["XGO"]="94";

   		},
  		
  		displayMode:function(){
			return f_9.n_4;
			
		},


		n_1:function(txt){
		    var res="";
		    if(txt.indexOf("<h2>Nessun risultato. Perfeziona la tua ricerca.</h2></div>") >= 0)
				return 0;
		    var offset = txt.indexOf("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
			if(offset > -1) 
				res = txt.substring(offset + "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">".length,offset + 400);
			else
				return 0;

		    var offset = txt.indexOf("<h1>");
			if(offset > -1) 
				res = txt.substring(offset + "<h1>".length,offset + 250);
			else
				return 0;
				
		    offset = res.indexOf("annunci");
			if(offset > -1) 
				res = res.substring(0,offset).trim();
			else
				return 0;

			return res;	
				
			 
		
		},		

		l3:function(motorMaker,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&CARAVAN_MODEL/MAKE=motorMakerX";
			this.$.l3.call(this,motorMaker,obj);
			if(obj.motorMaker == 95)
				obj.b2(motorMaker);			
			    
				


		},

		l4:function(motorModel,obj){
			obj.b2(motorModel);			
		},

		h9:function(mainCity,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&areaId=areaIdX";
			obj.mainCity = obj.h2[obj.a1][mainCity];
			this.$.h9.call(this,mainCity,obj);
		},

		i1:function(areaId,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&areaId=areaIdX";
			obj.mainCity = obj.o9[obj.a1][areaId];
			this.$.i1.call(this,areaId,obj);
		},

		b3:function(priceFrom){
			this.$.b3.call(this,priceFrom);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&PRICE_FROM=price_fromX";

		},
		b2:function(keyword){

			if(this.a4[this.a1][this.a3].indexOf("&keyword=keywordsX") < 0){
				this.a3++;
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&keyword=keywordsX";
			}
			else{
				this.a3++;
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1];
			}

    		this.$.b2.call(this,keyword);

    		},

		u8:function(x2,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&YEAR_MODEL_FROM=x2X&YEAR_MODEL_TO=2009";
			this.$.u8.call(this,x2,obj);

		},

		n9:function(sellerType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&ISPRIVATE=sellerTypeX";
			this.$.n9.call(this,sellerType,obj);

		},


		u9:function(v7,obj){
			obj.a3++;
			if(v7 == "kilometri zero")
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&VEHICLE_OFFER=20";
			else{
				this.$.u9.call(this,v7,obj);
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&MILEAGE_FROM=0&MILEAGE_TO=v7X";
			}
		},

		b4:function(priceTo){
			this.$.b4.call(this,priceTo);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&PRICE_TO=price_toX";

		}

	});


	var ebayUrlCamperEngine = camperSearchUrl.extend({
		x1:"",		
  	    construct:function(baseUrl,name){
  			this.$.init.call(this,baseUrl,name);
 			this.$.init.call(this,baseUrl,name);




  		},


		displayMode:function(){
			return f_9.n_4;
			
		},


		n_1:function(txt){
		    var res="";
		    if(txt.indexOf("<h2>Nessun risultato. Perfeziona la tua ricerca.</h2></div>") >= 0)
				return 0;
		    var offset = txt.indexOf("</span> <span class='matchClass'>risultati per");
			if(offset > -1)
				res = txt.substring(0,offset);
			else{
			    var offset = txt.indexOf("<span class='countClass'>");
				if(offset > -1){
					res = txt.substring(offset + "<span class='countClass'>".length,offset + 100);
				    var offset = res.indexOf("<");
					res = res.substring(0,offset);
					return m_2.replaceDot(res.trim());

				}
				else	 
					return 0;

			}	

		    var offset = res.lastIndexOf(">");
			if(offset > -1) 
				res = res.substring(offset + 1,offset + 10);
			else
				return 0;
				

			return m_2.replaceDot(res);	
				
			 
		
		},

		l3:function(motorMaker,obj){
			obj.a3++;
			obj.x1 = motorMaker;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&_nkw=" + motorMaker ;

		},

		l4:function(motorModel,obj){
			obj.a3++;			
			if(obj.a4[obj.a1][obj.a3 - 1].indexOf("&_nkw=") < 0)			
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&_nkw=" + motorModel ;
			else
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "+" + motorModel ;
				
		},


		l5:function(motorType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQTipoZmotorTypeX";
			this.$.l5.call(this,motorType,obj);

		},

		l6:function(fuelType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQAlimentazioneZfuelTypeX";
			this.$.l6.call(this,fuelType,obj);


		},

		u7:function(v4,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQColoreZv4X";
			obj.v4 = v4.toCapitalCase();
		},

		v1:function(x4,obj){
			obj.a3++;
			if(this.$.v1.call(this,x4,obj) == 0){
				if(obj.a4[obj.a1][obj.a3 - 1].indexOf("QQAccessoriQ2520eQ2520OptionalZx4") < 0){
					obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQAccessoriQ2520eQ2520OptionalZx4X";
					this.$.v1.call(this,x4,obj);
				}
				else{
					obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  +  "Q7c" + obj.v3[obj.a1][x4];
				}
			}	
			else
					obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];
			
		},



		h9:function(mainCity,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQ_flnZ1QQ_fposZareaIdXQQ_fsptZ1QQ_sadisZ100QQ_ssovZ1";
			obj.mainCity = obj.h5[mainCity];
			this.$.h9.call(this,mainCity,obj);
		},

		i1:function(areaId,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&areaId=areaIdX";
			obj.mainCity = obj.o9[obj.a1][areaId];
			this.$.i1.call(this,areaId,obj);
		},


		b3:function(priceFrom){
			var prcFrom = "";
			if(priceFrom != "0")
				prcFrom = priceFrom.replace("000","");
			else
				prcFrom = priceFrom;
				 
			this.$.b3.call(this,prcFrom);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "QQLHQ5fPriceZprice_fromXQ2e000";

		},
		b2:function(keyword){

			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1];
    		this.$.b2.call(this,m_2.replaceSpaceWithMinus(keyword + "_"));

    		},

		u8:function(x2,obj){ //Ver
			var years="2009Q72008Q72007Q72006Q72005Q72004Q72003Q72002Q72001Q72000Q71999Q71998Q71197Q71996Q71995Q71994Q71993Q71992Q71991Q71990";
			x2 = years.substring(0,years.indexOf(x2) + 4);
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&QQDataQ2520diQ2520immatricolazioneZx2X";
			this.$.u8.call(this,x2,obj);

		},

		n9:function(sellerType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "QQConcessionarioQ252FPrivatoZsellerTypeX";
			this.$.n9.call(this,sellerType,obj);

		},


		u9:function(v7,obj){
	  			switch(v7){
	  				case "kilometri zero":
	  					obj.v7 = "QQChilometraggioZMenodi1000Km56e076e3";
	  					break;
	  				case "5000 km":
	  					obj.v7 = "QQChilometraggioZMenodi1000Km56e076e3Q7c1001a10000Km6de587f6";
	  					break;
	  				case "20000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520Km";
	  					break;
	  				case "40000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520Km";
	  					break;
	  				case "60000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520Km";
	  					break;
	  				case "80000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520Km";
	  					break;
	  				case "100000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520Km";
	  					break;
	  				case "125000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520KmQ7c100Q252E001Q2520aQ2520150Q252E000Q2520Km";
	  					break;
	  				case "150000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520KmQ7c100Q252E001Q2520aQ2520150Q252E000Q2520Km";
	  					break;
	  				case "200000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520KmQ7c100Q252E001Q2520aQ2520150Q252E000Q2520KmQ7c150Q252E001Q2520Km";
	  					break;
	  				case "250000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520KmQ7c100Q252E001Q2520aQ2520150Q252E000Q2520KmQ7c150Q252E001Q2520Km";
	  					break;
	  				case "300000 km":
	  					obj.v7 = "QQChilometraggioZMenoQ2520diQ25201Q252E000Q2520KmQ7c1Q252E001Q2520aQ252010Q252E000Q2520KmQ7c10Q252E001Q2520aQ252025Q252E000Q2520KmQ7c25Q252E001Q2520aQ252050Q252E000Q2520KmQ7c50Q252E001Q2520aQ252075Q252E000Q2520KmQ7c75Q252E001Q2520aQ2520100Q252E000Q2520KmQ7c100Q252E001Q2520aQ2520150Q252E000Q2520KmQ7c150Q252E001Q2520Km";
	  					break;

	  			}

			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "v7X";
		},

		b4:function(priceTo){
			var prcTo = "";
			if(priceTo != "0")
				prcTo = priceTo.replace("000","");
			else
				prcTo = priceTo;
				 
			this.$.b4.call(this,prcTo);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "Q2eQ2eprice_toXQ2e000";

		}

	});


	var tuttoRuoteCamperEngine = camperSearchUrl.extend({

  	    construct:function(baseUrl,name){

	  			this.$.init.call(this,baseUrl,name);


                this.u6[this.a1]["Arancio"] = "Arancio"
            	this.u6[this.a1]["Argento"] = "Argento"
            	this.u6[this.a1]["Azzurro"] = "Azzurro"
            	this.u6[this.a1]["Beige"]   = "Beige"
            	this.u6[this.a1]["Bianco"]  = "Bianco"
            	this.u6[this.a1]["Blu"]     = "Blu"
            	this.u6[this.a1]["Bronzo"]  = "Bronzo"
            	this.u6[this.a1]["Giallo"]  = "Giallo"
            	this.u6[this.a1]["Grigio"]  = "Grigio"
            	this.u6[this.a1]["Marrone"] = "Marrone"
            	this.u6[this.a1]["Nero"]    = "Nero"
            	this.u6[this.a1]["Rosso"] = "Rosso"
            	this.u6[this.a1]["Verde"] = "Verde"

				this.keywordsClear = true;


  		},

		displayMode:function(){
			return f_9.n_4;
			
		},


		n_1:function(txt){
		    var res="";
		    if(txt.indexOf("Trovati 0 record. Effettua una nuova ricerca.") >= 0)
				return 0;
				
		    var offset = txt.indexOf("Trovati <span class=\"red\"><strong>");
			if(offset > -1){ 
				res = txt.substring(offset + "Trovati <span class=\"red\"><strong>".length,offset + 100);
			    offset = res.indexOf("<");
				if(offset > -1) 
					res = res.substring(0,offset);
					return res;
			}
			else
				return 0;
			
			 
		
		},


		l3:function(motorMaker,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&marca=motorMakerX";
			obj.motorMaker = m_2.replaceSpaceWithPlus(motorMaker.toCapitalCase());


		},

		u7:function(v4,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&colore=v4X";
			this.$.u7.call(this,v4,obj);

		},

		v1:function(x4,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];
		},

		n9:function(sellerType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + obj.n3[obj.a1][sellerType];
		},

		l4:function(motorModel,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&modello=motorModelX";
			obj.motorModel = m_2.replaceSpaceWithPlus(motorModel.toCapitalCase());


		},

		l5:function(motorType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&categ=motorTypeX";
			this.$.l5.call(this,motorType,obj);

		},

		l6:function(fuelType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&carbu=fuelTypeX";
			this.$.l6.call(this,fuelType,obj);

		},

		u8:function(x2,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&imm=x2X";
			this.$.u8.call(this,x2,obj);

		},

		setVersion:function(version,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];
			obj.motorModel = obj.motorModel + "+" + version;	
		},


		h9:function(mainCity,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&prov=areaIdX";
			obj.mainCity = obj.p_3[mainCity];
			this.$.h9.call(this,mainCity,obj);
		},

		i1:function(areaId,obj){
			var str="";
			var counter=0;
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "&prov=areaIdX";
			for(city in obj.v5){
				if(obj.v5[city] == areaId && counter != 0 && obj.h5[city] != undefined){
					str = str + "&zip=" + obj.h5[city];
					counter++;

				}
				else if(obj.v5[city] == areaId && counter == 0){
					str =  obj.h5[city];
					counter++;
				}

			}
			obj.mainCity = str;
			this.$.i1.call(this,areaId,obj);
		},


		b3:function(priceFrom){
			this.$.b3.call(this,priceFrom);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&lire1=price_fromX";

		},

		u9:function(v7,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];

		},

		b2:function(keyword){

			if(this.a4[this.a1][this.a3].indexOf("&keyword=keywordsX") < 0){
				this.a3++;
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&version=keywordsX";
			}
			else{
				this.a3++;
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1];
			}

    		this.$.b2.call(this,m_2.replaceSpaceWithPlus(keyword));

    		},

		b4:function(priceTo){
			this.$.b4.call(this,priceTo);
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&lire2=price_toX";

		}

	});


	var SubitoCamperEngine = camperSearchUrl.extend({

  	    construct:function(baseUrl,name){

	  			this.$.init.call(this,baseUrl,name);
	  			this.keywordsSeparator[this.a1] = "%20";

	  	},		
		displayMode:function(){
			return f_9.n_4;
			
		},

		n_1:function(txt){
		    var res=0;
		    if(txt.indexOf("<h3>Non sono stati trovati annunci!</h3>") >= 0)
				return 0;

		    var offset = txt.indexOf("<strong>1</strong>");
			if(offset > -1) 
				return 1;
		    var offset = txt.indexOf("<strong>Tutti</strong>");
			if(offset > -1) 
				res = txt.substring(offset + "<strong>Tutti</strong>".length,offset + 100);
			else{
			    var offset = txt.indexOf("di <strong>");
				if(offset > -1){ 
					res = txt.substring(offset + "di <strong>".length,offset + 100);
				    offset = res.indexOf("<");
					if(offset > -1) 
						res = res.substring(0,offset);
						return res;
				}
				else
					return 0;
			}	
		    offset = res.indexOf("<strong>");
			if(offset > -1) 
				res = res.substring(offset + "<strong>".length,offset + 100);
			else
				return 0;
		    offset = res.indexOf("</strong>");
			if(offset > -1) 
				res = res.substring(0,offset);
			else
				return 0;
			return res;	
				
			 
		
		},

		
		l3:function(motorMaker,obj){
			obj.b2(motorMaker);

		},

		u7:function(v4,obj){
			obj.b2(v4);
		},

		v1:function(x4,obj){
			obj.b2(x4);
		},

		n9:function(sellerType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];
		},

		l4:function(motorModel,obj){
			obj.b2(motorModel);

		},

		l5:function(motorType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&cart=motorTypeX";
			this.$.l5.call(this,motorType,obj);
			
		},

		l6:function(fuelType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&fu=fuelTypeX";
			this.$.l6.call(this,fuelType,obj);
		},
		u8:function(x2,obj){
		
			var year = parseInt(x2) - 1980;
      		var e5 = new Date();
 			e5 = new Date(e5.getTime());
    		var currYear = e5.getFullYear();
    		currYear = parseInt(currYear) - 1980;

			obj.a3++;
			if(year > 0){			
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&rs=x2X&re=" + currYear;
				obj.x2 = year;				
			}
			else		
				obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1];
		5},

		i1:function(areaId,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1].replace("abruzzo-italia",areaId.toLowerCase());
		},

		b3:function(priceFrom){
			var price= parseInt(priceFrom)/1000 + 1;
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&ps=price_fromX";
			this.$.b3.call(this,price);

		},

		b4:function(priceTo){
			var price= parseInt(priceTo)/1000 + 1;
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "&pe=price_toX";
			this.$.b4.call(this,price);

		},

    	h9:function(mainCity,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1].replace("abruzzo-italia",obj.h2[obj.a1][mainCity].toLowerCase()).replace("/vendita/auto/","/vendita/auto/" + mainCity.toLowerCase());
    	},


		u9:function(v7,obj){
			var kilometer = parseInt(v7)/5000 + 1;	
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1] + "&ms=1&me=v7X";
			obj.v7 = kilometer;			
			
		},
		b2:function(keyword){
			this.a3++;
			if(this.a4[this.a1][this.a3 - 1].indexOf("?q=") < 0 && this.a4[this.a1][this.a3 - 1].indexOf("&q=") < 0 )
				if(this.a4[this.a1][this.a3 - 1].indexOf("?") < 0)
					this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1] + "?q=keywordsX";
				else
					this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1] + "&q=keywordsX";					
			else
			
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1];
				 
			this.$.b2.call(this,m_2.replaceSpaceWithPercent20(keyword));

    	}
	});


	var KijijiCamperEngine = camperSearchUrl.extend({

  	    construct:function(baseUrl,name){
			
	  			this.$.init.call(this,baseUrl,name);
				this.price[this.a1]["0"]="1";
				this.price[this.a1]["1000"]="2";
				this.price[this.a1]["2000"]="3";
				this.price[this.a1]["3000"]="3";
				this.price[this.a1]["4000"]="3";
				this.price[this.a1]["5000"]="4";
				this.price[this.a1]["6000"]="4";
				this.price[this.a1]["7000"]="5";
				this.price[this.a1]["8000"]="5";
				this.price[this.a1]["9000"]="6";
				this.price[this.a1]["10000"]="6";
				this.price[this.a1]["11000"]="6";
				this.price[this.a1]["12000"]="6";
				this.price[this.a1]["13000"]="6";
				this.price[this.a1]["14000"]="7";
				this.price[this.a1]["15000"]="7";
				this.price[this.a1]["16000"]="7";
				this.price[this.a1]["17000"]="7";
				this.price[this.a1]["18000"]="7";
				this.price[this.a1]["19000"]="8";
				this.price[this.a1]["20000"]="8";
				this.price[this.a1]["21000"]="8";
				this.price[this.a1]["22000"]="8";
				this.price[this.a1]["23000"]="8";
				this.price[this.a1]["24000"]="8";
				this.price[this.a1]["25000"]="8";
				this.price[this.a1]["26000"]="8";
				this.price[this.a1]["27000"]="8";
				this.price[this.a1]["28000"]="8";
				this.price[this.a1]["29000"]="8";
				this.price[this.a1]["30000"]="8";    			
				this.x2s[this.a1]["2009"] = "1";
				this.x2s[this.a1]["2008"] = "2";
				this.x2s[this.a1]["2007"] = "3";
				this.x2s[this.a1]["2006"] = "4";
				this.x2s[this.a1]["2005"] = "5";
				this.x2s[this.a1]["2004"] = "5";
				this.x2s[this.a1]["2003"] = "5";
				this.x2s[this.a1]["2002"] = "6";
				this.x2s[this.a1]["2001"] = "6";
				this.x2s[this.a1]["2000"] = "6";
				this.x2s[this.a1]["1999"] = "6";
				this.x2s[this.a1]["1998"] = "6";
				this.x2s[this.a1]["1997"] = "7";
				this.x2s[this.a1]["1996"] = "7";
				this.x2s[this.a1]["1995"] = "7";
				this.x2s[this.a1]["1994"] = "7";
				this.x2s[this.a1]["1993"] = "7";
				this.x2s[this.a1]["1992"] = "7";
				this.x2s[this.a1]["1991"] = "8";
				this.x2s[this.a1]["1990"] = "8";
				this.x2s[this.a1]["1985"] = "8";
				this.x2s[this.a1]["1980"] = "8";
				this.x2s[this.a1]["1975"] = "8";
				this.x2s[this.a1]["1970"] = "8";
				this.x2s[this.a1]["1965"] = "8";
				this.x2s[this.a1]["1960"] = "8";
				this.x2s[this.a1]["1950"] = "8";
				this.x2s[this.a1]["1940"] = "8";
				this.x2s[this.a1]["1930"] = "8";
				this.x2s[this.a1]["1920"] = "8";
				this.x2s[this.a1]["1910"] = "8";
	  			this.v8[this.a1]["benzina"] = "Benzina";
	  			this.v8[this.a1]["gasolio"] = "Diesel";
	  			this.v8[this.a1]["gas"] = "Gpl";
	  			this.v8[this.a1]["elettrica"] = "Elettrica";
				

	  	},		
		displayMode:function(){
			return f_9.n_4;
			
		},

		n_1:function(txt){
		    var res=0;
		    var pos="";
		    if(txt.indexOf("Nessun risultato per") >= 0)
				return 0;

			pos= "<li class=\"gris\">";
		    var offset = txt.lastIndexOf(pos);

			if(offset < 0){ 
			  pos= "<span class=\"gris\">";
		      offset = txt.lastIndexOf(pos);
			
			}
			
			if(offset < 0) 
				return 0;
			
			if(offset > -1) 
				res = txt.substring(offset + pos.length, offset +100);
			else
				return 0;
				

		    offset = res.indexOf("Risultati");

			if(offset > -1) 
				res = res.substring(0,offset);
			else
				return 0;
			
			return res.replace(",","");	
				
			 
		
		},


		
		l3:function(motorMaker,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1] + "motorMakerX/" ;
			obj.motorMaker=motorMaker;
		},

		u7:function(v4,obj){
			obj.b2(v4);
		},

		v1:function(x4,obj){
			obj.b2(x4);
		},


		l4:function(motorModel,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1].substring(0,obj.a4[obj.a1][obj.a3 - 1].length -1) + "+motorModelX/" ;
			obj.motorModel=motorModel;
		},

		setVersion:function(version,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1].substring(0,obj.a4[obj.a1][obj.a3 - 1].length -1) + "+motorVersionX/" ;
			obj.version = version;	
		},

		l5:function(motorType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1];
			obj.motorType=motorType;
			
		},

		l6:function(fuelType,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1].substring(0,obj.a4[obj.a1][obj.a3 - 1].length -1) + "+fuelTypeX/" ;
			this.$.l6.call(this,fuelType,obj);
		},


		i1:function(areaId,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] =  obj.a4[obj.a1][obj.a3 - 1].replace("www",areaId.toLowerCase());
		},

		b3:function(priceFrom){
			this.$.b3.call(this,priceFrom);
			this.priceFrom = this.price[this.a1][priceFrom];
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "prezzo13:price_fromX/";

		},

		b4:function(priceTo){
			this.$.b4.call(this,priceTo);
			this.priceTo = this.price[this.a1][priceTo];
			this.a3++;
			this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "prezzo14:price_toX/";

		},

    	h9:function(mainCity,obj){

			 obj.a3++;
		     obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1].replace("/moto/","/moto/annunci-areaIdX/");
   			 obj.mainCity = mainCity;
   			 this.$.h9.call(this,mainCity,obj);

    	},


		u9:function(v7,obj){
	  			switch(v7){
	  				case "kilometri zero":
	  					obj.v7 = "0";
	  					break;
	  				case "5000 km":
	  					obj.v7 = "0";
	  					break;
	  				case "20000 km":
	  					obj.v7 = "1";
	  					break;
	  				case "40000 km":
	  					obj.v7 = "2";
	  					break;
	  				case "60000 km":
	  					obj.v7 = "2";
	  					break;
	  				case "80000 km":
	  					obj.v7 = "3";
	  					break;
	  				case "100000 km":
	  					obj.v7 = "4";
	  					break;
	  				case "125000 km":
	  					obj.v7 = "4";
	  					break;
	  				case "150000 km":
	  					obj.v7 = "5";
	  					break;
	  				case "200000 km":
	  					obj.v7 = "5";
	  					break;
	  				case "250000 km":
	  					obj.v7 = "6";
	  					break;
	  				case "300000 km":
	  					obj.v7 = "6";
	  					break;

	  			}
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "km9:0/km10:v7X/";

			},

		u8:function(x2,obj){
			obj.a3++;
			obj.a4[obj.a1][obj.a3] = obj.a4[obj.a1][obj.a3 - 1]  + "anno11:x2X/anno12:1";
			this.$.u8.call(this,x2,obj);

		},

		b2:function(keyword){

			if(this.a4[this.a1][this.a3].indexOf("QQKeywordZkeywordsX") < 0){ 
					if(this.a4[this.a1][this.a3].indexOf("QQKeywordZ") < 0){
						this.a3++;
						this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "QQKeywordZkeywordsX";
					}
					else{
						this.a3++;
						this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1]  + "Q20Q20keywordsX";
					}
					
			}
			else{
				this.a3++;
				this.a4[this.a1][this.a3] = this.a4[this.a1][this.a3 - 1];
			}

		this.$.b2.call(this,m_2.replaceSpaceWithQ20(keyword));

		}
	});


	var DimmicosavuoiCamperSearchUrl = camperSearchUrl.extend({

  	    construct:function(baseUrl,name){
			
	  			this.$.init.call(this,baseUrl,name);
				

	  	},		
		displayMode:function(){
			return f_9.n_4;
			
		},

		h1:function() {

				var finalUrl= f_9.baseUrl + "/search.php?action=getFullResults&path=" + g_2.o_9 + "&id=" +  new Date().getTime();
				return finalUrl;
		},

		n_1:function(txt){
				

			if(txt == null || txt == "")
				return 0;

 			var results=[];
			var array = txt.split("#");
			for(val in array){
				var res = new p_5();
					if(array[val] != ""){
							var dbfs = array[val].substring(array[val].indexOf("}%"),array[val].length + 2);
							var resObj = array[val].substring(0,array[val].indexOf("}%") - 1);
							results[results.length] = res.clone(PHP_Unserialize(resObj));
							results[results.length - 1].dbfs = dbfs;
						}
					else
					 break;
			}
				
			var table = new p_9();
			var finalResults=[];
			var i=0;
			// Filtri
			if(this.priceFrom != "" && this.priceTo != ""){
				
				for(i=0;i<results.length;i++){
					if(parseInt(results[i].price) >= parseInt(this.priceFrom) && parseInt(results[i].price) <= parseInt(this.priceTo)){
						finalResults[finalResults.length] = results[i];  
					}	

				}
				results = finalResults;
			}
			
			var finalResultsKm=[];

			if(results.length == 0) return 0;	

			if(this.v7 != ""){
				
				for(i=0;i<results.length;i++){
					var tmp = results[i].dbfs.substring(results[i].dbfs.indexOf("con meno di ") + "con meno di ".length,results[i].dbfs.length);
					var km = parseInt(tmp.substring(0,tmp.indexOf("km") - 1)); 
					if(km  <= parseInt(this.v7)){
						finalResultsKm[finalResultsKm.length] = results[i];  
					}	

				}
				results = finalResultsKm;
				
			}

			if(results.length == 0) return 0;	

			var finalResultsYear=[];

			if(this.x2 != ""){
				
				for(i=0;i<results.length;i++){
					var tmp = results[i].dbfs.substring(results[i].dbfs.indexOf("immatricolata dopo il ") + "immatricolata dopo il ".length,results[i].dbfs.length);
					var year = parseInt(tmp); 
					if(year  >= parseInt(this.x2)){
						finalResultsYear[finalResultsYear.length] = results[i];  
					}	

				}
				results = finalResultsYear;
				
			}

			if(results.length == 0) return 0;	

			results.sort(function(a,b){return parseInt(a.price) - parseInt(b.price)});
			table.h_7Table(results,"annuncio auto");
			//document.getElementById("z1").style.height="150px";
			//document.getElementById('z1').innerHTML = table.code;
			f_9.p_9 = table.code;
			window.frames['I0'].location.href  =  "resX0.htm";


							
			return results.length;				
			 
		
		},

		jumpToPageTimed:function(){
				  

		},

		l3:function(motorMaker,obj){


		},

		u7:function(v4,obj){

		},


		n9:function(sellerType,obj){

		},

		l4:function(motorModel,obj){

		},


		l5:function(motorType,obj){

		},

		l6:function(fuelType,obj){

		},

		u8:function(x2,obj){
			obj.x2 = x2;
			
		},

		setVersion:function(version,obj){
				
		},


		h9:function(mainCity,obj){
			obj.mainCity = mainCity;
		},

		i1:function(areaId,obj){
			obj.areaId = areaId;
		},


		b3:function(priceFrom){
			this.$.b3.call(this,priceFrom);

		},

		u9:function(v7,obj){
			obj.v7= v7;

		},

		b2:function(keyword){

    	}

		
	});



