function on_focus(a, b){
	a.style.color='#cccccc';
  	if(a.name == 'ww' && a.className == 'intro_a'){
  		a.style.backgroundImage = "none";
  	}
  	else if(a.name == 'ww' && a.className == 'intro_b'){
  		a.style.backgroundImage = "none";
	}
	else if(a.value == b){
  		a.value = '';
  	}
}

function on_blur(a, b){
	if(a.value == ''){
  		if(a.name == 'ww' && a.className == 'intro_a'){
  			a.style.backgroundImage = "url('/widm/images/forms/wachtwoord1.png')";
  		}
  		else if(a.name == 'ww'  && a.className == 'intro_b'){
  			a.style.backgroundImage = "url('/widm/images/forms/wachtwoord2.png')";
		}
  		else{
			a.value = b;
		}
 		a.style.color='#ffffff';
  	}
	else{
  		a.style.color='#ffffff';
	}
}

function createHTTPHandler(){
    httphandler = false;
    /*@cc_on @*/
    /*@if (@_jscript_version >= 5)
    // JScript gives us Conditional compilation, we can cope with old IE versions.
    // and security blocked creation of the objects.
    try {
      httphandler = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
       httphandler = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
          httphandler = false;
      }
    	}
   	 @end @*/
    if (!httphandler && typeof XMLHttpRequest!='undefined') {
      	 	 	httphandler = new XMLHttpRequest();
    }
    return httphandler;
}

function updateTable(){
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
		 	if(document.getElementById('voorspelling'+i+''+j) != null){
				document.getElementById('voorspelling'+i+''+j).disabled=false;
				document.getElementById('voorspelling'+i+''+j).style.display='inline';
			}
		}
	}
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
			if(document.getElementById('voorspelling'+i+''+j) != null && document.getElementById('voorspelling'+i+''+j).checked){
				for(k = 0; k < 10; k++){
					if(i != k && document.getElementById('voorspelling'+k+''+j) != null){
						document.getElementById('voorspelling'+k+''+j).disabled=true;
						document.getElementById('voorspelling'+k+''+j).style.display='none';
					}
					if(j != k && document.getElementById('voorspelling'+i+''+k) != null){
						document.getElementById('voorspelling'+i+''+k).disabled=true;
						document.getElementById('voorspelling'+i+''+k).style.display='none';
					}
				}
			}
		}
	}
}

function checkLast(){
	countUnchecked = 0;
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
		 	if(document.getElementById('voorspelling'+i+''+j) != null){
				if(document.getElementById('voorspelling'+i+''+j).disabled==false && document.getElementById('voorspelling'+i+''+j).checked==false){
					countUnchecked++;
				}
			}
		}
	}
	if(countUnchecked == 1){
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
		 	if(document.getElementById('voorspelling'+i+''+j) != null){
				if(document.getElementById('voorspelling'+i+''+j).disabled==false && document.getElementById('voorspelling'+i+''+j).checked==false){
					document.getElementById('voorspelling'+i+''+j).checked = true;
				}
			}
		}
	}
		
	}
}
