$(function()
		{
			$('.menuItemSelected').css('backgroundColor','rgb(226,241,249)').fadeIn(1000);
			$('.forumcategories').fadeIn(1000);
			$('.forumtitles').fadeIn(1000);
			$('.forumlist').fadeIn(1000);
			$('.topiclist').fadeIn(1000);
			$('.forumposts').fadeIn(1000);
			$('.searchresult').fadeIn(1000);
			$('#emoticons').mouseover(function(){
				$(this).next().fadeIn();
				
			});
			$('#emoticonToolbar').mouseleave(function(){
				$(this).fadeOut();
				
			});
			
			$('.quotePlaceholder').mouseover(function(){
				$(this).siblings().fadeIn();
				
			});
			$('.forumpostQuote').mouseleave(function(){
				$(this).fadeOut();
				
			});
		}
)

function getObject(obj) {
  var theObj;
  if(document.all) {
    if(typeof obj=="string") {
      return document.all(obj);
    } else {
      return obj.style;
    }
  }
  if(document.getElementById) {
    if(typeof obj=="string") {
      return document.getElementById(obj);
    } else {
      return obj.style;
    }
  }
  return null;
}

function toCount(entrance,exit,text,characters) {
  var entranceObj=getObject(entrance);
  var exitObj=getObject(exit);
  var length=characters - entranceObj.value.length;
  if(length <= 0) {
    length=0;
    text='<span class="disable"> '+text+' </span>';
    entranceObj.value=entranceObj.value.substr(0,characters);
  }
  exitObj.innerHTML = text.replace("{CHAR}",length);
}

function addText(textToAdd) {
	var newtext = textToAdd;
	document.postEdit.postData.value += newtext;
}

function confirmOperation(URL)
{
	var result=confirm("Biztos benne?");
	if(result == true)
	{
		window.location = URL;
	}
}


