/* *		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. * */ // 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();// Write bookmark icon & link, only with IEfunction writeBookmark(actionlabel) {	if (document.layers || !is.ie) {		// Not IE, do nothing	} else {		document.write('<a href="javascript:window.external.AddFavorite(bMarkLocation,bMarkTitle)" class="iconRight"><img src="'+webdbpath + 'bookmark.gif" width="20" height="12" alt="Bookmark this page" class="icon" border="0" />'+actionlabel+'</a>');	}	}// Write font switcher icons & links, switcher code in styleswitcher.js (courtesy of A List Apart, http://www.alistapart.com/articles/alternate/) function writeFontSwitcher(actionlabel) {	if (document.layers){		// NS4, do nothing	} else {		document.write('<a href="javascript:setActiveStyleSheet(\'largeFonts\');switchFontIcon();"><img src="'+webdbpath + 'font_large.gif" width="26" height="12" alt="Set larger text size" border="0" class="icon" name="largeIcon" /></a><a href="javascript:setActiveStyleSheet(\'default\');switchFontIcon();"><img src="'+webdbpath +'font_default.gif" width="26" height="12" alt="Set default text size" border="0" class="icon" name="defaultIcon" /></a><a href="javascript:switchFont();switchFontIcon();" style="color:#DC5114">'+actionlabel+'</a><br/>');				// set icons according to cookie		if (cookie == "largeFonts") {			document.images['largeIcon'].src=webdbpath + 'font_large_on.gif';		} else {			document.images['defaultIcon'].src=webdbpath + 'font_default_on.gif';		}	}}// Switch font iconfunction switchFontIcon() {	if (getActiveStyleSheet() == "largeFonts") {		document.images['largeIcon'].src=webdbpath +'font_large_on.gif';		document.images['defaultIcon'].src=webdbpath +'font_default.gif';	} else {		document.images['largeIcon'].src=webdbpath+'/font_large.gif';		document.images['defaultIcon'].src=webdbpath+'font_default_on.gif';	}}	// Switch font between large and defaultfunction switchFont() {	if (getActiveStyleSheet() == "largeFonts") {		setActiveStyleSheet('default');	} else {		setActiveStyleSheet('largeFonts');	}}// Image switching code (Adobe ImageReady)function newImage(arg) {	if (document.images) {		rslt = new Image();		rslt.src = arg;		return rslt;	}}function changeImages() {	if (document.images && (preloadFlag == true)) {		for (var i=0; i<changeImages.arguments.length; i+=2) {			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];		}	}}// Form reset confirmationfunction confirmReset() {	var answer = confirm ("Do you wish to reset form values?")	if (answer) {		document.forms[0].reset();	}}// Popup opener, MacroMediafunction MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}