/* Functies voor uitburo.nl
 * 18.11.2008 - Edgar: aangemaakt en alle functies gemigreerd naar dit bestand.
 */
 
// popup window script
function NewWindow(mypage, myname, w, h, scroll) {
  var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
	win = window.open(mypage, myname, winprops)
	win.focus();
	}
	
	
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



/* show - Hide Layer script */
function showlayer(layerName)  
	{ 
	document.getElementById(layerName).style.visibility='visible';  
	}
function hidelayer(layerName)  
	{ 
	document.getElementById(layerName).style.visibility='hidden';  
	}

	
	
/* Scroll script */
function scrollit() 
{
 	for (I=20; I>=1; I--)
	{
	window.scroll(1,I)
 	}
}


/* Functie voor eerste letter als hoofdletter */
function textValueToFirstUpper (inpObj) {
    if (-1 == inpObj.value.search(/^[A-Z]/)) {
      inpObj.value =
      inpObj.value.substr(0, 1).toUpperCase() + inpObj.value.substr(1);
    }
  }
  
  
/* Uitmail aanmeld pagina, functie voor aanvinken van alle Genres */
function set_all_genres() {
    with (window.document.invoerform) 
    {
      if (genres_all.checked) {
        for (i=0; i<genre.length; i++) {
          genre[i].checked = true;
        }
      }
      else {
        for (i=0; i<genre.length; i++) {
          genre[i].checked = false;
        }
      }
    }
  }
  

/* Uitmail aanmeld pagina, functie voor aanvinken van alle Regios */
function set_all_regio() {
    with (window.document.invoerform) 
    {
      if (regio_all.checked) {
        for (i=0; i<regio.length; i++) {
          regio[i].checked = true;
        }
      }
      else {
        for (i=0; i<regio.length; i++) {
          regio[i].checked = false;
        }
      }
    }
  }
