var isNav4, isIE4; isNav4 = false; isIE4 = false; if (parseInt(navigator.appVersion.charAt(0)) >= 4) { isNav4 = (navigator.appName == "Netscape") ? true : false; isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? true : false; } /////////////////////////////////////////////////////////////////////// // The FPImage Object // Variable declarations var imageDirectory; var imageTypeExt; var imageNormalSuffix; var imageHighlightSuffix; var imagePressedSuffix; var emailX = (screen.width/2)-100; var emailY = (screen.height/2)-100; var pos = "left="+emailX+",top="+emailY; var fp_image_count; var fp_images; // List of all defined images // Initialization imageDirectory = "images/"; imageTypeExt = ".gif"; imageNormalSuffix = "_off"; imageHighlightSuffix = "_on"; imagePressedSuffix = "_down"; fp_images = new Array(); fp_image_count = 0; function fpImageCreate(theName, theImageName) { var theFPImage; if (theImageName) theFPImage = new FPImage(theName, theImageName); else theFPImage = new FPImage(theName, theName); if (theFPImage) { fp_images[fp_image_count] = theFPImage; fp_image_count++; } return theFPImage; } /////////////////////////////// // FPImage object definition function FPImage(theName, theImageName) { this.name = theName; this.imagename = theName; if (theImageName != null) this.imagename = theImageName; this.enablehighlight = enablehighlight; this.mouseDownAction = null; this.mouseUpAction = null; this.mouseMoveAction = null; this.mouseOverAction = null; this.mouseOutAction = null; this.normal_image = new Image(); this.normal_image.src = imageDirectory + this.imagename + imageNormalSuffix + imageTypeExt; this.highlight_image = null; this.enablehighlight(true); } function enablehighlight(highlight) { if (highlight) { this.highlight_image = new Image(); this.highlight_image.src = imageDirectory + this.imagename + imageHighlightSuffix + imageTypeExt; this.mouseOverAction = DoHighlight; this.mouseOutAction = DoRestore; } else { this.highlight_image = null; this.mouseOverAction = null; this.mouseOutAction = null; } } function DoHighlight() { if (document.images && (this.highlight_image != null)) { var image_object; var image_name_on, image_name_off; image_name_off = this.imagename + imageNormalSuffix; image_name_on = this.imagename + imageHighlightSuffix; for (i = 0; i < document.images.length; ++i) { var src_string = new String(document.images[i].src); if ((-1 != src_string.search( image_name_off)) || (-1 != src_string.search(image_name_on))) { image_object = document.images[i]; // window.alert("Found image at " + i + ", src=" + image_object.src); image_object.src = this.highlight_image.src; break; } } } } function DoRestore() { if (document.images && (this.highlight_image != null)) { var image_object; var image_name_on, image_name_off; image_name_off = this.imagename + imageNormalSuffix; image_name_on = this.imagename + imageHighlightSuffix; for (i = 0; i < document.images.length; ++i) { var src_string = new String(document.images[i].src); if ((-1 != src_string.search( image_name_off)) || (-1 != src_string.search(image_name_on))) { image_object = document.images[i]; // window.alert("Found image at " + i + ", src=" + image_object.src); image_object.src = this.normal_image.src; break; } } } } function handleover(strImageName) { for (i = 0; i < fp_image_count; i++) { if (strImageName == fp_images[i].name) { // window.alert("Found image " + fp_images[i].name); fp_images[i].mouseOverAction(); return; } } } function handleout(strImageName) { for (i = 0; i < fp_image_count; i++) { if (strImageName == fp_images[i].name) { // window.alert("Found image " + fp_images[i].name); fp_images[i].mouseOutAction(); return; } } } function email(){ emailWindow = window.open("http://www.camtran.com/insidesalesemailpage.html","contact","width=200,height=200,"+pos); }