function scrollStart () {
	if (document.getElementById('items') && (document.getElementById('items').childNodes.length <= 1 && getElementsByClass('video-1'))) { 
		$(function() { $("#scrollable").scrollable( { horizontal:true, size:1 } );
	});}
}

function show_hide($object, $description) {
	var $descriptions = new Array ();
	$descriptions['otziv'] = new Array ('Добавить отзыв', 'Свернуть');
	$descriptions['error'] = new Array ('Сообщить об ошибке', 'Свернуть');
	$object.href = 'javascript:void(0)';
	if (policlass($object.parentNode, 'show')) {
		$object.parentNode.className = $object.parentNode.className.replace(' show', '');
		$object.getElementsByTagName('SPAN')[0].innerHTML = $object.getElementsByTagName('SPAN')[1].innerHTML = $descriptions[$description][0];
	}
	else {
		$object.parentNode.className += ' show';
		$object.getElementsByTagName('SPAN')[0].innerHTML = $object.getElementsByTagName('SPAN')[1].innerHTML = $descriptions[$description][1];
	}
}

function policlass($object, $class) {
	$classname = $object.className.split(' '); 
	for(j=0; j<$classname.length; j++){
		if ($classname[j]==$class) { j=$classname.length;$classname = 1; }
	}
	if ($classname != 1) {$classname = 0}
	return $classname;
}

function phones_scroll($i)
{
	$object = document.getElementById('phones_scroll'+$i);
	if ($object.getElementsByTagName('span').length>0) {
		$width_item = $object.getElementsByTagName('span')[0].offsetWidth;
		$width_div = $object.parentNode.parentNode.parentNode.offsetWidth-34-40;
		$sum = Math.floor($width_div/($width_item+8));    
	    if ($sum < 3) $sum = 3;
		$width = $sum*($width_item+8)-8+'px'
		$object.style.width = $sum*($width_item+8)-8+'px';
		$object.parentNode.style.width = $sum*($width_item+8)-8+34+40+'px';
		$(function() {
			$("#scrollable"+$i).scrollable({horizontal:true, size:$sum});
		});
	}
}

function phones_scroll_handler()
{
	menu_ie8fix();
	if (document.getElementById('phones_scroll')) {phones_scroll('');}
	var $i = 1;
	while (document.getElementById('phones_scroll'+$i)) {
		phones_scroll($i);
		$i++;
	}
	
}

function getImageSize( oPic) {
    var oHlpr = document.createElement( 'IMG');
    //var oPic = document.getElementById( id);
    oHlpr.style.visibility = 'hidden';
    oHlpr.style.position = 'absolute';
    oHlpr.top = 0; oHlpr.left = 0;
    oHlpr.src = oPic.src;
    document.body.appendChild( oHlpr);
    var imSize = { 'width':oHlpr.offsetWidth,'height':oHlpr.offsetHeight }
    document.body.removeChild( oHlpr);
    return imSize;
}


function ShAllVendors(el)
{
    var e=document.getElementById('allvendors');
    if(e.style.display=='block')
    {
        el.innerHTML="Другие производители";
        document.getElementById('allvendors').style.display='none'
    }else
    {
        el.innerHTML="Скрыть";
        document.getElementById('allvendors').style.display='block'
    }
}

function addHandler(object, event, handler, useCapture) {
    if (object.addEventListener)
        object.addEventListener(event, handler, useCapture);
    else if (object.attachEvent)
        object.attachEvent('on' + event, handler);
    else object['on' + event] = handler;
}

function removeHandler(object, event, handler) {
    if (object.removeEventListener)
        object.removeEventListener(event, handler, false);
    else if (object.detachEvent)
        object.detachEvent('on' + event, handler);
}



function menu_ie8fix() {
	if (navigator.userAgent.indexOf('IE 8') != -1) {
		var $menu = getElementsByClass('menu');
		var $tag = $menu[0].getElementsByTagName('A');
		for (i=0; i<$tag.length; i++) {
			addHandler($tag[i], "mouseout", divFunc);
		}
		function divFunc(event) {
			event = event || window.event 
			var t = event.target || event.srcElement
			if (t.parentNode.tagName == 'A') {
				//document.styleSheets[0].addRule(".menu ul li a span", "position:relative; display:inline-block; line-height:28px; height:28px; vertical-align:top; padding:0 14px 0 14px; color:#6d4b03; font-size:12px; font-family:Verdana, Geneva, sans-serif; z-index:1;")
				setTimeout('style_span();', 0);
			}
		}
	}
}
function style_span() {document.styleSheets[0].addRule(".menu ul li a span", "position:relative; display:inline-block; line-height:28px; height:28px; vertical-align:top; padding:0 14px 0 14px; color:#6d4b03; font-size:16px; font-family:Verdana, Geneva, sans-serif; z-index:1;")}

function getElementsByClass(searchClass,node,tag) {
   var classElements = new Array();
   if ( node == null )
      node = document;
   if ( tag == null )
      tag = '*';
   var elements = node.getElementsByTagName(tag);
   var elemLength = elements.length;
   var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)');
   for (var i = 0, j = 0; i < elemLength; i++) {
      if ( pattern.test(elements[i].className) ) {
         classElements[j] = elements[i];
         j++;
      }
   }
   return classElements;
}

window.onload = phones_scroll_handler;
window.onresize = phones_scroll_handler;

function locatePath(path)
{
    
//if (navigator.userAgent.indexOf("MSIE 6") != -1) {     
//    window.location.href(path);    }                  
//else 
window.location=path;
return false;
}
$(document).ready(function(){
	$('body').append('<div><link rel="stylesheet" type="text/css" href="/misc/css/highslide.css" /><!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="/misc/css/highslide-ie6.css" /><![endif]--></div>')
})

hs.graphicsDir = '/misc/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.8;
	hs.outlineType = 'rounded-white';
	hs.captionEval = 'this.thumb.alt';
	hs.marginTop = 50;
	hs.marginBottom = 140 // make room for the thumbstrip and the controls
	hs.numberPosition = 'caption';
	hs.allowSizeReduction = true;
	hs.minWidth = 40;
	hs.minHeight = 150;
	hs.showCredits = false;
	hs.openerTagNames = ['a', 'div'];
	hs.ifarme = false;
	hs.opera = (window.opera)?true:false;
	hs.chrome = (navigator.userAgent.toLowerCase().indexOf('chrome') > -1)?true:false;
	
	hs.lang = {
		cssDirection: 'ltr',
		loadingText : 'Загрузка...',
		loadingTitle : 'Нажмите для отмены',
		focusTitle : 'Click to bring to front',
		fullExpandTitle : '',
		creditsText : '',
		creditsTitle : '',
		previousText : 'Предыдущая',
		nextText : 'Следующая', 
		moveText : 'Move',
		closeText : 'Закрыть', 
		closeTitle : '', 
		resizeTitle : 'Resize',
		playText : 'Старт',
		playTitle : 'Включить слайдшоу (пробел)',
		pauseText : 'Пауза',
		pauseTitle : 'Приостановить слайдшоу (пробел)',
		previousTitle : '',
		nextTitle : '',
		moveTitle : 'Move',
		fullExpandText : '1:1',
		number: '',
		restoreTitle : 'Нажмите для закрытя фотографии, Нажмите и двигайте для перемещения. Используйте кнопки стрелочки для следующего и предыдущего фото.'
	}

	// Add the slideshow providing the controlbar and the thumbstrip
	hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		overlayOptions: {
			className: 'text-controls',
			position: 'bottom center',
			relativeTo: 'viewport',
			offsetY: -95
		},
		thumbstrip: {
			position: 'bottom center',
			mode: 'horizontal',
			relativeTo: 'viewport'
			
		}
	});

hs.init = function () {
	if (!hs.container) {
	
		hs.getPageSize();
		hs.ieLt7 = hs.ie && hs.uaVersion < 7;
		for (var x in hs.langDefaults) {
			if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
			else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined') 
				hs.lang[x] = hs.langDefaults[x];
		}
		
		hs.container = hs.createElement('div', {
				className: 'highslide-container'
			}, {
				position: 'absolute', 
				left: 0, 
				top: 0, 
				width: '100%', 
				zIndex: hs.zIndexCounter,
				direction: 'ltr'
			}, 
			document.body,
			true
		);
		hs.loading = hs.createElement('a', {
				className: 'highslide-loading',
				title: hs.lang.loadingTitle,
				innerHTML: hs.lang.loadingText,
				href: 'javascript:;'
			}, {
				position: 'absolute',
				top: '-9999px',
				opacity: hs.loadingOpacity,
				zIndex: 1
			}, hs.container
		);
		hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
		hs.viewport = hs.createElement('div', {
				className: 'highslide-viewport',
				id: 'highslide-viewport'
			}, {
				visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
			}, hs.container, 1
		);
		
		// http://www.robertpenner.com/easing/ 
		Math.linearTween = function (t, b, c, d) {
			return c*t/d + b;
		};
		Math.easeInQuad = function (t, b, c, d) {
			return c*(t/=d)*t + b;
		};
		Math.easeOutQuad = function (t, b, c, d) {
			return -c *(t/=d)*(t-2) + b;
		};
		
		hs.hideSelects = hs.ieLt7;
		hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE' 
			|| (hs.ie && hs.uaVersion < 5.5));
	}
}

hs.Expander.prototype.show = function () { // Перенос кнопок управления в див с большой картинкой
	var x = this.x, y = this.y;
	this.doShowHide('hidden');
	var $h_viewport_id = document.getElementById('h-viewport_cont');
	if ($h_viewport_id) { $h_viewport_id.id = 'removeid'; }
	if (this.slideshow && this.slideshow.thumbstrip) {
		this.slideshow.thumbstrip.selectThumb();
		//alert(this.wrapper.id+' - '+this.wrapper.getAttribute('style'))
		$h_viewport = hs.createElement('div', {id:'h-viewport_cont', className:'h-viewport'}, null, this.wrapper.parentNode, null);
	}
	if (this.slideshow && this.slideshow.controls) {
		$sc = hs.createElement('div', {className:'text-controls'}, null, this.wrapper, null);
		$sc.appendChild(this.slideshow.controls);
	}
	// Apply size change
	this.changeSize(
		1, {
			wrapper: {
				width : x.get('wsize'),
				height : y.get('wsize'),
				left: x.pos,
				top: y.pos
			},
			content: {
				left: x.p1 + x.get('imgPad'),
				top: y.p1 + y.get('imgPad'),
				width:x.imgSize ||x.size,
				height:y.imgSize ||y.size
			}
		},
		hs.expandDuration
	);
}
hs.Expander.prototype.imageCreate = function() {
	var exp = this;
	var $el_cont;
	hs.isvid = (exp.a.getAttribute('rel') && exp.a.getAttribute('rel').indexOf('video') != -1)?true:false;
	if (hs.isvid) {
		var img_copy = document.getElementById(exp.a.getAttribute('rel'));
		hs.ifarme = img_copy.childNodes[0].tagName == 'IFRAME';
		if (hs.ie && !hs.ifarme) {	
			$el_cont = document.createElement('span');
			$el_cont.className = 'video-container';
			$el_cont.innerHTML = img_copy.innerHTML+img_copy.innerHTML;
			document.body.appendChild($el_cont);
			var img = $el_cont.childNodes[0];
			img.id = 'video_big_'
			hs.video_innerHTML = $el_cont;
		}
		else {
			img_copy = img_copy.cloneNode(true);
			var img = img_copy.childNodes[0];
		}
	}
	else { var img = document.createElement('img');}
	//if ($isvid) alert(document.getElementById(exp.a.getAttribute('rel')).parentNode.innerHTML);
   	this.content = img;
    img.onload = function () {
   		if (hs.expanders[exp.key]) exp.contentLoaded(); 
	};
   	if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
    img.className = 'highslide-image';
   	hs.setStyles(img, {
    	visibility: 'hidden',
   		display: 'block',
   		position: 'absolute',
		maxWidth: '9999px',
		zIndex: 3
	});
   	img.title = hs.lang.restoreTitle;
    if (hs.safari) hs.container.appendChild(img);
   	if (hs.ie && hs.flushImgSize && !hs.isvid) img.src = null;
	if (!hs.isvid) img.src = this.src;
	if (hs.isvid) { exp.contentLoaded();}
	
	this.showLoading();
}

hs.animate = function(el, prop, opt) {
	var start,
		end,
		unit;
	if (typeof opt != 'object' || opt === null) {
		var args = arguments;
		opt = {
			duration: args[2],
			easing: args[3],
			complete: args[4]
		};
	}
	if (typeof opt.duration != 'number') opt.duration = 250;
	opt.easing = Math[opt.easing] || Math.easeInQuad;
	opt.curAnim = hs.extend({}, prop);
	for (var name in prop) {
		var e = new hs.fx(el, opt , name );
		
		start = parseFloat(hs.css(el, name)) || 0;
		end = parseFloat(prop[name]);
		unit = name != 'opacity' ? 'px' : '';
		
		e.custom( start, end, unit );
	}	
	if(el.parentNode.parentNode.id.indexOf ('highslide-wrapper') +1) {
		//alert(el.parentNode.parentNode.id+' - '+el.parentNode.parentNode.getAttribute('style')+' - '+el.id)
		$highslide_viewport = document.getElementById('highslide-viewport');
		var $v_x = document.body.offsetWidth;
		var $v_t = document.body.scrollTop || document.documentElement.scrollTop;
		var $v_h = document.documentElement.clientHeight || document.body.offsetHeight;
		//$highslide_viewport.style.bottom = '-143px';
		$highslide_viewport.childNodes[1].style.height = 'auto';
		$highslide_viewport.childNodes[1].style.bottom = '0';
		$h_viewport.appendChild($highslide_viewport);
		var $vxl = Math.floor($v_x/2)-Math.floor($highslide_viewport.parentNode.offsetWidth/2);
		$highslide_viewport.style.width = $v_x+'px'
		$highslide_viewport.style.left = -$vxl+'px';
		$highslide_viewport.style.height = $v_h+'px';
		$highslide_viewport.style.top = $v_t+'px';
		var $h_removeid = document.getElementById('removeid');
		if ($h_removeid) { $h_removeid.parentNode.removeChild($h_removeid);}
		if (hs.ie && hs.isvid && !hs.ifarme) {
			var $video_big = document.getElementById('video_big_');
			if ($video_big) {
				var video_parent = $video_big.parentNode;
				video_parent.removeChild($video_big);
				video_parent.appendChild(hs.video_innerHTML);
			}
		}
	}
}

hs.setDimmerSize = function(exp) {
	hs.getPageSize();
	$height = document.getElementById('super').offsetHeight;
	$width = document.body.offsetWidth || document.documentElement.offsetWidth;
	if (!hs.dimmer) return;
	/*var h = (hs.ie && exp && exp.wrapper) ? 
		parseInt(exp.wrapper.style.top) + parseInt(exp.wrapper.style.height)+ (exp.outline ? exp.outline.offset : 0) : 0; */
	hs.setStyles(hs.dimmer, {
		width: $width +'px', 
		height: $height +'px'
	});
}

hs.Thumbstrip = function(slideshow) {
	function add (exp) {
		hs.extend(options || {}, {
			overlayId: dom,
			hsId: 'thumbstrip'
		});
		if (hs.ieLt7) options.fade = 0;
		exp.createOverlay(options);
		hs.setStyles(dom.parentNode, { overflow: 'hidden' });
	};
	
	function scroll (delta) {	
		selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
	};
	
	function selectThumb (i, scrollBy) {
		if (i === undefined) for (var j = 0; j < group.length; j++) {
			if (group[j] == hs.expanders[slideshow.expKey].a) {
				i = j;
				break;
			}
		}
		if (i === undefined) return;
		var as = dom.getElementsByTagName('a'),
			active = as[i],
			cell = active.parentNode,
			left = isX ? 'Left' : 'Top',
			right = isX ? 'Right' : 'Bottom',
			width = isX ? 'Width' : 'Height',
			offsetLeft = 'offset' + left,
			offsetWidth = 'offset' + width,
			overlayWidth = div.parentNode.parentNode[offsetWidth],
			minTblPos = overlayWidth - table[offsetWidth],
			curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
			tblPos = curTblPos,
			mgnRight = 20;
		if (scrollBy !== undefined) {
			tblPos = curTblPos - scrollBy;
			if (tblPos > 0) tblPos = 0;
			if (tblPos < minTblPos) tblPos = minTblPos;
	
		} else {
			for (var j = 0; j < as.length; j++) as[j].className = '';
			active.className = 'highslide-active-anchor';
			var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
				activeRight = cell[offsetLeft] + cell[offsetWidth] + 
					(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
			if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
			else if (activeLeft < -curTblPos) tblPos = -activeLeft;
		}
		var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
		hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
		hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
		scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
		scrollDown.style.display = (tblPos > minTblPos)  ? 'block' : 'none';
	};
	

	// initialize
	var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
		options = slideshow.thumbstrip,
		mode = options.mode || 'horizontal',
		floatMode = (mode == 'float'),
		tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
		isX = (mode == 'horizontal'),
		dom = hs.createElement('div', {
				className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode,
				innerHTML:
					'<div class="highslide-thumbstrip-inner">'+
					'<'+ tree[0] +'><'+ tree[1] +'></'+ tree[1] +'></'+ tree[0] +'></div>'+
					'<div class="highslide-scroll-up"><div></div></div>'+
					'<div class="highslide-scroll-down"><div></div></div>'+
					'<div class="highslide-marker"><div></div></div>'
			}, {
				display: 'none'
			}, hs.container),
		domCh = dom.childNodes,
		div = domCh[0],
		scrollUp = domCh[1],
		scrollDown = domCh[2],
		marker = domCh[3],
		table = div.firstChild,
		tbody = dom.getElementsByTagName(tree[1])[0],
		tr;
	for (var i = 0; i < group.length; i++) {
		if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
		(function(){
			var a = group[i],
				$img_temp = new Array(),
				cell = hs.createElement(tree[3], null, null, tr),
				pI = i,
				a_copy = a.cloneNode(true);
				a_copy.childNodes[0].id = 'img_main-'+i;
			if (a_copy.className.indexOf('video') != -1) {
				a_copy.innerHTML = '<img src="/misc/img/video_thmb.gif" alt="" />'
			}
			var appendTo = document.body;
			$img_temp[i] = hs.createElement('img', {id:'img_temp-'+i, src:a_copy.childNodes[0].src}, { position: 'absolute', top: '-9999px' }, appendTo, true);
			var	a_x = $img_temp[i].width,
				a_y = $img_temp[i].height;
			if (a_x > a_y) { a_copy.childNodes[0].style.width = '73px';}
			else { a_copy.childNodes[0].style.height = '73px';}
			if (hs.chrome) {$span = '<span id="a_copy_del"></span>';}
			else {$span = '<span></span>';}
			hs.createElement('a', {
				href: a.href,
				onclick: function() {
					hs.getExpander(this).focus();
					return hs.transit(a);
				},
				innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a_copy.innerHTML+$span
			}, null, cell);
			$img_temp[i].parentNode.removeChild($img_temp[i]);
			if(hs.chrome) {setTimeout(second_passed, 200);}
			function second_passed(){
				a_copy.childNodes[0].style.width = 'auto';
				a_copy.childNodes[0].style.height = 'auto';
				var appendTo = document.body;
				//alert(1);
				$img_temp[i] = hs.createElement('img', {id:'img_temp-'+i, src:a_copy.childNodes[0].src}, { position: 'absolute', top: '-9999px' }, appendTo, true);
				//$img_temp[i] = getImageSize( a.childNodes[0]);
				var	a_x = $img_temp[i].width,
				a_y = $img_temp[i].height;
				//alert('a_x = '+a_x+', a_y = '+a_y);
				if (a_x > a_y) { a_copy.childNodes[0].style.width = '73px';}
				else { a_copy.childNodes[0].style.height = '73px';}
				hs.createElement('a', {
					href: a.href,
					onclick: function() {
						hs.getExpander(this).focus();
						return hs.transit(a);
					},
					innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a_copy.innerHTML+'<span></span>'
				}, null, cell);
				$img_temp[i].parentNode.removeChild($img_temp[i]);
				a_copy_del = document.getElementById('a_copy_del').parentNode;
				a_copy_del.parentNode.removeChild(a_copy_del);
			}
		})();
	}
	
	if (!floatMode) {
		scrollUp.onclick = function () { scroll(-1); };
		scrollDown.onclick = function() { scroll(1); };
		hs.addEventListener(tbody, document.onmousewheel !== undefined ? 
				'mousewheel' : 'DOMMouseScroll', function(e) {        
			var delta = 0;
	        e = e || window.event;
	        if (e.wheelDelta) {
				delta = e.wheelDelta/120;
				if (hs.opera) delta = -delta;
	        } else if (e.detail) {
				delta = -e.detail/3;
	        }
	        if (delta) scroll(-delta * 0.2);
	        if (e.preventDefault) e.preventDefault();
			e.returnValue = false;
		});
	}
	
	return {
		add: add,
		selectThumb: selectThumb
	}
};

/*hs.dim = function(exp) {
	if (!hs.dimmer) {
		hs.dimmer = hs.createElement ('div', 
			{ 
				className: 'highslide-dimming',
				owner: '',
				onclick: function() {
					 
						//hs.close();
				}
			}, { 
				position: 'absolute',
				visibility: 'visible',
				left: 0,
				opacity: 0,
				top:0
			}, hs.container, true);
		hs.addEventListener(window, 'resize', hs.setDimmerSize);
	}
	hs.dimmer.style.display = '';
	hs.setDimmerSize();
	hs.dimmer.owner += '|'+ exp.key;
	if (hs.geckoMac && hs.dimmingGeckoFix) 
		hs.setStyles(hs.dimmer, {
			background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
			opacity: 1
		});
	else
		hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
}*/

hs.dim = function(exp) {
	if (!hs.dimmer) {
		hs.dimmer = hs.createElement ('div', {
				className: 'highslide-dimming highslide-viewport-size',
				owner: '',
				onclick: function() {
					
						//hs.close();
				}
			}, {
                visibility: 'visible',
				opacity: 0
			}, hs.container, true);
	}

	hs.dimmer.style.display = '';
	if (!hs.ieLt7) {hs.setDimmerSize();}
	hs.dimmer.owner += '|'+ exp.key;
	if (hs.geckoMac && hs.dimmingGeckoFix)
		hs.setStyles(hs.dimmer, {
			background: 'url('+ hs.graphicsDir + 'geckodimmer.png)',
			opacity: 1
		});
	else
		hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
}

hs.Expander.prototype.focus = function() {
	this.wrapper.style.zIndex = hs.zIndexCounter += 2;
	// blur others
	for (var i = 0; i < hs.expanders.length; i++) {
		if (hs.expanders[i] && i == hs.focusKey) {
			var blurExp = hs.expanders[i];
			blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
				if (!hs.opera) { blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';}
				blurExp.content.title = hs.lang.focusTitle;
		}
	}
	
	// focus this
	if (this.outline) this.outline.table.style.zIndex 
		= this.wrapper.style.zIndex - 1;
	this.content.className = 'highslide-'+ this.contentType;
		this.content.title = hs.lang.restoreTitle;
		
		if (hs.restoreCursor) {
			hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
			if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
			this.content.style.cursor = hs.styleRestoreCursor;
		}
		
	hs.focusKey = this.key;	
	hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);	
}
