var setup=[];
setup.cssfile="";
setup.pagesizes=[5,10,25,50,0];
setup.site="milcars";
setup.locale="GBP";
setup.searchURL="http://www.britishcommerce.co.uk/autodirector/carlistsearch.php?site=milcars&search=";
setup.viewURL="http://www.britishcommerce.co.uk/autodirector/viewupdate.php?site=milcars&amp;id=";
setup.emailURL="http://www.britishcommerce.co.uk/autodirector/emailsales.php?site=milcars&id=";
setup.thumburl="http://www.britishcommerce.co.uk/autodirector/data/milcars/thumbs/";
setup.picurl="http://www.britishcommerce.co.uk/autodirector/data/milcars/pics/";
setup.picsize=600;
setup.licprod=true;
setup.showform=true;
setup.adverton=false;
setup.orderbyon=true;
setup.advert="British Commerce";
setup.advertURL="http://www.britishcommerce.co.uk/";

var vehiclelist;
function DefineVehicles() {
	vehiclelist=[];
	vehiclelist[0]=new Vehicle(668, false, 2003, "CHRYSLER GRAND CHEROKEE CRD QUADRA DRIVE", "CHRYSLER", "GRAND CHEROKEE", 120000, "blue", "automatic", "FINISHED IN A BEAUTIFULL METALLIC BLUE WITH GREY LEATHER INTERIOR , FULL SPEC INC CRUISE , ALLOYS , CLIMATE , C.D , AIRBAGS , ROOFRAILS ETC.....IMMACULATE CONDITION WITH FULL SERVICE HISTORY , MUST BE SEEN.", 5995, [3398,3399,3400]);
	vehiclelist[1]=new Vehicle(614, false, 2002, "LEXUS GS 300 SE", "LEXUS", "GS", 100000, "silver", "automatic", "FINISHED IN METALLIC SILVER WITH BEIGE LEATHER INTERIOR , FULL SERVICE HISTORY , FULL SPEC INC , ALLOYS , CLIMATE , TRIP , CRUISE , POWER SEATS/WINDOWS/MIRRORS , EXCELLENT CONDITION , LOOKS AND DRIVES GREAT!.", 5995, [3088,3089,3090,3091,3092]);
	vehiclelist[2]=new Vehicle(645, false, 2005, "CHRYSLER PT CRUISER LTD", "CHRYSLER", "PT CRUISER", 33000, "black", "automatic", "FINISHED IN GLEAMING DEEP POLISHED BLACK WITH CHROME TRIMMINGS , LEATHER INTERIOR , ARMRESTS , A/C , ALLOYS , C.D , AIRBAGS , HEATED SEATS ,  ELEC WINDOWS , IMMACULATE CONDITION INSIDE AND OUT , A REAL HEAD TURNER!", 5695, [3255,3256,3257,3258,3259]);
	vehiclelist[3]=new Vehicle(586, false, 2000, "BMW 318 Ci COUPE", "BMW", "318 Ci", 100000, "silver", "manual", "FINISHED IN METALLIC SILVER WITH FULL BLACK LEATHER INTERIOR , A/C , CD , ALLOYS , AIRBAGS , GOOD CONDITION INSIDE AND OUT , MUST BE SEEN.", 4995, [2932,2933,2934,2935,2936]);
	vehiclelist[4]=new Vehicle(639, false, 2001, "LEXUS GS 300", "LEXUS", "GS", 140000, "blue", "automatic", "FINISHED IN A BEAUTIFULL DARK METALLIC BLUE WITH CREAM LEATHER INTERIOR , EXCELLENT CONDITION , MANY EXTRA,S INCLUDING CLIMATE , ELEC MEMORY SEATS , SUNROOF , C.D ETC.....MUST BE SEEN.", 4495, [3218,3219,3220,3221,3222,3223]);
	vehiclelist[5]=new Vehicle(579, false, 2005, "MERCURY SABLE V6 3.0", "MERCURY", "SABLE", 90000, "burgundy", "automatic", "FINISHED IN METALIC BURGUNDY RED , GREY CLOTH INTERIOR , A/C , C.D , ELEC WINDOWS , AIRBAGS , MINT CONDITION , DRIVES SUPERB.", 3995, [2897,2898,2899,2900,2901]);
	vehiclelist[6]=new Vehicle(692, false, 2003, "NISSAN PRIMERA 2.0 SE", "NISSAN", "PRIMERA", 48000, "silver", "manual", "FINISHED IN A LOVELY METALLIC SILVER WITH DARK GREY INTERIOR , LOW MILEAGE , ELEC WINDOWS , REMOTE ALARM/LOCKING , FULL SERVICE RECORDS , AIRBAGS ETC...IMMACULATE INSIDE AND OUT , MUST BE SEEN.", 3995, [3521,3522,3523,3524,3525,3526]);
	vehiclelist[7]=new Vehicle(691, false, 2002, "HYUNDAI TRAJET  V6 MPV", "HYUNDAI", "TRAJET ", 67000, "red", "automatic", "FINISHED IN METALLIC RED/BURGUNDY WITH LEATHER INTERIOR , A/C , C.D , ALLOYS , TINTED GLASS , FULL SPEC , LOW MILEAGE , EXCELLENT CONDITION INSIDE AND OUT , MUST BE SEEN.", 3995, [3515,3516,3517,3518,3519,3520]);
	vehiclelist[8]=new Vehicle(653, false, 2002, "FORD MONDEO 2.0 GHIA EST", "FORD", "MONDEO", 48000, "blue", "manual", "FINISHED IN A NICE LIGHT METALLIC BLUE WITH DARK CLOTH INTERIOR , A/C , C.D ALLOYS , ELEC WINDOWS , ALARM , REMOTE LOCKING , VERY LOW MILEAGE , IMMACULATE CONDITION INSIDE AND OUT.", 3995, [3303,3304,3305,3306,3307,3308]);
	vehiclelist[9]=new Vehicle(695, false, 2001, "VW PASSAT  1.8T SE", "VW", "PASSAT ", 86000, "blue", "automatic", "FINISHED IN A BEAUTIFULL LIGHT METALLIC BLUE WITH GREY VELOUR INTERIOR , A/C , C.D , ELEC WINDOWS , REMOTE ALARM/LOCKING , ALLOYS , FULL SERVICE HISTORY , IMMACULATE CONDITION INSIDE AND OUT...MUST BE SEEN.", 3995, [3538,3539,3540]);
	vehiclelist[10]=new Vehicle(686, false, 2001, "VOLVO S80 SE", "VOLVO", "S80", 90000, "silver", "automatic", "FINISHED IN A LOVELY METALLIC SILVER WITH BLACK LEATHER , FULLY LOADED INCLUDING CLIMATE , CRUISE , ALLOYS , SUNROOF ETC....IMMACULATE CONDITION INSIDE AND OUT , MUST BE SEEN!!", 3995, [3486,3487,3488,3489]);
	vehiclelist[11]=new Vehicle(673, false, 2001, "JAGUAR S-TYPE V6 SPORT", "JAGUAR", "S-TYPE", 75000, "blue", "manual", "FINISHED IN STUNNING PACIFIC BLUE WITH CONTRASTING CREAM LEATHER INTERIOR , A/C , ELEC WINDOWS , AIRBAGS , ALLOYS , ABSOLUTLEY IMMACULATE INSIDE AND OUT , DRIVE LIKE A DREAM , MUST BE SEEN.", 3995, [3416,3417,3418,3419,3420]);
	vehiclelist[12]=new Vehicle(661, false, 1999, "JAGUAR S-TYPE V6 3.0 SE", "JAGUAR", "S-TYPE V6 3.0", 0, "silver", "automatic", "FINISHED IN A STUNNING METALLIC SILVER WITH BLACK LEATHER INTERIOR , A/C , ALLOYS , AIRBAGS , C.D , ELEC WINDOWS/SEATS , ALARM , FULL SERVICE RECORDS , HPi , EXCELLENT CONDITION INSIDE AND OUT , DRIVES SUPERB , MUST BE SEEN.", 3995, [3351,3352,3353,3354,3355,3356]);
	vehiclelist[13]=new Vehicle(650, false, 1998, "NISSAN 200 SPORT TURBO SX TOURING", "NISSAN", "200 SPORT TURBO", 64000, "red", "automatic", "FINISHED IN UNMARKED RED WITH BLACK LEATHER INTERIOR , LOW MILEAGE , A/C , ELEC WINDOWS , ALLOYS , EXCELLENT CONDITION INSIDE AND OUT.", 3995, [3280,3281,3282,3283,3284]);
	vehiclelist[14]=new Vehicle(647, false, 1998, "BMW 735i SE", "BMW", "735i", 75000, "blue", "automatic", "FINISHED IN A BEAUTIFULL DARK METALLIC BLUE WITH BEIGE LEATHER INTERIOR , WITH ONLY 75,000 MILES , HIGH SPEC INC 18&quot; RIMS , LOW PROFILES , CLIMATE , CRUISE , AIRBAGS , CD MULTI PLAYER , SUNROOF , EXCELLENT CONDITION INSIDE AND OUT.", 3695, [3265,3266,3267,3268,3269]);
	vehiclelist[15]=new Vehicle(696, false, 2004, "VAUXHALL ASTRA 1.6 CLUB", "VAUXHALL", "ASTRA", 80000, "blue", "automatic", "FINISHED IN A LOVELY LIGHT METALLIC BLUE WITH GREY CLOTH INTERIOR , A/C , C.D , ELECS , AIRBAGS ,  &quot;GREAT MPG&quot; !!  ,  LOW MAINTANANCE , IMMACULATE CONDITION INSIDE AND OUT , BARGAIN PRICE!!", 3495, [3541,3542,3543,3544,3545]);
	vehiclelist[16]=new Vehicle(694, false, 2002, "VAUXHALL ZAFIRA MPV ELEGANCE 1.8 7 SEATER", "VAUXHALL", "ZAFIRA MPV", 65000, "blue", "manual", "FINISHED IN A BEAUTIFULL LIGHT METALLIC BLUE WITH CHARCOAL INTERIOR , A/C , ALLOYS , C.D , REAR SEATS FOLD NEATLY INTO FLOOR , ELEC WINDOWS , LOW MILEAGE , AIRBAGS , IMMACULATE CONDITION INSIDE AND OUT , MUST BE SEEN.", 3495, [3532,3533,3534,3535,3536,3537]);
	vehiclelist[17]=new Vehicle(592, false, 2001, "FORD GALAXY MPV 2.3 ZETEC PETROL", "FORD", "GALAXY MPV", 113000, "blue", "manual", "FINISHED IN DARK METALLIC BLUE , A/C , C.D , ALLOYS , 7 SEATER , ELEC WINDOWS , AIRBAGS , REMOVEABLE SEATS , WINDOW TINTS , EXCELLENT CONDITION INSIDE AND OUT , MUST BE SEEN.", 3495, [2961,2962,2963,2964]);
	vehiclelist[18]=new Vehicle(669, false, 2001, "SAAB 9-5 EST WAGON 2.0t", "SAAB", "9-5 EST WAGON", 100000, "silver", "automatic", "FINISHED IN METALLIC SILVER WITH GREY VELOUR INTERIOR , A/C , C.D , ALLOYS , ROOFRAILS , VERY SPACIOUS , IMMACULATE CONDITION , LOOKS AND DRIVES SUPERB , MUST BE SEEN.", 3495, [3404,3405,3406]);
	vehiclelist[19]=new Vehicle(23, false, 1998, "Honda CR-V 5Dr", "Honda", "CR-V", 94000, "meattalic silver", "manual", "HONDA CR-V 5DR MANUAL 2.0|finished in metallic silver , alloys , c.d , remote locking/alarm , elec windows ,  full service history , looks and drives superb.", 3495, [38]);
	vehiclelist[20]=new Vehicle(675, false, 2003, "ROVER 75 1.8 turbo", "ROVER", "75", 52000, "champagne", "automatic", "FINISHED IN A STUNNING METALLIC CHAMPAGNE WITH GREY VELOUR INTERIOR , MULTI AIRBAGS , A/C , C.D , ALLOYS , ELEC WINDOWS/MIRRORS , REMOTE LOCKING/ALARM , EXCELLENT CONDITION INSIDE AND OUT WITH FULL SERVICE HISTORY , ECONOMICAL AND LOW MAINTANANCE , MUST BE SEEN.", 3295, [3432,3433,3434,3435,3436,3437]);
	vehiclelist[21]=new Vehicle(588, false, 2002, "FORD MONDEO GHIA X 2.0", "FORD", "MONDEO", 0, "green", "automatic", "FINISHED IN A STUNNING METALLIC GREEN WITH FULL BLACK LEATHER INTERIOR , INC A/C , ALLOYS , C.D , ELEC WINDOWS , MULTI-AIRBAGS , REMOTE ALARM , EXCELLENT CONDITION INSIDE AND OUT , DRIVES SUPERB.", 3295, [2942,2943,2944,2945,2946]);
	vehiclelist[22]=new Vehicle(604, false, 2001, "VOLVO S60 T SE", "VOLVO", "S60 T", 120000, "blue", "manual", "FINISHED IN A STUNNING DARK METALLIC BLUE WITH FULL CREAM LEATHER INTERIOR , C.D , ALLOYS , A/C , MULTI AIRBAGS , REMOTE ALARM/LOCKING , ELEC WINDOWS , CRUISE ECT......EXCELLENT CONDITION INSIDE AND OUT.....BARGAIN PRICE!", 3295, [3034,3035,3036,3037]);
	vehiclelist[23]=new Vehicle(505, false, 2001, "VOLVO S40i 2", "VOLVO", "S40i", 70000, "turquoise", "manual", "FINISHED IN A STUNNING METALLIC TURQUOISE COLOR WITH GREY INTERIOR , A/C , ALLOYS , AIRBAGS , C.D , EXCELLENT CONDITION , FULL SERVICE HISTORY AS WITH ALL OUR VEHICLES , GREAT LITTLE FAMILY CAR", 3295, [2501,2502,2503,2504,2505]);
	vehiclelist[24]=new Vehicle(687, false, 2001, "AUDI A3 1.6 SPORT", "AUDI", "A3", 0, "silver", "manual", "FINISHED IN METALLIC SILVER WITH GREY CLOTH INTERIOR , A/C , C.D , ALLOYS , ELEC WINDOWS , ALARM , REMOTE LOCKING , ARMRESTS , AIRBAGS ETC...IMMACULATE CONDITION INSIDE AND OUT , MUST BE SEEN.", 2995, [3490,3491,3492]);
	vehiclelist[25]=new Vehicle(260, false, 2000, "VOLVO S40 2.0 XS", "VOLVO", "S40", 100000, "yellow", "manual", "FINISHED IN BEAUTIFULL MELLOW YELLOW , EXCELLENT CONDITION INSIDE AND OUT , ELEC WINDOWS , AIRBAGS , A/C , NOT TO BE MISSED , INFACT IT CANT BE MISSED!", 2995, [1203,1204,1205,1206,1207]);
	vehiclelist[26]=new Vehicle(347, false, 2000, "MAZDA 323i 1.5 SE", "MAZDA", "323i 1.5", 53000, "blue", "manual", "FINISHED IN A STUNNING LIGHT METALLIC BLUE WITH ONLY 53,000 MILES , ELEC WINDOWS , ALLOYS , A/C , LOW INSURANCE AND TAX ,  VERY ECONOMICAL , LOOKS AND DRIVES SUPERB , IMMACULATE CONDITION.", 2995, [1630,1631,1632,1633]);
	vehiclelist[27]=new Vehicle(682, false, 2000, "JAGUAR S-TYPE V6 SE", "JAGUAR", "S-TYPE", 188000, "silver", "automatic", "FINISHED IN METALLIC SILVER WITH GREY LEATHER , A/C , C.D , ALLOYS , FULL SERVICE HISTORY WITH ONLY ONE OWNER , LOOKS AND DRIVES GREAT , GOOD CONDITION INSIDE AND OUT.", 2995, [3466]);
	vehiclelist[28]=new Vehicle(656, false, 1999, "AUDI A3 1.6 S", "AUDI", "A3", 115000, "gold", "manual", "FINISHED IN A BEAUTIFULL METALLIC GOLD WITH LIGHT GREY CLOTH INTERIOR , ELEC WINDOWS , AIRBAGS , ALLOYS , FULL SERVICE RECORDS , IMMACULATE CONDITION INSIDE AND OUT.", 2995, [3321,3322,3323,3324,3325,3326]);
	vehiclelist[29]=new Vehicle(233, false, 1998, "MERCEDES C220 DIESEL DIESEL", "MERCEDES", "C220 DIESEL", 115000, "gold", "", "FINISHED IN METALLIC GOLD , ELEC WINDOWS , C.D , RECENT TIRES X 4 , FULL SERVICE HISTORY , MECHANICALLY MAINTAINED TO A HIGH STANDARD , VERY ECONOMICAL", 2995, [1056,1057,1058,1059,1060]);
	vehiclelist[30]=new Vehicle(519, false, 1998, "VOLVO V70 T5", "VOLVO", "V70", 130000, "green", "automatic", "FINISHED IN A DARK METALLIC GREEN WITH BEIGE CLOTH INTERIOR , A/C , ALLOYS , C.D , AIRBAGS , ELEC WINDOWS , ALARM , GOOD CONDITION INSIDE AND OUT , DRIVES SUPERB .", 2995, [2574,2575,2576,2577,2578]);
	vehiclelist[31]=new Vehicle(512, false, 1999, "NISSAN ALMERA 2.0 SE PLUS", "NISSAN", "ALMERA", 88000, "silver", "automatic", "FINISHED IN METALLIC SILVER WITH CREAM LEATHER INTERIOR , A/C , ALLOYS , MULTI CD , AIRBAGS , ALARM , REMOTE LOCKING , LOOKS AND DRIVES SUPERB , VALUE FOR MONEY , MUST BE SEEN.", 2695, [2538,2539,2540,2541,2542]);
	vehiclelist[32]=new Vehicle(454, false, 1998, "TOYOTA COROLLA 1.6 CD", "TOYOTA", "COROLLA", 56000, "white", "manual", "FINISHED IN UNMARKED GLEAMING WHITE , A/C , ELEC WINDOWS , ELEC SUNROOF , C.D PLAYER , LOW INSURANCE , GREAT MPG!....IMMACULATE INSIDE AND OUT.. FULL SERVICE HISTORY .", 2695, [2198,2199,2200,2201]);
	vehiclelist[33]=new Vehicle(65, false, 2000, "Saab 9-3 2.0 Eco Manual", "Saab 9-3 2.0", "Eco", 112000, "red", "manual", "SAAB 9-3 2.0 ECO MANUAL|finished in gleaming bright red , A/C , power windows , 112,000 miles , full history , great looking car , clean inside and out , must be seen.|Price: £2495       # 2000(W)", 2495, [116,117]);
	vehiclelist[34]=new Vehicle(689, false, 1999, "TOYOTA COROLLA 1.6 GLS", "TOYOTA", "COROLLA", 50000, "aubergine", "manual", "FINISHED IN A BEAUTIFULL AND RARE METALLIC AUBERGINE WITH GREY VELOUR INTERIOR , ONLY 50,000 MILES , IMMACULATE CONDITION INSIDE AND OUT , ELEC WINDOWS , A/C , C/D , ALLOYS , SUNROOF , MUST BE SEEN.", 2495, [3499,3500,3501,3502,3503]);
	vehiclelist[35]=new Vehicle(489, false, 1999, "PEUGEOT 406 HDi 2.0 DIESEL", "PEUGEOT", "406", 90000, "blue", "manual", "FINISHED IN A NICE METALLIC BLUE , A/C , ELEC WINDOWS , VERY ECONOMICAL AROUND 50 MPG!....CLEAN AND TIDY VEHICLE , DRIVES SUPERB.", 2495, [2414,2415,2416,2417,2418]);
	vehiclelist[36]=new Vehicle(14, false, 1998, "Peugeot 306 Diesel Hatch", "Peugeot", "306 Diesel", 98000, "mettalic blue", "manual", "PEUGEOT 306 1.9 DIESEL HATCH|finished in dark metallic blue , a/c , alloys , good condition , massive mpg , clean little car , drives superb.", 2495, [26]);
	vehiclelist[37]=new Vehicle(693, false, 1998, "TOYOTA PREVIA MPV 2.4 GS 7 SEATER", "TOYOTA", "PREVIA MPV", 100000, "green", "automatic", "DARK METALLIC GREEN WITH GREY INTERIOR , 7 SEATER MPV WITH A/C , C.D , ELEC WINDOWS/ROOF , GOOD CONDITION , DRIVES GREAT.", 2495, [3527,3528,3529,3530,3531]);
	vehiclelist[38]=new Vehicle(623, false, 1997, "HONDA LEGEND V6 3.5", "HONDA", "LEGEND", 120000, "maroon", "automatic", "FINISHED IN METALLIC BURGUNDY WITH BEIGE LEATHER INTERIOR , A/C , CRUISE , C.D , ALLOYS , ELEC WINDOWS , ELEC SEATS , SUNROOF , VERY GOOD CONDITION THROUGHOUT.", 2495, [3133,3134,3135,3136,3137]);
	vehiclelist[39]=new Vehicle(141, false, 1997, "TOYOTA CELICA 1.8 ST", "TOYOTA", "CELICA", 110000, "silver", "manual", "FINISHED IN METALLIC SILVER , FULL SERVICE HISTORY , POWER WINDOWS/MIRRORS , AIRBAG , EXCELLENT CONDITION INSIDE AND OUT , GREAT SPORTS CAR", 2495, [514,515,516,517,518]);
	vehiclelist[40]=new Vehicle(698, false, 2000, "RENAULT MEGAN SPORT SCENIC 1.6 ALIZE", "RENAULT", "MEGAN SPORT", 120000, "silver", "manual", "METALLIC SILVER , GOOD CONDITION , ELEC WINDOWS , A/C , SERVICE HISTORY , DRIVES GREAT , WELL MAINTAINED , 2 OWNERS.", 2195, [3549,3550,3551,3552,3553,3554]);
	vehiclelist[41]=new Vehicle(697, false, 1999, "VOLVO S40 2.0T", "VOLVO", "S40", 86000, "black", "manual", "FINISHED IN METALLIC BLACK WITH GREY INTERIOR , A/C , C.D , ELEC WINDOWS , AIRBAGS , FULL SERVICE HISTORY , LOW MAINTANANCE , GOOD CONDITION.", 1995, [3546,3547,3548]);
	vehiclelist[42]=new Vehicle(22, false, 1998, "Nissan Primera 2.0 SX", "Nissan", "Primera 2.0", 100000, "mettalic green", "automatic", "NISSAN PRIMERA 2.0 SX AUTO|finished in metallic green , a/c , alloys , sunroof , stereo , 100k , immaculate throught , drives superb.", 1995, [37]);
	vehiclelist[43]=new Vehicle(157, false, 1998, "FORD MONDEO 2.0 GHIA X", "FORD", "MONDEO", 116000, "grey", "manual", "FINISHED IN METALLIC GREY WITH FULL LEATHER INTERIOR , ALLOYS , A/C , CD , LOOKS AND DRIVES SUPERB , IMMACULATE THROUGHOUT", 1995, [609,610,611,612,613,614]);
	vehiclelist[44]=new Vehicle(341, false, 1996, "HONDA ACCORD ESTATE 2.0", "HONDA", "ACCORD", 58000, "red", "automatic", "FINISHED IN METALLIC RED , LOW MILEAGE , ELEC WINDOWS , SUNROOF , VERY GOOD CONDITION INSIDE AND OUT , DRIVES SUPERB", 1995, [1606,1607,1608,1609]);
	vehiclelist[45]=new Vehicle(350, false, 1996, "HONDA CIVIC 1.5iLS", "HONDA", "CIVIC", 80000, "green", "manual", "FINISHED IN DARK METALLIC GREEN , LOW INSURANCE , VERY ECONOMICAL , CLEAN AND TIDY CAR , DRIVES WELL.", 1995, [1642,1643,1644]);
}
setup.searchon=false;



// Client JavaScript, (C)AutoDirector
setup.text = {
	searchtitle: "search",
	search: "search:",
	ordertitle: "change vehicle order",
	orderby: "order:",
	go: "go",
	reset: "view all",
	filterdefault: "any",
	filtermake: "make:",
	filtermodel: "model:",
	filterage: "age:",
	filteragetext: "under #",
	filtermileage: "mileage:",
	filtermileagetext: "under # miles",
	filtercolour: (setup.locale == 'USD' ? 'color:' : 'colour:'),
	filterprice: "price:",
	filterpricetext: "under #",
	detaillink: "click for more details...",
	model: "model:",
	colour: (setup.locale == 'USD' ? 'color:' : 'colour:'),
	gearbox: (setup.locale == 'USD' ? 'transmission:' : 'gearbox:'),
	mileage: "mileage:",
	mileageunit: "miles",
	details: "details:",
	photo: "photograph",
	photoof: " of ",
	novehicles: "No vehicles are available at this time. Please return later.",
	nodetails: "The vehicle you requested is not available. Please return to the showroom.",
	contact: "contact us about this vehicle",
	name: "name:",
	nametitle: "enter your name",
	email: "email:",
	emailtitle: "enter your email address",
	telephone: "telephone:",
	telephonetitle: "enter your telephone number",
	questions: "questions:",
	questionstitle: "enter any questions or comments",
	send: "send enquiry",
	invalid: "Please enter",
	invalidname: " - your name",
	invalidcontact: " - an email address or telephone number",
	invalidemail: " - a valid email address",
	sendenquiry: "sending your enquiry...",
	sendsuccess: "Your enquiry was sent successfully. We will contact you shortly.",
	sendfail: "Sorry, but your enquiry could not be sent at this time. Please try again later or contact us directly.",
	sendtimeout: "Sorry, but your enquiry is taking too long. Please try again later.",
	backshowroom: "&#171; back to the showroom",
	back: "&#171; back",
	backtitle: "previous page",
	next: "next &#187;",
	nexttitle: "next page",
	vehicle: "matching vehicle",
	vehicles: "matching vehicles",
	show: "show",
	showall: "all",
	showor: "or",
	showpage: "per page",
	searchfail: "Sorry, but your search is taking too long.\nPlease try again later.",
	imageclose: "close",
	imageback: "back",
	imagenext: "next"
};

setup.override={
	nullyear: "",
	showprice: true,
	currencystart: "",
	currencyend: "",
	pricemessage: ["sold", "please call"]
};

setup.filter={
	active: true,
	ages: [1,2,3,5,10,15,20,25],
	mileages: [1000, 5000, 10000, 20000, 30000, 50000, 100000],
	prices: [1000, 2000, 3000, 5000, 10000, 15000, 20000, 30000, 50000]
};

// sorting options
var sortTypes = [];
var st=0;
sortTypes[st++] = { name: "price, highest first", sort: function(a, b) { return SortCars(a.price, b.price, -1); } };
sortTypes[st++] = { name: "price, lowest first", sort: function(a, b) { return SortCars(a.price, b.price, 1); } };
sortTypes[st++] = { name: "make/model, A to Z", sort: function(a, b) { return SortCars(a.model, b.model, 1); } };
sortTypes[st++] = { name: "make/model, Z to A", sort: function(a, b) { return SortCars(a.model, b.model, -1); } };
sortTypes[st++] = { name: "year, youngest first", sort: function(a, b) { return SortCars(a.year, b.year, -1); } };
sortTypes[st++] = { name: "year, oldest first", sort: function(a, b) { return SortCars(a.year, b.year, 1); } };
sortTypes[st++] = { name: "mileage, lowest first", sort: function(a, b) { return SortCars(a.mileage, b.mileage, 1); } };
sortTypes[st++] = { name: "mileage, highest first", sort: function(a, b) { return SortCars(a.mileage, b.mileage, -1); } };
sortTypes[st++] = { name: "search result", sort: function(a, b) { return SortCars(a.searchrank, b.searchrank, -1); } };
sortTypes[st++] = { name: "search (reversed)", sort: function(a, b) { return SortCars(a.searchrank, b.searchrank, 1); } };

// Google Analytics event tracking options
var GAsetup={
	enabled: true,
	type: "_trackEvent",
	category: "AutoDirector",
	actions: {
		search: "Search",
		vehicle: "View vehicle",
		enquiry: "Send enquiry"
	},
	vehicledetails: "[newcar] [year] [colour] [model], [price]"
};

var run={};setup.complete=false;setup.comlimit=1000;setup.timeout=10000;setup.thisPath=location.pathname;setup.thisURL=location.host+(location.port!=""?":"+location.port:"")+setup.thisPath;setup.activesearch=false;setup.JSsearch=null;setup.activesend=false;setup.JSsend=null;setup.senderror="";setup.salesemail="";setup.lightbox=null;var $T=setup.text;setup.divs=["licence","search","jumptop","list","jumpend","backtop","vehicle","enqresult","enquiry","backend","sponsor"];if(setup.orderbyon||setup.searchon){setup.Tsearch='<form id="adsearch" action="'+setup.thisPath+'" method="get"><fieldset><legend>'+$T.searchtitle+"</legend>";setup.Tsearch+='<div class="row"><label for="adorderby" title="'+$T.ordertitle+'">'+$T.orderby+'</label><select id="adorderby"></select></div>';if(setup.searchon){setup.Tsearch+='<div><label for="adsearchterm" title="search for a vehicle">'+$T.search+'</label><input id="adsearchterm" type="text" size="20" maxlength="50" /><input type="submit" value="'+$T.go+'" class="button" /></div>'}if(setup.filter.active){setup.Tsearch+='<div class="row"><label for="adfiltermake">'+$T.filtermake+'</label><select id="adfiltermake"></select></div>';setup.Tsearch+='<div><label for="adfiltermodel">'+$T.filtermodel+'</label><select id="adfiltermodel"></select></div>';setup.Tsearch+='<div><label for="adfilterage">'+$T.filterage+'</label><select id="adfilterage"></select></div>';setup.Tsearch+='<div><label for="adfiltermileage">'+$T.filtermileage+'</label><select id="adfiltermileage"></select></div>';setup.Tsearch+='<div><label for="adfiltercolour">'+$T.filtercolour+'</label><select id="adfiltercolour"></select></div>';setup.Tsearch+='<div><label for="adfilterprice">'+$T.filterprice+'</label><select id="adfilterprice"></select></div>'}if(setup.searchon||setup.filter.active){setup.Tsearch+='<a id="adreset" href="#">'+$T.reset+"</a>"}setup.Tsearch+="</fieldset></form>"}else{setup.Tsearch=""}setup.Tlist='<a id="ad_id[id]" href="#" title="'+$T.detaillink+'">[pic]';setup.Tdetail="[pics]";var adt="";if($T.model){adt+='<dt class="model">'+$T.model+'</dt><dd class="model">[newcar] [year] [model]</dd>'}if($T.colour){adt+='<dt class="colour">'+$T.colour+'</dt><dd class="colour">[colour]</dd>'}if($T.gearbox){adt+='<dt class="gearbox">'+$T.gearbox+'</dt><dd class="gearbox">[gearbox]</dd>'}if($T.mileage){adt+='<dt class="mileage">'+$T.mileage+'</dt><dd class="mileage">[mileage]</dd>'}if(adt){setup.Tlist+="<dl>"+adt+"</dl>"}if($T.details){adt+='<dt class="details">'+$T.details+'</dt><dd class="details">[info]</dd>'}if(adt){setup.Tdetail+="<dl>"+adt+"</dl>"}if(setup.override.showprice){adt='<div class="price">[price]</div>';setup.Tlist+=adt;setup.Tdetail+=adt}setup.Tlist+="</a>";setup.Tdetail+='<img src="'+setup.viewURL+'[id]" class="count" />';setup.Tlistnone="<p>"+$T.novehicles+"</p>";setup.Tdetailnone="<p>"+$T.nodetails+"</p>";setup.Tenquiry='<form id="adenquiry" action="'+setup.thisPath+'" method="get"><fieldset><legend>'+$T.contact+'</legend><div><label for="adname" title="'+$T.nametitle+'">'+$T.name+'</label><input  id="adname" name="adname" type="text" size="20" maxlength="50" /></div><div><label for="ademail" title="'+$T.emailtitle+'">'+$T.email+'</label><input  id="ademail" name="ademail" type="text" size="20" maxlength="100" /></div><div><label for="adtel" title="'+$T.telephonetitle+'">'+$T.telephone+'</label><input  id="adtel" name="adtel" type="text" size="20" maxlength="20" /></div><div><label for="adcomments" title="'+$T.questionstitle+'">'+$T.questions+'</label><textarea id="adcomments" name="adcomments" rows="4" cols="20"></textarea></div><div><input type="submit" value="'+$T.send+'" class="button" /></div></fieldset></form>';setup.Tback='<a href="#">'+$T.backshowroom+"</a>";setup.Tsponsor="";if(setup.adverton!=""){setup.Tsponsor+=setup.advert;if(setup.advertURL!=""){setup.Tsponsor='<a href="'+setup.advertURL+'">'+setup.Tsponsor+"</a>"}}setup.Tunlic='This showroom is powered by an unlicenced trial copy of AutoDirector. You may evaluate the AutoDirector system for 30 days. To remove this message, please visit <a href="http://www.autodirector.co.uk/">http://www.autodirector.co.uk/</a> and purchase a licence key.';function SortCars(d,c,f){if(d<c){return -1*f}if(d>c){return 1*f}return 0}function ADstart(){setup.OK=true;if(!owl.Dom){setup.OK=false;alert("Please use a more modern browser to view the showroom.")}else{if(owl.Dom.Get("#autodirector").length!=1){setup.OK=false;alert('This page does not contain a\n<div id="autodirector"></div> tag.')}if(owl.Dom.Get("head").length!=1){setup.OK=false;alert("The page does not contain a <head>.")}}if(!setup.OK){return}if(setup.cssfile!=""){owl.Dom.LoadCSS(setup.cssfile)}setup.adnode=owl.Dom.Get("#autodirector")[0];DefineVehicles();DefineDefaults();DefineNodes();var d=run.list;if(!setup.orderbyon&&!setup.searchon){ShowVehicleList()}else{var b=owl.Dom.Get("#adorderby")[0];var a=owl.Dom.Get("#adsearchterm")[0];if(a&&run.searchresult==null){d=true;a.value=run.search;run.search="";EventSearchSubmit()}else{if(b){var c=run.thispage;b.value=run.orderby;EventChangeOrder();if(run.thispage!=c){run.thispage=c;ShowVehicleList()}}}}if(!d&&run.ID>0){var f=run.ID;run.ID=0;ShowVehicle(f)}else{run.ID=0}setup.complete=true}function DefineDefaults(){var f=owl.Cookie.Restore("adcs");var c=owl.Http.Arguments();var d=function(i,j){var h=j;if(owl.Object.PropertyExists(f,i)){h=f[i]}if(owl.Object.PropertyExists(c,i)){h=c[i]}return h};run.ID=owl.Number.toInt(d("cid",0))||owl.Number.toInt(d("id",0));run.list=(d("list",true)==true);if(run.ID>0&&owl.Object.PropertyExists(c,"cid")&&!owl.Object.PropertyExists(c,"list")){run.list=false}run.orderby=owl.Number.toInt(d("orderby",0));run.filtermake=owl.Number.toInt(d("filtermake",-1));run.filtermodel=owl.Number.toInt(d("filtermodel",-1));run.filterage=owl.Number.toInt(d("filterage",-1));run.filtermileage=owl.Number.toInt(d("filtermileage",-1));run.filtercolour=owl.Number.toInt(d("filtercolour",-1));run.filterprice=owl.Number.toInt(d("filterprice",-1));run.pagesize=owl.Number.toInt(d("pagesize",setup.pagesizes[0]));run.thispage=owl.Number.toInt(d("thispage",1));run.name=d("name","");run.email=d("email","");run.tel=d("tel","");run.comments=d("comments","");run.scrollpos=owl.Number.toInt(d("scrollpos",0));var a=(owl.Object.PropertyExists(c,"search")?c.search:"");var g=(owl.Object.PropertyExists(f,"search")?f.search:"");if(a!=""&&setup.searchon){run.orderby=(setup.orderbyon?sortTypes.length-2:0);run.list=true}if(a!=""&&a!=g){run.search=a;run.searchresult=null}else{run.search=g;run.searchresult=d("searchresult",[]);if(run.searchresult.length==0){for(var b=0;b<vehiclelist.length;b++){run.searchresult[b]=vehiclelist[b].id}}UpdateSearchResult()}}function SaveDefaults(){owl.Cookie.Store("adcs",run)}function addOpt(c,d,a){var b=document.createElement("option");b.setAttribute("value",d);b.appendChild(document.createTextNode(a));c.appendChild(b)}function DefineNodes(){owl.Dom.RemoveChildren(setup.adnode);var b;for(var f=0;f<setup.divs.length;f++){b=document.createElement("div");b.id="autodirector_"+setup.divs[f];setup["node"+setup.divs[f]]=setup.adnode.appendChild(b);setup["node"+setup.divs[f]].style.display="none"}if(!setup[String.fromCharCode(108,105,99,112,114,111,100)]){var g=setup[String.fromCharCode(84,117,110,108,105,99)];var d=setup.nodelicence;if(g.substr(31,5)=="unlic"){owl.innerHTML(d,g,false)}else{owl.innerHTML(d,String.fromCharCode(85,78,76,73,67,69,78,67,69,68),false)}var c=d.style;c.position="static";c.display="block";c.visibility="visible";c.width="auto";c.height="auto";c.fontSize="1.2em";c.fontWeight="bold";c.textAlign="center";c.padding="0.5em";c.marginBottom="0.5em";c.color="#c00";c.backgroundColor="#ffc";c.border="3px solid #c00"}if(setup.orderbyon||setup.searchon){owl.innerHTML(setup.nodesearch,setup.Tsearch,false);var h=owl.Dom.Get("#adorderby")[0];if(h){for(var l=(setup.orderbyon?0:sortTypes.length-2);l<sortTypes.length-(setup.searchon?0:2);l++){addOpt(h,l,sortTypes[l].name)}h.value=run.orderby;new owl.Event(h,"change",EventChangeOrder)}var k=owl.Dom.Get("#adsearch")[0];if(k){new owl.Event(k,"submit",EventSearchSubmit)}if(setup.filter.active){DefineFilters()}var a=owl.Dom.Get("#adsearch");var j=owl.Dom.Get("#adreset");if(a.length==1&&j.length==1){new owl.Event(j[0],"click",function(i){i.StopDefaultAction();i.Target.blur();a[0].reset();run.orderby=0;vehiclelist.sort(sortTypes[run.orderby].sort);FilterHandler()})}}if(setup.showform){owl.innerHTML(setup.nodeenquiry,setup.Tenquiry,false);owl.Dom.Get("#adname")[0].value=run.name;owl.Dom.Get("#ademail")[0].value=run.email;owl.Dom.Get("#adtel")[0].value=run.tel;owl.Dom.Get("#adcomments")[0].value=run.comments;new owl.Event(owl.Dom.Get("#adenquiry"),"submit",EventSendEnquiry);new owl.Event(owl.Dom.Get("#adcomments"),"keypress",EventLimitComments)}owl.innerHTML(setup.nodebacktop,setup.Tback,false);owl.innerHTML(setup.nodebackend,setup.Tback,false);if(setup.Tsponsor!=""){owl.innerHTML(setup.nodesponsor,setup.Tsponsor,false);setup.nodesponsor.style.display="block"}new owl.Event(setup.nodelist,"click",EventVehicleClick);new owl.Event(setup.nodejumptop,"click",EventPageClick);new owl.Event(setup.nodejumpend,"click",EventPageClick);new owl.Event(owl.Dom.Get("a",setup.nodebacktop)[0],"click",EventBackClick);new owl.Event(owl.Dom.Get("a",setup.nodebackend)[0],"click",EventBackClick)}var filter={make:null,model:null,age:null,mileage:null,colour:null,price:null};function DefineFilters(){vinfo.make=vinfo.makelist.substring(1,vinfo.makelist.length-1).split("|").sort(function(f,d){return SortCars(f,d,1)});filter.make=owl.Dom.Get("#adfiltermake")[0];addOpt(filter.make,-1,$T.filterdefault);for(var b=0,a=vinfo.make.length;b<a;b++){addOpt(filter.make,b,vinfo.make[b])}filter.make.value=(vinfo.make.length==1?0:run.filtermake);filter.model=owl.Dom.Get("#adfiltermodel")[0];filter.age=owl.Dom.Get("#adfilterage")[0];addOpt(filter.age,vinfo.maxAge+1,$T.filterdefault);for(var b=0,c=setup.filter.ages.length;b<c&&setup.filter.ages[b]<=vinfo.maxAge;b++){if(setup.filter.ages[b]>=vinfo.minAge){addOpt(filter.age,setup.filter.ages[b],$T.filteragetext.replace(/#/g,setup.filter.ages[b]))}}filter.age.value=run.filterage;if(filter.age.selectedIndex<0){filter.age.selectedIndex=0}filter.mileage=owl.Dom.Get("#adfiltermileage")[0];addOpt(filter.mileage,vinfo.maxMile+1,$T.filterdefault);for(var b=0,c=setup.filter.mileages.length;b<c&&setup.filter.mileages[b]<=vinfo.maxMile;b++){if(setup.filter.mileages[b]>=vinfo.minMile){addOpt(filter.mileage,setup.filter.mileages[b],$T.filtermileagetext.replace(/#/g,NumberFormat(setup.filter.mileages[b],0)))}}filter.mileage.value=run.filtermileage;if(filter.mileage.selectedIndex<0){filter.mileage.selectedIndex=0}vinfo.colour=vinfo.colourlist.substring(1,vinfo.colourlist.length-1).split("|").sort(function(f,d){return SortCars(f,d,1)});filter.colour=owl.Dom.Get("#adfiltercolour")[0];addOpt(filter.colour,-1,$T.filterdefault);for(var b=0,a=vinfo.colour.length;b<a;b++){addOpt(filter.colour,b,vinfo.colour[b])}filter.colour.value=run.filtercolour;filter.price=owl.Dom.Get("#adfilterprice")[0];addOpt(filter.price,vinfo.maxPrice+1,$T.filterdefault);for(var b=0,c=setup.filter.prices.length;b<c&&setup.filter.prices[b]<=vinfo.maxPrice;b++){if(setup.filter.prices[b]>=vinfo.minPrice){addOpt(filter.price,setup.filter.prices[b],$T.filterpricetext.replace(/#/g,NumberFormat(setup.filter.prices[b],0,true)))}}filter.price.value=run.filterprice;if(filter.price.selectedIndex<0){filter.price.selectedIndex=0}new owl.Event(filter.make,"change",FilterHandler);new owl.Event(filter.model,"change",FilterHandler);new owl.Event(filter.age,"change",FilterHandler);new owl.Event(filter.mileage,"change",FilterHandler);new owl.Event(filter.colour,"change",FilterHandler);new owl.Event(filter.price,"change",FilterHandler);FilterHandler()}function FilterHandler(n){var a=(!n||n.Element==filter.make),h=null,k=null;if(a&&filter.model){owl.Dom.RemoveChildren(filter.model);addOpt(filter.model,"",$T.filterdefault);filter.model.selectedIndex=0}if(filter.make&&filter.make.value>=0){h=vinfo.make[filter.make.value]}var o=filter.model&&filter.model.value;if(filter.colour&&filter.colour.value>=0){k=vinfo.colour[filter.colour.value]}vinfo.active=0;var b="|";var g=(owl.Dom.Get("#adsearchterm").length==1&&run.orderby>=sortTypes.length-2);for(var m=0,c=vehiclelist.length;m<c;m++){vehiclelist[m].active=(!g||vehiclelist[m].searchrank>0)&&(!h||h==vehiclelist[m].make)&&(!o||o==vehiclelist[m].modelshort)&&(!filter.age||filter.age.value>=vehiclelist[m].age)&&(!filter.mileage||filter.mileage.value>=vehiclelist[m].mileage)&&(!k||k==vehiclelist[m].colour)&&(!filter.price||filter.price.value>=vehiclelist[m].price);if(vehiclelist[m].active){vinfo.active++}if(a&&h==vehiclelist[m].make&&b.indexOf("|"+vehiclelist[m].modelshort+"|")<0){b+=vehiclelist[m].modelshort+"|"}}if(a&&filter.model&&b.length>1){var f=b.substring(1,b.length-1).split("|").sort(function(q,l){return SortCars(q,l,1)});for(var p=0,d=f.length;p<d;p++){addOpt(filter.model,f[p],f[p])}}run.thispage=1;var i=run.list;ShowVehicleList();run.list=i;run.filtermake=filter.make&&filter.make.value;run.filtermodel=filter.model&&filter.model.value;run.filterage=filter.age&&filter.age.value;run.filtermileage=filter.mileage&&filter.mileage.value;run.filtercolour=filter.colour&&filter.colour.value;run.filterprice=filter.price&&filter.price.value;SaveDefaults();var j,p=setup.text;if(n&&n.Element){switch(n.Element){case filter.make:j=p.filtermake+" "+h;break;case filter.model:j=p.filtermodel+" "+o;break;case filter.age:j=p.filterage+" "+filter.age.value;break;case filter.mileage:j=p.filtermileage+" "+filter.mileage.value;break;case filter.colour:j=p.filtercolour+" "+k;break;case filter.price:j=p.filterprice+" "+filter.price.value;break}}else{if(g){j=p.search+" "+run.search}else{j=p.orderby+" "+sortTypes[run.orderby].name}}TrackEvent("search",j)}function ShowVehicleList(c){run.list=true;c=(c!==false);var l="list";var f=vinfo.active;if(vehiclelist.length>0){if(setup.orderbyon||setup.searchon){l+=",search"}l+=",jumptop,jumpend";var a=run.pagesize;if(a<1){a=99999}var d=Math.floor((f-1)/a)+1;if(run.thispage>d){run.thispage=d}if(c){var k=-1;var o=(run.thispage-1)*a;var h=o+a-1;if(h>f-1){h=f-1}var j="";for(var m=0;m<vehiclelist.length&&k<h;m++){if(vehiclelist[m].active){k++;if(k>=o&&k<=h){j+=vehiclelist[m].Replace(setup.Tlist)}}}owl.innerHTML(setup.nodelist,j);var n="<p>"+f+" "+(f!=1?$T.vehicles:$T.vehicle);if(f>0){n+=": "+$T.show+" ";var g=[],i=false;for(var q=0;q<setup.pagesizes.length;q++){if(setup.pagesizes[q]<f||!i){g[g.length]=setup.pagesizes[q];if(setup.pagesizes[q]>=f){i=true}}}for(var q=(g.length>2?0:1);q<g.length;q++){n+='<a href="#*'+g[q]+'"'+(run.pagesize==g[q]?' class="active"':"")+">"+(g[q]>0?g[q]:$T.showall)+"</a>";if(q+2<=g.length){n+=(q+2==g.length?" "+$T.showor+" ":", ")}}n+=" "+$T.showpage}n+="</p>";if(d>1){n+="<ol>";if(run.thispage>1){n+='<li><a href="#-1" class="back" title="'+$T.backtitle+'">'+$T.back+"</a></li>"}for(var b=1;b<=d;b++){n+='<li><a href="#'+b+'" title="page '+b+'"';if(b==run.thispage){n+=' class="active"'}n+=">"+b+"</a></li>"}if(run.thispage<d){n+='<li><a href="#+1" class="next" title="'+$T.nexttitle+'">'+$T.next+"</a></li>"}n+="</ol>"}owl.innerHTML(setup.nodejumptop,n);if(f==0){n=""}owl.innerHTML(setup.nodejumpend,n)}}else{if(c){owl.innerHTML(setup.nodelist,setup.Tlistnone)}}ShowNodes(l);SaveDefaults()}function ShowVehicle(f){run.list=false;var a="vehicle,backtop,backend";var c=setup.showform;if(f!=run.ID){run.ID=f;var b=VehicleIndex(f);if(b>=0){owl.innerHTML(setup.nodevehicle,vehiclelist[b].Replace(setup.Tdetail));var d=owl.Dom.Get("#autodirector_pics",setup.nodevehicle);if(d.length==1){setup.lightbox=new owl.Lightbox(d[0])}else{setup.lightbox=null}TrackEvent("vehicle",vehiclelist[b].Replace(GAsetup.vehicledetails),vehiclelist[b].price)}else{run.ID=0;owl.innerHTML(setup.nodevehicle,setup.Tdetailnone);c=false}}if(c){a+=",enquiry"}ShowNodes(a);owl.Screen.ScrollToElement(setup.adnode,0,100,0,30);SaveDefaults()}function ShowNodes(a){for(var b=1;b<setup.divs.length-1;b++){setup["node"+setup.divs[b]].style.display=(a.indexOf(setup.divs[b])>=0?"block":"none")}}function VehicleIndex(b){var a=0;while(b!=vehiclelist[a].id&&a<vehiclelist.length-1){a++}return(vehiclelist[a].id==b?a:-1)}function UpdateSearchResult(){vehiclelist.sort(sortTypes[0].sort);var b=vehiclelist.length;var c;for(var a=0;a<b;a++){c=0;while(vehiclelist[a].id!=run.searchresult[c]&&c<run.searchresult.length){c++}vehiclelist[a].searchrank=(vehiclelist[a].id==run.searchresult[c]?b-c:-a)}}var vinfo={active:0,thisYear:(new Date()).getFullYear(),minAge:9999999,maxAge:0,minMile:9999999,maxMile:0,minPrice:99999999,maxPrice:0,make:[],makelist:"|",colour:[],colourlist:"|"};function Vehicle(d,m,k,l,c,h,i,b,a,g,j,f){this.id=d;this.newcar=(m?"NEW":"");this.year=owl.Number.toInt(k);this.age=vinfo.thisYear-this.year;this.model=l;this.make=c;this.modelshort=h;this.mileage=owl.Number.toInt(i);this.colour=(b!=""?b:"-");this.gearbox=(a!=""?a:"-");this.info="|"+g+"|";this.info=reRepeat(this.info,/\|\-+\|/g,"|<hr />|");this.info=reRepeat(this.info,/\|-([^\|]+)\|/g,"|<h2>$1</h2>|");this.info=reRepeat(this.info,/\_([^\|]+)\_/g,"{{strong}}$1{{/strong}}");this.info=reRepeat(this.info,/!\(([^\||\(]+)\)/g,'{{img src="$1" /}}');this.info=reRepeat(this.info,/\[([^\||\[]+)\]\(\(([^\||\(]+)\)\)/g,'{{a href="$2"}}$1{{/a}}');this.info=reRepeat(this.info,/\(\(([^\||\(]+)\)\)/g,'{{a href="$1"}}$1{{/a}}');this.info=reRepeat(this.info,/\|\*([^\|]+)\|/g,"|<li>$1</li>|");this.info=reRepeat(this.info,/\|\+([^\|]+)\|/g,"|<liN>$1</liN>|");this.info=reRepeat(this.info,/\|([^\<][^\|]+)\|/g,"|<p>$1</p>|");this.info=reRepeat(this.info,/<\/li>\|<li>/g,"</li><li>");this.info=reRepeat(this.info,/<\/liN>\|<liN>/g,"</liN><liN>");this.info=reRepeat(this.info,/\|(<li>[^\|]+<\/li>)\|/g,"|<ul>$1</ul>|");this.info=reRepeat(this.info,/\|(<liN>[^\|]+<\/liN>)\|/g,"|<ol>$1</ol>|");this.info=reRepeat(this.info,/liN>/g,"li>");this.info=reRepeat(this.info,/\{\{/g,"<");this.info=reRepeat(this.info,/\}\}/g,">");this.info=reRepeat(this.info,/\|/g,"");this.price=(j!==null?owl.Number.toInt(j):0);this.pics=f;this.searchrank=0;this.active=true;vinfo.active++;if(this.age<vinfo.minAge){vinfo.minAge=this.age}if(this.age>vinfo.maxAge){vinfo.maxAge=this.age}if(this.mileage<vinfo.minMile){vinfo.minMile=this.mileage}if(this.mileage>vinfo.maxMile){vinfo.maxMile=this.mileage}if(this.price<vinfo.minPrice){vinfo.minPrice=this.price}if(this.price>vinfo.maxPrice){vinfo.maxPrice=this.price}if(vinfo.makelist.indexOf("|"+this.make+"|")<0){vinfo.makelist+=this.make+"|"}if(vinfo.colourlist.indexOf("|"+this.colour+"|")<0){vinfo.colourlist+=this.colour+"|"}}function reRepeat(d,b,c){var a;do{a=d;d=d.replace(b,c)}while(d!=a);return d}Vehicle.prototype.Replace=function(b){var a=(this.year>0?this.year:setup.override.nullyear);b=b.replace(/\[id\]/gi,this.id);b=b.replace(/\[newcar\]/gi,this.newcar);b=b.replace(/\[year\]/gi,a);b=b.replace(/\[model\]/gi,this.model);b=b.replace(/\[mileage\]/gi,NumberFormat(this.mileage,0)+" "+$T.mileageunit);b=b.replace(/\[colour\]/gi,this.colour);b=b.replace(/\[gearbox\]/gi,this.gearbox);b=b.replace(/\[info\]/gi,this.info);var c;if(setup.override.pricemessage[this.price]){c=setup.override.pricemessage[this.price]}else{c=NumberFormat(this.price,0,true)}b=b.replace(/\[price\]/gi,c);if(this.pics.length>0){b=b.replace(/\[pic\]/gi,'<img src="'+setup.thumburl+this.pics[0]+'.jpg" title="'+this.model+'" />');var f='<ol id="autodirector_pics">';for(var d=0;d<this.pics.length;d++){f+='<li><a href="'+setup.picurl+this.pics[d]+'.jpg" title="'+this.model+" "+setup.text.photo+" "+(d+1)+' - click to enlarge..."><img src="'+setup.thumburl+this.pics[d]+'.jpg" alt="'+this.model+" "+setup.text.photo+'" /><strong>'+a+" "+this.model+"</strong><span>"+setup.text.photo+" "+(d+1)+setup.text.photoof+this.pics.length+"</span></a></li>"}f+="</ol>";b=b.replace(/\[pics\]/gi,f)}else{b=b.replace(/\[pic\]/gi,"");b=b.replace(/\[pics\]/gi,"")}return b};function EventVehicleClick(a){a.StopDefaultAction();run.scrollpos=owl.Screen.ViewScroll().Y;var b=owl.Dom.FindAncestor(a.Target,"a");var c=(b?owl.Number.toInt(String(b.id).substr(5)):0);if(c>0){ShowVehicle(c)}}function EventChangeOrder(c){if(c){c.StopDefaultAction()}var b=owl.Dom.Get("#adorderby");if(b.length==1){b=b[0];owl.Css.ClassApply(b.parentNode,"active");run.orderby=b.value;vehiclelist.sort(sortTypes[run.orderby].sort);var a=owl.Dom.Get("#adsearchterm");if(a.length==1){a=a[0];if(run.orderby>=sortTypes.length-2){a.value=run.search}else{a.value=""}}run.thispage=1;FilterHandler();owl.Css.ClassRemove(b.parentNode,"active");owl.Screen.ScrollToElement(setup.adnode,0,100,0,30)}}function EventSearchSubmit(c){if(c){c.StopDefaultAction()}var a=owl.Dom.Get("#adsearchterm");if(!setup.activesearch&&a.length==1){a=a[0];var b=owl.String.Clean(a.value);if(b.length>0){if(b==run.search){owl.Dom.Get("#adorderby")[0].value=sortTypes.length-2;EventChangeOrder()}else{setup.activesearch=true;run.search=b;a.value=run.search;owl.Css.ClassApply(a.parentNode,"active");if(setup.JSsearch){owl.Dom.HeadRemove(setup.JSsearch)}setup.JSsearch=owl.Dom.LoadJS(setup.searchURL+escape(run.search)+"&callback=EventSearchResult()");setTimeout(EventSearchTimeout,setup.timeout)}}}}function EventSearchResult(){SearchReset();UpdateSearchResult();owl.Dom.Get("#adorderby")[0].value=sortTypes.length-2;EventChangeOrder()}function EventSearchTimeout(){if(setup.activesearch){SearchReset();owl.Dom.HeadRemove(setup.JSsearch);setup.JSsearch=null;run.search="";alert($T.searchfail)}}function SearchReset(){owl.Css.ClassRemove(owl.Dom.Get("#adsearchterm")[0].parentNode,"active");setup.activesearch=false}function EventPageClick(k){k.StopDefaultAction();var f=owl.Dom.FindAncestor(k.Target,"a");if(f){var b=f.getAttribute("href");var g=b.lastIndexOf("#");if(g>=0){var i=b.substr(g+1);var c=i.charAt(0);var a=(c=="*");var d=(c=="-"||c=="+");i=owl.Number.toInt(i);if(a){if(i!=run.pagesize){run.pagesize=i;ShowVehicleList()}}else{var j=(d?run.thispage+i:i);if(run.thispage!=j){run.thispage=j;ShowVehicleList();owl.Screen.ScrollToElement(setup.adnode,0,100,0,30)}}}}}function EventBackClick(a){a.StopDefaultAction();if(!setup.activesend){ShowVehicleList(false)}window.scrollTo(0,run.scrollpos)}function EventSendEnquiry(k){k.StopDefaultAction();if(!setup.activesend){var f="";var c=false;var a=owl.Dom.Get("#adcomments")[0];run.comments=owl.String.Trim(a.value).replace(/\r/g,"").replace(/\n/g,"\n");var b;do{b=run.comments;run.comments=run.comments.replace(/\n\n/g,"\n")}while(run.comments!=b);run.comments=run.comments.substr(0,setup.comlimit);a.value=run.comments;var j=owl.Dom.Get("#adtel")[0];run.tel=owl.String.Trim(j.value);j.value=run.tel;var d=owl.Dom.Get("#ademail")[0];run.email=d.value;if(run.email!=""){run.email=verify_email(run.email);if(run.email==""){f=$T.invalidemail+"\n"+f;c=d}else{d.value=run.email}}if(run.email==""&&run.tel==""&&f==""){f=$T.invalidcontact;c=d}var l=owl.Dom.Get("#adname")[0];run.name=owl.String.Clean(l.value);l.value=run.name;if(run.name.length<4){f=$T.invalidname+"\n"+f;c=l}if(c){alert($T.invalid+"\n"+f);try{c.select()}catch(i){}try{c.focus()}catch(i){}}else{setup.activesend=true;setup.nodeenquiry.style.display="none";owl.Css.ClassApply(setup.nodeenqresult,"active");owl.Dom.Text(setup.nodeenqresult,$T.sendenquiry);setup.nodeenqresult.style.display="block";var h=setup.emailURL+run.ID;h+="&callback=EventSendResult()";h+="&url="+escape(setup.thisURL);h+="&name="+escape(run.name);h+=(run.email!=""?"&email="+escape(run.email):"");h+=(run.tel!=""?"&tel="+escape(run.tel):"");h+=(run.comments!=""?"&comments="+escape(run.comments):"");if(setup.JSsend){owl.Dom.HeadRemove(setup.JSsend)}setup.JSsend=owl.Dom.LoadJS(h);setTimeout(EventSendTimeout,setup.timeout);SaveDefaults();var g=VehicleIndex(run.ID);TrackEvent("enquiry",vehiclelist[g].Replace(GAsetup.vehicledetails),vehiclelist[g].price)}}}function EventSendResult(){SendReset();var a="";switch(setup.senderror){case"":a+=$T.sendsuccess;break;case"noemail":a+=$T.sendfail;setup.nodeenquiry.style.display="block";break;default:a+=$T.sendfail;break}owl.Dom.Text(setup.nodeenqresult,a)}function EventSendTimeout(){if(setup.activesend){SendReset();owl.Dom.HeadRemove(setup.JSsend);setup.JSsend=null;owl.Dom.Text(setup.nodeenqresult,$T.sendtimeout);setup.nodeenquiry.style.display="block"}}function SendReset(){owl.Css.ClassRemove(setup.nodeenqresult,"active");setup.activesend=false}function EventLimitComments(a){var b=a.Key();if(a.Element.value.length>setup.comlimit){a.Element.value=a.Element.value.substr(0,setup.comlimit)}if(b.Function==""&&b.Pressed.length+a.Element.value.length>setup.comlimit){a.StopDefaultAction()}}function TrackEvent(d,a,c){a=a||null;c=c||null;var b=GAsetup;if(setup.complete&&b.enabled&&b.actions[d]&&typeof _gaq!="undefined"){_gaq.push([b.type,b.category,b.actions[d],a,c])}}function NumberFormat(g,c,k){var h=(setup.locale=="EURO"?" ":",");var m=(setup.locale=="EURO"?",":".");var n="-";var l="";var b,i,f,j;if(isNaN(g)){g=0}c=Math.abs(owl.Number.toInt(c));b=(g<0);g=owl.String.Pad(String(Math.round(Math.abs(g)*Math.pow(10,c))),c,"0");i=g.substr(0,g.length-c);f=g.substr(g.length-c);if(i==""){i="0"}else{do{j=i;i=i.replace(/(\d+)(\d{3})/g,"$1"+h+"$2")}while(i!=j)}g=i+(c>0?m+f:"");if(k){var a="\u00a3";var d="";if(setup.override.currencystart||setup.override.currencyend){a=(setup.override.currencystart||"");d=(setup.override.currencyend||"")}else{if(setup.locale=="USD"){a="$"}if(setup.locale=="EURO"){a="";d="\u20ac"}}g=a+g+d}if(b){g=n+g+l}return g}function verify_email(a){a=owl.String.Trim(a.toLowerCase());if(a!=""){if(a.replace(/^[^@]+@[a-z0-9]+([_\.\-]{0,1}[a-z0-9]+)*([\.]{1}[a-z0-9]+)+$/,"")!=""){a=""}}return a}if(!owl){var owl={};owl.Version=0.1;owl.UserAgent=navigator.userAgent.toLowerCase();owl.Browser={IE:/msie/.test(owl.UserAgent)&&!/opera/.test(owl.UserAgent),Mozilla:/mozilla/.test(owl.UserAgent)&&!/(compatible|webkit)/.test(owl.UserAgent),Opera:/opera/.test(owl.UserAgent),Safari:/webkit/.test(owl.UserAgent),Konqueror:/konqueror/.test(owl.UserAgent)};owl.Browser.Version=owl.UserAgent.replace(/^.+[ox|ra|on|or][\/: ]/,"");if(owl.Browser.Version.indexOf("msie")>=0){owl.Browser.Version=owl.Browser.Version.replace(/^.+[ie][\/: ]/,"")}owl.Browser.Version=owl.Browser.Version.replace(/([^\d.].+$)/,"");owl.Browser.VerNum=parseFloat(owl.Browser.Version);owl.Number=function(){var a=/[^0-9-.]/g;function c(f){var g=String(f);g=g.replace(a,"");var d=parseInt(g,10);return(isNaN(d)?0:d)}function b(d){if(isNaN(d)){d=0}return(Math.min(1,Math.max(-1,d)))}return{toInt:c,Sign:b}}();owl.String=function(){var f=/^\s*|\s*$/g;var b=/[^\w|\s|@|&|.|,|!|%|(|)|+|-]/g;var a=/[_|\s]+/g;function g(i){return String(i).replace(f,"")}function h(i){return g(String(i).replace(b,"").replace(a," "))}function c(k,j,i){k=String(k);j=owl.Number.toInt(j);if(typeof i=="undefined"){i=" "}else{i=String(i);if(i.length<1){i=" "}}while(k.length<j){k=i+k}return k}function d(l,k){if(typeof k=="string"){k=[k]}if(k&&k.length){for(var j=0,i=k.length;j<i;j++){l=l.replace(new RegExp("(^|[^%])%"+j+"([^0-9]|$)","g"),"$1"+k[j]+"$2")}}return l}return{Trim:g,Clean:h,Pad:c,Format:d}}();if(owl&&!owl.Array){owl.Array=function(){function b(f){return !!(f&&f.constructor==Array)}function a(g,f){g[g.length]=f}function c(g){var f=null;if(g.length>0){f=g[g.length-1];g.length--}return f}function d(f,g){return(f?(b(f)?f:[f]):(typeof g=="undefined"?[]:(b(g)?g:[g])))}return{Is:b,Push:a,Pop:c,Make:d}}()}owl.Each=function(g,d){if(g.length){for(var c=0,b=g.length,a=g[0];c<b&&d(a,c)!==false;a=g[++c]){}}else{for(var f in g){if(d(g[f],f)===false){break}}}};owl.Property=function(){function a(g){if(!g.owlP){g.owlP={};g.owlP.length=0}}function d(h,g,i){owl.Each(owl.Array.Make(h),function(j){a(j);j.owlP[g]=i;j.owlP.length++})}function f(h,g){return(b(h,g)?h.owlP[g]:null)}function b(h,g){return(h&&h.owlP&&typeof h.owlP[g]!="undefined")}function c(h,g){owl.Each(owl.Array.Make(h),function(i){if(i.owlP&&i.owlP[g]){delete i.owlP[g];i.owlP.length--;if(i.owlP.length==0){i.owlP=null}}})}return{Set:d,Get:f,Exists:b,Delete:c}}();owl.Object=function(){function Exists(object,item){return(object&&typeof object[item]!="undefined")}function PropertyExists(object,item){var type=(object?typeof(object[item]):"undefined");return(type!="undefined"&&type!="function")}function MethodExists(object,item){return(object&&typeof object[item]=="function")}function Serialize(obj){var t=typeof(obj);if(t!="object"||obj===null){if(t=="string"){obj='"'+obj+'"'}return String(obj)}else{var n,v,json=[],arr=owl.Array.Is(obj);for(n in obj){v=obj[n];t=typeof(v);if(t=="string"){v='"'+v+'"'}else{if(t=="object"&&v!==null){v=owl.Object.Serialize(v)}}json.push((arr?"":'"'+n+'":')+String(v))}return(arr?"[":"{")+String(json)+(arr?"]":"}")}}function DeSerialize(serial){if(serial===""){serial='""'}eval("var ret = "+serial+";");return ret}return{Exists:Exists,PropertyExists:PropertyExists,MethodExists:MethodExists,Serialize:Serialize,DeSerialize:DeSerialize}}()}if(owl&&!owl.Http){owl.Http=function(){var b,a;function c(){var f=owl.String.Trim(location.search);if(f!=a){a=f;b={};if(f.charAt(0)=="?"){f=f.substr(1)}owl.Each(f.split("&"),function(g){var h=g.split("=");if(h.length==2){b[unescape(h[0])]=unescape(h[1])}})}return b}function d(f){c();return(b[f]?b[f]:null)}return{Arguments:c,Argument:d}}()}if(owl&&!owl.Cookie){owl.Cookie=function(){var i="[|]";var g=/\[\|\]/g;var d=null;var b=function(){h("testcookie","testvalue",0.1);var k=(a("testcookie")=="testvalue");b=function(){return k};return b()};function h(m,o,n){if(!d){d={}}d[m]=o;o=String(o).replace(/\r/g,"").replace(/\n/g,i);var k="";if(n){var l=new Date();l.setTime(l.getTime()+(n*1000));k="; expires="+l.toUTCString()}document.cookie=m+"="+String(o)+k+"; path="+location.pathname.substr(0,location.pathname.indexOf("/",1)+1)}function a(k){var l=null;if(!d){d={};owl.Each(document.cookie.split(";"),function(n){n=owl.String.Trim(n);var m=n.indexOf("=");if(m>0){d[n.substr(0,m)]=n.substring(m+1).replace(g,"\n")}})}if(d[k]){l=d[k]}return l}function j(k){h(k,"",-60);d[k]=null}function f(l,k,m){h(l,owl.Object.Serialize(k),m)}function c(k){return owl.Object.DeSerialize(a(k))}return{Enabled:b,Set:h,Get:a,Delete:j,Store:f,Restore:c}}()}if(owl&&!owl.Image){owl.Image=function(){function a(d,f){var c=new Image();c.src=d;if(f){if(c.complete){f(c)}else{c.onload=function(){f(c)}}}}function b(d,f,c){if(owl.Browser.IE&&owl.Browser.VerNum>=5.5&&owl.Browser.VerNum<7){if(!c){c="crop"}owl.Each(owl.Array.Make(d),function(g){g.style.backgroundImage="none";g.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"', sizingMethod='"+c+"')"})}}return{Load:a,IEpng:b}}()}if(owl&&!owl.Css){owl.Css=function(){function b(h,g){var i=true;if(g){owl.Each(owl.Array.Make(h),function(j){var k=" "+j.className+" ";i=(k.indexOf(" "+g+" ")>=0);return i})}return i}function f(h,g){owl.Each(owl.Array.Make(h),function(i){var j=" "+i.className+" ";if(j.indexOf(" "+g+" ")<0){j+=g;i.className=owl.String.Trim(j)}})}function d(h,g){owl.Each(owl.Array.Make(h),function(i){var j="";if(g){j=" "+i.className+" ";j=owl.String.Trim(j.replace(new RegExp(" "+g+" ","gi")," "))}i.className=j})}function a(j,h,g){h=Math.min(Math.max(h,0),99.999);var i=h/100;owl.Each(owl.Array.Make(j),function(k){if(g!==false){if(k.style.visibility=="hidden"){if(h>0){k.style.visibility="visible"}}else{if(h==0){k.style.visibility="hidden"}}}k.style.opacity=i;k.style.MozOpacity=i;k.style.filter="alpha(opacity:"+h+")";k.style.KHTMLOpacity=i})}function c(g,i){var h="";if(g){if(document.defaultView&&document.defaultView.getComputedStyle){h=document.defaultView.getComputedStyle(g,"").getPropertyValue(i)}else{if(g.currentStyle){i=i.replace(/\-(\w)/g,function(j,k){return k.toUpperCase()});h=g.currentStyle[i]}}}return h}return{ClassExists:b,ClassApply:f,ClassRemove:d,Opacity:a,ComputedStyle:c}}()}if(owl&&owl.Browser&&owl.Browser.IE&&Math.floor(owl.Browser.VerNum)==6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}if(owl&&owl.Css&&!owl.Dom&&document.getElementById&&document.getElementsByTagName){owl.Dom=function(){var u=1;var r=2;var t=3;var m=8;var k=/[^\w|\s|-|#|\.|,|\[|\]|=|~|!|*]/g;var h=/\s+/g;var s=/^[^#|\.|\[]*/;var f=/#[^#|\.|\[]+/;var g=/\.[^#|\.|\[]+/;var i=/\[(.+)\]/;var n=/([~|!|*]*=)/;var p=/(^[^=|~|!|*])+/;var y=owl.Array,B=[document];function d(H,D){D=y.Make(D,B);H=owl.String.Trim(String(H).replace(k,"").replace(h," "));var C=[],K=H.split(","),M,G,L,I,J,F;for(L=0,I=K.length;L<I;L++){M=owl.String.Trim(K[L]);var E=D.slice();G=M.split(" ");for(J=0,F=G.length;J<F;J++){if(D.length>0){E=j(G[J],E)}}owl.Each(E,function(N){y.Push(C,N)})}return C}function j(I,P){var L=[],T,M,O,F,K,S,J,G;var H={Tag:"",ID:"",Class:"",AttribCheck:function(){return true}};H.Tag=s.exec(I);H.Tag=(H.Tag?H.Tag[0].toLowerCase():"*");if(H.Tag==""){H.Tag="*"}H.ID=f.exec(I);H.ID=(H.ID?H.ID[0].substr(1):"");H.Class=g.exec(I);H.Class=(H.Class?H.Class[0].substr(1):"");var Q=i.exec(I);if(Q){Q=Q[1];var D,R=null,E=n.exec(Q);E=(E?E[1]:null);if(E){var N=Q.indexOf(E);D=Q.substr(0,N);R=Q.substr(N+E.length)}else{D=Q}H.AttribCheck=function(V){var U;switch(D){case"class":U=V.className;break;case"for":U=V.htmlFor;break;default:U=V.getAttribute(D);break}U=(U?U:"");return((U==""&&(!E||E=="!="))||(!E||((E=="="&&U==R)||(E=="!="&&U!=R)||(E=="*="&&U.indexOf(R)>=0)||(E=="~="&&(" "+U+" ").indexOf(" "+R+" ")>=0))))}}for(O=0,F=P.length;O<F;O++){T=[];if(H.ID){M=document.getElementById(H.ID);if(M&&(H.Tag=="*"||M.nodeName.toLowerCase()==H.Tag)&&(!H.Class||owl.Css.ClassExists(M,H.Class))&&H.AttribCheck(M)){T[0]=M}}else{var C=function(U){return((H.Tag=="*"||U.nodeName.toLowerCase()==H.Tag)&&(H.Class==""||owl.Css.ClassExists(U,H.Class))&&H.AttribCheck(U))};if(H.Tag=="*"){T=q(P[O],0,C)}else{M=P[O].getElementsByTagName(H.Tag);for(J=0,G=M.length;J<G;J++){if(C(M[J])){T[T.length]=M[J]}}}}for(K=0,S=T.length;K<S;K++){L[L.length]=T[K]}}return L}function q(E,C,G){var F=function(K,M){var L=[],J,H,I;if(!M){M=1}for(J=0,H=K.childNodes.length;J<H;J++){I=K.childNodes[J];if(I.nodeType==u&&I.nodeName!="!"){if(!G||G(I)){L[L.length]=I}if(K.childNodes.length>0&&(!C||M<C)){L=L.concat(F(I,M++))}}}return L};E=y.Make(E,B);var D=[];owl.Each(E,function(H){D=D.concat(F(H))});return D}function a(F,E,D,C){F=y.Make(F,B);E=y.Make(E,B);owl.Each(E,function(J,I){if(C){c(J)}var K=Math.min(I,F.length-1);for(var H=0,G=F[K].childNodes.length;H<G;H++){J.appendChild(F[K].childNodes[H].cloneNode(true))}if(D){c(F[K])}else{z(J)}})}function z(C){owl.Each(y.Make(C,B),function(D){q(D,null,function(E){if(E.id){E.removeAttribute("id")}return true})})}function c(C){owl.Each(y.Make(C,B),function(D){while(D.lastChild){D.removeChild(D.lastChild)}})}function l(D,C){C=C.toLowerCase();while(D.nodeName.toLowerCase()!=C&&D.parentNode){D=D.parentNode}if(D.nodeName.toLowerCase()!=C){D=null}return D}function b(D){var E=false;for(var F=0,C=D.childNodes.length;F<C&&!E;F++){E=(D.childNodes[F].nodeType==t?D.childNodes[F]:b(D.childNodes[F]))}return E}function w(C,E){var D=(typeof E!="undefined");E=(D?(typeof E=="string"?[E]:E):"");owl.Each(y.Make(C,B),function(H,G){var F=b(H);if(D){var I=E[Math.min(G,E.length-1)];if(F){F.nodeValue=I}else{F=H.appendChild(document.createTextNode(I))}}else{if(F){E+=(E==""?"":"\n")+F.nodeValue}}});return(D?true:E)}function v(D){var C=d("head");return(C.length==1?C[0].appendChild(D):null)}function A(D){var C=d("head");return(C.length==1?C[0].removeChild(D):null)}function x(C){var D=document.createElement("script");D.setAttribute("type","text/javascript");D.setAttribute("src",C);return v(D)}function o(D){var C=document.createElement("link");C.setAttribute("type","text/css");C.setAttribute("rel","stylesheet");C.setAttribute("media","screen");C.setAttribute("href",D);return v(C)}return{ElementNode:u,AttributeNode:r,TextNode:t,CommentNode:m,Get:d,Descendents:q,Clone:a,RemoveIDs:z,RemoveChildren:c,FindAncestor:l,Text:w,HeadAppend:v,HeadRemove:A,LoadJS:x,LoadCSS:o}}()}if(owl&&!owl.Xml){owl.Xml=function(){var g=1;var i=2;var h=3;var f=8;function a(){var j=null;if(document.implementation&&document.implementation.createDocument){j=document.implementation.createDocument("","xml",null)}else{owl.Each(["MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],function(l){try{j=new ActiveXObject(l)}catch(k){}return !!j})}return j}function c(k){var j=null;if(!k){j=a()}else{if(typeof DOMParser!="undefined"){j=(new DOMParser()).parseFromString(k,"application/xml")}else{j=a();if(j){j.loadXML(k)}}}return j}function d(t,k,j){if(typeof j=="undefined"){j=1}if(j>1){if(t.nodeType==1){var m=document.createElement(t.nodeName);for(var q=0,o=t.attributes.length;q<o;q++){var s=t.attributes[q].name,l=t.attributes[q].value;switch(s){case"class":m.className=l;break;case"for":m.htmlFor=l;break;default:m.setAttribute(s,l);break}}k=k.appendChild(m)}else{if(t.nodeType==3){var r=(t.nodeValue?t.nodeValue:"");var p=owl.String.Trim(r);if(p.length<7||(p.indexOf("<!--")!=0&&p.indexOf("-->")!=(p.length-3))){k.appendChild(document.createTextNode(r))}}}}for(var n=0;n<t.childNodes.length;n++){d(t.childNodes[n],k,j+1)}return(k.lastChild?k.lastChild:k)}function b(j,l){var k=null;if(window.XSLTProcessor){try{var n=new XSLTProcessor();n.importStylesheet(l);k=n.transformToDocument(j,document)}catch(m){}}else{try{k=this.New();k.loadXML(j.transformNode(l))}catch(m){}}return(k&&k.documentElement&&k.documentElement.childNodes.length?k:null)}return{ElementNode:g,AttributeNode:i,TextNode:h,CommentNode:f,New:a,Load:c,Copy:d,Transform:b}}()}if(owl&&owl.Dom&&owl.Xml&&!owl.innerHTML){owl.innerHTML=function(c,d,a){a=(a!=false);c=owl.Array.Make(c);if(c.length>0){var b=owl.Xml.Load("<root>"+d+"</root>");if(b&&b.documentElement){owl.Each(c,function(f){if(a){owl.Dom.RemoveChildren(f)}c=owl.Xml.Copy(b.documentElement,f)})}}return c}}if(owl&&!owl.Event){owl.Event=function(b,d,c,a){b=owl.Array.Make(b,[window]);c=(typeof c=="function"?c:null);a=(a||a==0?owl.Number.toInt(a):null);var f=[];owl.Each(b,function(g){f[f.length]=owl.EventRegister.Add(g,d,c,a)});this.Detach=function(){for(var h=0,g=b.length;h<g;h++){owl.EventRegister.Detach(b[h],d,f[h],true)}}};owl.EventRegister=function(){var b=[],j=[],a=[],f=0,g=false;var h="EventRegister";function l(p,r,q,o){var m=owl.Property.Get(p,h);if(!m){m={};b[b.length]=p}if(!m[r]){f++;j[f]=[];m[r]=f;owl.Property.Set(p,h,m);var n=p["on"+r];if(n){new owl.Event(p,r,n)}p["on"+r]=owl.EventRegister.Handler;if(f==1){new owl.Event(window,"unload",owl.EventRegister.CleanUp,1e+100)}}var s=m[r];var t=j[s].length;j[s][t]={Handler:q,Priority:o};c(p,r,s);return{Reg:s,Func:t}}function c(n,q,r){var m=[];for(var s=0,o=j[r].length;s<o;s++){if(j[r][s].Handler!=null){m[m.length]={Index:s,Priority:j[r][s].Priority}}}if(m.length>0){m.sort(function(t,p){return t.Priority-p.Priority})}else{n["on"+q]=null;delete n.owlP[h][q];m=null}a[r]=m;g=false}function d(q){var n=true,s=new owl.EventInformation(this,q);if(s.Index&&s.Index.Reg){var m=a[s.Index.Reg].slice();for(var r=0,o=m.length;r<o;r++){s.Index.Func=m[r].Index;if(s.AllowNext&&j[s.Index.Reg][s.Index.Func].Handler){n&=(j[s.Index.Reg][s.Index.Func].Handler(s)!==false)}}}if(g){c(s.Element,s.Type,s.Index.Reg)}return n}function i(o,p,m,n){j[m.Reg][m.Func].Handler=null;if(n){c(o,p,m.Reg)}else{g=true}}function k(){for(var p=0,o=b.length,m=b[0];p<o;m=b[++p]){for(var n in owl.Property.Get(m,h)){m["on"+n]=null}owl.Property.Delete(m,h)}b=null;j=null;a=null}return{Namespace:h,Add:l,Handler:d,Detach:i,CleanUp:k}}();owl.EventInformation=function(a,b){this.Element=a;this.Event=(b?b:window.event);if(this.Event){this.Type=this.Event.type.toLowerCase();this.Target=(this.Event.target?this.Event.target:this.Event.srcElement);this.Index={Reg:this.Element.owlP[owl.EventRegister.Namespace][this.Type],Func:null};this.AllowNext=true}};owl.EventInformation.prototype.Key=function(){if(!this.KeySet){this.KeySet={Pressed:"",Function:"",Shift:this.Event.shiftKey,Ctrl:this.Event.ctrlKey,Alt:this.Event.altKey};if(owl.EventKey.test(this.Type)){var b=this.Event.keyCode;var a=(typeof this.Event.charCode!="undefined"?this.Event.charCode:null);if(a>0){this.KeySet.Pressed=String.fromCharCode(a)}else{if(owl.EventCK[b]&&(a!=null||b<32||(this.Type!="keypress"||(!this.Shift&&b<112&&b!=35&&b!=39&&b!=45&&b!=46)))){this.KeySet.Function=owl.EventCK[b]}else{if(b>=32){this.KeySet.Pressed=String.fromCharCode(b)}}}}}return this.KeySet};owl.EventInformation.prototype.Mouse=function(){if(!this.MouseSet){this.MouseSet={X:0,Y:0};if(owl.EventMouse.test(this.Type)){this.MouseSet.X=(this.Event.pageX?this.Event.pageX:this.Event.clientX+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft));this.MouseSet.Y=(this.Event.pageY?this.Event.pageY:this.Event.clientY+Math.max(document.documentElement.scrollTop,document.body.scrollTop))}}return this.MouseSet};owl.EventInformation.prototype.Detach=function(){owl.EventRegister.Detach(this.Element,this.Type,this.Index)};owl.EventInformation.prototype.StopHandlers=function(){this.AllowNext=false};owl.EventInformation.prototype.StopPropagation=function(){if(this.Event.stopPropagation){this.Event.stopPropagation()}this.Event.cancelBubble=true};owl.EventInformation.prototype.StopDefaultAction=function(){if(this.Event.preventDefault){this.Event.preventDefault()}this.Event.returnValue=false};owl.EventKey=/^key/i;owl.EventMouse=/mouse|click/i;owl.EventCK=[];owl.EventCK[8]="backspace";owl.EventCK[9]="tab";owl.EventCK[13]="enter";owl.EventCK[19]="break";owl.EventCK[27]="esc";owl.EventCK[33]="pageup";owl.EventCK[34]="pagedown";owl.EventCK[35]="end";owl.EventCK[36]="home";owl.EventCK[37]="left";owl.EventCK[38]="up";owl.EventCK[39]="right";owl.EventCK[40]="down";owl.EventCK[45]="insert";owl.EventCK[46]="delete";owl.EventCK[112]="f1";owl.EventCK[113]="f2";owl.EventCK[114]="f3";owl.EventCK[115]="f4";owl.EventCK[116]="f5";owl.EventCK[117]="f6";owl.EventCK[118]="f7";owl.EventCK[119]="f8";owl.EventCK[120]="f9";owl.EventCK[121]="f10";owl.EventCK[122]="f11";owl.EventCK[123]="f12";owl.EventCK[144]="numlock";owl.EventCK[145]="scrolllock";if(history&&history.navigationMode){history.navigationMode="compatible"}}if(owl&&!owl.Timer){owl.Timer=function(a,m,d,o,g,c,n){var b=null,f=(d||d==0?d:(a<m?1:-1));var j=(o?o:20),l=(g?g:0),k=(c?c:0);this.StartValue=(a?a:0);this.StopValue=(m||m==0?m:100);this.Value=this.StartValue;this.CallBack=(n?n:null);this.OnStart=null;this.OnStop=null;this.OnReverse=null;var i=false;var h=this;this.SetStep=function(p){if(p==0){this.Stop();f=0}else{if((p<0&&this.StartValue<this.StopValue)||(p>0&&this.StartValue>this.StopValue)){f=-p;this.Reverse()}else{f=p}this.Start()}};this.GetStep=function(){return f};this.Start=function(){if(!b){i=false;var q=function(r){if(!i){if(r){if(h.OnStart){h.OnStart(h)}if(h.CallBack){h.CallBack(h)}}b=setInterval(function(){h.Run()},j)}};var p=(this.Value==this.StartValue);if(p&&l>0){setTimeout(function(){q(p)},l)}else{q(p)}}};this.Run=function(){this.Value+=f;this.Value=(f>0?Math.min(this.Value,this.StopValue):Math.max(this.Value,this.StopValue));if(this.CallBack){this.CallBack(this)}if(this.Value==this.StopValue){this.Stop()}};this.Reverse=function(){var p=this.StartValue;this.StartValue=this.StopValue;this.StopValue=p;f=-f;if(this.OnReverse){this.OnReverse(this)}};this.Stop=function(){i=true;if(b){b=clearInterval(b);if(this.Value==this.StopValue){setTimeout(function(){if(h.OnStop){h.OnStop(h)}},k)}}};if(this.CallBack){this.Start()}}}if(owl&&owl.Dom&&owl.Timer&&!owl.Screen){owl.Screen=function(){var j=function(){var l=owl.Dom.Get("body");if(l.length==1){j=function(){return l[0]};return j()}else{return null}};function g(l){var m={X:l.offsetLeft,Y:l.offsetTop};while((l=l.offsetParent)){m.X+=l.offsetLeft;m.Y+=l.offsetTop}return m}var i;function h(){if(!i){if(window.innerWidth){i=function(){return{Width:window.innerWidth,Height:window.innerHeight}}}else{if(document.documentElement&&document.documentElement.clientWidth){i=function(){return{Width:document.documentElement.clientWidth,Height:document.documentElement.clientHeight}}}else{i=function(){return{Width:(j()?j().clientWidth:0),Height:(j()?j().clientHeight:0)}}}}}return i()}function b(){return{X:window.pageXOffset||(document.documentElement&&document.documentElement.scrollLeft)||(j()&&j().scrollLeft),Y:window.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(j()&&j().scrollTop)}}function k(){var l={Width:0,Height:0};if(j()){if(document.documentElement&&document.documentElement.scrollWidth){l.Width=document.documentElement.scrollWidth;l.Height=document.documentElement.scrollHeight}else{if(j().offsetWidth){l.Width=j().offsetWidth;l.Height=j().offsetHeight}}}return l}var a=function(){var l={};l.Width=(screen.width?screen.width:null);l.Height=(screen.height?screen.height:null);l.AvailWidth=(screen.availWidth?screen.availWidth:l.Width);l.AvailHeight=(screen.availHeight?screen.availHeight:l.Height);l.AvailLeft=(screen.availLeft?screen.availTop:0);l.AvailTop=(screen.availTop?screen.availTop:0);l.ColorDepth=(screen.colorDepth?screen.colorDepth:(screen.pixelDepth?screen.pixelDepth:null));a=function(){return l};return a()};var f=null;function c(n,m,l,o){if(l===false){window.scrollTo(n,m);if(typeof o=="function"){o()}}else{if(f){f.Stop()}f=new owl.Timer(owl.Screen.Config.MoveFrames,1,-1,owl.Screen.Config.MovePause,0,0,function(r){var q=b();var s=Math.sqrt(r.Value);window.scrollTo(q.X+Math.ceil((n-q.X)/s),q.Y+Math.ceil((m-q.Y)/s));var p=b();if(p.X==q.X&&p.Y==q.Y){r.Stop();if(typeof o=="function"){o();o=null}}})}}function d(p,o,v,s,l,u,n,w){if(u!==true){var m=h();o=Math.floor((o/100)*m.Width);v=Math.ceil((v/100)*m.Width);s=Math.floor((s/100)*m.Height);l=Math.ceil((l/100)*m.Height)}var q=g(p);var x=b();var t=(q.X<x.X+o?q.X-o:(q.X>x.X+v?q.X-v:x.X));var r=(q.Y<x.Y+s?q.Y-s:(q.Y>x.Y+l?q.Y-l:x.Y));c(t,r,n,w)}return{Location:g,ViewPort:h,ViewScroll:b,Page:k,Resolution:a,ScrollTo:c,ScrollToElement:d}}();owl.Screen.Config={MoveFrames:50,MovePause:20}}if(owl&&owl.Css&&owl.Dom&&owl.Screen&&owl.Timer&&!owl.Overlay){owl.Overlay=function(){var a={PageFadeID:"lb_pageoverlay",PageFadeMax:60,PageFadeStep:10,PageFadePause:5};var i=null,h=null,f=null,d="opacity";function g(s,k,j,m,n){if(!i){var q=owl.Dom.Get("body");if(q.length==1){i=q[0].appendChild(document.createElement("div"));i.style.position="absolute";i.style.top="0px";i.style.left="0px"}}if(i){i.id=a.PageFadeID;owl.Property.Set(i,d,0);owl.Css.Opacity(i,0);i.style.width="100%";i.style.height="100%";var o=owl.Screen.Page();var p=owl.Screen.ViewPort();var l=Math.max(i.offsetWidth,o.Width,(owl.Browser.IE?p.Width:0));var r=Math.max(i.offsetHeight,o.Height,(owl.Browser.IE?p.Height:0));h=new owl.Overlay.Elements(0,0,l,r);i.style.width=l+"px";i.style.height=r+"px";j=(j?j:a.PageFadeMax);f=new owl.Timer(0,j,(m?m:a.PageFadeStep),(n?n:a.PageFadePause));f.CallBack=function(u){owl.Css.Opacity(i,u.Value)};if(s){f.OnStop=function(u){if(u.Value>=j){s()}}}f.Start()}}function b(j){if(f){f.Reverse();f.OnStop=function(k){h.Show();i.style.width="0px";i.style.height="0px";if(j){j()}};f.Start()}}function c(){var j=document.createElement("iframe");j.src="javascript:false;";j.frameBorder="0";j.scrolling="no";j.style.position="absolute";j.style.padding="0px";j.style.margin="0px";j.style.width="50px";j.style.height="50px";j.style.top="0px";j.style.left="0px";j.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";return j}return{Config:a,PageFadeOut:g,PageFadeIn:b,CreateIframe:c}}();owl.Overlay.Elements=function(b,a,d,c){if(owl.Browser.IE&&owl.Browser.VerNum<7){this.Hidden=null;this.HideTags="select, iframe, applet";this.HideID="owlframe";this.TX=b;this.TY=a;this.BX=d;this.BY=c;this.Cover()}};owl.Overlay.Elements.prototype.Cover=function(){if(this.HideTags&&!this.Hidden){var a=this;this.Hidden=[];owl.Each(owl.Dom.Get(this.HideTags),function(f){if(!owl.Property.Exists(f,a.HideID)){var g=owl.Screen.Location(f);var b={TX:g.X,TY:g.Y,BX:g.X+f.offsetWidth,BY:g.Y+f.offsetHeight};if(b.BX>a.TX&&b.BY>a.TY&&a.BX>b.TX&&a.BY>b.TY){if(owl.Browser.VerNum<5.5){if(f.style.visibility!="hidden"){f.style.visibility="hidden";owl.Array.Push(a.Hidden,{Element:f,Iframe:false})}}else{var c=(f.offsetParent.nodeName.toLowerCase()=="body");var d=f.parentNode.appendChild(owl.Overlay.CreateIframe());d.style.left=(c?b.TX:f.offsetLeft)+Math.max(0,a.TX-b.TX)+"px";d.style.top=(c?b.TY:f.offsetTop)+Math.max(0,a.TY-b.TY)+"px";d.style.width=Math.min(a.BX,b.BX)-Math.max(a.TX,b.TX)+"px";d.style.height=Math.min(a.BY,b.BY)-Math.max(a.TY,b.TY)+"px";owl.Property.Set(d,a.HideID,true);owl.Array.Push(a.Hidden,{Element:f,Iframe:d})}}}})}};owl.Overlay.Elements.prototype.Show=function(){if(this.Hidden){owl.Each(this.Hidden,function(a){if(a.Iframe){a.Element.parentNode.removeChild(a.Iframe)}else{a.Element.style.visibility="visible"}})}this.Hidden=null}}if(owl&&owl.Event&&owl.innerHTML&&owl.Image&&owl.Overlay&&!owl.Lightbox){owl.Lightbox=function(J){if(!owl.Css.ClassExists(J,owl.Lightbox.Config.Container.ActiveClass)){var G=owl.Dom;var F=owl.Event;var x=owl.Timer;var S=owl.Lightbox.Config;var v=S.Animation;owl.Css.ClassApply(J,S.Container.ActiveClass);var E={shown:false,win:null,img:null,bar:null};var P={};var a=0,d=0,O=0,y=0,h=0,i=0,I=null;var j=[],U=null,T=0;var R=null,g=false,D=null,k=false;var r=0,p=0,Y=0,V=0;var K=null,N=null,t=null,C=null,H=null;owl.Each(owl.Dom.Get("a",J),function(A,Z){j[Z]=new owl.Lightbox.Image(A);owl.Property.Set(A,"LBindex",Z);new F(A,"click",function(aa){q(aa)})});if(!S.Preload.All&&S.Preload.Next&&j.length>0){j[0].Load()}}function q(aa){if(S.Enabled){s(aa);var Z=owl.Property.Get(aa.Element,"LBindex");j[Z].Load();if(!E.shown){E.shown=true;owl.Overlay.PageFadeOut(function(){Q(Z)});var A=owl.Screen.ViewPort();h=A.Width;i=A.Height;O=Math.max(S.Size.Minimum,Math.ceil(h-S.Size.WidthPad));y=Math.max(S.Size.Minimum,Math.ceil(i-S.Size.HeightPad))}}}function o(A){s(A);owl.Each(P,function(Z){Z.Detach()});if(K){K.Stop()}if(N){N.Stop()}E.win.style.display="none";owl.Overlay.PageFadeIn(function(){E.shown=false})}function Q(A){if(E.win===null){E.win=owl.Lightbox.CreateWindow();E.img=G.Get("img",E.win)[0];E.bar=G.Get("#lb_bar",E.win)[0];if(j.length<2){owl.Each(G.Get("a[id!=lb_close]",E.bar),function(Z){Z.style.display="none"})}owl.Css.Opacity(E.bar,S.Animation.BarOpacity)}L();a=S.Size.Start;d=a;I=owl.Screen.ViewScroll();E.win.style.display="block";z(a,d);f(A);P.KeyDown=new F(document,"keydown",m);P.Next=new F(G.Get("#lb_next",E.bar),"click",l);P.Back=new F(G.Get("#lb_back",E.bar),"click",l);P.Close=new F(G.Get("#lb_close",E.bar),"click",o);P.MouseOver=new F(E.win,"mouseover",u);P.Focus=new F(E.win,"focus",u);P.MouseOut=new F(E.win,"mouseout",u);P.Blur=new F(E.win,"blur",u);P.MouseMove=new F(E.win,"mousemove",W);P.Overlay=new F(G.Get("#"+owl.Overlay.Config.PageFadeID),"click",o);P.WinFocus=new F(document,"focus",b)}function b(Z){var A=Z.Target;while(A!=E.win&&A.parentNode){A=A.parentNode}if(A!=E.win){s(Z);E.win.focus();u(Z)}}function m(Z){var aa=Z.Key().Function;if(Z.Key().Pressed==" "){aa="right"}var A={esc:99,left:-1,up:-1,pageup:-1,right:1,down:1,pagedown:-1};if(A[aa]){if(A[aa]==99){o()}else{l(Z,A[aa])}}}function l(ab,Z){s(ab);if(!Z){Z=(ab.Element&&ab.Element.id=="lb_back"?-1:1)}if(U!==null){var aa=U+Z;var A=j.length-1;aa=(aa>A?0:(aa<0?A:aa));if(aa!=U){f(aa)}}}function f(A){L();if(H){H.Stop()}H=null;if(K){K.Stop()}if(N){N.Stop()}g=false;U=A;j[U].Load(X);if(T>0){N=new x(T,0,-v.FadeStep,v.FramePause,0,0,function(Z){M(Z.Value)})}if(!S.Preload.All&&S.Preload.Next&&U+1<j.length){j[U+1].Load()}}function X(){if(N){N.Stop()}M(0);j[U].Resize(O,y);E.img.width=j[U].Width;E.img.height=j[U].Height;E.img.src=j[U].Src;I=owl.Screen.ViewScroll();z(a,d);var A=v.SizeStep*(a>j[U].Width?-1:1);var Z=v.SizeStep*(d>j[U].Height?-1:1);if(K){K.Stop()}K=new x(a,j[U].Width,A,v.FramePause,S.Throttle,0);K.CallBack=function(aa){z(aa.Value,d)};K.OnStop=function(){K=new x(d,j[U].Height,Z,v.FramePause,0,0);K.CallBack=function(aa){z(a,aa.Value)};K.OnStop=function(){var aa=owl.Screen.Location(E.img);r=aa.X;p=aa.Y;g=true;if(N){N.Stop()}N=new x(0,100,v.FadeStep,v.FramePause,0,0);N.CallBack=function(ab){M(ab.Value)};N.OnStop=function(){if(R){n();c()}};N.Start()};K.Start()};K.Start()}function z(A,Z){E.img.style.left=((A-E.img.width)/2)+"px";E.img.style.top=((Z-E.img.height)/2)+"px";E.win.style.left=((h-A)/2+I.X)+"px";E.win.style.top=((i-Z)/2+I.Y)+"px";E.win.style.width=A+"px";E.win.style.height=Z+"px";a=A;d=Z}function u(A){if(C){clearInterval(C)}R=!(A.Type=="mouseout"||A.Type=="blur");C=setTimeout(function(){if(R){n();c()}else{L();w()}},S.Throttle)}function n(){if(S.ShowInfo&&g){if(D!=U){if(t){t.Stop();t=null}D=U;var aa=G.Get("p",E.bar)[0];G.Clone(j[D].Node,aa,false,true);var A=G.Get("img",aa);if(A.length>0){A[0].parentNode.removeChild(A[0])}}if(t){if(t.OnStop){t.OnStop=null;t.Reverse()}}else{var Z=-E.bar.offsetHeight;t=new x(Z,-1,v.BarStep,v.FramePause,0,0);t.CallBack=function(ab){k=ab.Value;E.bar.style.bottom=k+"px"};E.bar.style.visibility="visible"}t.Start()}}function L(){if(t&&!t.OnStop){t.Reverse();t.OnStop=function(){t=null};t.Start()}else{E.bar.style.visibility="hidden"}}function c(){if(S.Magnify&&g){if(H){if(H.OnStop){H.OnStop=null;H.Reverse()}}else{if(j[U].Ratio<1){H=new x(j[U].Ratio,1,(1-j[U].Ratio)/v.ZoomSteps,v.FramePause,0,0);H.CallBack=function(A){B(A.Value)}}}if(H){H.Start()}}}function w(){if(H&&!H.OnStop){H.Reverse();H.OnStop=function(){H=null};H.Start()}}function W(Z){if(S.Magnify&&g&&R&&j[U].Ratio<1){var A=Z.Mouse();Y=Math.max(0,Math.min(a,A.X-r));V=Math.max(0,Math.min(d,A.Y-p));if(!H||H.Value==1){B()}}}function B(aa){var A,Z;if(aa){A=Math.ceil(j[U].RealWidth*aa);Z=Math.ceil(j[U].RealHeight*aa)}else{A=E.img.width;Z=E.img.height}E.img.style.left=((1-((a-Y)/a))*(a-A))+"px";E.img.style.top=((1-((d-V)/d))*(d-Z))+"px";if(aa){E.img.width=A;E.img.height=Z}}function M(A){owl.Css.Opacity(E.img,A);T=A}function s(A){if(A){A.StopDefaultAction();A.StopPropagation();if(A.Element&&A.Element.blur){A.Element.blur()}}}};owl.Lightbox.CreateWindow=function(){var a=owl.innerHTML(owl.Dom.Get("body"),owl.Lightbox.Config.WindowHTML,false);owl.Lightbox.CreateWindow=function(){return a};return owl.Lightbox.CreateWindow()};owl.Lightbox.Image=function(a){this.Node=a;this.Src=this.Node.href;this.Pic=null;this.RealWidth=0;this.RealHeight=0;this.Ratio=1;this.Width=0;this.Height=0;this.Loading=false;this.LoadCallback=null;if(owl.Lightbox.Config.Preload.All){this.Load()}};owl.Lightbox.Image.prototype.Load=function(c){if(c){var b=this.LoadCallback;if(b){this.LoadCallback=function(){b();c()}}else{this.LoadCallback=c}}if(this.Pic===null){if(!this.Loading){this.Loading=true;var a=this;owl.Image.Load(this.Src,function(d){a.Pic=d;a.Loading=false;a.RealWidth=d.width;a.RealHeight=d.height;if(a.LoadCallback){a.LoadCallback();a.LoadCallback=null}})}}else{if(this.LoadCallback){this.LoadCallback();this.LoadCallback=null}}};owl.Lightbox.Image.prototype.Resize=function(b,a){if(this.RealWidth>0&&this.RealHeight>0){this.Ratio=Math.min(Math.min(b/this.RealWidth,1),Math.min(a/this.RealHeight,1));this.Width=Math.floor(this.RealWidth*this.Ratio);this.Height=Math.floor(this.RealHeight*this.Ratio)}};owl.Lightbox.Config={AutoStart:true,Enabled:true,ShowInfo:true,Magnify:true,Throttle:200,Container:{Element:".lightbox",ActiveClass:"active"},Preload:{All:false,Next:false},Size:{Start:40,Minimum:200,WidthPad:30,HeightPad:50},Animation:{FramePause:10,FadeStep:5,SizeStep:20,BarOpacity:60,BarStep:2,ZoomSteps:20},WindowHTML:'<div id="lb_window"><div id="lb_image"><img tabindex="0" /><div id="lb_bar"><p></p><a id="lb_close" href="#" title="'+setup.text.imageclose+'"><strong>'+setup.text.imageclose+'</strong></a><a  id="lb_next" href="#" title="'+setup.text.imagenext+'"><strong>'+setup.text.imagenext+'</strong></a><a id="lb_back" href="#" title="'+setup.text.imageback+'"><strong>'+setup.text.imageback+"</strong></a></div></div></div>"};if(owl.Lightbox.Config.AutoStart){new owl.Event(window,"load",function(a){owl.Each(owl.Dom.Get(owl.Lightbox.Config.Container.Element),function(b){new owl.Lightbox(b)})},99999)}}new owl.Event(window,"load",ADstart);


