	/*
	setCookie(), readCookie(), killCookie()
	A set of functions that eases the pain of using cookies.
	
	Source: Webmonkey Code Library
	(http://www.hotwired.com/webmonkey/javascript/code_library/)
	
	Author: Nadav Savio
	Author Email: nadav@wired.com
	*/

	// This next little bit of code tests whether the user accepts cookies.
		var acceptsCookies = false;
		if(document.cookie == '') {
			document.cookie = 'acceptsCookies=yes'; // Try to set a cookie.
			if(document.cookie.indexOf('acceptsCookies=yes') != -1) {
				acceptsCookies = true; 
			}// If it succeeds, set variable
		} else { // there was already a cookie
			acceptsCookies = true;
		}
	
	
		function setCookie (name, value, hours, path, domain, secure) {
			if (acceptsCookies) { // Don't waste your time if the browser doesn't accept cookies.
				var not_NN2 = (navigator && navigator.appName 
					&& (navigator.appName == 'Netscape') 
					&& navigator.appVersion 
					&& (parseInt(navigator.appVersion) == 2))?false:true;
	
				if(hours && not_NN2) { // NN2 cannot handle Dates, so skip this part
					if ( (typeof(hours) == 'string') && Date.parse(hours) ) { // already a Date string
						var numHours = hours;
					} else if (typeof(hours) == 'number') { // calculate Date from number of hours
						var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();
					}
				}
				document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':''); // Set the cookie, adding any parameters that were specified.
			}
		} // setCookie
	
	
		function readCookie(name) {
			if(document.cookie == '') { // there's no cookie, so go no further
				return false; 
			} else { // there is a cookie
				var firstChar, lastChar;
				var theBigCookie = document.cookie;
				firstChar = theBigCookie.indexOf(name);	// find the start of 'name'
				var NN2Hack = firstChar + name.length;
				if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie
					firstChar += name.length + 1; // skip 'name' and '='
					lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').
					if(lastChar == -1) lastChar = theBigCookie.length;
					return unescape(theBigCookie.substring(firstChar, lastChar));
				} else { // If there was no cookie of that name, return false.
					return false;
				}
			}
		} // readCookie
	
		function killCookie(name, path, domain) {
			var theValue = readCookie(name); // We need the value to kill the cookie
			if(theValue) {
				document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie
			}
		} // killCookie

	// Copyright © 2000 by Apple Computer, Inc., All Rights Reserved.
	//
	// You may incorporate this Apple sample code into your own code
	// without restriction. This Apple sample code has been provided "AS IS"
	// and the responsibility for its operation is yours. You may redistribute
	// this code, but you are not permitted to redistribute it as
	// "Apple sample code" after having made changes.
	//
	// 
	//
	
	function its() {
		var n = navigator;
		// string comparisons are much easier if we lowercase everything now.
		// to make indexOf() tests more compact/readable, we prepend a space 
		// to the userAgent string (to get around '-1' indexOf() comparison)
		var ua = ' ' + n.userAgent.toLowerCase();
		var pl = n.platform.toLowerCase(); // not supported in NS3.0
		var an = n.appName.toLowerCase();
	
		// browser version
		this.version = n.appVersion;
		
	    this.nn = ua.indexOf('mozilla') > 0;
	
		// 'compatible' versions of mozilla aren't navigator
		if(ua.indexOf('compatible') > 0) {
			this.nn = false;
		}
	
		this.opera = ua.indexOf('opera') > 0;
		this.webtv = ua.indexOf('webtv') > 0;
		this.ie = ua.indexOf('msie') > 0;
		this.aol = ua.indexOf('aol') > 0;
		
		this.major = parseInt( this.version );
		this.minor = parseFloat( this.version );
		
		// platform
		this.mac = ua.indexOf('mac') > 0;
		this.mac68k = (ua.indexOf('68k') > 0 || ua.indexOf('68000') > 0);
		this.macppc = (ua.indexOf('ppc') > 0 || ua.indexOf('powerpc') > 0);
	
		this.win = ua.indexOf('win') > 0;
		this.win16 = (ua.indexOf('16') > 0 && ua.indexOf('win') > 0);
		this.win31 = this.win16;
		this.win95 = (ua.indexOf('95') > 0 && ua.indexOf('win') > 0);
		this.win98 = (ua.indexOf('98') > 0 && ua.indexOf('win') > 0);
		this.winnt = (ua.indexOf('nt') > 0 && ua.indexOf('win') > 0);
	
		this.os2 = ua.indexOf('os/2') > 0;
	
		this.sun = ua.indexOf('sunos') > 0;
		this.irix = ua.indexOf('irix') > 0;
		this.hpux = ua.indexOf('hpux') > 0;
		this.aix = ua.indexOf('aix') > 0;
		this.dec = (ua.indexOf('dec') > 0 || ua.indexOf('alpha') > 0 || ua.indexOf('osf1') > 0 || ua.indexOf('ultrix') > 0);
		this.sco = (ua.indexOf('sco') > 0 || ua.indexOf('unix_sv') > 0);
		this.vms = (ua.indexOf('vax') > 0 || ua.indexOf('openvms') > 0);
		this.linux = ua.indexOf('linux') > 0;
		this.sinix = ua.indexOf('sinix') > 0;
		this.reliant = ua.indexOf('reliantunix') > 0;
		this.freebsd = ua.indexOf('freebsd') > 0;
		this.openbsd = ua.indexOf('openbsd') > 0;
		this.netbsd = ua.indexOf('netbsd') > 0;
		this.bsd = ua.indexOf('bsd') > 0;
		this.unixware = ua.indexOf('unix_system_v') > 0;
		this.mpras = ua.indexOf('ncr') > 0;
	
		this.unix = ua.indexOf("x11") > 0;
	
		// workarounds
		// - IE5/Mac reports itself as version 4.0
		if(this.ie && this.mac) {
			if(ua.indexOf("msie 5")) {
				this.major = 5;
				var actual_index = ua.indexOf("msie 5");
				var actual_major = ua.substring(actual_index + 5, actual_index + 8);
				this.minor = parseFloat(actual_major);
			}
		}
	
		return this;
	}
	
	var browser_check = new its();
	
			function show_section( parent, index ) {
			return (readCookie("sec" + parent + "vv" + index));
		}
		
		function add_section( parent, index ) {
			setCookie("sec" + parent + "vv" + index,"1",3,'','','');
		}
		
		function remove_section( parent, index ) {
			killCookie("sec" + parent + "vv" + index,'','');
		}
		
		function toggle_section( parent, index ) {
			(show_section(parent,index))?
				remove_section(parent, index):
				add_section(parent, index);
			if (browser_check.ie && browser_check.major >= 4) {
				refresh_dynamic();
			} else {
				location.href = location.href;
			}
		}
		
		function refresh_dynamic() {
			document.all.dynamic_redraw.innerHTML = draw_contents();
		}
		
		function draw_contents() {
			var show_sub_contents, sign;
			//var newString = '<img src="images/spacer.gif" width="1" height="10"><br>';
			var newString = '&nbsp;<br>';
			for (var i=0; i<sections[main_section].sub_sections.length; i++) {
				show_sub_contents = show_section(main_section, i);
				if (show_sub_contents) sign = '-';
				else sign = '+';
				
				// Blank line if new section name and url = ''
				if (show_sub_contents == '' && sections[main_section].sub_sections[i].name == '') {
					sign = '';
				}
				
				/* Window.status behavior changed to prevent display of markup tags - 1/18/05
				if (sections[main_section].sub_sections[i].url != null && sections[main_section].sub_sections[i].url != '') {
					newString += '<a href="#" onMouseOut="window.status=\'\'; return true;" onMouseOver="window.status=\'Expand: ' + sections[main_section].sub_sections[i].name + '\'; return true;" onClick="toggle_section(' + main_section + ',' + i + '); return false;"><font class="dhtmlNav">' + sign + '</font></a> <a href="' + sections[main_section].sub_sections[i].url + '"><font class="dhtmlNav">' + sections[main_section].sub_sections[i].name + '</font></a><br>';
				} else {
					newString += '<a href="#" onMouseOut="window.status=\'\'; return true;" onMouseOver="window.status=\'Expand: ' + sections[main_section].sub_sections[i].name + '\'; return true;" onClick="toggle_section(' + main_section + ',' + i + '); return false;"><font class="dhtmlNav">' + sign + ' ' + sections[main_section].sub_sections[i].name + '</font></a><br>';
				}
				if (show_sub_contents) {
					for (var j=0; j<sections[main_section].sub_sections[i].sub_sections.length; j++) {
						newString += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + sections[main_section].sub_sections[i].sub_sections[j].url + '" onMouseOut="window.status=\'\'; return true;" onMouseOver="window.status=\'Go To: ' + sections[main_section].sub_sections[i].sub_sections[j].name.replace('\'','\\\'') + '\'; return true;"><font class="dhtmlNav">' + sections[main_section].sub_sections[i].sub_sections[j].name + '</font></a><br>';
					}
				}*/
				
				if (sections[main_section].sub_sections[i].url != null && sections[main_section].sub_sections[i].url != '') {
					newString += '<a href="#" title="Click to Expand/Collapse" onMouseOut="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;" onClick="toggle_section(' + main_section + ',' + i + '); return false;"><font class="dhtmlNav">' + sign + '</font></a> <a href="' + sections[main_section].sub_sections[i].url + '"><font class="dhtmlNav">' + sections[main_section].sub_sections[i].name + '</font></a><br>';
				} else {
					newString += '<a href="#" title="Click to Expand/Collapse" onMouseOut="window.status=\'\'; return true;" onMouseOver="window.status=\'\'; return true;" onClick="toggle_section(' + main_section + ',' + i + '); return false;"><font class="dhtmlNav">' + sign + ' ' + sections[main_section].sub_sections[i].name + '</font></a><br>';
				}
				if (show_sub_contents) {
					for (var j=0; j<sections[main_section].sub_sections[i].sub_sections.length; j++) {
						newString += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + sections[main_section].sub_sections[i].sub_sections[j].url + '"><font class="dhtmlNav">' + sections[main_section].sub_sections[i].sub_sections[j].name + '</font></a><br>';
					}
				}
				
			}
			return newString;
		}

// Begin detail page pop up window function
 
function newWindowZoom()
{
var new_window = window.open("pop_up.html","zoom",'left=20,top=20,screenX=20,screenY=20,width=520,height=380,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no');
new_window.focus();
}
// End detail page pop up window function 
 
// Short text pop up window function
function C3_popup(theURL,winName) {
	window.open(theURL,winName,'scrollbars=yes,resizable=yes,width=488,height=300');
}

// Product enlarge pop up window function
function photo_enlarge(theURL,width,height) {
	var argument = "'left=20,top=20,screenX=20,screenY=20,width=" +width +",height=" +height +",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes'";
	window.open(theURL,"prodEnlarge",argument);
}

// Rich FX rotatable image pop up window function
function photo_rotate(theURL) {
	var argument = "'left=20,top=20,screenX=20,screenY=20,width=760,height=625,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes'";
	window.open(theURL,"prodRotate",argument);
}

// Zoomify pop up window function
function zoomify(theURL) {
	var argument = "'left=20,top=20,screenX=20,screenY=20,width=395,height=548,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes'";
	window.open(theURL,"zoomify",argument);
}

// Zoomify pop up window function for F&R
function zoomify_fr(theURL) {
	var argument = "'left=20,top=20,screenX=20,screenY=20,width=500,height=445,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes'";
	window.open(theURL,"zoomify",argument);
}

// Resizable pop up window function
function popup_r(theURL,winName,width,height) {
	if (width == "") {width = 600}
	if (height == "") {height = 400} 
	var argument = "'left=20,top=20,screenX=20,screenY=20,width=" +width +",height=" +height +",toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes'";
	window.open(theURL,winName,argument);
}

// Macromedia Image Functions
	
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
