function opac(im){	document.getElementById('sq' + im).style.opacity='.1';	document.getElementById('sq' + im).style.filter='alpha(opacity=10)';}function reopac(im){	document.getElementById('sq' + im).style.opacity='';	document.getElementById('sq' + im).style.filter='alpha(opacity=88)';}function colorRow(id){	document.getElementById("r_" + id).style.backgroundColor='#FDEB99';	document.getElementById('info_' + id).style.display='';}function discolorRow(id){	document.getElementById("r_" + id).style.backgroundColor='#fff';	document.getElementById('info_' + id).style.display='none';}function changeView(nr){	if(document.getElementById('button_subleague').value=='Onderlinge Stand'){		for(i=1; i<=nr; i++){			document.getElementById('pos_tour_' + i).style.display='none';			document.getElementById('pos_onderling_' + i).style.display='';			document.getElementById('time_onderling_' + i).style.display='';			document.getElementById('time_tour_' + i).style.display='none';		}		document.getElementById('button_subleague').value='TourChampion Stand';	}	else{					for(i=1; i<=nr; i++){			document.getElementById('pos_tour_' + i).style.display='';			document.getElementById('pos_onderling_' + i).style.display='none';			document.getElementById('time_onderling_' + i).style.display='none';			document.getElementById('time_tour_' + i).style.display='';		}		document.getElementById('button_subleague').value='Onderlinge Stand';	}}function toggle(targ){	t=document.getElementById(targ).style.display;	if(t=='none'){		document.getElementById(targ).style.display='';		document.getElementById(targ + "_plus").src='art/giro2009/min.gif';	}	else{		if(TYPE=="FILLSUBLEAGUE" && targ=="myteam_open"){			document.getElementById(targ).style.display='none';			TYPE="GETSCORE";			SLID=false;			document.getElementById('myteam_tekst').innerHTML="Als je bent ingelogd zie je je ploegnaam altijd in het klassement staan. Wil je kijken waar een andere ploeg staat of ben je niet ingelogd, vul dan hieronder de ploegnaam in en klik erop!";			document.getElementById('myteam_link').innerHTML="Waar staat mijn ploeg?";			document.getElementById(targ + "_plus").src='art/giro2009/plus.gif';			toggle('subleagues_open');		}		else if(TYPE=="FILLSUBLEAGUE" && targ=="subleagues_open"){			toggle('myteam_open');			document.getElementById(targ).style.display='none';			document.getElementById(targ + "_plus").src='art/giro2009/plus.gif';		}		else{			document.getElementById(targ).style.display='none';			document.getElementById(targ + "_plus").src='art/giro2009/plus.gif';		}	}}function fillSL(subl){	document.getElementById('myteam_open').style.display='';	document.getElementById('ploeg').focus();	document.getElementById('myteam_tekst').innerHTML="Zoek een ploeg en klik erop om hem toe te voegen aan je subleague!";	document.getElementById('myteam_link').innerHTML="Voeg een ploeg toe aan je subleague!";	SLID=subl;	TYPE="FILLSUBLEAGUE";	document.getElementById("myteam_open_plus").src='art/giro2009/min.gif';}var xmlhttp;function getPLOEGXML(url){	xmlhttp=null;	if (window.XMLHttpRequest){  		xmlhttp=new XMLHttpRequest();  	}	else if (window.ActiveXObject){ 		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");  	}	if (xmlhttp!=null){    	xmlhttp.onreadystatechange=state_Change; 		xmlhttp.open("GET",url,true);   		xmlhttp.send(null);    }	else{   		alert("Your browser does not support XMLHTTP.");    }}function state_Change(){	if (xmlhttp.readyState==4){		if (xmlhttp.status==200){			teams=xmlhttp.responseXML.getElementsByTagName("team");			if(teams.length){				if(document.getElementById("teams")){				document.getElementById("innertekst").removeChild(document.getElementById("teams"));				}				thisURL=document.URL;				kv=thisURL.split("&");				etapid=21;				mysc=false;				for(i=0; i<kv.length; i++){					querystring=kv[i].split("=");					if(querystring[0]=="etappe_id"){						etapid=querystring[1];						}					if(querystring[0]=="myscore"){						mysc=querystring[1];						}				}								newDiv=document.createElement("div");				newDiv.id="teams";				newUL=document.createElement("ul");				newUL.id="team_ul";				for(i=0; i<teams.length; i++){					newLI=document.createElement("li");					newA=document.createElement("a");					if(TYPE=="GETSCORE"){						page="index.php?fuseaction=tour.klassement&etid=" + etapid;						page+="&myscore=" + teams[i].getAttribute("deelnemer_id");						if(mysc){							page+="," + mysc;							}					}					else if(TYPE=="FILLSUBLEAGUE"){						page="index.php?fuseaction=tour.addTeam2SL&slid=" + SLID + "&team=" + teams[i].getAttribute("deelnemer_id");					}					/*loc="index.php?fuseaction=tour.klassement&etid=");					*/					newA.setAttribute("href",page);					newText=document.createTextNode(teams[i].firstChild.nodeValue);					newA.appendChild(newText);					newA.style.color="#7b002c";					newA.style.fontWeight="bold";					newLI.appendChild(newA);					newUL.appendChild(newLI);				}				newDiv.appendChild(newUL);				newDiv.style.width="92%";				document.getElementById('innertekst').appendChild(newDiv);				if(teams.length>5){					newDiv.style.height="120px";					newDiv.style.overflow="auto";				}			}		}		else{			alert("xml request mislukt");		}	}}function toggleScore(){	trs=document.getElementsByTagName("tr");	if(document.getElementById('togs').value=="TourChampion Score"){		for(i=0; i<trs.length; i++){			if(trs[i].className=="real"){				trs[i].style.display='';			}			if(trs[i].className=="subscore"){				trs[i].style.display='none';			}		}		document.getElementById('togs').value="Onderlinge Score";	}	else{		for(i=0; i<trs.length; i++){			if(trs[i].className=="real"){				trs[i].style.display='none';			}			if(trs[i].className=="subscore"){				trs[i].style.display='';			}		}		document.getElementById('togs').value="TourChampion Score";	}}poscur="onp";function showSLResults(pos){	tds=document.getElementsByTagName("td");	if(poscur){		for(i=0; i<tds.length; i++){			if(tds[i].className=poscur){				tds[i].style.display='none';				}		}	}	poscur=pos;}/*function CR(){	rad=document.getElementsByTagName("input");	proceed=false;	for(i=0; i<rad.length){		if(rad[i].type=="radio" && rad[i].className=="elect"){			alert(rad[i].value);			if(rad[i].checked()){				proceed=true;				}		}	}	if(!proceed){		alert("Selecteer a.u.b. een ploegnaam!");		}}*/