var DimSrcData=new Object({"items":[{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107533","Name":"Apartment","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107536","Name":"Commercial","Type":"EXACT","LBound":"4","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107539","Name":"Condo/Townhouse","Type":"EXACT","LBound":"7","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107542","Name":"Co-op/Condo","Type":"EXACT","LBound":"10","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"28","Name":"Any","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107545","Name":"Foreclosures","Type":"EXACT","LBound":"13","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107548","Name":"Land","Type":"EXACT","LBound":"16","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107549","Name":"Land/Vacant Lot","Type":"EXACT","LBound":"17","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107550","Name":"Multi Family","Type":"EXACT","LBound":"18","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1107552","Name":"Other","Type":"EXACT","LBound":"20","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"29","Name":"1+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1125134","Name":"Room","Type":"EXACT","LBound":"22","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"30","Name":"2+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1125135","Name":"Share/Roommate","Type":"EXACT","LBound":"23","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"31","Name":"3+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"32","Name":"4+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"27","DimName":"Bedrooms:Sales","Id":"33","Name":"5+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"35","Name":"1+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"36","Name":"2+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"37","Name":"3+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"38","Name":"4+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820473","Name":"$100K - $125K","Type":"RANGE","LBound":"100000","UBound":"125000"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"878063","Name":"Any","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820474","Name":"$125K - $150K","Type":"RANGE","LBound":"125000","UBound":"150000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820475","Name":"$150K - $175K","Type":"RANGE","LBound":"150000","UBound":"175000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820476","Name":"$175K - $200K","Type":"RANGE","LBound":"175000","UBound":"200000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820477","Name":"$200K - $225K","Type":"RANGE","LBound":"200000","UBound":"225000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820478","Name":"$225K - $250K","Type":"RANGE","LBound":"225000","UBound":"250000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820479","Name":"$250K - $275K","Type":"RANGE","LBound":"250000","UBound":"275000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820480","Name":"$275K - $300K","Type":"RANGE","LBound":"275000","UBound":"300000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820481","Name":"$300K - $325K","Type":"RANGE","LBound":"300000","UBound":"325000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"820482","Name":"$325K - $350K","Type":"RANGE","LBound":"325000","UBound":"350000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107570","Name":"$400K - $425K","Type":"RANGE","LBound":"400000","UBound":"425000"},{"Pipe":"10640","Parent":"0","DimId":"829164","DimName":"Data Source Type","Id":"829166","Name":"Broker","Type":"EXACT","LBound":"2","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829164","DimName":"Data Source Type","Id":"1084198","Name":"Classified","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"829220","Name":"Under $500","Type":"RANGE","LBound":"0","UBound":"500"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"829300","Name":"Under $100K","Type":"RANGE","LBound":"0","UBound":"100000"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829232","Name":"Studio","Type":"EXACT","LBound":"0","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878064","DimName":"Virtual Tour","Id":"878065","Name":"Yes","Type":"EXACT","LBound":"Y","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107554","Name":"AC/Central Air","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107555","Name":"Alarm","Type":"EXACT","LBound":"2","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107556","Name":"Balcony","Type":"EXACT","LBound":"3","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107557","Name":"Basement","Type":"EXACT","LBound":"4","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107558","Name":"Cable/Satellite TV","Type":"EXACT","LBound":"5","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107559","Name":"Carpeted Floors","Type":"EXACT","LBound":"6","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107560","Name":"Carport","Type":"EXACT","LBound":"7","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107561","Name":"Controlled Access","Type":"EXACT","LBound":"8","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107562","Name":"Cul-de-Sac","Type":"EXACT","LBound":"9","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107573","Name":"$750K - $800K","Type":"RANGE","LBound":"750000","UBound":"800000"},{"Pipe":"10640","Parent":"0","DimId":"975572","DimName":"Additional Listing Type","Id":"975576","Name":"New Homes","Type":"EXACT","LBound":"2","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107563","Name":"Deck","Type":"EXACT","LBound":"10","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107572","Name":"$600K - $650K","Type":"RANGE","LBound":"600000","UBound":"650000"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107566","Name":"Dishwasher","Type":"EXACT","LBound":"13","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107571","Name":"$500K - $550K","Type":"RANGE","LBound":"500000","UBound":"550000"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107565","Name":"Dining Room","Type":"EXACT","LBound":"12","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107567","Name":"Doorman","Type":"EXACT","LBound":"14","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1107569","Name":"Elevator","Type":"EXACT","LBound":"16","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107574","Name":"$850K - $900K","Type":"RANGE","LBound":"850000","UBound":"900000"},{"Pipe":"10640","Parent":"0","DimId":"975572","DimName":"Additional Listing Type","Id":"975573","Name":"Open House","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107575","Name":"$950K - $1M","Type":"RANGE","LBound":"950000","UBound":"1000000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107576","Name":"$1M - $1.25M","Type":"RANGE","LBound":"1000000","UBound":"1250000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107577","Name":"$1.25M - $1.5M","Type":"RANGE","LBound":"1250000","UBound":"1500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107578","Name":"$1.5M - $1.75M","Type":"RANGE","LBound":"1500000","UBound":"1750000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107579","Name":"$1.75M - $2M","Type":"RANGE","LBound":"1750000","UBound":"2000000"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829235","Name":"3","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107586","Name":"$4M - $4.5M","Type":"RANGE","LBound":"4000000","UBound":"4500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107585","Name":"$3.5M - $4M","Type":"RANGE","LBound":"3500000","UBound":"4000000"},{"Pipe":"10640","Parent":"0","DimId":"1058960","DimName":"Open House","Id":"1058961","Name":"Yes","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107580","Name":"$2M - $2.25M","Type":"RANGE","LBound":"2000000","UBound":"2250000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107581","Name":"$2.25M - $2.5M","Type":"RANGE","LBound":"2250000","UBound":"2500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107582","Name":"$2.5M -  $2.75M","Type":"RANGE","LBound":"2500000","UBound":"2750000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107583","Name":"$2.75M - $3M","Type":"RANGE","LBound":"2750000","UBound":"3000000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107584","Name":"$3M - $3.5M","Type":"RANGE","LBound":"3000000","UBound":"3500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107587","Name":"$4.5M - $5M","Type":"RANGE","LBound":"4500000","UBound":"5000000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107588","Name":"$5M - $7.5M","Type":"RANGE","LBound":"5000000","UBound":"7500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107589","Name":"$7.5M - $10M","Type":"RANGE","LBound":"7500000","UBound":"10000000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1107590","Name":"Over $10M","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107591","Name":"$900 - $1000","Type":"RANGE","LBound":"900","UBound":"1000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107592","Name":"$1000 - $1100","Type":"RANGE","LBound":"1000","UBound":"1100"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107593","Name":"$1100 - $1200","Type":"RANGE","LBound":"1100","UBound":"1200"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107594","Name":"$1200 - $1300","Type":"RANGE","LBound":"1200","UBound":"1300"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107595","Name":"$1300 - $1400","Type":"RANGE","LBound":"1300","UBound":"1400"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107596","Name":"$1400 - $1500","Type":"RANGE","LBound":"1400","UBound":"1500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107598","Name":"$1600 - $1700","Type":"RANGE","LBound":"1600","UBound":"1700"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107599","Name":"$1700 - $1800","Type":"RANGE","LBound":"1700","UBound":"1800"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107601","Name":"$1900 - $2000","Type":"RANGE","LBound":"1900","UBound":"2000"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829236","Name":"4","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829239","DimName":"Bathrooms:Rentals","Id":"829241","Name":"2","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107597","Name":"$1500 - $1600","Type":"RANGE","LBound":"1500","UBound":"1600"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107600","Name":"$1800 - $1900","Type":"RANGE","LBound":"1800","UBound":"1900"},{"Pipe":"10640","Parent":"0","DimId":"829239","DimName":"Bathrooms:Rentals","Id":"829242","Name":"3","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107602","Name":"$2000 - $2300","Type":"RANGE","LBound":"2000","UBound":"2300"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107603","Name":"$2300 - $2500","Type":"RANGE","LBound":"2300","UBound":"2500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107604","Name":"$2500 - $2700","Type":"RANGE","LBound":"2500","UBound":"2700"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107605","Name":"$2700 - $2800","Type":"RANGE","LBound":"2700","UBound":"2800"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107606","Name":"$2800 - $2900","Type":"RANGE","LBound":"2800","UBound":"2900"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107607","Name":"$2900 - $3000","Type":"RANGE","LBound":"2900","UBound":"3000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107608","Name":"$3000 - $3500","Type":"RANGE","LBound":"3000","UBound":"3500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107609","Name":"$3500 - $4000","Type":"RANGE","LBound":"3500","UBound":"4000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107610","Name":"$4000 - $4500","Type":"RANGE","LBound":"4000","UBound":"4500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107612","Name":"$5000 - $5500","Type":"RANGE","LBound":"5000","UBound":"5500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107617","Name":"$7500 - $8000","Type":"RANGE","LBound":"7500","UBound":"8000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107618","Name":"$8000 - $8500","Type":"RANGE","LBound":"8000","UBound":"8500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107619","Name":"$8500 - $9000","Type":"RANGE","LBound":"8500","UBound":"9000"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1125136","Name":"Single Family","Type":"EXACT","LBound":"24","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125171","Name":"$450K - $475K","Type":"RANGE","LBound":"450000","UBound":"475000"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829233","Name":"1","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829234","Name":"2","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829238","Name":"6","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1125138","Name":"Sublet","Type":"EXACT","LBound":"26","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829239","DimName":"Bathrooms:Rentals","Id":"829240","Name":"1","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1","DimName":"Property Type","Id":"1125139","Name":"Time Share","Type":"EXACT","LBound":"27","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107611","Name":"$4500 - $5000","Type":"RANGE","LBound":"4500","UBound":"5000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107613","Name":"$5500 - $6000","Type":"RANGE","LBound":"5500","UBound":"6000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107614","Name":"$6000 - $6500","Type":"RANGE","LBound":"6000","UBound":"6500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107615","Name":"$6500 - $7000","Type":"RANGE","LBound":"6500","UBound":"7000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107616","Name":"$7000 - $7500","Type":"RANGE","LBound":"7000","UBound":"7500"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107620","Name":"$9000 - $10000","Type":"RANGE","LBound":"9000","UBound":"10000"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1107621","Name":"Over $10K","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"829219","DimName":"Bedrooms:Rentals","Id":"829237","Name":"5","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829239","DimName":"Bathrooms:Rentals","Id":"829243","Name":"4","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829239","DimName":"Bathrooms:Rentals","Id":"829244","Name":"5","Type":"EXACT","LBound":"","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1125130","DimName":"Price Reduction","Id":"1125133","Name":"Yes","Type":"EXACT","LBound":"1","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"1125131","DimName":"New Listing","Id":"1125132","Name":"Yes","Type":"EXACT","LBound":"0","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125141","Name":"Fireplace","Type":"EXACT","LBound":"17","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125142","Name":"Fitness Center","Type":"EXACT","LBound":"18","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1125181","Name":"$800 - $900","Type":"RANGE","LBound":"800","UBound":"900"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125143","Name":"Furnished","Type":"EXACT","LBound":"19","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125144","Name":"Garage - 1 or more","Type":"EXACT","LBound":"20","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125145","Name":"Garage - 2 or more","Type":"EXACT","LBound":"21","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125146","Name":"Garage - 3 or more","Type":"EXACT","LBound":"22","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125147","Name":"Garbage Disposal","Type":"EXACT","LBound":"23","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125168","Name":"$350K - $375K","Type":"RANGE","LBound":"350000","UBound":"375000"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125148","Name":"Garden/Patio","Type":"EXACT","LBound":"24","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125149","Name":"Green Building","Type":"EXACT","LBound":"25","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125150","Name":"Handicapped Access","Type":"EXACT","LBound":"26","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125151","Name":"Hardwood Floors","Type":"EXACT","LBound":"27","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125152","Name":"High Speed Internet","Type":"EXACT","LBound":"28","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"34","DimName":"Bathrooms:Sales","Id":"1125182","Name":"5+","Type":"RANGE","LBound":"2147483647","UBound":"no-limit"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125153","Name":"Investment Property","Type":"EXACT","LBound":"29","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125169","Name":"$375K - $400K","Type":"RANGE","LBound":"375000","UBound":"400000"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125158","Name":"Outdoor Space","Type":"EXACT","LBound":"34","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125159","Name":"Park/Playground","Type":"EXACT","LBound":"35","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125157","Name":"New Developments","Type":"EXACT","LBound":"33","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125170","Name":"$425K - $450K","Type":"RANGE","LBound":"425000","UBound":"450000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125172","Name":"$475K - $500K","Type":"RANGE","LBound":"475000","UBound":"500000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125173","Name":"$550K - $600K","Type":"RANGE","LBound":"550000","UBound":"600000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125174","Name":"$650K - $700K","Type":"RANGE","LBound":"650000","UBound":"700000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125175","Name":"$700K - $750K","Type":"RANGE","LBound":"700000","UBound":"750000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125176","Name":"$800K - $850K","Type":"RANGE","LBound":"800000","UBound":"850000"},{"Pipe":"10640","Parent":"0","DimId":"820472","DimName":"Price Range:Sales","Id":"1125177","Name":"$900K - $950K","Type":"RANGE","LBound":"900000","UBound":"950000"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125154","Name":"Metro Area","Type":"EXACT","LBound":"30","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1125179","Name":"$600 - $700","Type":"RANGE","LBound":"600","UBound":"700"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125155","Name":"Multi-Level","Type":"EXACT","LBound":"31","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125156","Name":"Near Public Transportation","Type":"EXACT","LBound":"32","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1125178","Name":"$500 - $600","Type":"RANGE","LBound":"500","UBound":"600"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125162","Name":"Retirement Community","Type":"EXACT","LBound":"38","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125164","Name":"Swimming Pool","Type":"EXACT","LBound":"40","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125166","Name":"Waterfront","Type":"EXACT","LBound":"42","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1125167","Name":"Waterview","Type":"EXACT","LBound":"43","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"829217","DimName":"Price Range:Rentals","Id":"1125180","Name":"$700 - $800","Type":"RANGE","LBound":"700","UBound":"800"},{"Pipe":"10640","Parent":"0","DimId":"829164","DimName":"Data Source Type","Id":"1125183","Name":"Builder","Type":"EXACT","LBound":"3","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135267","Name":"Washer","Type":"EXACT","LBound":"41","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135268","Name":"Dryer","Type":"EXACT","LBound":"44","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135269","Name":"Washer Allowed","Type":"EXACT","LBound":"45","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135270","Name":"Washer Included","Type":"EXACT","LBound":"46","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135271","Name":"Dryer Allowed","Type":"EXACT","LBound":"47","UBound":"0"},{"Pipe":"10640","Parent":"0","DimId":"878067","DimName":"Amenities","Id":"1135272","Name":"Dryer Included","Type":"EXACT","LBound":"48","UBound":"0"}]});var Constants=new Object({"items":[{"Pipe":"10640","Name":"GTSRE_PIPELINE_LISTINGS","ConstType":"Pipeline","Value":"10640","VarType":"Constructor"},{"Pipe":"10642","Name":"GTSRE_PIPELINE_AGENTS","ConstType":"Pipeline","Value":"10642","VarType":"Constructor"},{"Pipe":"10640","Name":"GTSRE_CHANNEL_S","ConstType":"Channel","Value":"829246","VarType":"Constructor"},{"Pipe":"10640","Name":"GTSRE_CHANNEL_R","ConstType":"Channel","Value":"829247","VarType":"Constructor"},{"Pipe":"10640","Name":"GTSRE_DIMENSION_PRICE_SALES","ConstType":"Dimension","Value":"820472","VarType":"ListSingle"},{"Pipe":"10640","Name":"GTSRE_DIMENSION_BEDS_SALES","ConstType":"Dimension","Value":"27","VarType":"ListSingle"},{"Pipe":"10640","Name":"GTSRE_DIMENSION_BATHS_SALES","ConstType":"Dimension","Value":"34","VarType":"ListSingle"},{"Pipe":"10640","Name":"GTSRE_DIMENSION_PROPERTY_TYPE","ConstType":"Dimension","Value":"1","VarType":"ListSingle"},{"Pipe":"10640","Name":"GTSRE_DIMENSION_CHANNELS","ConstType":"Dimension","Value":"829245","VarType":"ListSingle"},{"Pipe":"10640","Name":"GTSRE_KEYWORDSEARCH_KEYWORD","ConstType":"KeywordSearch","Value":"KeywordSearch","VarType":"TextBox"},{"Pipe":"10640","Name":"GTSRE_KEYWORDSEARCH_ZIP","ConstType":"KeywordSearch","Value":"AddrZip","VarType":"TextBox"},{"Pipe":"10640","Name":"GTSRE_KEYWORDSEARCH_IDWEB","ConstType":"KeywordSearch","Value":"IdWeb","VarType":"TextBox"},{"Pipe":"10642","Name":"GTSRE_KEYWORDSEARCH_ADVERTISER","ConstType":"KeywordSearch","Value":"AgentAdvertiser","VarType":"TextBox"},{"Pipe":"10642","Name":"GTSRE_KEYWORDSEARCH_AGENT","ConstType":"KeywordSearch","Value":"AgentName","VarType":"TextBox"},{"Pipe":"10640","Name":"GTSRE_COUNTRY_USA","ConstType":"Country","Value":"200","VarType":"Constructor"},{"Pipe":"10640","Name":"GTSRE_FILTER_PRICE_RANGE","ConstType":"Filter","Value":"Price_Sales","VarType":"Constructor"},{"Pipe":"10640","Name":"GTSRE_PRICE_MIN","ConstType":"Variable","Value":"0","VarType":"Variable"},{"Pipe":"10640","Name":"GTSRE_PRICE_MAX","ConstType":"Variable","Value":"999000000","VarType":"Variable"},{"Pipe":"10640","Name":"GTSRE_COMBOBOX_ANY_OPTION","ConstType":"Variable","Value":"['Any', 0]","VarType":"Variable"},{"Pipe":"10640","Name":"GTSRE_ROOT","ConstType":"Variable","Value":"'root'","VarType":"Variable"},{"Pipe":"10640","Name":"GTSRE_LEAF","ConstType":"Variable","Value":"'leaf'","VarType":"Variable"}]});var GabrielsKey="[2zlvk9vwgWTGL8cb3VjiRYBrY2JTSodxWzchvpbTva13n/A30Gd/OVZKyySUYXT9ztULaEmaxaV21yH1H0agl3lBYc0cw5gVE8ZaOjn9I4r3G182WYpIZw3 ZDnmYYsxqTuX2n/0LYo=]";var ApiRoot="http://newsday.optimumhomes.com/api/search/";String.prototype.Trim=function(){var My=this;if(My==null){return"";}return My.replace(/^\s*|\s*$/g,"");};function gE(objId){if(document.getElementById(objId)){return document.getElementById(objId);}return null;}String.format=function(){if(arguments.length==0){throw("String.format requires arguments");}var str=" "+arguments[0];for(var i=1;i<arguments.length;i++){var re=new RegExp('([^\\{]{1})(\\{'+(i-1)+'\\}(?!\\}))','gm');str=str.replace(re,'\$1'+arguments[i]);}str=str.replace(new RegExp('\\{\\{','gm'),"{");str=str.replace(new RegExp('\\}\\}','gm'),"}");return str.substring(1);};GTSRESearch.GetType=function(Element){var ReturnVal="unknown";if(Element==null){ReturnVal="null";}if(Element.constructor==null){ReturnVal="unknown";}else{var Catches=Element.constructor.toString().toLowerCase().match(/([a-z0-9]+)(\(\))/i);if(Catches!=null){ReturnVal=Catches[1];}else{ReturnVal="unknown";}}return ReturnVal;};Array.prototype.Contains=function(){var My=this;for(var t=0;t<My.length;t++){for(var a=0;a<arguments.length;a++){if(arguments[a]==this[t]){return true;}}}return false;};GTSRESearch.isArray=function(obj){if(obj.constructor.toString().toLowerCase().indexOf("array")==-1){return false;}return true;};for(var x=0;x<Constants.items.length;x++){if(Constants.items[x].ConstType=="Variable"){eval(String.format("var {0} = {1};",Constants.items[x].Name,Constants.items[x].Value));}else{eval(String.format("var {0} = \"{1}\";",Constants.items[x].Name,Constants.items[x].Value));}}function GTSRESearch(strNamespace,constPipeline,constChannel,constCountry){if(strNamespace==undefined||strNamespace==null){window.alert("Namespace is a required field in the GTSRESearch constructor. Please pass the name of the object instance.");return;}this.Namespace=strNamespace;var CheckPipeline=GTSRESearch.GetConstant(constPipeline);if(CheckPipeline==null){window.alert("Pipeline is a required field in the GTSRESearch constructor.");return;}this.Pipeline=CheckPipeline.Value;var CheckChannel=GTSRESearch.GetConstant(constChannel);if(CheckChannel==null){window.alert("Channel is a required field in the GTSRESearch constructor.");return;}this.Channel=CheckChannel.Value;this.Country=GTSRE_COUNTRY_USA;var CheckCountry=GTSRESearch.GetConstant(constCountry);if(CheckCountry!=null){this.Country=constCountry;}this.StartupCache=new Array();this.SuggestTextBox=null;this.ResponseContainer=null;this.DebugContainer=null;this.FormObjectCache=new Array();this.ContainerCache=new Array();this.LocationId=null;this.Dimensions=new Array();var My=this;GTSRESearch.prototype.AddSuggest=function(objContainerId,txtClassName,txtDefaultValue,txtDefaultValueClassName){with(this){var SuggestContainer=GTSRESearch.ValidateContainer(objContainerId,"AddSuggest");if(SuggestContainer==null){return;}SuggestTextBox=document.createElement("input");SuggestTextBox.type="text";SuggestTextBox.setAttribute("name",Namespace);if(txtClassName!=undefined&&txtClassName!=null){if(txtDefaultValueClassName!=undefined&&txtDefaultValueClassName!=null)SuggestTextBox.className=txtClassName+" "+txtDefaultValueClassName;else SuggestTextBox.className=txtClassName;}if(txtDefaultValue!=undefined&&txtDefaultValue!=null){SuggestTextBox.value=txtDefaultValue;}SuggestTextBox.onclick=function(){My.SuggestTextBox.value="";};SuggestTextBox.onkeyup=SuggestUp;SuggestTextBox.onkeydown=SuggestDown;if(SuggestTextBox.captureEvents){SuggestTextBox.captureEvents(Event.KEYUP);SuggestTextBox.captureEvents(Event.KEYDOWN);}StartupCache.push(function(){try{SuggestContainer.appendChild(My.SuggestTextBox);My.FormObjectCache.push(My.SuggestTextBox);My.ContainerCache.push(SuggestContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});}};GTSRESearch.prototype.AddResponseContainer=function(objContainerId,txtClassName){with(this){var ResponseDiv=GTSRESearch.ValidateContainer(objContainerId,"AddResponseContainer");if(ResponseDiv==null){return;}ResponseContainer=document.createElement("div");ResponseContainer.setAttribute("id","GTSREResponseContainer_"+Namespace);if(txtClassName!=undefined&&txtClassName!=null){ResponseContainer.className=txtClassName;}ResponseDiv.appendChild(ResponseContainer);ContainerCache.push(ResponseContainer);}};GTSRESearch.prototype.GenerateDimensionComboBox=function(constant,txtRootLeaf,txtClassName,arrayFirstValue){var ThisConstant=GTSRESearch.GetConstant(constant);if(ThisConstant==null){return null;}if(txtRootLeaf==undefined||txtRootLeaf==null){txtRootLeaf="root";}else{if(txtRootLeaf.toLowerCase()=="root"||txtRootLeaf.toLowerCase()=="leaf"){txtRootLeaf=txtRootLeaf.toLowerCase();}else{GTSRESearch.DebugErrors.push(["GenerateDimensionComboBox Warning",txtRootLeaf+" is not a legal type. Defaulting to 'root'"]);txtRootLeaf="root";}}var objThisComboBox=document.createElement("select");objThisComboBox.setAttribute("id",constant);if(txtClassName!=undefined&&txtClassName!=null){objThisComboBox.className=txtClassName;}if(arrayFirstValue!=null){var choice=document.createElement('option');choice.text=arrayFirstValue[0];choice.value=arrayFirstValue[1];objThisComboBox.options.add(choice);}for(var x=0;x<DimSrcData.items.length;x++){if(DimSrcData.items[x].DimId==constant){switch(txtRootLeaf){case"leaf":if(DimSrcData.items[x].Parent!="0"){objThisComboBox=My.AddComboBoxOption(objThisComboBox,DimSrcData.items[x]);}break;default:if(DimSrcData.items[x].Parent=="0"){objThisComboBox=My.AddComboBoxOption(objThisComboBox,DimSrcData.items[x]);}break;}}}return objThisComboBox;};GTSRESearch.prototype.GenerateDimensionCheckboxes=function(constant,txtRootLeaf,txtClassName){var ThisConstant=GTSRESearch.GetConstant(constant);if(ThisConstant==null){return null;}if(txtRootLeaf==undefined||txtRootLeaf==null){txtRootLeaf="root";}else{if(txtRootLeaf.toLowerCase()=="root"||txtRootLeaf.toLowerCase()=="leaf"){txtRootLeaf=txtRootLeaf.toLowerCase();}else{GTSRESearch.DebugErrors.push(["GenerateDimensionCheckboxes Warning",txtRootLeaf+" is not a legal type. Defaulting to 'root'"]);txtRootLeaf="root";}}var CheckboxCollection=new Array();for(var x=0;x<DimSrcData.items.length;x++){if(DimSrcData.items[x].DimId==constant){var item=DimSrcData.items[x];switch(txtRootLeaf){case"leaf":if(item.Parent!="0"){var CheckboxContainer=this.GenerateCheckboxContainer(item.Name,item.Id,txtClassName);CheckboxCollection.push(CheckboxContainer);}break;default:if(item.Parent=="0"){var CheckboxContainer=this.GenerateCheckboxContainer(item.Name,item.Id,txtClassName);CheckboxCollection.push(CheckboxContainer);}break;}}}return CheckboxCollection;};GTSRESearch.prototype.GenerateCheckboxContainer=function(strText,strValue,txtClassName){var ChckboxContainer=document.createElement("div");if(txtClassName!=undefined&&txtClassName!=null){ChckboxContainer.className=txtClassName;}var Chckbox=document.createElement("input");Chckbox.type="checkbox";Chckbox.setAttribute("id",strValue);Chckbox.value=strValue;ChckboxContainer.appendChild(Chckbox);var textNode=document.createTextNode(strText);var Label=document.createElement("label");Label.setAttribute("for",strValue);Label.appendChild(textNode);ChckboxContainer.appendChild(Label);return ChckboxContainer;};GTSRESearch.prototype.AddDimensionComboBoxMulti=function(constant,objContainerId,txtRootLeaf,txtClassName,intComboBoxSize){var ThisContainer=GTSRESearch.ValidateContainer(objContainerId,"AddDimensionComboBoxMulti");if(ThisContainer==null){return;}if(intComboBoxSize==undefined||intComboBoxSize==null||intComboBoxSize==0){intComboBoxSize=3;}var ThisConstant=this.GetValidConstant(constant,"AddDimensionComboBoxMulti",['ListMulti'],null);if(ThisConstant==null){return;}this.StartupCache.push(function(){try{var ThisComboBox=My.GenerateDimensionComboBox(constant,txtRootLeaf,txtClassName,null);if(ThisComboBox==null){GTSRESearch.DebugErrors.push(["AddDimensionComboBoxMulti","GenerateDimensionComboBox returned null."]);return;}ThisComboBox.multiple=true;ThisComboBox.size=intComboBoxSize;ThisComboBox.selectedIndex=-1;ThisContainer.appendChild(ThisComboBox);My.FormObjectCache.push(ThisComboBox);My.ContainerCache.push(ThisContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddTextBoxKeyword=function(constant,objContainerId,txtClassName){var ThisContainer=GTSRESearch.ValidateContainer(objContainerId,"AddTextBoxKeyword");if(ThisContainer==null){return;}var ThisConstant=this.GetValidConstant(constant,"AddTextBoxKeyword",['TextBox'],null);if(ThisConstant==null){return;}var NewTextBox=document.createElement("input");NewTextBox.type="text";NewTextBox.setAttribute("id",constant);if(txtClassName!=undefined&&txtClassName!=null){NewTextBox.className=txtClassName;}this.StartupCache.push(function(){try{ThisContainer.appendChild(NewTextBox);My.FormObjectCache.push(NewTextBox);My.ContainerCache.push(ThisContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddDimensionCheckbox=function(constant,objContainerId,txtOptionText,txtClassName){var ThisContainer=GTSRESearch.ValidateContainer(objContainerId,"AddDimensionCheckbox");if(ThisContainer==null){return;}var ThisConstant=this.GetValidConstant(constant,"AddDimensionCheckbox",['Boolean'],null);if(ThisConstant==null){return;}var My=this;this.StartupCache.push(function(){try{var ThisCheckbox=My.GenerateCheckboxContainer(txtOptionText,constant,txtClassName);if(ThisCheckbox==null){return;}ThisContainer.appendChild(ThisCheckbox);var ThisCheckboxObj=ThisCheckbox.getElementsByTagName("input")[0];My.FormObjectCache.push(ThisCheckboxObj);My.ContainerCache.push(ThisContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddDimensionCheckboxCollection=function(constant,objContainerId,txtRootLeaf,txtClassName){var ThisContainer=GTSRESearch.ValidateContainer(objContainerId,"AddDimensionCheckboxCollection");if(ThisContainer==null){return;}var ThisConstant=this.GetValidConstant(constant,"AddDimensionCheckboxCollection",['ListMulti'],['Dimension']);if(ThisConstant==null){return;}this.StartupCache.push(function(){try{var ThisCheckboxCollection=My.GenerateDimensionCheckboxes(constant,txtRootLeaf,txtClassName);if(ThisCheckboxCollection==null){GTSRESearch.DebugErrors.push(["AddDimensionCheckboxCollection","GenerateDimensionCheckboxes returned null."]);return;}for(var x=0;x<ThisCheckboxCollection.length;x++){ThisContainer.appendChild(ThisCheckboxCollection[x]);var ThisCheckbox=ThisCheckboxCollection[x].getElementsByTagName("input")[0];My.FormObjectCache.push(ThisCheckbox);My.ContainerCache.push(ThisContainer);}}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddDimensionComboBox=function(constant,objContainerId,txtRootLeaf,txtClassName,arrayFirstValue){var ThisContainer=GTSRESearch.ValidateContainer(objContainerId,"AddDimensionComboBox");if(ThisContainer==null){return;}var ThisConstant=this.GetValidConstant(constant,"AddDimensionComboBox",['ListMulti','ListSingle'],null);if(ThisConstant==null){return;}if(arrayFirstValue==undefined||arrayFirstValue==null){arrayFirstValue=null;}else{if(GTSRESearch.isArray(arrayFirstValue)){if(arrayFirstValue.length!=2){GTSRESearch.DebugErrors.push(["AddDimensionComboBox First Value Error","The first value option passed must be an array with only 2 elements; text and value. Option omitted."]);arrayFirstValue=null;}}else{GTSRESearch.DebugErrors.push(["AddDimensionComboBox First Value Error","The first value option passed must be an array with 2 elements; text and value. Option omitted."]);arrayFirstValue=null;}}this.StartupCache.push(function(){try{var ThisComboBox=My.GenerateDimensionComboBox(constant,txtRootLeaf,txtClassName,arrayFirstValue);if(ThisComboBox==null){GTSRESearch.DebugErrors.push(["AddDimensionComboBox","GenerateDimensionComboBox returned null."]);return;}ThisContainer.appendChild(ThisComboBox);My.FormObjectCache.push(ThisComboBox);My.ContainerCache.push(ThisContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.SelectCountry=function(numIndex){var Country=Countries.items[numIndex];if(My.SuggestTextBox!=null){if(Country.AutoPop.toLowerCase()=="true"){My.SuggestTextBox.value=Country.StName+", "+Country.ISO3;My.LocationId=Country.StEId;}else{My.SuggestTextBox.value="";}}My.Country=Country.RId;};GTSRESearch.prototype.AddChannelComboBox=function(objComboBoxChannel){if(objComboBoxChannel==undefined||objComboBoxChannel==null){GTSRESearch.DebugErrors.push(["AddChannelComboBox Error","An object is required"]);return;}if(objComboBoxChannel.type!="gtsre-combobox"){GTSRESearch.DebugErrors.push(["AddChannelComboBox Error","A GTSREComboBox object is required"]);return;}if(objComboBoxChannel.ComboBox.options.length<2){GTSRESearch.DebugErrors.push(["AddChannelComboBox Error","No options were added to the GTSREComboBox object"]);return;}var My=this;objComboBoxChannel.ComboBox.onchange=function(){My.Channel=this.options[this.options.selectedIndex].value;};this.ContainerCache.push(objComboBoxChannel.Container);this.StartupCache.push(function(){try{objComboBoxChannel.Container.appendChild(objComboBoxChannel.ComboBox);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddRangeComboBoxes=function(objComboBoxMin,objComboBoxMax){var Min=objComboBoxMin;var Max=objComboBoxMax;var MyBoxes=new GTSRERangeComboBoxes(Min,Max);this.FormObjectCache.push(MyBoxes);this.ContainerCache.push(Min.Container);this.ContainerCache.push(Max.Container);this.StartupCache.push(function(){try{Min.Container.appendChild(Min.ComboBox);Max.Container.appendChild(Max.ComboBox);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddElement=function(objHtml){this.StartupCache.push(function(){try{var ThisObj=objHtml;if(ThisObj==null){GTSRESearch.DebugErrors.push(["AddElement","HTMLElement is null."]);return;}My.FormObjectCache.push(ThisObj);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddRangeTextBoxes=function(objTextBoxMin,objTextBoxMax){var Min=objTextBoxMin;var Max=objTextBoxMax;var MyBoxes=new GTSRERangeTextBoxes(Min,Max);this.FormObjectCache.push(MyBoxes);this.ContainerCache.push(Min.Container);this.ContainerCache.push(Max.Container);this.StartupCache.push(function(){try{Min.Container.appendChild(Min.TextBox);Max.Container.appendChild(Max.TextBox);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddCountryComboBox=function(objContainerId,txtClassName,constCountry){var CheckCountry=this.GetValidConstant(constCountry,"AddCountryComboBox",null,['Country']);if(CheckCountry!=null){My.Country=constCountry;}var CountriesContainer=GTSRESearch.ValidateContainer(objContainerId,"AddCountryComboBox");if(CountriesContainer==null){return;}this.StartupCache.push(function(){try{var objThisComboBox=document.createElement("select");objThisComboBox.setAttribute("id","CountriesComboBox");objThisComboBox.onchange=function(e){My.SelectCountry(objThisComboBox.selectedIndex);};if(txtClassName!=undefined&&txtClassName!=null){objThisComboBox.className=txtClassName;}for(var x=0;x<Countries.items.length;x++){var choice=document.createElement('option');choice.text=Countries.items[x].Name;choice.value=Countries.items[x].RId;objThisComboBox.options.add(choice);}CountriesContainer.appendChild(objThisComboBox);GTSRESearch.SelectByValue(objThisComboBox,My.Country);My.FormObjectCache.push(objThisComboBox);My.ContainerCache.push(CountriesContainer);}catch(err){GTSRESearch.DebugErrors.push(["JSError",err]);}});};GTSRESearch.prototype.AddComboBoxOption=function(objComboBox,objItem){var choice=document.createElement('option');choice.text=objItem.Name;choice.value=objItem.Id;objComboBox.options.add(choice);return objComboBox;};GTSRESearch.prototype.SuggestUp=function(e){var keynum;var sender;if(window.event){keynum=event.keyCode;sender=event.srcElement;}else if(e.which){keynum=e.which;sender=e.target;}eval("var Instance = "+sender.name+";");Instance.LocationId=0;var val=Instance.SuggestTextBox.value;switch(keynum){case 13:if(Instance.ResponseContainer.style.display=="block"){Instance.CloseSuggest();Instance.StopProcessingEvents(e);return false;}return true;break;case 27:Instance.CloseSuggest();Instance.SuggestTextBox.value=val;return false;break;case 40:Instance.SuggestSelect(Instance.CurrentSuggestIndex()+1);break;case 38:Instance.SuggestSelect(Instance.CurrentSuggestIndex()-1);break;default:if(Instance.SuggestTextBox.value.Trim().length>1){var QueryURL=ApiRoot+"suggest.aspx?C="+Instance.Country+"&key="+escape(GabrielsKey)+"&callback="+Instance.Namespace+".ParseJSON&term="+Instance.SuggestTextBox.value.Trim();Instance.LoadJSON(QueryURL);}else{Instance.CloseSuggest();}break;}};GTSRESearch.prototype.SuggestDown=function(e){var keynum;var sender;if(window.event){keynum=event.keyCode;sender=event.srcElement;}else if(e.which){keynum=e.which;sender=e.target;}eval("var Instance = "+sender.name+";");var val=Instance.SuggestTextBox.value;switch(keynum){case 13:if(Instance.ResponseContainer.style.display=="block"){if(Instance.CurrentSuggestIndex()>-1){Instance.GetSuggest(Instance.CurrentSuggestIndex());Instance.StopProcessingEvents(e);return false;}}case 27:Instance.CloseSuggest();Instance.SuggestTextBox.value=val;return false;break;default:return true;break;}};GTSRESearch.prototype.SuggestSelect=function(num){with(this){var LIS=ResponseContainer.getElementsByTagName("div");var item=null;for(var x=0;x<LIS.length;x++){if(x==num){LIS[x].className='hot';item=x;}else{LIS[x].className='non';}}if(item==null){if(num>LIS.length-1){item=LIS.length-1;LIS[item].className='hot';}else{item=0;}}if(item>0){ScrollToItem(item);}}};GTSRESearch.prototype.ScrollToItem=function(elepos){with(this){var eleE=gE('ila'+elepos);var eleS=ResponseContainer;var Etop=eleE.offsetTop;var Stop=eleS.scrollTop;if(Etop<ResponseContainer.scrollTop){ResponseContainer.scrollTop=Etop;}else if((Etop+eleE.offsetHeight)>(Stop+eleS.offsetHeight)){ResponseContainer.scrollTop=Etop-eleS.offsetHeight+eleE.offsetHeight;}}};GTSRESearch.prototype.CurrentSuggestIndex=function(){var LIS=this.ResponseContainer.getElementsByTagName("div");var T=-1;for(var x=0;x<LIS.length;x++){if(LIS[x].className=='hot'){T=x;break;}}return T;};GTSRESearch.prototype.GetSuggest=function(index){var LIS=this.ResponseContainer.getElementsByTagName("div");this.SuggestTextBox.value=LIS[index].innerHTML;var CityName=LIS[index].innerHTML.replace(/<[^>]+>/g,"").replace(/\s\/\s/g,"/");var EndecaId=LIS[index].getAttribute('name');this.SuggestTextBox.value=CityName.toUpperCase();this.LocationId=EndecaId;this.CloseSuggest();};GTSRESearch.prototype.StopProcessingEvents=function(e){if(e&&e.preventDefault){e.preventDefault();}else if(window.event&&window.event.returnValue){window.eventReturnValue=false;}};GTSRESearch.prototype.CloseSuggest=function(){var Dvs=document.getElementsByTagName("div");for(var x=0;x<Dvs.length;x++){if(Dvs[x].id.indexOf("GTSREResponseContainer")>-1){var nmsp=Dvs[x].id.replace("GTSREResponseContainer_","");eval("var Instance = "+nmsp+";");Instance.ResponseContainer.innerHTML="";Instance.ResponseContainer.style.display="none";}}this.ToggleSelects("visible");};GTSRESearch.prototype.ToggleSelects=function(newVis){if(!document.all){return;}if(newVis=="hidden"){var TRO=new GTSRERecurseOffset(this.ResponseContainer);var MatchLeft=TRO.GetOffsetLeft();var MatchTop=TRO.GetOffsetTop();var MatchRight=MatchLeft+TRO.GetOffsetWidth();var MatchBottom=MatchTop+TRO.GetOffsetHeight();var SelectCollection=document.getElementsByTagName("select");for(var s=0;s<SelectCollection.length;s++){var SelectObject=SelectCollection[s];var SRO=new GTSRERecurseOffset(SelectObject);var SelectLeft=SRO.GetOffsetLeft();var SelectTop=SRO.GetOffsetTop();var SelectRight=SelectLeft+SRO.GetOffsetWidth();var SelectBottom=SelectTop+SRO.GetOffsetHeight();if((SelectRight>MatchLeft)&&(SelectBottom>MatchTop)&&(SelectLeft<MatchRight)&&(SelectTop<MatchBottom)){SelectObject.style.visibility='hidden';}if((SelectLeft==0)&&(SelectTop==0)){SelectObject.style.visibility="hidden";}}}else{var Sel=document.getElementsByTagName("select");for(var x=0;x<Sel.length;x++){Sel[x].style.visibility="visible";}}};GTSRESearch.prototype.LoadJSON=function(url){var Header=document.getElementsByTagName("head")[0];var newScript=document.createElement('script');newScript.type='text/javascript';newScript.src=url;Header.appendChild(newScript);};GTSRESearch.prototype.ParseJSON=function(JsonResponse){var response=JsonResponse;var SuggestHTML="";if(response.SearchResponse!=undefined){if(response.SearchResponse=="Success"){if(this.DebugContainer!=null){this.DebugContainer.innerHTML+="<BR><B>RESPONSE:</B>"+response.Message;}else{var fct=function(url){window.setTimeout(new Function("window.location.href = '"+url+"';"),100);};fct(response.Message);}if(this.ResponseContainer!=null){this.ResponseContainer.innerHTML="";this.CloseSuggest();}}else{if(this.ResponseContainer!=null){this.ResponseContainer.innerHTML=response.Message;this.ResponseContainer.style.display="block";this.ResponseContainer.style.visibility="visible";}else{alert(response.Message.replace(/<[^>]+?>/g,' ').replace(/[\s\t]{2,100}/g,' '));}if(this.DebugContainer!=null){this.DebugContainer.innerHTML+="<BR><B>RESPONSE:</B>"+response.SearchResponse;}}return;}if(response.items==undefined){this.ResponseContainer.innerHTML="";this.CloseSuggest();}if(response.items.length>0){for(var x=0;x<response.items.length;x++){var item=response.items[x];SuggestHTML+=String.format("<div class='{0}' ID='ila{1}' name='{2}' onclick=\"{4}.GetSuggest({1});\" onmouseover=\"{4}.SuggestSelect({1});\">{3}</div>",item.cssclass,item.counter,item.name,item.term,this.Namespace);}this.ResponseContainer.innerHTML=SuggestHTML;if(this.ResponseContainer.style.display!="block"){this.ResponseContainer.style.display="block";}this.ToggleSelects("hidden");}else{this.ResponseContainer.innerHTML="";this.CloseSuggest();}};GTSRESearch.prototype.GetValidConstant=function(constant,strMethodName,arrVarTypes,arrConstTypes){if(constant==undefined){GTSRESearch.DebugErrors.push([strMethodName+" Error","A constant is required."]);return null;}var ThisConstant=GTSRESearch.GetConstant(constant);if(ThisConstant==null){GTSRESearch.DebugErrors.push([strMethodName+" Error","The constant provided could not be identified."]);return null;}else{if(this.Dimensions.Contains(constant)){GTSRESearch.DebugErrors.push([strMethodName+" Error","A dimension constant with the same value has already been added ("+ThisConstant.Name+")"]);return null;}else{this.Dimensions.push(constant);}if(arrVarTypes!=undefined&&arrVarTypes!=null){if(!arrVarTypes.Contains(ThisConstant.VarType)){GTSRESearch.DebugErrors.push([strMethodName+" Error","A dimension constant with the Form Type "+arrVarTypes.join(' or ')+" is required"]);return null;}}if(arrConstTypes!=undefined&&arrConstTypes!=null){if(!arrConstTypes.Contains(ThisConstant.ConstType)){GTSRESearch.DebugErrors.push([strMethodName+" Error","A dimension constant of Type "+arrConstTypes.join(' or ')+" is required"]);return null;}}}return ThisConstant;};GTSRESearch.prototype.Submit=function(txtDebugContainerId){this.DebugContainer=null;if(txtDebugContainerId!=undefined&&txtDebugContainerId!=null){this.DebugContainer=GTSRESearch.ValidateContainer(txtDebugContainerId,"Submit Debug");}var NValues=new Array();var Filters=new Array();var Keywords=new Array();var s="";var data;var txtSearch=(this.SuggestTextBox==null)?null:this.SuggestTextBox.value.Trim();var ZipSearch=null;var IdWebSearch=null;if(txtSearch==null){for(var x=0;x<this.FormObjectCache.length;x++){var item=this.FormObjectCache[x];if(item.type=="text"){txtSearch=item.value;break;}}}if(txtSearch!=null){if(txtSearch==""){window.alert("Please provide a search term");this.SuggestTextBox.focus();return;}else{if(this.LocationId!=undefined&&this.LocationId!=null&&this.LocationId!=0){NValues.push(parseInt(this.LocationId,10));}else{var ZipConst=GTSRESearch.GetConstant(GTSRE_KEYWORDSEARCH_ZIP);var IdWebConst=GTSRESearch.GetConstant(GTSRE_KEYWORDSEARCH_IDWEB);if((ZipConst.Pipe==this.Pipeline)||(IdWebConst.Pipe==this.Pipeline)){var RegexUSZip10=/([0-9]{5})(\-[0-9]{4})?/;var RegexCAZip=/[ABCEGHJKLMNPRSTVXY]\d[A-Z]\s*\d[A-Z]\d/;var REMatch;if(this.Country==GTSRE_COUNTRY_USA){REMatch=RegexUSZip10.exec(txtSearch);if(REMatch!=null&&(txtSearch.length==5)){if(REMatch.length>1){ZipSearch=REMatch[1];}}else if(txtSearch.indexOf(",")==-1){IdWebSearch=txtSearch.replace(' ','');}}try{if(this.Country==GTSRE_COUNTRY_CAN){REMatch=RegexCAZip.exec(txtSearch);if(REMatch!=null){if(REMatch.length>0){ZipSearch=REMatch[0].replace(/\s/g,"");}}}}catch(e){}if(ZipSearch!=null){Keywords.push([GTSRE_KEYWORDSEARCH_ZIP,ZipSearch]);}if(IdWebSearch!=null){Keywords.push(["IdSearch",IdWebSearch]);}}}}}for(var x=0;x<this.FormObjectCache.length;x++){var item=this.FormObjectCache[x];if((item.value=="1058961")&&item.checked){var sel_date_select=document.getElementById("oh_date");if((typeof(sel_date_select)!="undefined")&&(sel_date_select.value!="0"))Keywords.push(["OpenHouse1Date",sel_date_select.value]);}s+=String.format("{0}:      {1}\n",item.type,item.id);switch(item.type){case"select-one":data=parseInt(item.options[item.selectedIndex].value,10);if(data>0){NValues.push(data);}break;case"select-multiple":for(var i=0;i<item.options.length;i++){data=parseInt(item.options[i].value,10);if(item.options[i].selected){if(data>0){NValues.push(data);}}}break;case"checkbox":if(item.checked){data=parseInt(item.value,10);if(data>0){NValues.push(data);}}break;case"text":if(item.value.Trim()!=""){Keywords.push([item.id,item.value.Trim()]);}break;case"range-combo":case"range-text":item.Validate();if(!item.isValid){return;}if(!item.isEmpty){Filters.push(item.GetFilter());}break;}}var QGen=new UrlGen("");if(IdWebSearch!=null)NValues.push("0");else NValues.push(parseInt(this.Channel,10));QGen.AddParam("C",this.Country);QGen.AddParam("P",this.Pipeline);if(txtSearch!=null){QGen.AddParam("txtSearch",escape(txtSearch));}QGen.AddParam("N",NValues.join("+"));if(Filters.length>0){QGen.AddParam("Nf",Filters.join("||"));}if(Keywords.length>0){var NTK=new Array();var NTT=new Array();for(var k=0;k<Keywords.length;k++){NTK.push(Keywords[k][0]);NTT.push(escape(Keywords[k][1]));}QGen.AddParam("Ntk",NTK.join("|"));QGen.AddParam("Ntt",NTT.join("|"));}QGen.AddParam("callback",this.Namespace+".ParseJSON");QGen.AddParam("key",escape(GabrielsKey));if(this.DebugContainer!=null){var QGDebug=new UrlGen(QGen.ToString());QGDebug.RemoveParam("key");this.DebugContainer.innerHTML+="<BR><B>QUERY:</B>"+QGDebug.ToString();}this.LoadJSON(ApiRoot+"search.aspx?"+QGen.ToString());};GTSRESearch.prototype.UnLoad=function(){for(var x=0;x<this.ContainerCache.length;x++){this.ContainerCache[x].innerHTML="";}};GTSRESearch.prototype.ReLoad=function(){for(var x=0;x<this.StartupCache.length;x++){window.setTimeout(this.StartupCache[x],(x*10)+1);}};GTSRESearch.prototype.Load=function(txtPreselectQuery,txtDebugContainerId){My=this;if(this.ResponseContainer==null){GTSRESearch.DebugErrors.push(["Load Error","A valid ResponseContainer is required"]);}if(txtPreselectQuery!=undefined&&txtPreselectQuery!=null&&txtPreselectQuery!=""){this.StartupCache.push(function(){var NValues=new Array();var FilterVals=new Array();var FilterNames=new Array();var KeywordSearchVals=new Array();var KeywordSearchNames=new Array();txtPreselectQuery=escape(unescape(txtPreselectQuery));txtPreselectQuery=txtPreselectQuery.replace(/%7C/gi,"|");txtPreselectQuery=txtPreselectQuery.replace(/%26/gi,"&");txtPreselectQuery=txtPreselectQuery.replace(/\s/gi,"+");txtPreselectQuery=txtPreselectQuery.replace(/%20/gi,"+");var PreGen=new UrlGen(txtPreselectQuery);var txtSearch=PreGen.GetParam("txtSearch");var Country=PreGen.GetParam("C");NValues=PreGen.GetParam("N").split('+');var RawFilters=PreGen.GetParam("Nf").split('||');for(var x=0;x<RawFilters.length;x++){var Ele=RawFilters[x].split('|');FilterNames.push(Ele[0]);FilterVals.push(Ele[1]);}var RawNtt=PreGen.GetParam("Ntt").split('|');var RawNtk=PreGen.GetParam("Ntk").split('|');for(var x=0;x<RawNtk.length;x++){KeywordSearchNames.push(RawNtk[x]);KeywordSearchVals.push(RawNtt[x]);}for(var x=0;x<My.FormObjectCache.length;x++){var item=My.FormObjectCache[x];switch(item.type){case"select-one":if(item.id=="CountriesComboBox"){for(var i=0;i<item.options.length;i++){if(Country==new String(item.options[i].value)){item.selectedIndex=i;break;}}break;}for(var i=0;i<item.options.length;i++){if(NValues.Contains(new String(item.options[i].value))){item.selectedIndex=i;break;}}break;case"select-multiple":for(var i=0;i<item.options.length;i++){if(NValues.Contains(new String(item.options[i].value))){item.selected=true;}}break;case"checkbox":if(NValues.Contains(new String(item.value))){item.checked=true;}break;case"gtsre-combobox":for(var i=0;i<item.options.length;i++){if(NValues.Contains(new String(item.options[i].value))){item.selectedIndex=i;break;}}break;case"text":if(item.id=="GTSRESuggestText_"+My.Namespace){if(txtSearch.length>0){item.value=unescape(txtSearch).replace(/\+/g," ");break;}}for(var i=0;i<KeywordSearchNames.length;i++){if(item.id==KeywordSearchNames[i]){item.value=KeywordSearchVals[i];break;}}break;case"range-combo":if(FilterNames.Contains(item.Property)){for(var i=0;i<FilterNames.length;i++){if(item.Property==FilterNames[i]){var FilterData=FilterVals[i].split('+');for(var t=0;t<item.Min.ComboBox.options.length;t++){if(FilterData[1]==new String(item.Min.ComboBox.options[t])){item.Min.ComboBox.selectedIndex=t;break;}}for(var t=0;t<item.Max.ComboBox.options.length;t++){if(FilterData[2]==new String(item.Max.ComboBox.options[t])){item.Max.ComboBox.selectedIndex=t;break;}}}}}break;case"range-text":if(FilterNames.Contains(item.Property)){for(var i=0;i<FilterNames.length;i++){if(item.Property==FilterNames[i]){var FilterData=FilterVals[i].split('+');item.Min.TextBox.value=FilterData[1];item.Max.TextBox.value=FilterData[2];break;}}}break;}}});}var DebugContainer=null;if(txtDebugContainerId!=undefined&&txtDebugContainerId!=null){DebugContainer=GTSRESearch.ValidateContainer(txtDebugContainerId,"Load Debug");}this.StartupCache.push(function(){if(DebugContainer!=null){DebugContainer.style.backgroundColor='#CCCC99';var DebugData="<B>Gabriels Search API Debug Info for object '"+My.Namespace+"'</B><BR><BR>";if(GTSRESearch.DebugErrors.length==0){DebugData+="<B style='color:green;font-size:14px;'>No Constructor Errors</B>";}else{DebugData+="<table border=1 cellpadding=2 cellspacing=0 style='background-color:#eaeaea'>\
                    <TR>\
                        <TD style='background-color:#cccccc;font:bold 12px arial;'>Method</TD>\
                        <TD style='background-color:#cccccc;font:bold 12px arial;'>Error</TD>\
                    </TR>";for(var x=0;x<GTSRESearch.DebugErrors.length;x++){DebugData+=String.format("<TR>\
                            <TD style='background-color:#ffffff;font:bold 12px arial;'>{0}</TD>\
                            <TD style='background-color:#ffffff;font:12px arial;'>{1}</TD>\
                        </TR>",GTSRESearch.DebugErrors[x][0],GTSRESearch.DebugErrors[x][1]);}DebugData+="</TABLE>";}DebugContainer.style.border="1px solid #000000";DebugContainer.style.padding="10px";DebugContainer.innerHTML=DebugData;My.ContainerCache.push(DebugContainer);}});for(var x=0;x<this.StartupCache.length;x++){document.onload=My.StartupCache[x]();}if(My.ResponseContainer!=null){document.body.onclick=function(){eval(My.Namespace+".CloseSuggest();")};}GTSRESearch.DebugErrors=new Array();};}GTSRESearch.DebugErrors=new Array();GTSRESearch.GetConstant=function(constant){if(constant==undefined||constant==null){return null;}for(var x=0;x<Constants.items.length;x++){if(Constants.items[x].Value==constant){return Constants.items[x];}}return null;};function UrlGen(strQueryString){this.Parameters=new Array();UrlGen.prototype.Init=function(strQueryString){with(this){Parameters=new Array();var QueryString=strQueryString.replace(/&amp;/gi,'&');QueryString=QueryString.replace('%7c','|');QueryString=unescape(QueryString);var _tempParams=QueryString.split('&');for(var i=0;i<_tempParams.length;i++){var _Param=_tempParams[i].split('=');Parameters.push(_Param);}}};UrlGen.prototype.RemoveParam=function(strKey){with(this){var _tempParams=new Array();for(var i=0;i<Parameters.length;i++){if(Parameters[i][0].toLowerCase()!=strKey.toLowerCase()){_tempParams.push(Parameters[i]);}}Parameters=_tempParams;}};UrlGen.prototype.RemoveParams=function(arrParams){with(this){for(var p=0;p<arrParams.length;p++){RemoveParam(arrParams[p]);}}};UrlGen.prototype.AddParam=function(strKey,strValue){with(this){Parameters.push(new Array(strKey,strValue));}};UrlGen.prototype.GetParam=function(strKey){with(this){for(var i=0;i<Parameters.length;i++){if(Parameters[i][0].toLowerCase()==strKey.toLowerCase()){return Parameters[i][1];}}return"";}};UrlGen.prototype.ToString=function(){with(this){var _tempParams=new Array();for(var i=0;i<Parameters.length;i++){if(Parameters[i][0].Trim()!=""){_tempParams.push(Parameters[i].join('='));}}return _tempParams.join('&');}};this.Init(strQueryString);}function GTSRERangeComboBoxes(objComboBoxMin,objComboBoxMax){if(objComboBoxMin.Constant!=objComboBoxMax.Constant){GTSRESearch.DebugErrors.push(["GTSRERangeComboBoxes Error","The constants for both minimum and maximum must be the same"]);return;}this.type="range-combo";this.Min=objComboBoxMin;this.Max=objComboBoxMax;this.Property=objComboBoxMin.Constant;this.Filter="";this.isValid=true;this.isEmpty=true;GTSRERangeComboBoxes.prototype.Validate=function(){if(this.Min.ComboBox.options.selectedIndex==0&&this.Max.ComboBox.options.selectedIndex==0){this.isValid=true;this.isEmpty=true;return;}this.isEmpty=false;var minValue=parseInt(this.Min.ComboBox.options[this.Min.ComboBox.options.selectedIndex].value,10);var maxValue=parseInt(this.Max.ComboBox.options[this.Max.ComboBox.options.selectedIndex].value,10);if(minValue>=maxValue){window.alert("The maximum selection must be greater than the minimum selection");this.isValid=false;return;}this.isValid=true;return;};GTSRERangeComboBoxes.prototype.GetFilter=function(){var minValue=parseInt(this.Min.ComboBox.options[this.Min.ComboBox.options.selectedIndex].value,10);var maxValue=parseInt(this.Max.ComboBox.options[this.Max.ComboBox.options.selectedIndex].value,10);this.Property=this.Min.Constant;this.Filter=String.format("BTWN+{0}+{1}",minValue,maxValue);return this.Property+"|"+this.Filter;};}function GTSRERangeTextBoxes(objTextBoxMin,objTextBoxMax){if(objTextBoxMin.Constant!=objTextBoxMax.Constant){GTSRESearch.DebugErrors.push(["GTSRERangeTextBoxes Error","The constants for both minimum and maximum must be the same"]);return;}this.type="range-text";this.Min=objTextBoxMin;this.Max=objTextBoxMax;this.Property=objTextBoxMin.Constant;this.Filter="";this.isValid=true;this.isEmpty=true;GTSRERangeTextBoxes.prototype.Validate=function(){var minValue=parseInt(this.Min.TextBox.value,10);var maxValue=parseInt(this.Max.TextBox.value,10);if(isNaN(minValue)||isNaN(maxValue)){this.isEmpty=true;return;}this.isEmpty=false;if(minValue>=maxValue){window.alert("The maximum value must be greater than the minimum value");this.isValid=false;return;}this.isValid=true;return;};GTSRERangeTextBoxes.prototype.GetFilter=function(){var minValue=parseInt(this.Min.TextBox.value,10);var maxValue=parseInt(this.Max.TextBox.value,10);this.Property=this.Min.Constant;this.Filter=String.format("BTWN+{0}+{1}",minValue,maxValue);return this.Property+"|"+this.Filter;};}GTSRESearch.ValidateContainer=function(objContainerId,strMethodName){var err=null;if(objContainerId==undefined){err=[strMethodName+" Error","No div container id provided"];GTSRESearch.DebugErrors.push(err);return null;}var objContainer=null;if(GTSRESearch.GetType(objContainerId)=="string"){objContainer=gE(objContainerId);}else{err=[strMethodName+" Error","Div container id required. Passed: "+objContainerId];GTSRESearch.DebugErrors.push(err);return null;}if(objContainer==null){err=[strMethodName+" Error","Div container id provided ("+objContainerId+") did not refer to a valid div container"];GTSRESearch.DebugErrors.push(err);return null;}return objContainer;};GTSRESearch.SelectByValue=function(objComboBox,objValue){if(objComboBox.options.length>0){for(var x=0;x<objComboBox.options.length;x++){if(new String(objComboBox.options[x].value)==new String(objValue)){objComboBox.selectedIndex=x;return;}}}};function GTSREComboBox(constant,objContainerId,txtClassName,delegateOnChange){var Const=GTSRESearch.GetConstant(constant);if(Const==null){GTSRESearch.DebugErrors.push(["GTSREComboBox Error","A constant is required"]);return;}var objContainer=GTSRESearch.ValidateContainer(objContainerId,"GTSREComboBox");if(objContainer==null){return;}this.Container=objContainer;this.Constant=constant;this.ComboBox=document.createElement("select");this.DelegateOnChange=null;this.type="gtsre-combobox";if(txtClassName!=undefined&&txtClassName!=null){this.ComboBox.className=txtClassName;}if(delegateOnChange!=undefined&&delegateOnChange!=null){this.DelegateOnChange=delegateOnChange;this.ComboBox.onchange=delegateOnChange;}GTSREComboBox.prototype.AddOption=function(Text,objValue){var choice=document.createElement("option");choice.text=Text;choice.value=objValue;this.ComboBox.options.add(choice);};}function GTSRETextBox(constant,objContainerId,txtClassName,delegateOnChange){var Const=GTSRESearch.GetConstant(constant);if(Const==null){GTSRESearch.DebugErrors.push(["GTSRETextBox Error","A constant is required"]);return;}var objContainer=GTSRESearch.ValidateContainer(objContainerId,"GTSRETextBox");if(objContainer==null){return;}this.Container=objContainer;this.Constant=constant;this.TextBox=document.createElement("input");this.TextBox.type="text";this.DelegateOnChange=null;this.type="gtsre-textbox";if(txtClassName!=undefined&&txtClassName!=null){this.TextBox.className=txtClassName;}if(delegateOnChange!=undefined&&delegateOnChange!=null){this.DelegateOnChange=delegateOnChange;this.TextBox.onchange=delegateOnChange;}}function GTSRERecurseOffset(obj){this.ParentObj=null;this.CurrentObj=obj;this.OoffsetLeft=obj.offsetLeft;this.OoffsetTop=obj.offsetTop;this.OoffsetWidth=obj.offsetWidth;this.OoffsetHeight=obj.offsetHeight;GTSRERecurseOffset.prototype.Init=function(){with(this){if(CurrentObj.offsetParent!=null){do{ParentObj=CurrentObj.offsetParent;OoffsetLeft+=ParentObj.offsetLeft;OoffsetTop+=ParentObj.offsetTop;CurrentObj=ParentObj;}while(CurrentObj.offsetParent!=null);}}};GTSRERecurseOffset.prototype.GetOffsetLeft=function(){return this.OoffsetLeft;};GTSRERecurseOffset.prototype.GetOffsetTop=function(){return this.OoffsetTop;};GTSRERecurseOffset.prototype.GetOffsetWidth=function(){return this.OoffsetWidth;};GTSRERecurseOffset.prototype.GetOffsetHeight=function(){return this.OoffsetHeight;};this.Init();}function FoeSearch(string){var txtSearch=document.getElementById("suggest1").getElementsByTagName("input")[0];txtSearch.value=string;}