var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-6056149-3");
pageTracker._trackPageview();
} catch(err) {}

function Question( Ask, Redirect ) {
	
	if ( confirm( Ask ) ) {
		
		window.location = Redirect;
		
	} else {
		
		alert('Verwijderen geannuleerd.');
		
	}
	
}

function addBookmark( ) {
	
	if ( window.external )
		
		window.external.AddFavorite( window.document.location, window.document.title );
		
	else if ( window.sidebar )
		
		window.sidebar.addPanel( window.document.title, window.document.location, '' );
		
}

function addFavorite( gameID ) {
	
	var handler = null;
	
	/*
	  Set POST variable's
	*/
	
	var posts            = new Array();
	
	/*
	  POST'S
	*/
	
	posts[ 'g' ]        = gameID;
	
	if ( gameID != '' ) {
		
		do_request_function = function () {
			
			if ( typeof handler.xmlhandler.responseText != undefined && handler.readystate_ready_and_ok( ) ) {
				
				if ( handler.xmlhandler.responseText == '1' ) {
					
					alert( 'Het spel is succesvol toegevoegd aan je favorieten!' );
					
				} else {
					
					alert( 'Je hebt al 30 spellen toegevoegd, meer kan niet..' );
					
				}
				
			}
			
		}
		
		handler = new XMLHttp_request();
		
		handler.process( 'ajax/games', 'POST', handler.format_for_post(posts) );
		handler.onreadystatechange( do_request_function );
		
	}
	
}