function changeTab(tabName) {    

	var tabInformatie = document.getElementById('ctl00_ContentPlaceHolder1_PanelInformatie');
	var tabLesprogramma  = document.getElementById('ctl00_ContentPlaceHolder1_PanelLesprogramma');
	var tabRooster = document.getElementById('ctl00_ContentPlaceHolder1_PanelRooster');
	
	tabInformatie.style.display = 'none';
	tabLesprogramma.style.display = 'none';
	tabRooster.style.display = 'none';

	/*var panelBelMij = document.getElementById('ctl00_ContentPlaceHolder1_PanelBelMij');		
	var panelBelMijVerzonden = document.getElementById('ctl00_ContentPlaceHolder1_PanelBelMijVerzonden');
	panelBelMij.style.display = 'none';
	panelBelMijVerzonden.style.display = 'none';	*/
	
	var activeTab = document.getElementById(tabName);
	activeTab.style.display = 'block';	

	tabInformatie = document.getElementById('ctl00_ContentPlaceHolder1_HLInformatie');
	tabLesprogramma  = document.getElementById('ctl00_ContentPlaceHolder1_HLLesprogramma');
	tabRooster = document.getElementById('ctl00_ContentPlaceHolder1_HLRooster');
	tabInformatie.className = 'listnav';
	tabLesprogramma.className = 'listnav';
	tabRooster.className = 'listnav';

	tabName = tabName.replace('Panel','HL');
	activeTab = document.getElementById(tabName);
	activeTab.className = 'listnavactive';
	
	activeTab = document.getElementById('tab');

	switch(tabName) {
		case 'ctl00_ContentPlaceHolder1_HLInformatie':
			activeTab.value = 1;
		    // panelBelMij.style.display = 'block';		    
			break;
		case 'ctl00_ContentPlaceHolder1_HLLesprogramma':
			activeTab.value = 2;			
			break;
		case 'ctl00_ContentPlaceHolder1_HLRooster':
			activeTab.value = 3;			
			break;
		default:
	}	
}

function submitForm(eventTarget, eventArgument) {    
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget.value;
        theForm.__EVENTARGUMENT.value = eventArgument.value;
        theForm.submit();
    }
}

function changeLocation(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.submit();
    }
}

function update_tijd(module,uren) {
    var e = document.getElementById('ctl00_ContentPlaceHolder1_txtILCmodules'); 
    var s = document.getElementById('ctl00_ContentPlaceHolder1_txtILCsessies'); 
    if (module.checked) {
        uren = parseFloat(e.value.replace(',','.')) + parseFloat(uren.replace(',','.'));
    } else {
        uren = parseFloat(e.value.replace(',','.')) - parseFloat(uren.replace(',','.'));
    }
    s.value = Math.ceil(uren / 3);
    
    uren = uren + '';
    uren = uren.replace('.',',');    
    e.value = uren;
}

