﻿function newWindow(mypage,myname,w,h,features) {

  if(screen.width){

  var winl = (screen.width-w)/2;

  var wint = (screen.height-h)/2;

  }else{winl = 0;wint =0;}

  if (winl < 0) winl = 0;

  if (wint < 0) wint = 0;

  var settings = 'height=' + h + ',';

  settings += 'width=' + w + ',';

  settings += 'top=' + wint + ',';

  settings += 'left=' + winl + ',';

  settings += features;

  win = window.open(mypage,myname,settings);

  win.window.focus();

}

function popFullWindow(page) {


	var win = window.open(page, '','fullscreen=yes, scrollbars=auto');
	
}

function popupWindow(gamId, gamName, web) {
	var win = window.open('/fullscreen.php?gamId=' + gamId + '&name='+ gamName, '', 'fullscreen=yes, scrollbars=auto');
	
	var pro = location.protocol;
	
	var loc = location.host;
	
	if (pro.length > 0 ) {
		loc = pro + '//' + loc;
	}
	window.location = loc;
	win.focus();
}

