var terkep_level = 0;

function initializeGMap(fullnev, address) {
	var geocoder = new google.maps.Geocoder();
	var contentString = '<div id="content"><b>'+fullnev+'</b>:<br><a href="http://maps.google.com/maps?f=q&hl=hu&geocode=&q='+address+'" target="_blank">'+address+'</a></div>';
	var marker; 

	geocoder.geocode( { 'address': address}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			map.setCenter(results[0].geometry.location);
			marker = new google.maps.Marker({
		    		map: map, 
				title: fullnev,
		    		position: results[0].geometry.location
			});
			google.maps.event.addListener(marker, 'click', function() {
				//infowindow.open(map,marker);
				var url = "http://maps.google.com/maps?f=q&hl=hu&geocode=&q="+address;
				window.open(url, fullnev+": "+address/*,'resizable=yes,width=500,height=400, top=10, left=10'*/);
	});

		} else {
			alert("Geocode was not successful for the following reason: " + status);
		}
	});

	var latlng = new google.maps.LatLng(47.397, 150.644);
	var myOptions = {
		zoom: 14,
		center: latlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
		};
	var map = new google.maps.Map(document.getElementById("map"), myOptions);

	var infowindow = new google.maps.InfoWindow({
	    content: contentString
	});
	
}

function loadTrendmap(szint, bolt_id) {
    var fv = "foldszint_h_1.swf";
    
    if (szint == 0) fv = "foldszint_h_1.swf";
    if (szint == 1) fv = "1emelet_h_1.swf";

    terkep_level = szint;
    swfobject.embedSWF("/img/"+fv,  // flash file
	"trendmap_map",   // div id
	"530", "400",  // width and height
	"10.0.0",       // flash palyer version
	"/img/expressInstall.swf",
	{xmlfile: "/img/content.xml", activeBoxId: bolt_id},
	{wmode: 'transparent', menu: false},
	{});
	
}

function zoomHide() {

    document.getElementById("fullshadow").style.display='none';
    document.getElementById("fullkeret").style.display='none';
    document.getElementById("zoomkeret").style.display='none';

}

function zoomShow() {
    var fv = "";
    
    if (terkep_level == 0) fv = "foldszint_h_1.swf";
    if (terkep_level == 1) fv = "1emelet_h_1.swf";
    
    swfobject.embedSWF("img/"+fv,  // flash file
	"zoomkeret",   // div id
	"800", "600",  // width and height
	"10.0.0",       // flash palyer version
	"img/expressInstall.swf",
	{xmlfile: "/img/content.xml"},
	{wmode: 'transparent', menu: false},
	{});

    document.getElementById("fullshadow").style.display='block';
    document.getElementById("fullkeret").style.display='block';
    document.getElementById("zoomkeret").style.display='block';
    
}

function LoadSideFlash() {
	swfobject.embedSWF("kabat3/slide_final_2010_11_29.swf",  // flash file
			"side_flash",   // div id
			"185", "329",  // width and height
			"10.0.0",       // flash palyer version
			"include/expressInstall.swf",
			{xmlfile: "kabat3/content.xml"},
			{wmode: 'transparent', menu: false},
			{}
			);                   // attributes
}

//popup bezárás
function closepop()
{
	var pop = document.getElementById("loginpopup");
	document.body.removeChild(pop);
}

