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);}

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;}}
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";}}
if(typeof window.onload=="function"){
var oldonload=window.onload;
window.onload=function(){
QAinit();
oldonload();};
}else{window.onload=QAinit;}
/*-------------------------*/
function search(event) {
  var key = event.which || event.keyCode;
  var input = Event.element(event);
  if (key == 13) {
    carousel.scrollTo(parseFloat(input.value) - 3)
    Event.stop(event);
    return false;
  }
}  