

function PrijskrassenFlash(divToEmbed, swfFile, xmlFileName) {
	
	this.divToEmbed = divToEmbed;
	this.swfFile = swfFile;
	this.xmlFileName = xmlFileName;
	this.flashmovie;

	
	window.onload = function(){
		
		PrijskrassenFlash.swfObjectEmbed();
	};
}

PrijskrassenFlash.prototype.setObjectHeight = function(newHeight) {
	PrijskrassenFlash.getFlashMovie("kraslot").height = newHeight;
}
PrijskrassenFlash.prototype.openPage = function(url) {

	var settings = {
		height:700, // sets the height in pixels of the window.
		width:900, // sets the width in pixels of the window.
		toolbar:0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
		scrollbars:1, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
		status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
		resizable:1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
		left:0, // left position when the window appears.
		top:0, // top position when the window appears.
		center:0, // should we center the window? {1 (YES) or 0 (NO)}. overrides top and left
		createnew:1, // should we create a new window for each occurance {1 (YES) or 0 (NO)}.
		location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
		menubar:0 // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
	};
	//center the popup
	settings.top = (screen.height-(settings.height + 110))/2;
	settings.left = (screen.width-settings.width)/2;

	parameters = "location=" + settings.location + ",menubar=" + settings.menubar + ",height=" + settings.height + ",width=" + settings.width + ",toolbar=" + settings.toolbar + ",scrollbars=" + settings.scrollbars  + ",status=" + settings.status + ",resizable=" + settings.resizable + ",left=" + settings.left  + ",screenX=" + settings.left + ",top=" + settings.top  + ",screenY=" + settings.top;
	//console.log("url = "+url)
	window.open(url, "disclaimervoorwaarden", parameters).focus();
	return false;

	
}
PrijskrassenFlash.prototype.swfObjectEmbed = function() {

	var flashvars = {};
	var params = {};
	var attributes = {};
	flashvars.path =  "static/flash/";
	flashvars.xmlFileName = encodeURIComponent(PrijskrassenFlash.xmlFileName);
	params.wmode = "transparent";
	attributes.id = "kraslot";
	attributes.align = "left";
	swfobject.embedSWF(PrijskrassenFlash.swfFile, PrijskrassenFlash.divToEmbed, "866", "450", "9.0.0", "", flashvars, params, attributes);

}


PrijskrassenFlash.prototype.getFlashMovie = function(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

