function showMenu(name) {
	e = document.getElementById('menu'+name);
	e.style['display']='block';
}

function canHideMenu(name) {
	e = document.getElementById('menu' + name);
	e.style['display'] = 'none';
}

function napiszMiPoczte(sDom, sUser){
	return("mail"+"to:"+sUser+"@"+sDom+'.com.pl');
}

function AL_GetFlash(idName,movie,wdth,hght,fVars) {
	document.write("<div id='div"+idName+"'></div>");
	if (obj_setFlash = document.getElementById("div"+idName)) {
		fVars = fVars.replace(/amp;/, '');
		objTag1 = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+wdth+"' height='"+hght+"' id='"+idName+"'>";
		objTag2 = "<object data='"+movie+"' type='application/x-shockwave-flash' width='"+wdth+"' height='"+hght+"' id='"+idName+"'>";

		paramTag = "<param name='movie' value='"+movie+"'>"
		+"<param name='wmode' value='transparent'>"
		+"<param name='quality' value='high'>"
		+"<param name='scale' value='auto'>"
		+"<param name='menu' value='false'>"
		+"<param name='allowScriptAccess' value='sameDomain'>"
		+"<param name='allowFullScreen' value='false'>"
		+"<param name='swliveconnect' value='true'>"
		+"<param name='FlashVars' value='"+fVars+"'>"
		+"</object>";

		if (typeof HTMLElement != "undefined") {
			obj = document.createElement("object");
			obj.setAttribute("data", movie);
			obj.setAttribute("type", "application/x-shockwave-flash");
			obj.setAttribute("width", wdth);
			obj.setAttribute("height", hght);
			obj.setAttribute("id", idName);
			par = document.createElement("param");
			par.setAttribute("name", "wmode");
			par.setAttribute("value", "transparent");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "quality");
			par.setAttribute("value", "high");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "scale");
			par.setAttribute("value", "auto");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "menu");
			par.setAttribute("value", "false");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "allowScriptAccess");
			par.setAttribute("value", "sameDomain");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "allowFullScreen");
			par.setAttribute("value", "false");
			obj.appendChild(par);
			par = document.createElement("param");
			par.setAttribute("name", "swliveconnect");
			par.setAttribute("value", "true");
			obj.appendChild(par);
			if (fVars) {
				par = document.createElement("param");
				par.setAttribute("name", "FlashVars");
				par.setAttribute("value", fVars);
				obj.appendChild(par);
			}
			par = document.createTextNode("div"+idName);
			obj.appendChild(par);

			return obj_setFlash.appendChild(obj);
		} else if (document.all && !window.opera) {
			obj_setFlash.insertAdjacentHTML('beforeEnd',objTag1+paramTag);
		} else {
			obj_setFlash.write(objTag2+paramTag);
		}
	}
}

function GetKol(nr) {
	tabkol=new Array(
		["3288","E3E43C"], // Spozywka
		["3290","953993"], // Bizuteria
		["3297","0077BE"], // Dzieci
 		["3284","F37536"], // Moda
		["3299","00AEC3"], // Multimedia
		["3294","FDBA2F"], // Obuwie
		["3301","0077BE"], // Rozrywka
		["3303","007548"], // Sport
		["3292","91C84B"], // Uslugi
		["3305","6BC28F"], // Wyposazenie wnetrz
		["3286","EE2F62"]  // Zdrowie i uroda
	);
	for (j=0; j < tabkol.length; j++) if (tabkol[j][0]==nr) return tabkol[j][1];
}

function SetMarker(poz,mark) {
	if(window.mapka) {
//		window.document["mapka"].SetVariable("poz",poz);
//		window.document["mapka"].SetVariable("mark",mark);
		window.mapka.SetVariable("poz",poz);
		window.mapka.SetVariable("mark",mark);
	}
	if(document.mapka) {
		document.mapka.SetVariable("poz",poz);
		document.mapka.SetVariable("mark",mark);
	}
}

function GetBox(id) { for (i=0; i < Sklep.length; i++) if (Sklep[i][2]==id) return Sklep[i]; }

function Wizyt(id) {
	cfg='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=750,height=700';
	win=window.open("http://www.galeriaolimp.com.pl?page_id="+GetBox(id)[5],"win",cfg);
//	win=window.open("http://olimp.selinet.pl?page_id="+GetBox(id)[5],"win",cfg);
	win.focus();
	win.onBlur=function() { win.Close(); }
}

function ChangeBranza(id) {
	txt="";
	for (i=0; i < Sklep.length; i++) {
		if (id==0 || id==Sklep[i][3]) {
			kol=GetKol(Sklep[i][3]);
			txt+="<div style='background:#"+kol+";'><a href='#' onClick='SetMarker(\""+Sklep[i][0]+"\",\""+Sklep[i][1]+"\"); return false;'><span>"+Sklep[i][4]+"</span></a></div>";
		}
	}
	document.getElementById("MapaSklepyDiv").innerHTML=txt;
}
