function insert_smile(type) {
	parent.message.document.getElementById('form_message').chatbarText.value=parent.message.document.getElementById('form_message').chatbarText.value+" "+type+" ";
	parent.message.document.getElementById('form_message').chatbarText.focus();
	
}

// ------------------------------------------ funkce pro otevirani novych oken
function okno(soubor) {
  window.open(soubor,'','')
}


function change_box(idcko){
			box=document.getElementById(idcko);
			
			pole = new Array
			pole[0]="smilles";
			pole[1]="users";
			pole[2]="control";
			poleA = new Array
			poleA[0]="tab2";
			poleA[1]="tab2";
			poleA[2]="tab1";
			
			if (idcko=="smilles"){
			}
			
			if (idcko=="users"){
				pole[0]="users";
				pole[1]="control";
				pole[2]="smilles";

				poleA[0]="tab2";
				poleA[1]="tab1";
				poleA[2]="tab2";	
			}
			
			if (idcko=="control"){
				pole[0]="control";
				pole[1]="users";
				pole[2]="smilles";
				
				poleA[0]="tab1";
				poleA[1]="tab2";
				poleA[2]="tab2";				
			}
			
				
			document.getElementById("box_"+pole[0]).style.display="";
			document.getElementById("box_"+pole[1]).style.display="none";
			document.getElementById("box_"+pole[2]).style.display="none";
			
			document.getElementById("a1").className=poleA[0];
			document.getElementById("a2").className=poleA[1];
			document.getElementById("a3").className=poleA[2];
				
}

function show_nick(nick) {
	document.getElementById('chatbarText').value=nick;
	document.getElementById('livesearch').style.display="none";
	document.getElementById('chatbarText').chatbarText.focus();
	
}

