

function FrameChecker() {

	var strLocation		= location.href;
	var arrServerNames	= new Array()
//	arrServerNames[0]	= "nldsz1y0j"
	arrServerNames[1]	= "paulvanbuuren.net"

	for(var loop_index = 0; loop_index < arrServerNames.length; loop_index++){
		if (strLocation.indexOf(arrServerNames[loop_index]) > 0) {

			// check of we niet in een frame zitten
			if (window != window.top) {
				window.alert("framechecker : " + location.href);
				top.location.href = location.href;
			}


		}
	}

}



// new window in full screen =========================================
function openFull(theURL,winName) 	{
	var fs=window.open(theURL,winName,"scrollbars")
	fs.moveTo(0,0)
	fs.resizeTo(screen.width,screen.height)
	fs.focus();
}



function DoEncode(ExtraText, linkClass)	{
	var EncodedText = "";
	EncodedText += "&#112;&#097;"
	EncodedText += "&#117;&#108;&#064;"
	EncodedText += "&#112;&#097;"
	EncodedText += "&#117;&#108;&#118;"
	EncodedText += "&#097;&#110;&#098;&#117;&#117;"
	EncodedText += "&#114;&#101;"
	EncodedText += "&#110;&#046;&#110;&#101;&#116;"
	var strOutput = "<hr />";
	if (ExtraText) {
		strOutput += ExtraText + "&nbsp;&nbsp;<br /> "
	}
	strOutput += "[&nbsp;<a href=\""
	strOutput += "mail"
	strOutput += "to:"
	strOutput += EncodedText
	strOutput += "?Subject=joe webstek : www.paulvanbuuren.net"
	strOutput += "\""
	if (linkClass) {
		strOutput += linkClass
	}
	else {
		strOutput += " class=\"footerLink\""
	}
	strOutput += ">contact : " + EncodedText + "</a>"
	document.write(strOutput)
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav_dropdown");
		if (navRoot) {
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}
}

function ShowNoShow(elementName) {

	if (document.getElementById(elementName)) {
		
		var theElement = document.getElementById(elementName);

		// if the check box is checked, show the hidden options
		theElement.style.display = (theElement.style.display != 'none') ? 'none' : 'block';
//		theElement.style.display = (document.getElementById("checkbox_" + elementName).checked) ? 'block' : 'none';
	}

	return false;
}


	function hideUnhide() {
		// check the status of the hide / show radiobuttons
		if(document.getElementById)
		{
			// javascript is enabled
			// look for the div sections that may be hidden
			var arrHiddenElements = document.getElementsByTagName('div');
			var toggle = new Array();
	
			for (var i=0;i<arrHiddenElements.length;i++)
			{
				if(arrHiddenElements[i].className == 'form_invisible_row') 
				{
					// this element should point to an ID that we toggle visible / invisible
					var elementID = (arrHiddenElements[i].getAttribute("id")) ? arrHiddenElements[i].getAttribute("id") : "";
	
					if (elementID) {
						toggle[i] = document.getElementById("checkbox_" + elementID); // arrHiddenElements[i].appendChild(document.createElement('a'));
	
						// ensure options are shown if radiobutton is checked
						ShowNoShow(elementID);
					}
					
				}
			}
		}
	}

	
	function makeNewWindows() {
	
		
		if (!document.links) {
			document.links = document.getElementsByTagName('linksoverview');
		}
		
		for (var t=0; t<document.links.length; t++) {
			var zaplinks = document.links[t];
			if (zaplinks.href.search(/http/) != -1) {
				if (zaplinks.href.search('/paulvanbuuren.net/') == -1) {
					zaplinks.setAttribute('target', '_blank');
				}
				window.alert(zaplinks.href);
			}
		}
	}
	
	function addLoadEvent2(func)
	{	
		var oldonload = window.onload;
		if (typeof window.onload != 'function'){
			window.onload = func;
		} else {
			window.onload = function(){
				oldonload();
				func();
			}
		}
	}

	addLoadEvent2(startList);		
	addLoadEvent2(FrameChecker);		
	addLoadEvent2(hideUnhide);		
