
//Nastavení stylopisu pro skrytí jshide polí

addStyleRule('.jshide', 'display:none;');
addStyleRule('.nojshide', 'display:block;');

var stylesht = document.styleSheets[0];
function a() {
  alert('');
  for(cssRule in stylesht.rules) {
    if(!isNaN(cssRule)) {
      alert(cssRule);
      break;
      document.body.appendChild(document.createTextNode(cssRule + ", "));
      //document.body.appendChild(document.createTextNode(stylesht.cssRules[cssRule].selectorText + ", "));
    }
  }
}

//window.setTimeout('a();', 1000);

function addStyleRule(selector, value) {
  //Vybere první stylopis. Nevím, jak se bude chovat při vypnutých stylech, ale kromě ošetření chyby to není třeba řešit :)
var stylesht = document.styleSheets[0];
  
  var styleshts_lngt = (stylesht.cssRules?stylesht.cssRules.length:stylesht.rules.length);
  if (stylesht.insertRule) {
    stylesht.insertRule(selector + ' {' + value + '}', styleshts_lngt);
    return styleshts_lngt;
  } else if (stylesht.addRule) {
    stylesht.addRule(selector, value, styleshts_lngt);
    return styleshts_lngt;
  }
  return false;
}


function new_win(href) {
  var win = window.open(href, 'newwin');
  return (typeof win == 'object' ? false : true);
}

