	var ua = navigator.userAgent.toLowerCase(); 
	
	// browser name
	this.isGecko     = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.isMozilla   = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
	this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.isIE        = ( (ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) ); 
	this.isSafari    = (ua.indexOf('safari') != - 1);
	this.isOpera     = (ua.indexOf('opera') != -1); 
	this.isKonqueror = (ua.indexOf('konqueror') != -1 && !this.isSafari); 
	this.isIcab      = (ua.indexOf('icab') != -1); 
	this.isAol       = (ua.indexOf('aol') != -1); 
	
	this.msie6 = false;
	
	// spoofing and compatible browsers
	this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
	this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
	
	// browser version
	this.versionMinor = parseFloat(navigator.appVersion); 

	this.versionMajor = -1;
	var appVersionMSIEIndex = (((navigator.appVersion).toLowerCase()).indexOf("msie"));
	var appVersionString = (navigator.appVersion).substring(appVersionMSIEIndex);
	if (appVersionMSIEIndex > -1) {

        for (var z = 0; z < 100; ++z) {

            
            appVersionString = (navigator.appVersion).substring(appVersionMSIEIndex + z);
	        this.versionMajor = parseFloat(appVersionString); 
	        // find first occurence of a number ... 
	        if (!isNaN(this.versionMajor))
	            break;
	    }
    }

	// correct version number
	if (this.isIE && this.versionMajor >= 6)
		this.msie6 = true;

	function initNavTexts() {

		if (this.isIE) {
	
			if (this.msie6) {
			    document.getElementById("navTitle_1").style.display = "none";
			} else {
				document.all["navTitle_1"].style.visibility = "hidden";
			}
			if (this.msie6) {
				document.getElementById("navTitle_2").style.display = "none";
			} else {
				document.all["navTitle_2"].style.visibility = "hidden";
			}
			if (this.msie6) {
				document.getElementById("navTitle_3").style.display = "none";
			} else {
				document.all["navTitle_3"].style.visibility = "hidden";
			}
			if (this.msie6) {
				document.getElementById("navTitle_4").style.display = "none";
			} else {
				document.all["navTitle_4"].style.visibility = "hidden";
			}
			if (this.msie6) {
				document.getElementById("navTitle_5").style.display = "none";
			} else {
				document.all["navTitle_5"].style.visibility = "hidden";
			}
			if (this.msie6) {
				document.getElementById("navTitle_6").style.display = "none";
			} else {
				document.all["navTitle_6"].style.visibility = "hidden";
			}
		}
	}

	// do the following only for non ms ie browsers ... 
	var hexArray = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
	
	var colorStartVal = 255;
	var colorEndVal   = 153;
	
	var colorValue1 = colorStartVal;
	var colorValue2 = colorStartVal;
	var colorValue3 = colorStartVal;
	var colorValue4 = colorStartVal;
	var colorValue5 = colorStartVal;
	var colorValue6 = colorStartVal;
	
	function resizeMainWindow() {

		var newSizeX = 965;
		var newSizeY = 780;

		if (window.screen.availWidth > 1024) {

			// TODO: test other browsers ... 
			if (this.isIE) {
				newSizeX = 980;
				newSizeY = 770;
			} else {
				newSizeX = 965;
				newSizeY = 760;
			}
			window.resizeTo(newSizeX, newSizeY);
		} else {
			return false;
		}
	}
	
	function toggleNavTitle1(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue1 = colorStartVal;
				fadeColor1();
			} else {
				document.getElementById("navTitle_1").style.display = displayAttr;
				colorValue1 = colorEndVal;
			}
		}
	}
	function toggleNavTitle2(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue2 = colorStartVal;
				fadeColor2();
			} else {
				document.getElementById("navTitle_2").style.display = displayAttr;
				colorValue2 = colorEndVal;
			}
		}
	}
	function toggleNavTitle3(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue3 = colorStartVal;
				fadeColor3();
			} else {
				document.getElementById("navTitle_3").style.display = displayAttr;
				colorValue3 = colorEndVal;
			}
		}
	}
	function toggleNavTitle4(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue4 = colorStartVal;
				fadeColor4();
			} else {
				document.getElementById("navTitle_4").style.display = displayAttr;
				colorValue4 = colorEndVal;
			}
		}
	}
	function toggleNavTitle5(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue5 = colorStartVal;
				fadeColor5();
			} else {
				document.getElementById("navTitle_5").style.display = displayAttr;
				colorValue5 = colorEndVal;
			}
		}
	}
	function toggleNavTitle6(itemNbr, displayAttr) {

		if (this.isIE) {

			toggleNavTitle(itemNbr, displayAttr);
		} else {

			if (displayAttr == "block") {
				colorValue6 = colorStartVal;
				fadeColor6();
			} else {
				document.getElementById("navTitle_6").style.display = displayAttr;
				colorValue6 = colorEndVal;
			}
		}
	}
	
	function convertR(rValue) {
	    var r1 = 0, r2 = 0, g1 = 0, g2 = 0, b1 = 0, b2 = 0;
	    for(r = 0; r < rValue; r++) {
	       	r2++;
	       	if(r2 % 16 == 0) {
	           	r2 = 0;
	           	r1 = r1 + 1;
	       	}
	    }
	    return "" + hexArray[r1] + hexArray[r2];
	}
	function convertG(gValue) {
	    var r1 = 0, r2 = 0, g1 = 0, g2 = 0, b1 = 0, b2 = 0;
	    for(g = 0; g < gValue; g++) {
	       	g2++;
	        if(g2 % 16 == 0) {
	            g2 = 0;
	            g1 = g1 + 1;
	        }
	    }
	    return "" + hexArray[g1] + hexArray[g2];
	}
	function convertB(bValue) {
	    var r1 = 0, r2 = 0, g1 = 0, g2 = 0, b1 = 0, b2 = 0;
	    for(b = 0; b < bValue; b++){
	        b2++;
	        if(b2 % 16 == 0) {
	            b2 = 0;
	            b1 = b1 + 1;
	        }
	    }
	    return "" + hexArray[b1] + hexArray[b2];
	}
	
	function callWithTimeout(funcName, timeDelay)
	{
	    window.setTimeout(funcName, timeDelay);
	}
	
	function fadeColor1() {
	
	    if (colorValue1 > colorEndVal) {
	        var rVal = convertR(colorValue1);
	        var gVal = convertG(colorValue1);
	        var bVal = convertB(colorValue1);
			var elementToFade = document.getElementById("navTitle_1");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue1--;
	        callWithTimeout("fadeColor1()", 1);
	    } else {
	        //colorValue1 = 255;
	    }
	}
	function fadeColor2() {
	
	    if (colorValue2 > colorEndVal) {
	        var rVal = convertR(colorValue2);
	        var gVal = convertG(colorValue2);
	        var bVal = convertB(colorValue2);
			var elementToFade = document.getElementById("navTitle_2");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue2--;
	        callWithTimeout("fadeColor2()", 1);
	    } else {
	        //colorValue2 = 255;
	    }
	}
	function fadeColor3() {
	
	    if (colorValue3 > colorEndVal) {
	        var rVal = convertR(colorValue3);
	        var gVal = convertG(colorValue3);
	        var bVal = convertB(colorValue3);
			var elementToFade = document.getElementById("navTitle_3");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue3--;
	        callWithTimeout("fadeColor3()", 1);
	    } else {
	        //colorValue3 = 255;
	    }
	}
	function fadeColor4() {
	
	    if (colorValue4 > colorEndVal) {
	        var rVal = convertR(colorValue4);
	        var gVal = convertG(colorValue4);
	        var bVal = convertB(colorValue4);
			var elementToFade = document.getElementById("navTitle_4");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue4--;
	        callWithTimeout("fadeColor4()", 1);
	    } else {
	        //colorValue4 = 255;
	    }
	}
	function fadeColor5() {
	
	    if (colorValue5 > colorEndVal) {
	        var rVal = convertR(colorValue5);
	        var gVal = convertG(colorValue5);
	        var bVal = convertB(colorValue5);
			var elementToFade = document.getElementById("navTitle_5");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue5--;
	        callWithTimeout("fadeColor5()", 1);
	    } else {
	        //colorValue5 = 255;
	    }
	}
	function fadeColor6() {
	
	    if (colorValue6 > colorEndVal) {
	        var rVal = convertR(colorValue6);
	        var gVal = convertG(colorValue6);
	        var bVal = convertB(colorValue6);
			var elementToFade = document.getElementById("navTitle_6");
	        if(typeof(document.all) == 'object') {
				elementToFade.style.color = "#" + rVal + "" + gVal + "" + bVal;
			} else {
				elementToFade.setAttribute("style", "color:#" + rVal + "" + gVal + "" + bVal + ";");
			}
	        colorValue6--;
	        callWithTimeout("fadeColor6()", 1);
	    } else {
	        //colorValue6 = 255;
	    }
	}

	function highlightRow(rowId, highlight, defaultClass, imgFile) {
	
		if(typeof(document.all) == 'object') {
	
			if (highlight == "true") {
	        	document.all[rowId].className = "highlight";
	    	} else {
	        	document.all[rowId].className = defaultClass;
			}
			
		} else {
	
			if (highlight == "true") {
	        	document.getElementById(rowId).className = "highlight";
	    	} else {
	        	document.getElementById(rowId).className = defaultClass;
			}
		}
	
		if (imgFile && imgFile != null && imgFile != "") {
	
			toggleProductInfoContainer(highlight, imgFile);
		}
	}


	// code for ms ie browser ... 
	function toggleNavTitle(itemNbr, displayAttr) {

		if (this.msie6) {
			var elementToToggle = document.getElementById("navTitle_" + itemNbr);
		} else {
			var elementToToggle = document.all["navTitle_" + itemNbr];
		}

		if (displayAttr == "block") {

            elementToToggle.className = "dynamicNavTextMSIE";

			if (this.msie6) {
				elementToToggle.style.display = "block";
			} else {
				elementToToggle.style.visibility = "visible";
			}
			
		} else {

			if (this.msie6) {
				elementToToggle.style.display = "none";
			} else {
				elementToToggle.style.visibility = "hidden";
			}
		}
	}

