function SetLang ( Lang )
{
  	document.formLang.SetLang.value = Lang;
  	document.formLang.submit();
}

function doReload()
{
	window.location.reload ( true );
}

function WinClose ()
{
 	window.opener.doReload();
 	window.close();
}

function PrintPage ()
{
 if (typeof(window.print) != 'undefined')
 {
     window.print();
 }
}

function func_get_args () {
    // !No description available for func_get_args. @php.js developers: Please update the function summary text file.
    // 
    // version: 909.322
    // discuss at: http://phpjs.org/functions/func_get_args
    // +   original by: Brett Zamir (http://brett-zamir.me)
    // %        note 1: May not work in all JS implementations
    // *     example 1: function tmp_a () {return func_get_args();}
    // *     example 1: tmp_a('a', 'b');
    // *     returns 1: ['a', 'b']
    if (!arguments.callee.caller) {
        try {
            throw new Error('Either you are using this in a browser which does not support the "caller" property or you are calling this from a global context');
            // return false;
        } catch (e){
            return false;
        }
    }

    return Array.prototype.slice.call(arguments.callee.caller.arguments);
}

function objGet(x) {
  if(Boolean(document.getElementById)) return document.getElementById(x);
  else if (Boolean(document.all)) return eval('document.all.'+x);
  else if (Boolean(document.ids)) return eval('document.ids.'+x);
  else return null;
}

function changeImgBt(id, path) {
  var imgObj = document.getElementById(id);
  imgObj.setAttribute("src", '/_face/img5/'+path);
}

function setScreen() {
  var idArr = func_get_args();
  for(var i=0;i<idArr.length;i++) {
    objGet(idArr[i]).style.display='block';
  }
}

function unsetScreen() {
  var idArr = func_get_args();
  for(var i=0;i<idArr.length;i++) {
    objGet(idArr[i]).style.display='none';
  }
}


function AddFavorite(linkObj,addUrl,addTitle)
{
  if (document.all && !window.opera)
  {
    window.external.AddFavorite(addUrl,addTitle);
    return false;
  }
  else if (window.opera && window.print)
  {
    linkObj.title = addTitle;
    return true;
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
  {
    if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
    {
      window.sidebar.addPanel(addTitle,addUrl,'');
      return false;
    }
  }
  window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
  return false;
}
