function new_window(url) {
if (document.all) 
{var xMax = screen.width, yMax = screen.height} 
else if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight
} else {
var xMax = 640, yMax=480
}; 

var xOffset = (xMax - 330)/2, yOffset = (yMax - 260)/2;

DealerWindow = window.open(url,'DealerDisplay','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=330,height=260,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
DealerWindow.focus();
}

function rifle_popup(url) {
if (document.all) 
{var xMax = screen.width, yMax = screen.height} 
else if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight
} else {
var xMax = 640, yMax=480
}; 

var xOffset = (xMax - 562)/2, yOffset = (yMax - 330)/2;

RifleWindow = window.open(url,'RiflePopUpDisplay','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=562,height=330,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
RifleWindow.focus();
}

function cid_window(url) {
if (document.all) 
{var xMax = screen.width, yMax = screen.height} 
else if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight
} else {
var xMax = 640, yMax=480
}; 

var xOffset = (xMax - 390)/2, yOffset = (yMax - 350)/2;

CidWindow = window.open(url,'CIDExplanation','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=390,height=350,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
CidWindow.focus();
}

function popup(url,windowname,width,height,scrollbar) {
if (document.all) 
{var xMax = screen.width, yMax = screen.height} 
else if (document.layers) {
var xMax = window.outerWidth, yMax = window.outerHeight
} else {
var xMax = screen.width, yMax = screen.height
}; 

var xOffset = (xMax - width)/2;
var yOffset = (yMax - height)/2;

NewWindow = window.open(url,windowname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scrollbar+',resizable=0,width='+width+'px,height='+height+'px,screenX='+xOffset+'px,screenY='+yOffset+'px,top='+yOffset+'px,left='+xOffset+'px');
NewWindow.focus();
}
