
// Removed i.v.m. Hotmail
//if (window != window.top)
//{
//	top.location.href = location.href;
//}

// Statusbar
window.status = statusbalk;

function snelkiezen(waar)
{
	eval("parent" + ".location = '" + waar.options[waar.selectedIndex].value + "'");
}

function verander_kleur(dit, optie)
{
	if(optie == 0)
	{
		dit.style.backgroundColor = "#f3f3f3";
	}
	else if(optie == 1)
	{
		dit.style.backgroundColor = "";
	}
}

function bevestig(dit, bericht)
{
    if (bericht == '' || typeof(window.opera) != 'undefined')
	{
        return true;
	}

    return confirm(bericht);
}

function forums_topic(titel, plaatje, tid, auteur_id, auteur, reacties, laatste_post, paginas, titel_alt)
{
   output = '<tr>';
   output += '<td width=32 nowrap bgcolor="#f8f8f8" class="forums" align="center" style="border-left: #999999 1px solid">';
   output += '<img src="' + url + 'images/forums/' + plaatje + '.gif" width=22 height=15 border=0>';
   output += '</td>';
   output += '<td width="40%" align="left" class="forums" onmouseover="verander_kleur(this, 0)" onmouseout="verander_kleur(this, 1)" onclick="window.location=\'' + url + 'forums/topic/' + tid + '/laatste\'">';
   output += '<a href="' + url + 'forums/topic/' + tid + '/laatste" title="' + titel_alt + '">' + titel + '</a> ' + paginas;
   output += '</td>';
   output += '<td width="10%" bgcolor="#f8f8f8" class="forums" align="center">';
   output += '<a href="' + url + 'leden/profiel/' + auteur_id + '">' + auteur + '</a>';
   output += '</td>';
   output += '<td width="10%" class="forums" align="center">';
   output += reacties;
   output += '</td>';
   output += '<td width="40%" bgcolor="#f8f8f8" class="forums" align="center" style="border-right: #999999 1px solid">';
   output += laatste_post;
   output += '</td>';
   output += '</tr>';

   document.write(output);
}

function ledenlijst(bgcolor, id, gebruikersnaam, posts, geregistreerd_op)
{
   output = '<tr>';
   output += '<td width="40%" bgcolor=' + bgcolor + '>';
   output += '<a href="' + url + 'leden/profiel/' + id + '">' + gebruikersnaam + '</a>';
   output += '</td>'; 
   output += '<td width="30%" align="center" bgcolor=' + bgcolor + '>';
   output += posts;
   output += '</td>';
   output += '<td width="30%" align="center" bgcolor=' + bgcolor + '>';
   output += geregistreerd_op;
   output += '</td>';
   output += '</tr>';

   document.write(output);
}

var vorig_width = new Array();
var vorig_height = new Array();
	
function resize()
{
	image = document.images;
   
	for(i = 0; i < image.length; i++)
	{
		id_tag = image[i].getAttribute('id')
        
		if(id_tag == 'topic')
		{
			if(image[i].width > 550)
			{
			   vorig_width[image[i].src] = image[i].width;
			   vorig_height[image[i].src] = image[i].height;

			   image[i].width = 550;
			   image[i].style.border = "#000000 1px dashed";
			   image[i].style.cursor = "hand";
			   image[i].height = Math.floor(image[i].height/(image[i].width/550));
			   image[i].alt = 'Originele grootte: ' + vorig_width[image[i].src] + ' x ' + vorig_height[image[i].src];
			}
		}
	}
}

function image_fullscreen(image)
{
	width = vorig_width[image.src];
	height = vorig_height[image.src];

	if(width > 550)
	{
		scrollbar = 0;
		target = url + "image.php?src=" + escape(image.src) + "&width=" + width + "&height=" + height;

		if(width > screen.availWidth)
		{
			scrollbar = 1;
			width = screen.availWidth;
		}

		if(height > screen.availHeight)	
		{
			scrollbar = 1;
			height = screen.availHeight;
    	}

		full = window.open(target, "_blank", "toolbar=no,location=no,menubar=no,fullscreen=" + scrollbar + ",channelmode=" + scrollbar + ",scrollbars=" + scrollbar + ",status=no,left=0,top=0,width=" + width + ",height=" + height);
	}
}

window.onload = function() { resize(); }; 

function googlead()
{
google_ad_client = "pub-3587004543063400";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_channel ="3025290753";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
}

// Hoofdtabel verbreden bij hogere schermresoluties
if (screen.width >= 1000) {
	document.write('<style type="text/css">table.basis_tabel { width: 900px; }</style>');
} else {
	document.write('<style type="text/css">table.basis_tabel { width: 780px; }</style>');
}