﻿/*resize game window, maximum 1260x700*/
function openGameWindow(pageURL,pageName){
    var leftPos = parseInt((screen.width/2) - (1260/2)-5);
    var topPos = parseInt((screen.height/2) - (700/2)-30);
    
    if ((screen.width > 1260) && (screen.height > 700)){
        windowFeatures = "top="+topPos+",left="+leftPos+"resizable=yes,width=1260,height=700";
        newWindow=window.open(pageURL,pageName,windowFeatures);
        newWindow.focus();
    } else if ((screen.width == 1024) && (screen.height == 768)){
        windowFeatures = "top=0,left=0,resizable=yes,width=1005,height=700";
        newWindow=window.open(pageURL,pageName,windowFeatures);
        newWindow.focus();
    } else {
        windowFeatures = "top=0,left=0,resizable=yes,width="+(screen.width)+",height="+(screen.height);
        newWindow=window.open(pageURL,pageName,windowFeatures);
        newWindow.focus();
    }
}