
function popUp(URL,width,height)
{
	day = new Date();
	id = day.getTime();
	var winLeft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left='+winLeft+',top='+winUp);");
}

function contact_by_mail(user, domain, suffix, content)
{
	if (!content)
	{
		document.write('' + user + '@' + domain + '.' + suffix + '');
	} 
	else
	{
		document.write('' + content + '');
	}
	return true;
}

function wisselMenu(item,bestand)
{
	document.getElementById(item).style.backgroundImage = "url("+bestand+")";
}

function writeCookie(callget) 
{
	var today = new Date();
	var the_date = new Date("December 31, 2023");
	var the_cookie_date = the_date.toGMTString();
	var the_cookie = "users_res="+ screen.width +"x"+ screen.height;
	var the_cookie = the_cookie + ";expires=" + the_cookie_date;
	document.cookie=the_cookie;
	if (document.cookie)
	{  
		location = ''+callget+'';
	}
}


function checkRes(callget, width, height) {
	if(width != screen.width || height != screen.height) {
		writeCookie(''+callget+'');
	} else {
		return true;
	}
}

function wisselShopGroep(groepid)
{
	var pagina = "/pagina/shop/"+groepid;
	window.open(pagina,'_self');
}