//	BELASTINGDIENST © 2002-2003: /common/js/bd.js 16-09-2003
var cMinimumHeight			= 470;
var cMinimumWidth			= 770;
var cContextWidth			= 139;
var cDivMarginRuler6 		= 10;
var cDivMarginContextRight 	= 5;
var cMarginRulerLeft		= 175;
var cMarginRulerRight		= 149;
var cMarginCenterToLeftCol	= 10;

function initIt() {if(BD_style!="print") { doInit();}} 

function doResize() { window.name="";
	if ( BD_browser.ns6 ) {
		if ( (window.innerWidth!=origWidth)||(window.innerHeight!=origHeight)) window.location.reload();
	} else {
		doInit();
	}
}

function doRekenHulp(thisWizard, thisTitle) {
	if ( thisWizard != "" ) {
		var thisWidth = 660;
		var thisHeight = 539;
		var thisPath = "/reken/" + thisWizard + "/index.htm";
		if (!thisTitle || (thisTitle == "")) var thisTitle = "Rekenhulp";
		window.open(thisPath,thisTitle,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50");
	}
}

function doGVK() { 
	var thisWidth = 660;
	var thisHeight = 539;
	var thisPath = "/reken/gvk/index.htm";
	window.open(thisPath,"GVK","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50");
}

function doFimo(thisFimo) {
	if ( thisFimo != "" ) {
		var thisWidth = 660;
		var thisHeight = 539;
		var thisPath = "/reken/uwsituatie/" + thisFimo + "/index.htm";
		window.open(thisPath,thisFimo,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50");
	}
}

function doWizard(thisModule) {
	var thisWidth = 660;
	var thisHeight = 539;
	switch (thisModule) {
		case "wwformulier": var thisPath = "/reken/aangifte/" + thisModule + "/index.htm"; break;
		case "loonberbe": var thisPath = "/reken/aangifte/" + thisModule + "/index.htm"; break;
		case "loonberde": var thisPath = "/reken/aangifte/" + thisModule + "/index.htm"; break;
		case "monumentaftrek": var thisPath = "/reken/aangifte/" + thisModule + "/index.htm"; break;
		default: var thisPath = "/reken/" + thisModule + "/index.htm"; break;
	}
	window.open(thisPath,"Onlinehulpmiddel","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doModule(thisModule) {
	var thisWidth = 600;
	var thisHeight = 510;
	var thisPath = "/reken/" + thisModule + "/index.htm";
	window.open(thisPath,"Onlinehulpmiddel","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doModule2(thisModule) {
	var thisWidth = 600;
	var thisHeight = 510;
	switch (thisModule) {
		case "bbpuk": thisModule = "bbp2001/en"; break;
		case "bbpde": thisModule = "bbp2001/de"; break;
		case "bbpnl": thisModule = "bbp2001/nl"; break;
		default: break;
	}
	var thisPath = "/reken/" + thisModule + "/index.htm";
	window.open(thisPath,"Onlinehulpmiddel","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doFAQ(thisModule) {
	var thisWidth = 660;
	var thisHeight = 539;
	var thisPath = "../../home/vraag/" + thisModule + "/index.htm";
	window.open(thisPath,"FAQ","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doFAQmrb(thisModule) {
	var thisWidth = 660;
	var thisHeight = 539;
	var thisPath = "../../mrb/" + thisModule + "/fr-categorie-subset.htm";
	window.open(thisPath,"FAQ","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doFAQzf(thisModule) {
	var thisWidth = 660;
	var thisHeight = 539;
	var thisPath = "../../9229250/ziekenfonds/" + thisModule + "/fr-categorie-subset.htm";
	window.open(thisPath,"FAQ","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doKana(thisModule) {
	var thisWidth = 660;
	var thisHeight = 539;
	var thisPath = "http://kb.emailbelastingdienst.com/" + thisModule + ".htm";
	window.open(thisPath,"Kana","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doHelp(thisPath, thisHelp) {
	var thisWidth = 645;
	var thisHeight = 500;
	if (!thisHelp) var thisHelp = "index";
	if (!thisPath) var thisPath = "../home/help/";
	else switch (thisPath) {
		case 0: var thisPath = "home/help/"; break;
		case 1: var thisPath = "../help/"; break;
		case 2: var thisPath = "../../home/help/"; break;
		case 3: var thisPath = "help/"; break;
		default: var thisPath = thisPath; break;
	}
	var thisURL = thisPath + thisHelp + ".htm";
	window.open(thisURL,"Help2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doOrder(thisCode, thisPath) {
	var thisWidth = 470;
	var thisHeight = 540;
	var thisURL = "order" + thisCode + ".htm";
	window.open(thisURL,"Bestellen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50,z-lock=0,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,");
}

function doDL(thisUrl, thisSiteStat) {
	if (thisSiteStat) {
		thisSiteStat = "http://nl.sitestat.com/belastingdienst/belastingdienst/s?" + thisSiteStat;
        var counter = thisSiteStat + "&ns__t=" + new Date().getTime();
		var counterImage = new Image(); counterImage.src = counter;
	}
    top.location.href = thisUrl;
}

function doDLPDF(thisUrl, thisSiteStat) {
	if (thisSiteStat) {
		thisSiteStat = "http://nl.sitestat.com/belastingdienst/belastingdienst/s?" + thisSiteStat;
		var counter = thisSiteStat + "&ns__t=" + new Date().getTime();
        var counterImage = new Image(); counterImage.src = counter;
	}
	thisUrl = "/common/dl/" + thisUrl;
	window.open(thisUrl,"Downloadvenster","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=660,height=539,left=180,top=50,screenX=80,screenY=50");
}

function doDLSite(thisSite) {
	if ( thisSite != "" ) document.location.href="../../"+thisSite+"/download/index.htm"; 
}

function doContact(thisCode) {
	var thisWidth = 470;
	var thisHeight = 540;
	var thisURL = "code" + thisCode + ".htm";
	if (thisCode == "reactie") thisURL = "reactie.htm"; 
	window.open(thisURL,"Contact","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + thisWidth + ",height=" + thisHeight + ",left=80,top=50,screenX=80,screenY=50");
}

if (window.focus) window.focus(); 
function browserData() { 
	this.css = false;
	this.dom = ( document.getElementById && (navigator.userAgent.indexOf("Opera") == -1))? true : false;
	this.ie5 = ( this.dom && document.all )? true: false;
	this.ns6 = ( this.dom  && !document.all )? true: false;
	this.ns4 = ( !this.dom && document.layers )? true : false;
	this.ie4 = ( !this.dom && document.all )? true : false;
	this.nodyn = ( !this.ns6 && !this.ns4 && !this.ie4 && !this.ie5 )? true : false;
}

function setCSS() {
	if (BD_browser.dom) {
		return ".css";
	}
	return "";
}

function setCesuur()	{if(window.name=="alt") window.name=""; else window.name="alt"; window.location.reload();
}
function doPrint()		{if(window.name=="print") window.name=""; else window.name="print"; window.location.reload();
}
function doClose() 		{window.close();}

function setBrowser() {
	this.windowHeight = setWindowHeight();
	this.windowWidth = setWindowWidth();
	this.pageWidth = this.windowWidth - cContextWidth;
	this.pageMiddleLine = (this.windowWidth - (cMarginRulerRight + cMarginRulerLeft))/2 + cMarginRulerLeft;
	this.divStartColWidth = this.pageMiddleLine - cMarginRulerLeft - cMarginCenterToLeftCol;
}

function setWindowWidth() {
	var theWidth;
	if ( window.innerWidth != window.undefined ) {
		theWidth = window.innerWidth;
		if ( document.body.scrollWidth ) {
			theWidth = (document.body.scrollWidth < theWidth)? document.body.scrollWidth: theWidth;
		}
	} else {
		if ( document.documentElement && document.documentElement.clientWidth ) {
			theWidth = document.documentElement.clientWidth;
		} else if ( document.body ) {
			theWidth = document.body.clientWidth;
		}
	}
	var thisReturn = (theWidth < cMinimumWidth)? cMinimumWidth: theWidth;
	return thisReturn;
}

function setWindowHeight() {
	var theHeight;
	if ( window.innerHeight != window.undefined ) {
		theHeight = window.innerHeight;
		if ( document.body.scrollHeight ) {
			theHeight = (document.body.scrollHeight < theHeight)? document.body.scrollHeight: theHeight;
		}
	} else {
		if ( document.documentElement && document.documentElement.clientWidth ) {
			theHeight = document.documentElement.clientHeight;
		} else if ( document.body ) {
			theHeight = document.body.clientHeight;
		}
	}
	var thisReturn = (theHeight < cMinimumHeight)? cMinimumHeight: theHeight;
	return thisReturn;
}

