document.observe("dom:loaded",function(event){$$('a.externe-link, a[rel*=external]').each(function(el){el.target='_blank'});$$('input.no-autocomplete').each(function(input){input.writeAttribute('autocomplete','off')});$$('ul#hoofdmenu li.level1').each(function(el){Event.observe(el,'mouseover',function(){el.addClassName('hover-ie')});Event.observe(el,'mouseout',function(){el.removeClassName('hover-ie')})});$$('table.myevents tbody tr').each(function(el){Event.observe(el,'mouseover',function(){el.addClassName('hover-ie')});Event.observe(el,'mouseout',function(){el.removeClassName('hover-ie')})});$$('input.button').each(function(el){Event.observe(el,'mouseover',function(){el.addClassName('button-hover')});Event.observe(el,'mouseout',function(){el.removeClassName('button-hover')})});$$('button').each(function(el){Event.observe(el,'mouseover',function(){el.addClassName('button-hover')});Event.observe(el,'mouseout',function(){el.removeClassName('button-hover')})});$$('li.image input.input_file').each(function(el){Event.observe(el,'change',function(){var test=el.value;el.next(0).value=test})});$$('ul#faq li a.question').each(function(el){el.next(0).hide();Event.observe(el,'click',function(){if(el.hasClassName('active')){el.next(0).hide();el.removeClassName('active')}else{el.next(0).show();el.addClassName('active')}})});$$('ul.topartists li span.add').each(function(el){el.hide()});$$('ul.topartists li').each(function(el){Event.observe(el,'mouseover',function(){el.select('span.votes').first().hide();el.select('span.add').first().show()});Event.observe(el,'mouseout',function(){el.select('span.votes').first().show();el.select('span.add').first().hide()})});setValue($('zoeken-q'),'zoeken...');var lijst=$('opties');if(lijst){var url=getStrippedUrl()+'?actie=print',item=new Element('li'),link=new Element('a',{id:'print','class':'none',href:url}).update('Print pagina').observe('click',function(event){event.stop();print(url)});item.appendChild(link);lijst.appendChild(item)};$$('.inklapbaar').each(function(el){el.addClassName('ingeklapt');var heading2=null;if(heading2=el.select('h2')[0])Event.observe(heading2,'click',function(event){el.toggleClassName('uitgeklapt')})});$$('button#submit-button').each(function(el){Event.observe(el,'click',function(){$('submitform').submit()})})})
function getStrippedUrl(){var url=location.href,index=url.lastIndexOf('#');return url.substr(0,index)}
function print(url){popup=window.open(url,"help","width=720, height=700, top=100, left=100, toolbar=0, resizable=1, scrollbars=1, status=0.menubar=0, location=0, directories=0");popup.focus()}
function setValue(el,nieuwevalue){if(el!==null&&el.value==''){el.setAttribute('value',nieuwevalue);Event.observe(el,'focus',function(){if(el.value==nieuwevalue)el.value=''});Event.observe(el,'blur',function(){if(el.value=='')el.value=nieuwevalue})}}
function submitform(){document.searchartist.submit()};clickable('ul.topartists li','hover')
function clickable(selector,classnameHover){$$(selector).each(function(el){var anchors=el.getElementsBySelector('a');if(anchors[0])Event.observe(el,'click',function(event){location.href=anchors[0]});Event.observe(el,'mouseover',function(event){el.addClassName(classnameHover)});Event.observe(el,'mouseout',function(event){el.removeClassName(classnameHover)})})};var checkboxHeight="25",radioHeight="25",selectWidth="190";document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: '+selectWidth+'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; }</style>');var Custom={init:function(){var inputs=document.getElementsByTagName("input"),span=Array(),textnode,option,active;for(a=0;a<inputs.length;a++)if((inputs[a].type=="checkbox"||inputs[a].type=="radio")&&inputs[a].className=="styled"){span[a]=document.createElement("span");span[a].className=inputs[a].type;if(inputs[a].checked==true)if(inputs[a].type=="checkbox"){position="0 -"+(checkboxHeight*2)+"px";span[a].style.backgroundPosition=position}else{position="0 -"+(radioHeight*2)+"px";span[a].style.backgroundPosition=position};inputs[a].parentNode.insertBefore(span[a],inputs[a]);inputs[a].onchange=Custom.clear;span[a].onmousedown=Custom.pushed;span[a].onmouseup=Custom.check;document.onmouseup=Custom.clear};inputs=document.getElementsByTagName("select");for(a=0;a<inputs.length;a++)if(inputs[a].className=="styled"){option=inputs[a].getElementsByTagName("option");active=option[0].childNodes[0].nodeValue;textnode=document.createTextNode(active);for(b=0;b<option.length;b++)if(option[b].selected==true)textnode=document.createTextNode(option[b].childNodes[0].nodeValue);span[a]=document.createElement("span");span[a].className="select";span[a].id="select"+inputs[a].name;span[a].appendChild(textnode);inputs[a].parentNode.insertBefore(span[a],inputs[a]);inputs[a].onchange=Custom.choose}},pushed:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*3+"px"}else if(element.checked==true&&element.type=="radio"){this.style.backgroundPosition="0 -"+radioHeight*3+"px"}else if(element.checked!=true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight+"px"}else this.style.backgroundPosition="0 -"+radioHeight+"px"},check:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 0";element.checked=false}else{if(element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*2+"px"}else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(a=0;a<inputs.length;a++)if(inputs[a].name==group&&inputs[a]!=this.nextSibling)inputs[a].previousSibling.style.backgroundPosition="0 0"};element.checked=true}},clear:function(){inputs=document.getElementsByTagName("input");for(var b=0;b<inputs.length;b++)if(inputs[b].type=="checkbox"&&inputs[b].checked==true&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px"}else if(inputs[b].type=="checkbox"&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 0"}else if(inputs[b].type=="radio"&&inputs[b].checked==true&&inputs[b].className=="styled"){inputs[b].previousSibling.style.backgroundPosition="0 -"+radioHeight*2+"px"}else if(inputs[b].type=="radio"&&inputs[b].className=="styled")inputs[b].previousSibling.style.backgroundPosition="0 0"},choose:function(){option=this.getElementsByTagName("option");for(d=0;d<option.length;d++)if(option[d].selected==true)document.getElementById("select"+this.name).childNodes[0].nodeValue=option[d].childNodes[0].nodeValue}};window.onload=Custom.init
