

var newwindow = '';

function laad(url) {
    var pagina = url;
    var newwin = window.open('/extern/frames.php?url='+pagina ,'venster','width='+(screen.width-8)+', 			height='+screen.height+', top=0, left=0');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//if (top.location == self.location) {    //if page is not in its frameset
    //  top.location.href = "http://www.woonwebsite.be";
//}

if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}

function popitup(url) {
	if (newwindow.location && !newwindow.closed)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,'name','height=480,width=640');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
}

function openURL(url) {  // open specified URL in current window

	if (newwindow.location && !newwindow.closed)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,'name','height=400,width=601,scrollbars=yes');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
}


function fill_dependSel(selBox, value) {  
var opt = new Array;  

	}  

function jump(menu){
  var loc = menu[menu.selectedIndex].value.split("|");
  if(loc.length == 2)
    window.open(loc[1], loc[0]);
  else if(loc.length == 1) 
    window.open(loc[0]); 
}

function TopicTop() {
  parent.topFrame.location="top.html";
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
	this.opera = (window.opera); // Opera 5+
	this.ns4 = (document.layers); // Netscape 4.x
	this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
	this.ie = (document.all);  // Internet Explorer 4+
    var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
	if ((sProperty == "left") || (sProperty == "top")) {
		if (!this.ns4) {docObj = docObj.style;}
		sValue = eval("docObj." + sProperty);
		if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
			if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); }
			else { sValue = eval(sDiv + ".offsetLeft"); }
		};
	}
	else {
		if (this.opera) {
			docObj = docObj.style;
			if (sProperty == "height") { sValue = docObj.pixelHeight; }
			else if (sProperty == "width") { sValue = docObj.pixelWidth; }
		}
		else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);}
		else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); }
	    else if (this.ie) {
			if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); }
			else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); }
		}
   	}
	sValue = (sValue == "") ? 0 : sValue;
	if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } }
	return parseInt(sValue);
}

function flevMoveDiv(sDivID, sLeft, sTop){ // v1.3, Marja Ribbers-de Vroed, FlevOOware
	var	docObj = eval("MM_findObj('" + sDivID + "')"), sSuffix="";
	if (!document.layers) {docObj = docObj.style;} // not NS4.x
	if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sSuffix="px";}
	if (sLeft != "") {eval("docObj.left = '" + sLeft + sSuffix + "'");}
	if (sTop != "") {eval("docObj.top = '" + sTop + sSuffix + "'");}
}

function flevAutoScrollDivs() { // v1.11, Marja Ribbers-de Vroed, FlevOOware
	var iArgs = flevAutoScrollDivs.arguments.length;
	var docObj = MM_findObj('AutoScrollContainer'); if (!docObj) {return;}
	if (docObj.scrollTimeout != null) {clearTimeout(docObj.scrollTimeout);}
	var sContainerDivID = 'AutoScrollContainer';
	var sContentDivID = 'AutoScrollContent';
	var iStartScrolling = (iArgs > 0) ? parseInt(flevAutoScrollDivs.arguments[0]) : 1;
	var iPixels = (iArgs > 1) ? parseInt(flevAutoScrollDivs.arguments[1]) : 1;
	var iDelay = (iArgs > 2) ? parseInt(flevAutoScrollDivs.arguments[2]) : 50;
	var iCurrentTop = flevDivPositionValue(sContentDivID, 'top');
	var iScrollTop = (-1 * flevDivPositionValue(sContentDivID, 'height'));
	var iScrollBottom = flevDivPositionValue(sContainerDivID, 'height');
	var iCurrentLeft = flevDivPositionValue(sContentDivID, 'left');
	if (iStartScrolling) {
		if (iCurrentTop >= iScrollTop) {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iCurrentTop-iPixels));}	// Continue scrolling
		else {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iScrollBottom));}	// Re-position scrolling layer at bottom of containing layer
		docObj.scrollTimeout = setTimeout("flevAutoScrollDivs(" + iStartScrolling + "," + iPixels + "," + iDelay + ")", iDelay);
	}
}

function bookmarksite(title,url,trackingObject)
{
	if (window.sidebar) { // firefox
	    //window.sidebar.addPanel(title, url, ""); Dont use until it's fixed
	    trackingObject._trackEvent('Favorieten', 'Toevoegen - Firefox', url);
	    alert('U gebruikt Firefox. Klik deze melding weg in druk op CTRL+D om deze pagina toe te voegen aan uw favorieten.');
	}
	else if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
	    trackingObject._trackEvent('Favorieten', 'Toevoegen - Google Chrome', url);
	    alert('U gebruikt Google Chrome. Klik deze melding weg in druk op CTRL+D om deze pagina toe te voegen aan uw favorieten.');
	}
	else if(window.opera && window.print) { // opera
	    //var elem = document.createElement('a');
	    //elem.setAttribute('href',url);
	    //elem.setAttribute('title',title);
	    //elem.setAttribute('rel','sidebar');
	    //elem.click();
	    trackingObject._trackEvent('Favorieten', 'Toevoegen - Opera', url);
	    alert('U gebruikt Opera. Klik deze melding weg in druk op CTRL+D om deze pagina toe te voegen aan uw favorieten.');
	} 
	else if(window.external) { // ie
	    trackingObject._trackEvent('Favorieten', 'Toevoegen - Internet Explorer', url);
	    window.external.AddFavorite(url, title);
	}
	else { // all other, probably safari
	    trackingObject._trackEvent('Favorieten', 'Toevoegen - Safari', url);
	    alert('U gebruikt een browser die deze functie niet ondersteunt. Klik deze melding weg in druk op CTRL+D om deze pagina toe te voegen aan uw favorieten.');
	}
}
