var starState = 0;
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
	}
}
function ajaxRequest(url, str)
{ 
	xmlHttp=GetXmlHttpObject();
	xmlHttp.onreadystatechange=function()
   {
		if(xmlHttp.readyState==4)
        {
			document.getElementById(str).innerHTML=xmlHttp.responseText;
        }
    }

	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function write_comment_form()
{
	document.write('<form method="post" action=""><table align="center" width="100%">');
	document.write('<tr><td><p><strong>Az Ön hozzászólása:</strong><br /><textarea rows="10" cols="30" style="width: 80%" name="sentComment"></textarea></p></td></tr>');
	document.write('<tr><td><input type="submit" name="saveComment" value="Hozzászólás elküldése" /></td></tr>');
	document.write('</table></form>');
}

function stars_reset(score)
{
		for(i = 1; i <= score; i++)
		{
			document.getElementById("star_"+i).src = "images/bigstar.gif";
		}
		for(j = i; j <= 5; j++)
		{
			document.getElementById("star_"+j).src = "images/bigstar_.gif"
		}
}
function stars(numStars, videoId)
{
	if(starState != numStars)
	{
		for(i = 1; i <= numStars; i++)
		{
			document.getElementById("star_"+i).src = "images/bigstar.gif";
		}
		for(j = i; j <= 5; j++)
		{
			document.getElementById("star_"+j).src = "images/bigstar_.gif"
		}
		starState = numStars;
	}
}
function top5_rightpage()
{
	var oPage = document.getElementById('naviPageNo');
	if(oPage.value > 0)
	{
		oPage.value--;
	}
}
function top5_leftpage()
{
	var oPage = document.getElementById('naviPageNo');
	if(oPage.value < document.getElementById('naviPageMax').value)
	{
		oPage.value++;
	}
}
