// JavaScript Document
function openMap(url,wi,hi){
var screenWidth = window.screen.availWidth;
var screenHeight = window.screen.availHeight;
var windowWidth = wi; 
var windowHeight = hi;
var topPosition = 0; 
var leftPosition = 0;

if (screenWidth < windowWidth) {
  windowWidth = screenWidth; 
} else {
  leftPosition = (screenWidth - windowWidth) /2; 
}

if (screenHeight < windowHeight) {
  windowHeight = screenHeight; 
} else {
  topPosition = (screenHeight - windowHeight) /2;
}

var winOption = "width=" + windowWidth + ",height=" + windowHeight + ",top=" + topPosition + ",left=" + leftPosition;


mw =window.open(url,"card",winOption);
mw.focus();}
