function pokaz(idDiv){
	document.getElementById(idDiv).style.display='block';
}

function ukryj(idDiv){
	document.getElementById(idDiv).style.display='none';
}

function colorize(id){
	document.getElementById(id).style.background="#de5900";
	document.getElementById(id).style.color="#ffffff";
}

function uncolorize(id){
	document.getElementById(id).style.background="#ffffff";
	document.getElementById(id).style.color="#6f6b62";
}

function getElementsByClassName(cn){
  var arr = new Array(); 
  var els = document.getElementsByTagName("*");
  var exp= new RegExp("^(.* )?"+cn+"( .*)?$", "g");
  for (var i = 0; i < els.length; i++ ){
    if (exp.test(els[i].className)){
      arr.push(els[i]);
    }
  }
  return arr;
}
function showHideRows(classNameHide,classNameShow){
    
    arrRowsHide = getElementsByClassName(classNameHide);
    arrRowsShow = getElementsByClassName(classNameShow);
    arrLangBoxes = getElementsByClassName('lang_box');
    
    var tabCount=0;
    tabCount = arrRowsHide.length;
    for(var i=0;i<arrRowsHide.length;i++){
        arrRowsHide[i].style.display = 'none';
    }
    for(var i=0;i<arrRowsShow.length;i++){
        arrRowsShow[i].style.display = "";
    }
    for(var i=0;i<arrLangBoxes.length;i++){
        arrLangBoxes[i].className = 'lang_box_hidden';
    }
}
function checkAgeTo(value){
    for(var i=18;i<=99;i++){
        document.getElementById('age_to_'+i).style.display="";
    }
    for(var i=18;i<=value;i++){
        document.getElementById('age_to_'+i).style.display="none";
    }
    if(value>=document.getElementById('select_age_to').value){
        var plus_one = parseInt(value)+1;
        document.getElementById('select_age_to').value=plus_one;
    }    
}
