/**
 * Game scripts
 * !! If you are in here changing, move stuff into base.dg.js instead !!
 * !! NOTHING can be added to this file !!
 */
function closeAndGoto ( vTarget, noUnload ) {
	window.opener.location.href = vTarget;
	if (noUnload)
		this.onbeforeunload = null;
	window.close();
}

function navigate ( vUrl ) {
	this.onbeforeunload = null;
	document.location.href = vUrl;
}

function fullGame ( id, noDb ) {
	cUrl = '/'+language+'/gamesFullsize.php?id='+id+'&maintenance='+noDb;
	var gameWin = window.open(cUrl, 'fullSizeGame', 'resizable=yes,menubar=no,toolbar=no,statusbar=no');
	gameWin.focus();
}

function goTo () {
	if (confirm(message)) {
		document.location.href = '/'+language+'/album.php';
	}
}

function addEvent_confBeforeUnload ( oBody ) {
	this.onbeforeunload = confBeforeUnload;
}

function confBeforeUnload () {
	return "\n"+message;
}

var vimto = {
	trackPlay: function() {
		$.get('/' + language + '/xml/campaign/vimto.php');
	}
};