﻿// window position
function getScreenWIDTH(){
    if(document.layers||document.all)
      return screen.width
  }

function getScreenHEIGHT(){
    if(document.layers||document.all)
      return screen.height 
  }

var winHeight =getScreenHEIGHT()/2;
var winWidth =getScreenWIDTH()/2;

function resizeWin(){
 var uName = navigator.userAgent;
 if (uName.indexOf("Safari") > -1) widthPx-=2;heightPx-=1
}

function shopWin(ad){
    widthPx = 1000;
    heightPx = 800;
    resizeWin();
    x = (screen.width  - widthPx) / 2;
    y = (screen.height - heightPx) / 2;

    scheduleW = window.open(ad,"shopWin","left="+x+",top="+y+",width="+widthPx+",height="+heightPx+",location=no,directories=no,resizable=yes,menubar=no,toolbar=yes,scrollbars=yes,status=no");
	scheduleW.focus();
}
