function emoticon(theSmilie) {
	if (document.REPLIER.Post.caretPos && document.REPLIER.Post.createTextRange) {
		var caretPos = document.REPLIER.text.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie;
	} else {
    	document.REPLIER.Post.value += ' ' + theSmilie + ' ';
    }
    
    document.REPLIER.Post.focus();
}

function change_photo(url, width, height){
	parent.document.images['main_photo'].src= url;
	parent.document.images['main_photo'].style.height= height;
	parent.document.images['main_photo'].style.width = width;
}





function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}







var chopen;
function layer_option(opt,l_name,pozit)
{
// a kozepso a layer az utolso a menugomb
var Layername=document.getElementById(l_name);//layer
var newlayer=document.getElementById(pozit);// menugomb
	newlayer.style.position="relative";

var maindiv=Layername.offsetParent;
for(i=0;i<=100;i++)
	{
	var obj=document.getElementById("La_"+i);
		if (obj && obj.id!=l_name)
		{
		obj.style.visibility="hidden";
		}
	}


var P_left=Layername.offsetLeft;
var P_top=Layername.offsetTop;
var L_left=newlayer.offsetLeft;
var L_top=newlayer.offsetTop;
var L_height=newlayer.offsetHeight;

if (opt=="block")
	{
	if (chopen)
	{
	clearInterval(chopen);
	chk=false;
	}
	Layername.style.display="block";
	Layername.style.top=(L_top+L_height)+"px";
	Layername.style.left=L_left+"px";
	Layername.style['z-index']='500';
	Layername.style.visibility="visible";
	}
	else
	{
	st(l_name);
	}
}
function st(l_name)
{
chopen=setInterval("checkopen('"+l_name+"')",1000);
var chk=true;
}


function checkopen(l_name)
{
if (l_name)
	{
	var Layername=document.getElementById(l_name);//layer
	Layername.style.visibility="hidden";
	}
}

function addBookmark(title,url)
{
if (window.sidebar)
{ 
window.sidebar.addPanel(title, url,""); 
}
else if( document.all )
{
window.external.AddFavorite(url, title);
}
else if( window.opera && window.print )
{
return true;
}
}
