function fbs_click() {
  u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
	}
function showIt(i) {
  var i, menu;
  foto= eval("document.all.foto"+i);
	foto.style.visibility="visible";
  }
function hideIt(i) {
  var i, menu;
  foto= eval("document.all.foto"+i);
	foto.style.visibility="hidden";
  }
//vy4istit pole po kliknuti
function CleanField(fField, sValue) {
  if (fField.value == sValue) fField.value = '';
  }
function checkBoxes(num, check){
  for(i=1;i<=num;i++) {
    document.getElementById('chk_'+i).checked=check;
    }
  }
function AddText(form, Action){
	var AddTxt="";
	var txt="";
	var beg,end;
	el=document.getElementById('post');
	if(Action==1){	
	  beg="<strong>";
	  end="</strong>";
		}
	if(Action==2){	
	  beg="<u>";
	  end="</u>";
	  }
	if(Action==3){	
	  beg="<i>";
	  end="</i>";
	  }
	if(Action==4){	
	  beg="<br>\r\n";
	  end="";
	  }
  if(Action==5){	
		txt=prompt("URL webové adresy.","http://");	
	  if(txt!=null){		
		  var sel = document.selection;
			beg="<a href=\""+txt+"\" ";
		  txt=prompt("Titulek","Title");		
		  beg+="title=\""+txt+"\">";
		  if (sel == null) txt=prompt("Text hyperlinku","Text");		
	    end="</a> ";
      }	
		}
	if(Action==6){	
		txt=prompt("URL obrázku","URL");	
		if(txt!=null)		
		beg="<img src=\""+txt+"\" ";
		txt=prompt("Alternativní text","::alt");		
		beg+="alt=\""+txt+"\"> ";			
	  end="";
	  }
	if(Action==7){	
		var sel = document.selection;
		beg="<abbr ";
		txt=prompt("Vysvětlení zkratky","Vysvětlení zkratky");		
		beg+="title=\""+txt+"\">";
		if (sel == "") txt=prompt("Zkratka","Vlastní zkratka");		
		end="</abbr> ";		
	  }
	if(Action==9){	
	  beg="\r\n[h2]";
	  end="[/h2]\r\n";
	  }
	if(Action==10){	
	  beg="\r\n<h3>";
	  end="</h3>\r\n";
	  }

  if (el.setSelectionRange) {
    // W3C/Mozilla
    el.value = el.value.substring(0,el.selectionStart) + beg + el.value.substring(el.selectionStart,el.selectionEnd) + end + el.value.substring(el.selectionEnd,el.value.length);
    }
  else if (document.selection && document.selection.createRange) {
    // IE code goes here
    el.focus(); //or else text is added to the activating control
    var range = document.selection.createRange();
    range.text = beg + range.text + end;
 	  }
	}
function printmail(){
    var mail1 = self.document.forms.m.m_komu.value;
    var mail2 = self.document.forms.m.m_kde.value;
    var browserName=navigator.appName;
    if (browserName=="Microsoft Internet Explorer"){
      var x = mail1+'@'+mail2;
      window.clipboardData.setData('Text',x);
      }
  	alert(browserName+"\r\nEmail byl zkopírován do schránky!\r\n"+mail1+'@'+mail2);
		}
function darr(i){
 var i;
 document.getElementById('kraj'+i).style.backgroundImage='url(/images/kraj.gif)';
 }
function undarr(i){
 var i;
 document.getElementById('kraj'+i).style.background='';
 }


