set = new Array()
set["hirek"] = "Hirek"
set["blog"] = "Blog"
set["video1"] = "Tv"
set["video2"] = "Konc"
form_cache = ""
if (document.images) {
  kepek = new Array()
  for (i=5;i<=16;i++){
	if (i == 15){
	  i++
	}
	tmp = "k"+i
	if (!tmp.charAt(2)){
	  a = "0"+i
	  l = i
	}else{
	  a = i
	  l = tmp.charAt(2)
	}
	kepek["k"+a] = new Image
	kepek["k"+a].src = "images/vazlat10_"+a+".gif"
	kepek["k"+a+l] = new Image
	kepek["k"+a+l].src = "images/vazlat10_"+a+l+".gif"
  }
}
scroller = null
function initPage(){
  el = document.getElementById("scrollarea")
  if (el){
    scroller = new jsScroller(el, 350, 330)
  }
}
function initPageZene(){
  el = document.getElementById("scrollarea")
  if (el){
    scroller = new jsScroller(el, 400, 250)
  }
}
function menuAnimate(num, mode){
  num2 = num.charAt(1)
  if (mode){
  	document.getElementById("rollover"+num).src = kepek["k"+num+num2].src
  }else{
	document.getElementById("rollover"+num).src = kepek["k"+num].src
  }
}
goBack = false
function initMsgBox(){
  e = document.getElementById("message")
  vWidth = 420
  tWidth = e.offsetWidth
  e.style.left = "0px"
  if (tWidth > vWidth){
	startMsgAnim(vWidth, tWidth, 0)
  }
}
function startMsgAnim(vW, tW, lft){
  if (goBack == false){
	lft -= 1
  }else{
	lft += 1
  }
  if (lft <= (vW - tW)){
	goBack = true
  }else if (lft >= 0){
	goBack = false
  }
  document.getElementById("message").style.left = lft+"px"
  t = setTimeout("startMsgAnim("+vW+", "+tW+", "+lft+")", 50)
}
function showWin(id){
  document.getElementById(id).style.visibility = "visible"
  if (id == "popupHirl"){
	  ajaxCall("hirlevel", "showajax", "do", "", "showHirlevel()", false, false, "hirlevel", "")
  }
}
function closeWin(id){
  document.getElementById(id).style.visibility = "hidden"
}

function getLyrics(id){
  sbAjax.addQuery("POST", gBase+"modules/zene/lyrics.php", "id="+id, true, "displayLyrics()", "loadLyrics()", "", true)
}

function loadLyrics(){
  showWin("popupLyrics")
  document.getElementById("popupLyrics").innerHTML = "     <div class=\"ppCont\" id=\"popLyrCont\"><center>Töltés...</center></div>\n"
}

function displayLyrics(rText, rXml){
  out_txt = "     <div class=\"ppCont\" id=\"popLyrCont\">\n"
  out_txt += "     <div class=\"Scroller-Container\">\n"
  i = 0
  while (rXml.getElementsByTagName("lyric_ln")[i]){
	if (rXml.getElementsByTagName("lyric_ln")[i].childNodes[0]){
	  out_txt += rXml.getElementsByTagName("lyric_ln")[i].childNodes[0].nodeValue.replace(/&lt;/g, "<").replace(/&gt;/g, ">")+"<br />\n"
	}else{
	  out_txt += " <br />\n"
	}
	i++
  }
  out_txt += "     </div>\n"
  out_txt += "     </div>\n"
  out_txt += "     <div class=\"scrollup\" id=\"suLyric\" onmouseover=\"lyrScroll.startScroll(0, 15)\" onmouseout=\"lyrScroll.stopScroll()\"></div>\n"
  out_txt += "     <div class=\"scrolldown\" id=\"sdLyric\" onmouseover=\"lyrScroll.startScroll(0, -15)\" onmouseout=\"lyrScroll.stopScroll()\"></div>\n"
  document.getElementById("popupLyrics").innerHTML = out_txt
  el = document.getElementById("popLyrCont")
  lyrScroll = new jsScroller(el, 270, 375)
}

function sndFeliratkozas(){
  ajaxCall("hirlevel", "ajaxfeliratkozas", "do", "", "showHirlevel()", false, false, "hirlevel", "loadHirlevel()")
}