	var params;
	var attributes;
	var thisMap;
	var types;
	var xPrice;
	var filters;
	var startup = true;
	
	function jsReady() {
		/*if ($("object[name=map]").size() > 0 && typeof($("object[name=map]")[0].onJSLoad) == "function") {
			$("object[name=map]")[0].onJSLoad();
		}*/
		//$("button[name=update]").click();
	}
	function InitFilters(e) {
		var filters = new Object();
		var types = new Array();
		$("form input.filter").each(function() {
			if ($(this).is(":checked")) {
				types.push($(this).val());
			}
		});
		if (types.length<1) {
			types.push(99.9999);
		}
		filters.types = types;
		thisMap.setFilters(filters);
	}
	$(document).ready(function() {
					
		var niceBrowser = true;
		if ($.browser.msie && parseInt($.browser.version) < 7) {
			niceBrowser = false;
		}
		
		if (niceBrowser) {
			/*=========end FLASH ============*/
			var source = "php/mapAppData.php?lang="+ lang +"&class="+klass;
			
			thisMap = new MapApp({
				apiKey: "ABQIAAAAy_3-fAT44OGlGoN6RxPmahQNwb4coqjf3voVjQuXUqXbCvF0GBTkLbAuGPTk7Y3KS-vXL8GvA_QE5w",
				dataSource: source,
				onComplete:InitFilters
			});
			
			$("form input.filter").bind("change", InitFilters);
			
			
			/* Map control options */
			$("#satteliteButtLink").mouseover(function(){
				$("#satteliteButtLink img").removeClass("satteliteButt");
				$("#satteliteButtLink img").addClass("satteliteButtHover");
			});
			$("#satteliteButtLink").mouseout(function(){
				$("#satteliteButtLink img").removeClass("satteliteButtHover");
				$("#satteliteButtLink img").addClass("satteliteButt");
			});
			$("#satteliteButtLink").click(function(){
				$("#satteliteButtLink img").removeClass("satteliteButtHover");
				$("#satteliteButtLink img").addClass("satteliteButtActive");
				$("#mapButtLink img").removeClass("mapButtActive");
				$("#mapButtLink img").addClass("mapButt");
			});
			$("#mapButtLink").mouseover(function(){
				$("#mapButtLink img").removeClass("mapButt");
				$("#mapButtLink img").addClass("mapButtHover");
			});
			$("#mapButtLink").mouseout(function(){
				$("#mapButtLink img").removeClass("mapButtHover");
				$("#mapButtLink img").addClass("mapButt");
			});
			$("#mapButtLink").click(function(){
				$("#mapButtLink img").removeClass("mapButtHover");
				$("#mapButtLink img").addClass("mapButtActive");
				$("#satteliteButtLink img").removeClass("satteliteButtActive");
				$("#satteliteButtLink img").addClass("satteliteButt");
			});
		}

	});
