function openWin(fajlnev,x,y) {
	var w = window.open(fajlnev,w,"width="+x+",height="+y+",top=50,left=50,resizable=no");
	w.focus();
}

function tabla_szinez() {
	var elem = "TR";

	if (document.getElementsByTagName) {
		var el = document.getElementsByTagName(elem);
		for (var i=0; i<el.length; i++) {
			if (el[i].childNodes[0].tagName != "TH" && el[i].parentNode.parentNode.className.indexOf("data") != -1) {
				if (i%2 == 1) {
					el[i].className = "on";
					el[i].oldClassName = "on";
				} else {
					el[i].className = "off";
					el[i].oldClassName = "off";
				}
			}
		}
	}

}

function helyzetMent(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

function smiley(theSmilie) {
   theSmilie = ' ' + theSmilie + ' ';
   if (document.form.hozzaszolas.createTextRange && document.form.hozzaszolas.caretPos) {
      var caretPos = document.form.hozzaszolas.caretPos;
      caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie;
   } else {
      document.form.hozzaszolas.value  += theSmilie;
   }
   document.form.hozzaszolas.focus();
   theSmilie = '';
}
