function VoteVideo(num, id)
{  try{
    frame = document.getElementById('vote-frame');
    newElm = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
  }
  catch(err){
    window.status = err.message;
  }
  newElm.getElementById('vote-stars').value=num;
  newElm.getElementById('video-id').value=id;
  newElm.forms['vote-form'].submit();
  document.getElementById('vote-div-t-1').style.display='none';
  document.getElementById('vote-div-t-2').style.display='none';
  document.getElementById('vote-div-t-3').style.display='none';
  document.getElementById('vote-div-t-4').style.display='block';
  document.getElementById('vote-td-opt').style.width='200px';
}

//rotating thumb functions

var changing_thumbs = new Array();

function changeThumb(pref, index, i, path)
{
	if (changing_thumbs[index])
	{
		document.getElementById('prew-'+ pref+'-'+index).src = path + "/"+i+".jpg";
		i++;
		if(i==17) i=1;
		setTimeout("changeThumb('" + pref + "','" + index + "'," + i + ", '" + path + "')", 600);
	}
}

function startThumbChange(pref, index, path)

{

	changing_thumbs[index] = true;

	changeThumb(pref, index, 1, path);

}

function endThumbChange(pref, index, path)

{

	changing_thumbs[index] = false;

	document.getElementById('prew-'+ pref+'-'+index).src = path + "/1.jpg";

}

