if (document.images) {

 viewon = new Image();
 viewon.src = "/images/view_on.gif";

 viewoff = new Image();
 viewoff.src = "/images/view_off.gif";

 submiton = new Image();
 submiton.src = "/images/submit_on.gif";

 submitoff = new Image();
 submitoff.src = "/images/submit_off.gif";

 sizing_calculatoron = new Image();
 sizing_calculatoron.src = "/images/sizing_calculator_on.gif";

 sizing_calculatoroff = new Image();
 sizing_calculatoroff.src = "/images/sizing_calculator_off.gif";

 sizing_guideon = new Image();
 sizing_guideon.src = "/images/sizing_guide_on.gif";

 sizing_guideoff = new Image();
 sizing_guideoff.src = "/images/sizing_guide_off.gif";

 threed_imageon = new Image();
 threed_imageon.src = "/images/3d_image_on.gif";

 threed_imageoff = new Image();
 threed_imageoff.src = "/images/3d_image_off.gif";

 lenseson = new Image();
 lenseson.src = "/images/lenses_on.gif";

 lensesoff = new Image();
 lensesoff.src = "/images/lenses_off.gif";

 find_a_dealeron = new Image();
 find_a_dealeron.src = "/images/find_a_dealer_on.gif";

 find_a_dealeroff = new Image();
 find_a_dealeroff.src = "/images/find_a_dealer_off.gif";

 featureson = new Image();
 featureson.src = "/images/features_on.gif";

 featuresoff = new Image();
 featuresoff.src = "/images/features_off.gif";

 }
 
function View(id,width,height) {
    LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
    OpenWin = 
    this.open("view.php?id="+id,"PicWindow","toolbar=no,width="+width+",height="+height+",left="+LeftPosition+",top="+TopPosition+",directories=no,status=no,scrollbars=no,resize=no,menubar=no")
}

function ViewImage(id,width,height) {
    LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
    OpenWin = 
    this.open("/view.php?id="+id,"PicWindow","toolbar=no,width="+width+",height="+height+",left="+LeftPosition+",top="+TopPosition+",directories=no,status=no,scrollbars=no,resize=no,menubar=no")
}

function Open(page, width, height) {
	LeftPosition = (screen.width) ? (screen.width-width)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-height)/2 : 0;
	OpenWin = this.open(page,"PopupWindow","toolbar=no,width="+width+",height="+height+",left="+LeftPosition+",top="+TopPosition+",directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
}