function div_extra (div_id){
	id=document.getElementById(div_id);
	if (id.className=='opn') {
					saveCookie(div_id+"_class", 'cls', 5);
					id.className='cls';
			} else {
					saveCookie(div_id+"_class", 'opn', 5);
					id.className='opn';
			}
}

function saveCookie (jmeno, hodnota, dny) {
	var denExp = new Date();
	denExp.setTime (denExp.getTime() + (86400 * 1000 * dny));
  document.cookie = jmeno + "=" + escape(hodnota) + "; expires=" + denExp.toGMTString() +  "; path=/";
}
 
function open_div (div_id) {
 id=document.getElementById(div_id);
 if (id.style.display=='') {
		id.style.display='none';
	} else {
		id.style.display='';
	}
}

function Trim (a_String) {
var buff = a_String.toString();
 while (buff.substr(0,1) == " ") 
  buff = buff.substr(1)
 return buff;	
}

function checkArticle2Mail(frm) {
	if (Trim(frm.komu.value) == "") {
	alert("Některá s povinných položek není správně vyplněna.");
	frm.komu.focus();
	return false;
	}
	if (Trim(frm.od.value) == "") {
	alert("Některá s povinných položek není správně vyplněna.");
	frm.od.focus();
	return false;
	}
	frm.submit();
}

function showDiv (idname) {
 id=document.getElementById('div290');
 id.style.display='none';
 id=document.getElementById('div291');
 id.style.display='none';
 id=document.getElementById('div292');
 id.style.display='none';
 id=document.getElementById('div293');
 id.style.display='none';

 id=document.getElementById(idname);
 id.style.display='';
}	
function ConfirmGet(aMessage, aURL, aFrame) {
var result; 
 result= confirm(aMessage);
 if (result) {
  window.open(aURL, aFrame ,'');
 } 
}
