function pointercursor()	{
document.body.style.cursor = "move"; 
}
function unpointercursor()	{
document.body.style.cursor=""; 
}
function centered_popup(url,breedte,hoogte,target)
{
	l = (screen.width-breedte)/2;
	t = (screen.height-hoogte)/2;
	widthHeight = "width="+breedte+",height="+hoogte+",left="+l+",top="+t+",menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,location=no";
	window.open(url,target,widthHeight);
	return true;
}
function chat_popup(url,target)
{
	w = screen.width*(3/4);
	h = screen.height*(3/4);
	l = (screen.width-w)/2;
	t = (screen.height-h)/2;
	widthHeight = "width="+w+",height="+h+",left="+l+",top="+t+",menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,location=no";
	window.open(url,target,widthHeight);
	return true;
}
function openchat(oForm)
{
	s = 'chat/chatpopup.php?authuser='+oForm.authuser.value+'&authpass='+oForm.authpass.value+'&nickname='+oForm.nickname.value;
	chat_popup(s,'ttchatroom');
	return false;
}
function resize_images() { 
	for (i = 4; i < document.images.length; i++){ // i = 4 om eerste layout images direct over te slaan
		while ( !document.images[i].complete ) { 
			break;
  		} 
  		if (document.images[i].name == "postimage" && document.images[i].width > 580) { 
			document.images[i].width = 580;
    	} else {
  			if (document.images[i].name == "reactieimage" && document.images[i].width > 460) { 
				document.images[i].width = 460;
			} else {
				if (document.images[i].name == "profielpic" && document.images[i].width > 280) { 
					document.images[i].width = 280;
				} else {
					if (document.images[i].name == "avatar" && document.images[i].width > 100) { 
						document.images[i].width = 100;
					}
				}
			}
		}
	} 
}
