if (window.screen) {
    var clientW = Math.floor(screen.availWidth);
    var clientH = Math.floor(screen.availHeight);
}


function openWindow(url){//standard size defined for generic pop up content
window.name = "main";
Window1=window.open(url,'Window1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=500,top='+((clientH-500)/2)+',left='+((clientW-560)/2)); 
Window1.focus();

}

function openWindow2(url, w, h){//customizable size with no tool bars, for calculators, amicus deposit register info, pavilion locator,...etc
window.name = "main";
Window2=window.open(url,'Window2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2));
Window2.focus();

}

function openWindow3(url, w, h){//customizable size with standard tool bars, for pc points
window.name = "main";
Window3=window.open(url,'Window3','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2)); 
Window3.focus();

}

function openWindow4(url, w, h){//auto scrolling, NOT resizable, for why join pop up
window.name = "main";
Window4=window.open(url,'Window4','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width='+w+',height='+h+',top='+((clientH-h)/2)+',left='+((clientW-w)/2)); 
Window4.focus();

}

