function site_OpenWindow(p_name, p_url, p_width, p_height, p_scrollbars) { var wleft, wtop; if (window.screen != null) { wleft = Math.ceil(eval((screen.width-p_width)/2)); wtop = Math.ceil(eval((screen.height-p_height)/2)); } else { wleft = 150; wtop = 150; } newWindow = window.open(p_url, p_name, 'resizable=no,toolbar=no,scrollbars='+p_scrollbars+',menubar=no,status=no,width='+p_width+',height='+p_height+',top='+wtop+',left='+wleft); } 
function BLNSL_trim(p_obj) {strIn=p_obj.value;while(cChar=strIn.charAt(0),(cChar=="\n")||(cChar=="\r")||(cChar=="\t")||(cChar==" ")) strIn=strIn.substring(1,strIn.length-1);while(cChar=strIn.charAt(strIn.length-1),(cChar=="\n")||(cChar=="\r")||(cChar=="\t")||(cChar==" ")) strIn=strIn.substring(0,strIn.length-2);p_obj.value=strIn; }
function BLNSL_checkField(p_form,p_name) {ret=true,objIn=eval('document.forms[\''+p_form+'\'].'+p_name);if(objIn.type=='text'){BLNSL_trim(objIn);if(objIn.value=='')ret=false;}if(objIn.type=='textarea'){if(objIn.value=='')ret=false;}if(objIn.type=='checkbox'){ret=objIn.checked;}if(objIn.type=='select-one'){ret=(objIn.selectedIndex>0);}return(ret);}
function BLNSL_formSubmitTest(p_name,p_text) {var retVal=true,strMsg='';if(p_name=='contact'&&BLNSL_checkField(p_name,'firstname')==false){retVal=false;strMsg+='* Voornaam\n';};if(p_name=='contact'&&BLNSL_checkField(p_name,'lastname')==false){retVal=false;strMsg+='* Naam\n';};if(p_name=='contact'&&BLNSL_checkField(p_name,'email')==false){retVal=false;strMsg+='* E-mail\n';};if(retVal==false)alert(p_text+'\n\n'+strMsg+'\n');return(retVal);}
function flashObjJSKlik(movie, locatie){
var fo = new FlashObject("/content/design/anims/canvas.swf?" + movie, "externalInterface", "383", "234", "8.0.23", "#292929", true);
fo.setAttribute("redirectUrl", "/nl/geen-flash-player-geinstalleerd/");
	//fo.addParam("scale", "noscale");
	fo.addParam("quality", "high");
	fo.addParam("menu", "true");
	fo.addParam("wmode", "transparent");
	fo.addParam("autoplay", "true");
	fo.addParam("loop", "false");	
	//fo.addParam("allowFullScreen", "true");
	fo.write(locatie);
scroll(0,0);
if(typeof _gat!="undefined"){pageTracker_trackEvent("Movie", "Thumbnail click", movie, "");}
}

function flashObjJSKlikStem(movie,id,locatie,tit){ $("#YourScoreTodo").hide();$("#YourScoreDone").hide();$("#YourRating").hide();$("#MemberScores").hide();flashObjJSKlik(movie,locatie);document.forms['bewaarscore'].comments.value=tit;
getVzwVoteData(id);}
function getVzwVoteData(id){$("#YourScoreTodo").hide();$("#YourScoreDone").hide();$("#YourRating").hide();$("#MemberScores").hide();$.getJSON("/avalon/voted.ashx?id="+id,function(d){v=d.Response.Result;r=d.Response.Rating;t=d.Response.TotCount;s=d.Response.Sum;a=d.Response.IsAdmin;if(v==0){document.forms['bewaarscore'].refpage.value=0;$("#YourScoreDone").show();$("#YourRating").show();$("#YourRating").html('<img src="/content/design/images/star'+r+'.png" />');}else{document.forms['bewaarscore'].refpage.value=id;$("#YourScoreTodo").show();}if(a=='1')getVzwVoters(id);$("#TotalRating").text(t);$("#MeanRating").text((t==0?0:s/t));});}
function getVzwVoters(id){var h4set;$("#YourScoreTodo").hide();$("#YourScoreDone").hide();$("#YourRating").hide();$.getJSON("/avalon/votedetails.ashx?id="+id,function(d){$("#MemberScores").empty();h4set=0;$("#MemberScores").show();$.each(d.Items, function(i,item){if(h4set==0){$("#MemberScores").append('<h4>Individuele quoteringen</h4><br /><br />');h4set=1}$("#MemberScores").append('<div class="MemberEntry"><div class="MemberName">'+item.Name+'</div><div class="MemberEntryScore">'+item.Rating+'</div></div>');});});}
function submitVzwVote(){if(document.forms['bewaarscore']!=null){
jQuery.post(document.forms['bewaarscore'].action, {'refpage': document.forms['bewaarscore'].refpage.value, 'rating': document.forms['bewaarscore'].rating.value, 'firstname': document.forms['bewaarscore'].firstname.value, 'lastname': document.forms['bewaarscore'].lastname.value, 'email': document.forms['bewaarscore'].email.value, 'comments': document.forms['bewaarscore'].comments.value},function (data, textStatus) {getVzwVoteData(document.forms['bewaarscore'].refpage.value);});
}}


function flashObjJSKlikTrailer(movie, locatie){
var fo = new FlashObject("/content/design/anims/trailer.swf?" + movie, "externalInterface", "383", "234", "8.0.23", "#292929", true);
fo.setAttribute("redirectUrl", "/nl/geen-flash-player-geinstalleerd/");
	fo.addParam("quality", "high");
	fo.addParam("menu", "true");
	fo.addParam("wmode", "transparent");
	fo.addParam("autoplay", "true");
	fo.addParam("loop", "false");	
	fo.write(locatie);
}

function flashNoResult(locatie){
var so = new FlashObject("/content/design/anims/noresult.swf", "externalInterface", "383", "234", "8.0.23", "#373737");
so.setAttribute("redirectUrl", "/nl/geen-flash-player-geinstalleerd/");
so.addParam("scale", "noscale");so.addParam("quality", "high");so.addParam("menu", "false");so.write(locatie);}
dag=new Array("zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"); 
mnd=new Array( "januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december");
now=new Date(); 
function VandaaDeDag(parameters){document.writeln(parameters)};
defaultStatus = "TV Limburg - Via Media 4 - Postbus 1 - 3500 Hasselt - 011/71 22 00"  
function twoCols(src, type){
var origList = src;
var leftList = document.createElement(type);
var rightList = document.createElement(type);
var container = document.createElement('div');
var items = origList.getElementsByTagName('LI');
var itemsLength = items.length/2;
for (i = 0; i < itemsLength; i++){
leftList.appendChild(items[0]);}
itemsLength = items.length;
for (i = 0; i < itemsLength; i++){
rightList.appendChild(items[0]);}
container.appendChild(leftList);
container.appendChild(rightList);
leftList.setAttribute('class', 'left');
rightList.setAttribute('class', 'right');
if (type == 'ol'){
rightList.setAttribute('start', leftList.getElementsByTagName('LI').length + 1 );}
container.setAttribute('class','twocol');
if (document.all){
leftList.setAttribute('className', 'left');
rightList.setAttribute('className', 'right');
container.setAttribute('className','twocol');}
origList.parentNode.replaceChild(container, origList);}
function allTwoCols (whichclass, type){
var uls = document.getElementsByTagName(type);
for (var i=0; i< uls.length; i++)
{if (uls[i].getAttribute('class') == whichclass || uls[i].getAttribute('className') == whichclass)
{twoCols(uls[i], type.toLowerCase());}}}
var ids=new Array();
function QAinit(){
if(document.getElementById){
var tids=document.getElementsByTagName('div');
for(i=0;i<tids.length;i++)if(tids[i].className=="question")ids[ids.length]=tids[i];
for(i=0;i<ids.length;i++)ids[i].onmouseup=setstate;
RedirectPopups('mnusprite28068');RedirectPopups('mnusprite29301');}}
function setstate(){
for(i=0;i<ids.length;i++){
if(ids[i]==this){
var d=this.parentNode.getElementsByTagName('div')[1];
if(d.style.display=="block")d.style.display="none";
else d.style.display="block";}}}
function expandall(){
if(document.getElementById){
for(i=0;i<ids.length;i++)ids[i].parentNode.getElementsByTagName('div')[1].style.display="block";}}
function collapseall(){
if(document.getElementById){
for(i=0;i<ids.length;i++)ids[i].parentNode.getElementsByTagName('div')[1].style.display="none";}}
function RedirectPopups(a){
	if(document.getElementById){
		var op=document.getElementById(a);
		if (op!=null){
			var oa = op.childNodes[0];
			if (oa!=null) {
				oa.setAttribute('target','_blank');
			}
		}
	}
}
if(typeof window.onload=="function"){
var oldonload=window.onload;
window.onload=function(){
QAinit();
oldonload();};
}else{window.onload=QAinit;}