window.onload = function(){
	actualVideoId='';
	actualVideoTitle='';
}
function ahref( id) {
	window.location = 'videos_' + id + '.htm';
	document.getElementById('playVideoId' + id).onclick = function(){return false;};
}
function playVideo(id, title) {
	if(actualVideoId != ''){document.getElementById('imagediv' + actualVideoId).innerHTML = '<img src="player/content/' + actualVideoId + '.jpg" >';}
	document.getElementById('imagediv' + id).innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="333"><param name="movie" value="player/player.swf"><param name="quality" value="high"><param name="flashvars" value="autoplay=true&sound=70&desc=' + title +'&buffer=15&vdo=content/' + id + '.f4v"><param name="allowFullScreen" value="true"><param name="quality" value="high"><param name="wmode" value="transparent"><param name="quality" value="high"><embed src="player/player.swf" flashvars="autoplay=true&sound=70&desc=' + title + '&buffer=15&vdo=content/' + id + '.f4v" width="400" height="333" allowFullScreen="true" quality="high" wmode="transparent" type="application/x-shockwave-flash" ></embed></object>';
	if(actualVideoId != ''){
		var old_id = actualVideoId; 
		var old_title = actualVideoTitle;
		document.getElementById('playVideoId' + old_id).onclick = function(){playVideo(old_id, old_title);};
		document.getElementById('playVideoId' + old_id).className = 'filmeButtonAllet';	
	}	
	document.getElementById('playVideoId' + id).onclick = function(){return false;};	
	document.getElementById('playVideoId' + id).className = 'filmeButtonAllet2';	
	actualVideoId = id;
	actualVideoTitle = title;
}


function xxfind_class(genre){
	var rootobj = document.getElementById('content');
	var classname = 'filmeGenre';
	var temparray=new Array()
	var inc=0
	var rootlength=rootobj.length
	for (i=0; i<rootlength; i++){
		if (rootobj[i].className==classname)
		temparray[inc++]=rootobj[i]
	}
	alert(rootlength);
}
function find_class(objref, genre) {
	var checker;
//	alert(objref.checked);
	if(objref.checked==true) checker=1;
	if(objref.checked==false) checker=0;
//	alert(checker);
	var allElems = document.getElementsByTagName('p');
	for (var i = 0; i < allElems.length; i++) {
		var thisElem = allElems[i];
		if (thisElem.className && thisElem.className == 'filmeGenre') {
				if (thisElem.innerHTML == genre) {
				if(checker==0)thisElem.parentNode.parentNode.parentNode.style.display = 'none';
				if(checker==1)thisElem.parentNode.parentNode.parentNode.style.display = 'block';
			}
		}
	}
}

