function disableSelection(target){
	if (typeof target.onselectstart!="undefined") //IE route
		target.onselectstart=function(){return false}
	else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
		target.style.MozUserSelect="none"
	else //All other route (ie: Opera)
		target.onmousedown=function(){return false}
}

function makevis(button,thediv){
	button.style.display='none';
	var mydiv=document.getElementById(thediv);
	mydiv.style.display='block';
}

function unvis(button,thediv){
	var thebutton=document.getElementById(button);
	thebutton.style.display='inline';
	var mydiv=document.getElementById(thediv);
	mydiv.style.display='none';
}

function togglevis(button,thediv){
	var thebutton=document.getElementById(button);
	var mydiv=document.getElementById(thediv);
	if(thebutton.style.display=='inline'){
		thebutton.style.display='none';
		mydiv.style.display='inline';
	}else{
		thebutton.style.display='inline';
		mydiv.style.display='none';	
	}
}

function checkzoek(){
	var zoekvalue=document.getElementById("zoekinput").value;
	if(zoekvalue==''){
		return false;
	}
	if(zoekvalue=='zoek'){
		return false;
	}
	return true
}

function eraser(obj,val){
	if(obj.value==val) obj.value="";	
}
function checklogin(){
	return false;	
}

function getCookieValue(cookieName)
{
   var cookieValue = document.cookie;
   var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "=");
   if (cookieStartsAt == -1)
   {
      cookieStartsAt = cookieValue.indexOf(cookieName + "=");
   }
   if (cookieStartsAt == -1)
   {
      cookieValue = null;
   }
   else
   {
      cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1;
      var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt);
      if (cookieEndsAt == -1)
      {
         cookieEndsAt = cookieValue.length;
      }
      cookieValue = unescape(cookieValue.substring(cookieStartsAt,cookieEndsAt));
   }
   return cookieValue;
}

function setCookie(cookieName, cookieValue, cookiePath, cookieExpires)
{
   cookieValue = escape(cookieValue);
   if (cookieExpires == "")
   {
      var nowDate = new Date();
      nowDate.setMonth(nowDate.getMonth() + 10);
      cookieExpires = nowDate.toGMTString();
   }
   //alert(cookieValue);
   if (cookiePath != "")
   {
      cookiePath = ";Path=" + cookiePath;
   }
   document.cookie = cookieName + "=" + cookieValue + 
      ";expires=" + cookieExpires + cookiePath;
}

function ClearOptions(OptionList) { 
	var selectbox=OptionList; 
	for (i=selectbox.length;i>0;i--) { 
	  selectbox.options[i]=null; 
	} 
} 
///clears options except 1


function AddToOptionList(OptionList, OptionValue, OptionText) {
   // Add option to the bottom of the list
   OptionList[OptionList.length] = new Option(OptionText, OptionValue);
}
