function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) { // by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact. // version 3.0.4 if (bgcolor=="") { bgcolor="#FFFFFF"; } var adj=10 var w = screen.width; var h = screen.height; var byFactor=1; if(w<740){ var lift=0.90; } if(w>=740 & w<835){ var lift=0.91; } if(w>=835){ var lift=0.93; } if (imageWidth>w){ byFactor = w / imageWidth; imageWidth = w; imageHeight = imageHeight * byFactor; } if (imageHeight>h-adj){ byFactor = h / imageHeight; imageWidth = (imageWidth * byFactor); imageHeight = h; } var scrWidth = w-adj; var scrHeight = (h*lift)-adj; if (imageHeight>scrHeight){ imageHeight=imageHeight*lift; imageWidth=imageWidth*lift; } var posLeft=0; var posTop=0; if (hugger == "hug image"){ if (hugMargin == ""){ hugMargin = 0; } var scrHeightTemp = imageHeight - 0 + 2*hugMargin; if (scrHeightTemp < scrHeight) { scrHeight = scrHeightTemp; } var scrWidthTemp = imageWidth - 0 + 2*hugMargin; if (scrWidthTemp < scrWidth) { scrWidth = scrWidthTemp; } if (scrHeight<100){scrHeight=100;} if (scrWidth<100){scrWidth=100;} posTop = ((h-(scrHeight/lift)-adj)/2); posLeft = ((w-(scrWidth)-adj)/2); } if (imageHeight > (h*lift)-adj || imageWidth > w-adj){ imageHeight=imageHeight-adj; imageWidth=imageWidth-adj; } posTop = parseInt(posTop); posLeft = parseInt(posLeft); scrWidth = parseInt(scrWidth); scrHeight = parseInt(scrHeight); var agt=navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1){ var args= new Array(); args[0]='parent'; args[1]=imageName; var i ; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } else { newWindow = window.open("jme_load.html","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop); newWindow.document.open(); newWindow.document.write(''+alt+''); newWindow.document.write('
'); newWindow.document.write('Click screen to close'); newWindow.document.write('
'); newWindow.document.close(); newWindow.focus(); } } if (document.images) { // Active Images img1on = new Image(); img1on.src = "fk_over.jpg"; img2on = new Image(); img2on.src = "r_chassis_text_over.jpg"; img3on = new Image(); img3on.src = "wheels_header_over.jpg"; img4on = new Image(); img4on.src = "rbp_header_over.jpg"; img5on = new Image(); img5on.src = "hubs_header_over.jpg"; img6on = new Image(); img6on.src = "morad_alloy_rims_over.jpg"; img7on = new Image(); img7on.src = "mud_guards_over.jpg"; img8on = new Image(); img8on.src = "merc_header_over.jpg"; img9on = new Image(); img9on.src = "oil_filler_CAP_sml.jpg"; img10on = new Image(); img10on.src = "polo_rear_sml.jpg"; img11on = new Image(); img11on.src = "rugby_rear_sml.jpg"; img1off = new Image(); img1off.src = "frame_kits_link.jpg"; img2off = new Image(); img2off.src = "r_chassis_text.jpg"; img3off = new Image(); img3off.src = "wheels_header.jpg"; img4off = new Image(); img4off.src = "rbp_header.jpg"; img5off = new Image(); img5off.src = "hubs_header.jpg"; img6off = new Image(); img6off.src = "morad_alloy_rims.jpg"; img7off = new Image(); img7off.src = "mud_guards.jpg"; img8off = new Image(); img8off.src = "merc_header.jpg"; img9off = new Image(); img9off.src = "oil_filler_cap_2_sml.jpg"; img10off = new Image(); img10off.src = "polo_front_sml.jpg"; img11off = new Image(); img11off.src = "rugby_front_sml.jpg"; } // Function to 'activate' images. function imgOn(imgName) { if (document.images) { document[imgName].src = eval(imgName + "on.src"); } } // Function to 'deactivate' images. function imgOff(imgName) { if (document.images) { document[imgName].src = eval(imgName + "off.src"); } } // -->