function popWin(location){
		var width = screen.width / 2;
		var height = screen.height / 2;
		var x = width / 2;
		var y = height / 2;
		var opt = "height=" + height + ", width=" + width + ", screenX=" + x + ", screenY=" + y + ", resizable=yes, scrollbars=yes";
		var helper = window.open(location, 'helper', opt);
		helper.focus()
}

function popWin1(location){
		var width = 733;
		var height = screen.height / 1;
		var x = width / 2;
		var y = height / 2;
		var opt = "height=" + height + ", width=" + width + ", screenX=" + x + ", screenY=" + y + ", resizable=yes, scrollbars=yes";
		var helper = window.open(location, 'helper', opt);
		helper.focus()
}

function popWin2(location){
		var width = 833;
		var height = screen.height / 1;
		var x = width / 2;
		var y = height / 2;
		var opt = "height=" + height + ", width=" + width + ", screenX=" + x + ", screenY=" + y + ", resizable=yes, scrollbars=yes";
		var helper = window.open(location, 'helper', opt);
		helper.focus()
}

function PopUp(location){
		var width = screen.width / 2;
		var height = screen.height / 2;
		var x = width / 2;
		var y = height / 2;
		var opt = "height=" + height + ", width=" + width + ", screenX=" + x + ", screenY=" + y + ", resizable=yes, scrollbars=yes";
		var helper = window.open(location, 'helper', opt);
		helper.focus()
}

function PopUpWH(theURL, width, height) { //v2.0
  var winName = 'player';
  var finalWidth = width;
  var finalHeight = height;
  if (width > screen.width)
  {
    finalWidth = screen.width;
    height = heigth*(finalWidth/width);
  }
  if (height > screen.height)
  {
    finalHeight = screen.height;
    finalWidth = finalWidth*(finalHeight/height);
  }
  var winl = (screen.width - width) / 2;
  var wint = (screen.height - height) / 2;
  features = 'width='+finalWidth+',height='+finalHeight+',top='+wint+',left='+winl+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no'
  window.open(theURL,winName,features);
}
