﻿    //window.alert( "Your screen resolution is " + window.screen.width + "x" + window.screen.height );       
    //var width = window.screen.width / 2;      
    //var height = window.screen.height / 2;      
    //window.alert( "Resizing to " + width + "x" + height );      
    //window.resizeTo( width , height );       
    //window.alert( "Moving to 0,0" );      
    //window.moveTo(0,0);       
    //var centerX = window.screen.width / 4;      
    //var centerY = window.screen.height / 4;      
    ///window.alert( "Moving to center of screen" + centerX + "," + centerY );      
    //window.moveTo( centerX , centerY );  

function OpenWin(url) {
    agent = navigator.userAgent;
    windowName = "Monkey_Pop";
    params  = "";
    params += "toolbar=0,";
    params += "location=0,";
    params += "directories=0,";
    params += "status=0,";
    params += "menubar=0,";
    params += "scrollbars=1,";
    params += "resizable=1,";
    params += "width=510,";
    params += "height=650";  
       
    win = window.open(url, windowName , params);
    if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) {
	    win = window.open(url, windowName , params);
    }
    if (!win.opener) {
	    win.opener = window;
    }
}

function viewHighScores ()
{
	//alert("viewHighScores called");
	unicaFunctions('ntptEventTag','ev=GTX Motor Monkey | View High Scores Clicked');
	OpenWin('/high-scores.aspx');
}


function submitHighScore (score,level)
{
	//alert("submitHighScore called,\nSCORE:"+ score +" AND LEVEL "+level);
	unicaFunctions('ntptEventTag','ev=GTX Motor Monkey | Submit High Score Clicked');
	OpenWin('/submit-score.aspx?score=' + score + '&level=' + level);
}

var firstgameplay = "true"
function trackGamePlay()
{
    if (firstgameplay != "false"){
        unicaFunctions('ntptEventTag','ev=GTX Motor Monkey | FIRST Game Played');
        dcsMultiTrack('DCS.dcssip','www.gtxmotormonkey.com','DCS.dcsuri','game/default.aspx','WT.ti','game/default.aspx','WT.ac','First Game Play');
        firstgameplay="false";
        //alert('firstgameplay now changed to false');
    }
    else {trackGameREPlay();}
    
}


function trackGameREPlay()
{
    //alert('now in trackREPlay');
    unicaFunctions('ntptEventTag','ev=GTX Motor Monkey | REPLAY Game Played');
    dcsMultiTrack('DCS.dcssip','www.gtxmotormonkey.com','DCS.dcsuri','game/default.aspx','WT.ti','game/default.aspx','WT.ac','Game Replay');
}

