function Emma () {
	this.open = open;
	this.fit = fit;
	this.resize = resize;
	this.send = send;

	function open(pagina, titel, width, height){
		if (typeof(width) == 'undefined') {
			width = 680;
		}

		if (typeof(height) == 'undefined') {
			height = 390;
		}

		window.open (pagina, titel, config='height='+height+', width='+width+', top=100, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=yes, dependent=yes');
	}

	function resize(breedte, hoogte) {
		y = hoogte + 130;
		window.resizeTo((breedte + 60), y + 38);
	}

	function send() {
		if (window.confirm('Weet u zeker dat u wilt gaan verzenden naar alle abonnees?')) { 
			Emma.open('send.php', 'verzenden', 800, 500);
		}
	}
}

Emma = new Emma;

function fit(statustext) {
	return;
	y = body.offsetHeight + 46;

	if ((screen.availHeight - 100) < y)
		y = screen.availHeight - 100;

	window.resizeTo((body.offsetWidth + 10), y + 38);
//	window.moveTo((800-body.offsetWidth)/2, (screen.height-y)/2 -50);
	window.defaultStatus = statustext;
	window.focus();
}

/**
* Preload beheericoons edit en add
*/
add = new Image ();
add.src = "/images/add.gif";

edit = new Image ();
edit.src = "/images/edit.gif";

/*
function dump_props(obj, obj_name) {
	var result = "";
	for (var i in obj) {
		result += "." + i + " = " + obj[i] + "<BR>";
	}
	result += "<HR>";
	return result;
}

function instanceOf(object, constructor) {
	while (object != null) {
		if (object == constructor.prototype)
			return true;
		
		object = object.__proto__;
	}
	return false;
}
*/
