var detect = navigator.userAgent.toLowerCase(); var OS,browser,version,total,thestring; function checkIt(string) { place = detect.indexOf(string) + 1; thestring = string; return place; } function findBrowser() { if (checkIt('konqueror')) { browser = "Konqueror"; OS = "Linux"; } else if (checkIt('safari')) browser = "Safari" else if (checkIt('omniweb')) browser = "OmniWeb" else if (checkIt('opera')) browser = "Opera" else if (checkIt('webtv')) browser = "WebTV"; else if (checkIt('icab')) browser = "iCab" else if (checkIt('msie')) browser = "Internet Explorer" else if (!checkIt('compatible')) { browser = "Netscape Navigator" version = detect.charAt(8); } else browser = "An unknown browser"; return browser; } function showImage(url, width, height) { width = 650; height = 715; if(findBrowser() == "Netscape Navigator") { //alert("hello"); width=parseInt(width) + 20; height=parseInt(height) + 20; } window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+width+',height='+height+',screenX=150,screenY=150,top=150,left=150'); } function thumbClick(url, imagefile, selectcolor, colortext, product_number, quantity) { document.getElementById('product_image').src = imagefile; document.getElementById('img_url').href="javascript:showImage('" + url + "');"; if(colortext) { document.getElementById('colortext').childNodes[0].nodeValue = 'Shown in ' + colortext; } if(document.getElementById('westport_id') && product_number) { document.getElementById('westport_id').childNodes[0].nodeValue = product_number; } if(selectcolor) { selectValueSet(selectcolor); } if(quantity) { document.getElementById('quantity_remaining').childNodes[0].nodeValue = quantity; } } function selectValueSet(valuetext) { if(document.getElementById('colors')) { SelectObject = document.getElementById('colors'); for(index = 0; index < SelectObject.length; index++) { if(SelectObject[index].text == valuetext) { SelectObject.selectedIndex = index; } } } }