// JavaScript Document
function getUrlParameters() {
	var s = location.search;
	if (s) {
		if (s.indexOf("?") == 0) {s = s.substr(1);}
		var attrs = s.split("&");
		for (var i = 0; i < attrs.length; i++) {
			var pair = attrs[i].split("=");
			eval("var " + pair[0] + " = '" + pair[1] + "'");
		}
	}
}
function flashObjekt(jmeno)
{
  	if (window.document[jmeno]) 
 	 {
 	     return window.document[jmeno];
  	}
 	 if (navigator.appName.indexOf("Microsoft Internet")==-1)
 	 {
    if (document.embeds && document.embeds[jmeno])
      return document.embeds[jmeno]; 
	}
  else 
  {
    return document.getElementById(jmeno);
  }
}
function otevri(URL,sirka,vyska) {
	okno=window.open(URL,"Okno"+sirka,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,height="+vyska+",width="+sirka);
	okno.focus();
}
function otevriPosuvny(URL,sirka,vyska) {
	okno=window.open(URL,"Okno"+sirka,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height="+vyska+",width="+sirka);
	okno.focus();
}
//
var objects = document.getElementsByTagName("object");
for (var i=0; i<objects.length; i++)
    objects[i].outerHTML = objects[i].outerHTML;
//
//
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else
  {
    return document.getElementById(movieName);
  }
}    
function nastavProm(komu,jakou,kolik)
{
     var movicko=getFlashMovieObject(komu);
     movicko.SetVariable(jakou, kolik);
     document.cookie='jmeno='+kolik;     
}
function nastavPromBezCookie(komu,jakou,kolik)
{
     var movicko=getFlashMovieObject(komu);
     movicko.SetVariable(jakou, kolik);     
}
function setCookie(key, value, days, path, domain, secure) {
   value = encodeURIComponent(value); // hodnota value by měla být minimálně escapována pomocí funkce escape()
   value+='; domain='+domain;
   value+='; path='+path;
   // expirace
   var date = new Date();
   date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
   value+='; expires=' + date.toGMTString();
   // secure
  if (secure) value+='; secure';
  document.cookie = key + '=' + value;
  }
function nastavCookie(str) {
  document.cookie = str;
}

