function getElementsByTagNames(list,obj) 
	{
	if (!obj) var obj = document;
	var tagNames = list.split(',');
	var resultArray = new Array();
	for (var i=0;i<tagNames.length;i++) 
		{
		var tags = obj.getElementsByTagName(tagNames[i]);
		for (var j=0;j<tags.length;j++) 
			{
			resultArray.push(tags[j]);
			}
		}
	
	var testNode = resultArray[0];
	if (!testNode) return [];
	if (testNode.sourceIndex) 
		{
		resultArray.sort(function (a,b) 
			{
			return a.sourceIndex - b.sourceIndex;
			});
		}
	else if (testNode.compareDocumentPosition) 
		{
		resultArray.sort(function (a,b) 
			{
			return 3 - (a.compareDocumentPosition(b) & 6);
			});
		}
	return resultArray;
	}
	

function makeHttpRequest()
	{
	//var http_request = false;
	
	if (window.XMLHttpRequest) 
		{ // Mozilla, Safari,...
			http_request = new XMLHttpRequest();
	    if (http_request.overrideMimeType) 
	    	{
				http_request.overrideMimeType('text/html');
	    	}
		} 
	else if (window.ActiveXObject) 
		{ // IE
		try 
			{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
	    } 
		catch (e) 
			{
			try 
				{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		}
	
	if (!http_request) 
		{
		alert('Helaas ondersteund uw browser geen HTTP Requests wat nodig is voor het gebruik van deze website.');
		return false;
		}
	}// einde http_request
		

function getContent(page,div,tagsarray)
	{	
	makeHttpRequest();	
	http_request.onreadystatechange = function() 
		{
		if(http_request.readyState == 1)
			{
			if(document.getElementById(div))
				{
				//document.getElementById(div).innerHTML = '';
				document.getElementById(div).style.visibility = 'visible';
				document.getElementById(div).style.display = 'block';
				}		
			if(document.getElementById('loader'))
				{
				document.getElementById('loader').style.visibility = 'visible';
				document.getElementById('loader').style.display = 'block';
				}
			}
			
		if(http_request.readyState == 4) 
			{    
			if(document.getElementById('loader'))
				{
				document.getElementById('loader').style.visibility = 'hidden';
				document.getElementById('loader').style.display = 'none';
				}
			if (http_request.status == 200) 
				{
				//document.getElementById(div).innerHTML = http_request.responseText;
				if(document.getElementById(div))
					{
					document.getElementById(div).innerHTML = http_request.responseText;
					}
				else if(div == 'no_message')
					{
					}
				else
					{
					if(http_request.responseText != "")
						{
						alert(http_request.responseText);
						}
					}
				}
			else 
				{
				alert('Er is helaas een connectie-fout opgetreden.(HTTP Request code: ' + http_request.status + ')');
				}
			}
		}
	
	if(tagsarray)
		{
		var taglist = '';	
					
		for(i in tagsarray)
			{
				if(tagsarray[i].type == 'checkbox')
					{
					if(tagsarray[i].checked == true)
						{
						taglist += '&' + tagsarray[i].name + '=' + tagsarray[i].value;
						}
					else
						{ 
						taglist += '&' + tagsarray[i].name + '=0';
						}
					}
				else
					{ 
					taglist += '&' + tagsarray[i].name + '=' + tagsarray[i].value;
					}
			}
			
		//http_request.open('POST', page + '?1=1' + taglist, true);
		http_request.open('POST', page, true);
		http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    //http_request.setRequestHeader("Content-length", taglist.length);
    http_request.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
   	http_request.send(taglist);
   	//http_request.send(null);
    //http_request.setRequestHeader("Connection", "close");
		}
	else
		{
		http_request.open('GET', page, true);
		http_request.send(null);
		}
	}

function imageSwitcher(id, map) 
	{
	splitted = document.getElementById(id).src.split("?");
	tel = parseInt(splitted[1]); 
	if(tel >= 0 && tel <= 10)
		{
		if(tel == 0 || tel == 10)
			{
			tel = 1;
			}
		else
			{ 
			tel = tel + 1; 
			}
		document.getElementById(id).src = "http://cs925.mojohost.com/CONTENT/videos/thumbs/" + map + "/" + id + "_" + tel + ".jpg?" + tel;
		timer = setTimeout("imageSwitcher('" + id + "','" + map + "');", 500);	
		}
	}
	
//Voor de ratings	
function over(image,id)
	{
	for (var x = 1; x <= 10; x++)
		{
		if(x <= image)
			{
			document.images['rate' + x + '_' + id].src = '/images/rate1.png';
			}
		else
			{
			document.images['rate' + x + '_' + id].src = '/images/rate2.png';
			}
		}
	}
	
function bookmark(title,url) 
    {
    if (window.sidebar) 
        { 
        window.sidebar.addPanel(title, url,""); 
        } 
    else if( document.all ) 
        {
        window.external.AddFavorite( url, title);
        } 
    else if( window.opera && window.print ) 
        {
        return true;
        }
    }
function enter(evt)
	{
	var charCode = (evt.which) ? evt.which : window.event.keyCode;

	if (charCode == 13)
		{
		postmessage();
		}
	}
	
var platinumId = new Array("","");
var start = null;
var rand = null;
function platinum(way, id)
	{
	start = new Date();
	rand = start.getTime();
	//clearInterval(platinumId);
	platinumId[id] = setInterval("slidePlatinum('" + way + "', '" + id + "', '"+ id +"');", 20);
	}

function slidePlatinum(way, id, rand)
	{
	var element = document.getElementById(id);
	if(parseInt(element.style.top) == -30 && way == "up")
		{
		clearInterval(platinumId[rand]);
		}
	else if (way == "up")
		{
		element.style.top = parseInt(element.style.top) - 2 + "px";
		}
	else if(parseInt(element.style.top) == 0 && way == "down")
		{
		clearInterval(platinumId[rand]);
		}
	else if (way == "down")
		{
		element.style.top = parseInt(element.style.top) + 2 + "px";
		}
	}


	//IMG rotator jQuery 
	//Made by jaapschaap.com
	var totalBlocks = 0;	
	var currentBlock = 1;
	
	function thumbSwith() {
    	$('.thumbSwitcher .thumb').animate({'left':'-=200'});
    	currentBlock = currentBlock + 1;
    	if(currentBlock == totalBlocks)
    		{
  			currentBlock = 1;
			timeOutId = setTimeout("thumbSwith2()",5000);
			}
		else
			timeOutId = setTimeout("thumbSwith()",5000);
		}

	function thumbSwith2()
		{
    	$('.thumbSwitcher .thumb').animate({'left':'+=200'});
    	currentBlock = currentBlock + 1;
    	if(currentBlock == totalBlocks)
    		{
  			currentBlock = 1;
			timeOutId = setTimeout("thumbSwith()",5000);
			}
		else
			timeOutId = setTimeout("thumbSwith2()",5000);
		}
		
	$(document).ready(function() {
    	$('.thumbSwitcher').css({'overflow':'hidden','height':'300px','width':'200','position':'relative','margin-left':'-5px'});
    	$('.thumbSwitcher .thumb').css({'position':'absolute','top':'0px','display':'none'});
		$('.thumbSwitcher:eq(0) .thumb').each(function (i) {
			totalBlocks = totalBlocks + 1;
			var left = i * 200;
    		$(this).css({'left': left +'px'}); 
			});
		totalBlocks = 0;		
		$('.thumbSwitcher:eq(1) .thumb').each(function (i) {
			totalBlocks = totalBlocks + 1;
			var left = i * 200;
    		$(this).css({'left': left +'px'}); 
			});	
    	$('.thumbSwitcher .thumb').css({'display':'block'});
		setTimeout("thumbSwith()",5000);
		});