/* * Description: Metso.com - Global JavaScript source * Type: JavaScript * Copyright: Metso Corporation * Author: Morning Digital Design, Jani Tarvainen * Created: 15/06/2004 * * Modified: 27/09/2004 Eetu Puustinen * Picture URLs and action titles in several functions are now brought as parameters, not hardcoded defaults. * */ function changeURL(value) { temp=value.split('|'); var target=temp[2]; var URLAddress=temp[1]; if (URLAddress == undefined || URLAddress == "[NULL]") { return; } top.window.location = URLAddress; } function clearInput(input) { if (input.defaultValue==input.value){ input.value = ""; } } function resetInput(input,resetValue) { if (input.value=="") { input.value = input.defaultValue; } } // Browser sniffer function BrowserCheck() { var b = navigator.appName this.mac = (navigator.appVersion.indexOf('Mac') != -1) if (b=="Netscape") this.b = 'ns' else if (b=="Microsoft Internet Explorer") this.b = 'ie' else this.b = b this.version = navigator.appVersion this.v = parseInt(this.version) this.ns = (this.b=="ns" && this.v>=5) this.ns5 = (this.b=="ns" && this.v==5) this.ns6 = (this.b=="ns" && this.v==5) this.ie = (this.b=="ie" && this.v>=4) this.ie4 = (this.version.indexOf('MSIE 4')>0) this.ie5 = (this.version.indexOf('MSIE 5')>0) this.ie5mac = (this.ie && this.mac); this.ns5mac = (this.ns && this.mac); this.min = (this.ns||this.ie) } is = new BrowserCheck(); function back(){ window.history.go(-1) } // Write bookmark icon & link, only with IE function writeBookmark(actionlabel) { if (document.layers || !is.ie) { // Not IE, do nothing } else { document.write('
'); } } function switchFont(arg) { if (getActiveStyleSheet() == "largeFonts") { setActiveStyleSheet('default'); arg.innerHTML = arg.innerHTML.replace(decreaseTitle, increaseTitle); } else { setActiveStyleSheet('largeFonts'); arg.innerHTML = arg.innerHTML.replace(increaseTitle, decreaseTitle); } } function writeCurrentFontSize(){ if (cookie == "largeFonts") { document.write('' + decreaseTitle + ''); } else { document.write('' + increaseTitle + ''); } } /* Generic Image Hover */ function imageOver(arg) { arg.src = arg.src.replace(".png", "_over.png"); arg.src = arg.src.replace(".gif", "_over.gif"); } function imageOut(arg) { arg.src = arg.src.replace("_over.png", ".png"); arg.src = arg.src.replace("_over.gif", ".gif"); } /* Generic Image Change- with paths */ function imageChange(arg, oldPath, newPath) { arg.src = arg.src.replace(oldPath, newPath); } /* Contact Finder map */ function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i