		function initScrollLayerPress() {
			//alert('initScrollLayerPress()');
			var navWin = document.getElementById('tn_window');
			if ( navWin != null && navWin != 'undefined') 
			{
				if (navWin.addEventListener) 
					navWin.addEventListener('DOMMouseScroll', lmWheelPress, false); 
				
				var wndo = new dw_scrollObj('tn_window', 'tn_data', 0, -scrollTo);
				wndo.bSizeDragBar = false;
				wndo.setUpScrollbar("dragBar1", "track1", "v", 2, 0);	
				dw_scrollObj.scrollTo('tn_window', 0, scrollTo, 1);
				setTimeout("showBar()", 50);
			}
		}
		
		function highlightPress(obj, pressId)
		{
			var offsetTop = obj.offsetTop;
			var offsetLeft = obj.offsetLeft;
			
			var highlight = document.getElementById('highlight');
			selectedPressId = pressId;
			if ( obj != null && obj != 'undefined') 
			{
				//alert('obj: ' + obj + ' **** ' + 'offsetTop: ' +offsetTop + ', offsetLeft: ' + offsetLeft);
				highlight.style.visibility="visible";
				highlight.style.top=offsetTop;
				highlight.style.left=offsetLeft;
			}
		}
		
		function gotoSelected(pressId,pressClipId,productId)
		{
			var win = document.getElementById("tn_data");
			var temp_y_offset = win.style.top;
			var newoffset = temp_y_offset.substring(0, temp_y_offset.length-2);
			if ( newoffset < 0 ) {
				newoffset = newoffset * -1;
			}
	
			var pressIdUrl = '';
			if ( pressId != null && pressId != 'undefined')
			{
				pressIdUrl = '&pressId='+pressId;
			}
			
			var pressClipIdUrl = '';
			if ( pressClipId != null && pressClipId != 'undefined')
			{
				pressClipIdUrl = '&pressClipId='+pressClipId;
			}
	
			var productIdUrl = '';
			if ( productId != null && productId != 'undefined')
			{
				productIdUrl = '&product='+productId;
			}
			
			window.location = "/b/Press.jsp?&y_offset="+newoffset+pressIdUrl+pressClipIdUrl+productIdUrl;
		}
		
		function gotoHighlight(pressClipId)
		{
			var win = document.getElementById("tn_data");
			var temp_y_offset = win.style.top;
			var newoffset = temp_y_offset.substring(0, temp_y_offset.length-2);
			if ( newoffset < 0 ) {
				newoffset = newoffset * -1;
			}
			
			window.location = "/b/Press.jsp?pressId="+selectedPressId+"&y_offset="+newoffset;
		}
		
		function mouseoveruparrow()
		{
			var uparrow = document.getElementById('up_arrow_img');
			if ( uparrow != null && uparrow != 'undefined' ) {
				uparrow.src = '/images/press/press_up_arrow_over.gif';
			}
		}
	
		function mouseoutuparrow()
		{
			var uparrow = document.getElementById('up_arrow_img');
			if ( uparrow != null && uparrow != 'undefined' ) {
				uparrow.src = '/images/press/press_up_arrow.gif';
			}
		}
	
		function mouseoverdownarrow()
		{
			var uparrow = document.getElementById('down_arrow_img');
			if ( uparrow != null && uparrow != 'undefined' ) {
				uparrow.src = '/images/press/press_down_arrow_over.gif';
			}
		}
	
		function mouseoutdownarrow()
		{
			var uparrow = document.getElementById('down_arrow_img');
			if ( uparrow != null && uparrow != 'undefined' ) {
				uparrow.src = '/images/press/press_down_arrow.gif';
			}
		}
		
		function showBlowup(pressClipId, attempt)
		{
			var max_attempt = 5;
			var parentObj = document.getElementById('press_content');
			var childObj = document.getElementById('blowup');
			if ( childObj == null || childObj == 'undefined')
			{
				if (attempt == null || attempt == 'undefined' ) attempt = 0;
				
				var oImg = new Image();
				oImg.src = '/images/press/pressclipid_' + pressClipId + '_zoom.jpg';
				
				if (oImg.complete || ( oImg.readyState && oImg.readyState=='complete' ) || attempt >= max_attempt ) { 
					
					//remove loading
					var loading_parentObj = document.getElementById('press_content');
					var loading_childObj = document.getElementById('loading');
					if ( loading_parentObj != null && loading_parentObj != 'undefined' && loading_childObj != null && loading_childObj != 'undefined') {
						loading_parentObj.removeChild(loading_childObj);
					}
					
					var innerblowup = document.createElement('div');
					innerblowup.setAttribute('id', 'innerblowup');
					innerblowup.style.position = 'absolute';
					innerblowup.style.width ="992px";
					innerblowup.style.height ="690px";
					innerblowup.style.left = 0;
					innerblowup.style.top = 30;
					
					parentObj.appendChild(innerblowup);
					
					var newDiv = document.createElement('div');
					newDiv.setAttribute('id', 'blowup');
					newDiv.style.position = 'absolute';
					var loaded_image_width = 900;
					if (oImg.complete || ( oImg.readyState && oImg.readyState=='complete' ) ) {
						loaded_image_width = oImg.width;
					}
					
					newDiv.style.width = loaded_image_width;
					newDiv.style.left = ( (992-loaded_image_width)/2);
					newDiv.innerHTML = "<center><img src='/images/press/pressclipid_" + pressClipId + "_zoom.jpg' /></center>";
					
					innerblowup.appendChild(newDiv);
					
					var closeDiv = document.createElement('div');
					closeDiv.setAttribute('id', 'blowup_close');
					closeDiv.style.position = 'absolute';
					closeDiv.style.top = 15;
					closeDiv.style.right = 15;
					closeDiv.innerHTML = "<a href='javascript:hideBlowup();'><center><img src='/images/press/close_btn.jpg' /></center></a>";
					
					newDiv.appendChild(closeDiv);
					
				}
				else {
					//set loading graphic
					if (attempt == 0) {
						var loading = document.createElement('div');
						loading.setAttribute('id', 'loading');
						loading.style.position = 'absolute';
						loading.style.width ="32px";
						loading.style.height ="32px";
						loading.style.left = 480;
						loading.style.top = 200;
						loading.innerHTML = "<img src='/images/press/ajax-loader.gif' />";
						parentObj.appendChild(loading);
					
					}
					
					//try again later
					setTimeout("showBlowup(" + pressClipId + ", " + (attempt+1) + ")",500);
					//alert('1 else');
					 
				}
				
			}
		}
		
		function hideBlowup()
		{
			var parentObj = document.getElementById('press_content');
			var childObj = document.getElementById('innerblowup');
			if ( parentObj != null && parentObj != 'undefined' && childObj != null && childObj != 'undefined') {
				parentObj.removeChild(childObj);
			}
		}
		
		function lmWheelPress(event) {
			if (!event) event = window.event;
			var delta = 0;
			var h = document.getElementById('tn_data').offsetHeight;
			h = h / 100;
			if (event.wheelDelta) {
				delta = event.wheelDelta*(h/1.9/40);
				if (window.opera) delta = -delta;
			} else if (event.detail) 
			{ //firefox
				delta = (-event.detail)*(h/1.9);
			}
			if (delta<-100) delta = -100;
			//alert(delta);
			dw_scrollObj.scrollBy('tn_window',0, delta, 1);
		}
		
var closePulldownNowOK = false;
function closePulldown(name) {
	closePulldownNowOK=true;
	setTimeout("closePulldownNow('"+name+"')", 100);
	//closePulldownNow(name);
}
function cancelClosePulldown() {
	closePulldownNowOK=false;
}
function closePulldownNow(name) {
		if (closePulldownNowOK==true) {
			for (var i = 1; i<=11; i++) {
				if (document.getElementById(name+i)) {
					document.getElementById(name+i).style.display='none';
				}
			}
		}
}
function forceClosePulldownNow(name) {
	for (var i = 1; i<=11; i++) {
		if (document.getElementById(name+i)) {
			document.getElementById(name+i).style.display='none';
		}
	}
}
function setMenuValue(name, displayValue, value) {
	var id = name + 'Title';
	var d = document.getElementById(id);
	if (d) {
		setText(d, displayValue);
	}
	eval(name+"Value='"+value+"';");
	if(typeof menuValueListener == 'function') {
		menuValueListener(name, displayValue, value);
	}
}
function pulldown(name) {
		closePulldownNowOK = false;
		var id = name + '1';
		var d = document.getElementById(id);
		for (var i = 1; i<=10; i++) {
			if (document.getElementById(name+i)) {
				document.getElementById(name+i).style.display='none';
			}
		}
		if (d) {
			d.style.display='block';			
		}
}
	function goCatF(cat) {
		var url = '/fwd/Categories.jsp?d=F&s=C&c='+escape(cat);
		document.location.href = url;
	}
	function goCatM(cat) {
			var url = '/fwd/Categories.jsp?d=M&s=C&c='+escape(cat);
			document.location.href = url;
	}
	function hl(img) {
		var name = img.id;
		var elem = document.getElementById(name+'Text');
		elem.style.color='#FFFFFF';
	}
	function rhl(img) {
			var name = img.id;
			var elem = document.getElementById(name+'Text');
			elem.style.color='#8e8e8e';
	}
	function hli(name) {
		var elem = document.getElementById(name);
		if (elem.style.backgroundPositionY) elem.style.backgroundPositionY='bottom';
		else elem.style.backgroundPosition='left bottom';
	}
	function rhli(name) {
			var elem = document.getElementById(name);
			if (elem.style.backgroundPositionY) elem.style.backgroundPositionY='';
			else elem.style.backgroundPosition='';
	}