(function($){
	/* hoverIntent by Brian Cherne */
	$.fn.hoverIntent = function(f,g) {
		// default configuration options
		var cfg = {
			sensitivity: 7,
			interval: 100,
			timeout: 0
		};
		// override configuration options with user supplied object
		cfg = $.extend(cfg, g ? { over: f, out: g } : f );

		// instantiate variables
		// cX, cY = current X and Y position of mouse, updated by mousemove event
		// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
		var cX, cY, pX, pY;

		// A private function for getting mouse position
		var track = function(ev) {
			cX = ev.pageX;
			cY = ev.pageY;
		};

		// A private function for comparing current and previous mouse position
		var compare = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			// compare mouse positions to see if they've crossed the threshold
			if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
				$(ob).unbind("mousemove",track);
				// set hoverIntent state to true (so mouseOut can be called)
				ob.hoverIntent_s = 1;
				return cfg.over.apply(ob,[ev]);
			} else {
				// set previous coordinates for next time
				pX = cX; pY = cY;
				// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
				ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
			}
		};

		// A private function for delaying the mouseOut function
		var delay = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			ob.hoverIntent_s = 0;
			return cfg.out.apply(ob,[ev]);
		};

		// A private function for handling mouse 'hovering'
		var handleHover = function(e) {
			// next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
			while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
			if ( p == this ) { return false; }

			// copy objects to be passed into t (required for event object to be passed in IE)
			var ev = jQuery.extend({},e);
			var ob = this;

			// cancel hoverIntent timer if it exists
			if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }

			// else e.type == "onmouseover"
			if (e.type == "mouseover") {
				// set "previous" X and Y position based on initial entry point
				pX = ev.pageX; pY = ev.pageY;
				// update "current" X and Y position based on mousemove
				$(ob).bind("mousemove",track);
				// start polling interval (self-calling timeout) to compare mouse coordinates over time
				if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}

			// else e.type == "onmouseout"
			} else {
				// unbind expensive mousemove event
				$(ob).unbind("mousemove",track);
				// if hoverIntent state is true, then call the mouseOut function after the specified delay
				if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
			}
		};

		// bind the function to the two event listeners
		return this.mouseover(handleHover).mouseout(handleHover);
	};
	
})(jQuery);

/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="sf-arrow">&nbsp;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.parent().addClass(c.anchorClass);};
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'withChildren',
		arrowClass  : 'css-menu-arrow',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'msieFix',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 1100,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : false,
		disableHI	: false,		// true disables hoverIntent detection
		onInit		: function(){}, // callback functions
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);

var panelsCount = 8;
var selectedTab = null;

getCookie=function(name){
var re=new RegExp(name+"=[^;]+", "i"); 
if (document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return ""
}

setCookie=function(name, value){
document.cookie = name+"="+value+""
}

function showPanel(number)
      {
	  	setCookie("openPanel", number)
        for(i = 1; i < panelsCount; i++){

			if (document.getElementById("panel"+i)){
		          document.getElementById("panel"+i).style.display = ("panel"+number == "panel"+i) ? 'block':'none';
			}
			if (document.getElementById("tab"+i)){
			  	  document.getElementById("tab"+i).parentNode.parentNode.className = ("tab"+number == "tab"+i) ? 'selectedTab':'tab';
			}
		}
        return false;
}
function openRecent()
{
	  	var opened=getCookie("openPanel");
		if (opened!="") { showPanel(opened);}
}
// xfade
var d=document, slides = new Array(), zInterval = null, current=0, pause=false;
var timeout_id;

function so_init(){
	if(!d.getElementById || !d.createElement)return;
	slides = d.getElementById('rotor').getElementsByTagName('div');
	for(i=1;i<slides.length;i++) slides[i].xOpacity = 0;
	slides[0].style.display = 'block';
	slides[0].xOpacity = .99;
	timeout_id=setTimeout(so_xfade,6000);
}

function setOpacity(obj){
	if(obj.xOpacity>.99){
		obj.xOpacity = .99; return;
	}
	obj.style.opacity = obj.xOpacity;
	obj.style.MozOpacity = obj.xOpacity;
	obj.style.filter = 'alpha(opacity=' + (obj.xOpacity*100) + ')';

}

function so_xfade(){
	cOpacity = slides[current].xOpacity;
	nIndex = slides[current+1]?current+1:0;
	nOpacity = slides[nIndex].xOpacity;

	cOpacity-=.03;
	nOpacity+=.03;

	slides[nIndex].style.display = 'block';
	slides[current].xOpacity = cOpacity;
	slides[nIndex].xOpacity = nOpacity;
	setOpacity(slides[current]);
	setOpacity(slides[nIndex]);

	if(cOpacity<=0)	{
		slides[current].style.display = 'none';
		current = nIndex;
		timeout_id=setTimeout(so_xfade,6000); 	}
	else {	timeout_id=setTimeout(so_xfade,30); }

}
function so_jump(num){
	clearTimeout(timeout_id);
	
	current=num;
	nIndex = slides[current+1]?current+1:0;		
	for(i=0;i<slides.length;i++) { slides[i].xOpacity = 0;slides[i].style.display = 'none';setOpacity(slides[i]); }
	
	slides[current].style.display = 'block';
	slides[current].xOpacity = 0.99;
	setOpacity(slides[current]);
	
	timeout_id=setTimeout(so_xfade,6000);		
}
// 		---------------		chained
<!--
data_1 = new Option("Systemy sterowania", "/produkty-i-technologie/wedlug-kategorii/systemy-sterowania.html");
	data_1_1 = new Option("Sterowniki PLC", "/ge/systemy-sterowania/sterowniki-plc.html");
		//data_1_1_1 = new Option("Kontrolery RX3i", "/www/Produkty_i_technologie/Systemy_sterowania//www/Produkty_i_technologie/Systemy_sterowania/PACSystems/Kontrolery_RX3i/index.html");	
		//data_1_1_2 = new Option("Kontrolery RX7i", "/www/Produkty_i_technologie/Systemy_sterowania/PACSystems/Kontrolery_RX3i/index.html");	
		data_1_1_1 = new Option("90-70", "/GE/systemy-sterowania/sterowniki-plc/7-sterowniki-90-70.html");	
		data_1_1_2 = new Option("90-30", "/GE/systemy-sterowania/sterowniki-plc/6-sterowniki-90-30.html");	
		data_1_1_3 = new Option("VersaMax", "/GE/systemy-sterowania/sterowniki-plc/5-sterowniki-versamax.html");	
		data_1_1_4 = new Option("VersaMax Micro", "/GE/systemy-sterowania/sterowniki-plc/4-sterowniki-versamax-micro.html");	
		data_1_1_5 = new Option("VersaMax Nano", "/GE/systemy-sterowania/sterowniki-plc/3-sterowniki-versamax-nano.html");	
		data_1_1_6 = new Option("XL6", "/horner/sterowniki-zintegrowane/sterownik-xl6.html");	
		data_1_1_7 = new Option("XLe", "/horner/sterowniki-zintegrowane/sterownik-xle.html");	
		data_1_1_8 = new Option("XLt", "/horner/sterowniki-zintegrowane/sterownik-xlt.html");	
		data_1_1_9 = new Option("NX", "/horner/sterowniki-zintegrowane/sterownik-nx.html");	
	data_1_2 = new Option("PACSystems", "/ge/systemy-sterowania/kontrolery-pac.html");
		data_1_2_1 = new Option("Kontrolery RX3i", "/GE/systemy-sterowania/kontrolery-pac/8-kontrolery-rx3i.html");
		data_1_2_2 = new Option("Kontrolery RX7i", "/GE/systemy-sterowania/kontrolery-pac/9-kontrolery-rx7i.html");
		data_1_2_3 = new Option("Panele operatorskie Quickpanel CE", "/GE/panele-operatorskie/quickpanel-ce.html");
	data_1_3 = new Option("Proficy Machine Edition", "/GE/systemy-sterowania/sterowniki-plc/12-proficy-machine-edition.html");
	data_1_4 = new Option("Układy I/O", "/GE/systemy-sterowania/uklady-wejsc-wyjsc.html");
		data_1_4_1 = new Option("VersaPoint", "/GE/systemy-sterowania/uklady-wejsc-wyjsc/13-versapoint.html");
		data_1_4_2 = new Option("VersaMax I/O", "/GE/systemy-sterowania/uklady-wejsc-wyjsc/14-versamax-io.html");
		data_1_4_3 = new Option("Genius", "/GE/systemy-sterowania/uklady-wejsc-wyjsc/15-genius.html");
		data_1_4_4 = new Option("8000 Process I/O", "/GE/systemy-sterowania/uklady-wejsc-wyjsc/16-8000-process-io.html");
	data_1_5 = new Option("Układy rezerwacji", "/GE/systemy-sterowania/systemy-rezerwacji.html");
		data_1_5_1 = new Option("Hot Standby Redundancy RX7i", "/GE/systemy-sterowania/systemy-rezerwacji/19-hot-standby-redundancy.html");
		data_1_5_2 = new Option("PAC8000 SafetyNet", "/GE/systemy-sterowania/systemy-rezerwacji/18-pac8000-safetynet.html");
		data_1_5_3 = new Option("MaxON", "/GE/systemy-sterowania/systemy-rezerwacji/17-maxon.html");
	data_1_6 = new Option("Proficy Process Systems", "/GE/systemy-sterowania/systemy-dcs.html");
	data_1_7 = new Option("Serwonapędy", "/GE/systemy-sterowania/serwonapedy.html");
	//data_1_8 = new Option("SoftPLC", "/www/Produkty_i_technologie/Systemy_sterowania/SoftPLC/index.html");
data_2 = new Option("Komputery i panele przemysłowe", "/produkty-i-technologie/wedlug-kategorii/komputery-przemyslowe.html");
	data_2_1 = new Option("Komputery przemysłowe", "/produkty-i-technologie/wedlug-kategorii/komputery-przemyslowe.html");
		data_2_1_1 = new Option("Komputery Box PC", "/wonderware/komputery-przemyslowe/komputery-boxpc.html");
		//data_2_1_2 = new Option("Komputery Tablet PC", "/www/Produkty_i_technologie/Komputery_i_panele_przemyslowe/Komputery_przemyslowe/Komputery_Tablet_PC/index.html");
		data_2_1_2 = new Option("Komputery TPC", "/wonderware/komputery-przemyslowe/komputery-panelowe-z-ekranem-dotykowym.html");
		data_2_1_3 = new Option("Panel operatorski Compact Panel CE", "/wonderware/komputery-przemyslowe/panel-operatorski-compact-panel-ce.html");	
	data_2_2 = new Option("Panele operatorskie", "/page/index.php/produkty-i-technologie/wedlug-kategorii/panele-operatorskie.html");
		data_2_2_1 = new Option("Quickpanel CE", "/GE/panele-operatorskie/quickpanel-ce.html");
		data_2_2_2 = new Option("Panel InTouch CE", "http://www.astor.com.pl/wonderware/produkty/panele-intouch-ce.html");
		data_2_2_3 = new Option("Datapanel", "/GE/panele-operatorskie/datapanel.html");
		data_2_2_4 = new Option("TIU", "/horner/panele-operatorskie/panele-operatorskie-tiu.html");
		data_2_2_5 = new Option("NX", "/horner/sterowniki-zintegrowane/sterownik-nx.html");	
		data_2_2_6 = new Option("XLe", "/horner/sterowniki-zintegrowane/sterownik-xle.html");	
		data_2_2_7 = new Option("XLt", "/horner/sterowniki-zintegrowane/sterownik-xlt.html");	
		data_2_2_8 = new Option("XL6", "horner/sterowniki-zintegrowane/sterownik-xl6.html");
data_3 = new Option("Łączność bezprzewodowa", "http://www.astor.com.pl/radiomodemy/");
	data_3_1 = new Option("Radiomodemy", "http://www.astor.com.pl/radiomodemy/");
		data_3_1_1 = new Option("SATELLINE-1870", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-869-mhz/radiomodemy-satelline-1870.html");
		data_3_1_2 = new Option("SATELLINE-2ASxE / 2ASxE200", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-400-mhz/radiomodemy-satelline-2asxe.html");
//		data_3_1_3 = new Option("SATELLINE-2ASxE / 2ASxE200", "/www/Produkty_i_technologie/Lacznosc_bezprzewodowa/Radiomodemy/SATELLINE-2ASxE__2ASxE200/index.html");
		data_3_1_3 = new Option("SATELLINE-3AS(d) 869", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-869-mhz/radiomodemy-satelline-3asd-869.html");
		data_3_1_4 = new Option("SATELLINE-3AS(d)", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-400-mhz/radiomodemy-satelline-3asd.html");
		data_3_1_5 = new Option("SATELLINE-3AS(d) NMS", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-400-mhz/radiomodemy-satelline-3asd.html");
		data_3_1_6 = new Option("SATELLINE-3AS(d) VHF", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-400-mhz/radiomodemy-satelline-3asd.html");
		data_3_1_7 = new Option("SATELLINE-3AS(d) EPIC", "http://www.astor.com.pl/radiomodemy/produkty/radiomodemy-dla-pasma-400-mhz/radiomodemy-satelline-3as-epic.html");
	data_3_2 = new Option("Urządzenia do transmisji sygnałów alarmowych", "http://www.astor.com.pl/radiomodemy/produkty/urzdzenia-do-systemow-alarmowych.html");
		data_3_2_1 = new Option("SATELCODE 8i", "http://www.astor.com.pl/radiomodemy/produkty/urzdzenia-do-systemow-alarmowych/satelcode-8i.html");
		data_3_2_2 = new Option("SATELNODE X8S", "http://www.astor.com.pl/radiomodemy/produkty/urzdzenia-do-systemow-alarmowych/satelnode-x8s.html");		
	data_3_3 = new Option("Akcesoria do radiomodemów", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria.html");
		data_3_3_1 = new Option("I-Link", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/i-link.html");	
		data_3_3_2 = new Option("C-Link", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/c-link.html");
		data_3_3_3 = new Option("Mod IP", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/mod-ip.html");		
		data_3_3_4 = new Option("Mini-Link", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/mini-link.html");	
		data_3_3_5 = new Option("SATEL-321", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/satel-321.html");	
		data_3_3_6 = new Option("Kable", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/kable.html");	
		data_3_3_7 = new Option("Anteny ćwierćfalowe", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/anteny-wierfalowe-i-pofalowe.html");	
		data_3_3_8 = new Option("Anteny półfalowe", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/anteny-wierfalowe-i-pofalowe.html");	
		data_3_3_9 = new Option("Anteny kierunkowe", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/anteny-kierunkowe-i-dookolne.html");	
		data_3_3_10 = new Option("Anteny dookólne", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/anteny-kierunkowe-i-dookolne.html");	
		data_3_3_11 = new Option("Zabezpieczenie odgromowe", "http://www.astor.com.pl/radiomodemy/produkty/satel-radiomodemy-akcesoria/zabezpieczenia-odgromowe.html");
	data_3_4 = new Option("Bezprzewodowy Ethernet", "http://www.astraada.pl/sieci-przemyslowe/bezprzewodowy-ethernet-24-ghz.html");
		data_3_4_1 = new Option("JetWave 2400 (2,4 GHz)", "http://www.astraada.pl/sieci-przemyslowe/bezprzewodowy-ethernet-24-ghz.html");	
		data_3_4_2 = new Option("JetWave 2600 (5,4 GHz)", "http://www.astraada.pl/sieci-przemyslowe/bezprzewodowy-ethernet-54-ghz.html");
data_4 = new Option("Przemysłowe systemy komunikacji", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji.html");
 	data_4_1 = new Option("Karty komunikacyjne", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne.html");
		data_4_1_1 = new Option("Applicom", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/72-karty-komunikacyjne-/222-karty-komunikacyjne-applicom-.html");
			data_4_1_1_1 = new Option("PCI2000", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/214-karta-komunikacyjna-pci2000-.html");
			data_4_1_1_2 = new Option("PCI2000FIP", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/215-karta-komunikacyjna-pci2000fip.html");
			data_4_1_1_3 = new Option("PCI2000MBP", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/216-karta-komunikacyjna-pci2000mbp.html");
			data_4_1_1_4 = new Option("PCI4000", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/217-karta-komunikacyjna-pci4000.html");
			data_4_1_1_5 = new Option("PCU1000", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/218-karta-komunikacyjna-pcu1000.html");
			data_4_1_1_6 = new Option("PCU1500PFB", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/219-karta-komunikacyjna-pcu1500pfb.html");
			data_4_1_1_7 = new Option("PCU1500S7", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/220-karta-komunikacyjna-pcu1500s7.html");
			data_4_1_1_8 = new Option("PCU2000ETH", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/74-karty-komunikacyjne-applicom/221-karta-komunikacyjna-pcu2000eth.html");    
		data_4_1_2 = new Option("Direct-Link", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/72-karty-komunikacyjne-/223-karty-komunikacyjne-direct-link.html");
			data_4_1_2_1 = new Option("PCI-DPIO", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/76-karty-komunikacyjne-direct-link/231-karta-komunikacyjna-pci-dpio.html");
			data_4_1_2_2 = new Option("PCU-CANIO", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/76-karty-komunikacyjne-direct-link/230-karta-komunikacyjna-pcu-canio.html");
			data_4_1_2_3 = new Option("PCU-DVNIO", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/76-karty-komunikacyjne-direct-link/229-karta-komunikacyjna-pcu-dvnio.html");
			data_4_1_2_4 = new Option("PCU100PFB", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/76-karty-komunikacyjne-direct-link/228-karta-komunikacyjna-pcu100pfb.html");
		data_4_1_3 = new Option("JETCard", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/72-karty-komunikacyjne-/224-karty-komunikacyjne-jetcard.html");
			data_4_1_3_1 = new Option("JETCard 1200", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/77-karty-komunikacyjne-jetcard/235-karta-komunikacyjna-jetcard-1200.html");
			data_4_1_3_3 = new Option("JETCard 1400", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/karty-komunikacyjne/77-karty-komunikacyjne-jetcard/236-karta-komunikacyjna-jetcard-1400.html");	
	data_4_2 = new Option("Konwertery", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery.html");
		data_4_2_1 = new Option("Woodhead APP-ESP-GTW", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/79-konwertery-protokolow-woodhead-/241-konwerter-app-esp-gtw.html");
		data_4_2_2 = new Option("Woodehad APP-ESR-GTW", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/79-konwertery-protokolow-woodhead-/242-konwerter-app-esr-gtw.html");
		data_4_2_3 = new Option("JETCon 1300", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/80-konwertery-jetcon-/243-konwerter-jetcon-1300.html");
		data_4_2_4 = new Option("JETCon 2101", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/80-konwertery-jetcon-/244-konwerter-jetcon-2101.html");
		data_4_2_5 = new Option("JETCon 2200", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/80-konwertery-jetcon-/246-konwerter-jetcon-2200.html");
		data_4_2_6 = new Option("JETCon 2301", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/80-konwertery-jetcon-/246-konwerter-jetcon-2301.html");
		data_4_2_7 = new Option("JETCon 2401", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/konwertery/80-konwertery-jetcon-/246-konwerter-jetcon-2401.html");	
	data_4_3 = new Option("Switche", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/switche.html");
		data_4_3_1 = new Option("JETNet 2000", "http://www.astraada.pl/sieci-przemyslowe/switche-niezarzadzalne.html");
		data_4_3_2 = new Option("JETNet 3000", "http://www.astraada.pl/sieci-przemyslowe/switche-niezarzadzalne.html");
//		data_4_3_3 = new Option("JETNet 3500", "/www/Produkty_i_technologie/Przemyslowe_systemy_komunikacji/Switche/JETNet_3500/index.html");
		data_4_3_3 = new Option("JETNet 4000", "http://www.astraada.pl/sieci-przemyslowe/switche-zarzadzalne/38-switche-zarzadzalne-modele.html");
		data_4_3_4 = new Option("JETNet 4500", "http://www.astraada.pl/sieci-przemyslowe/switche-zarzadzalne/38-switche-zarzadzalne-modele.html");
		data_4_3_5 = new Option("JETNet 3010G", "http://www.astraada.pl/sieci-przemyslowe/switche-niezarzadzalne.html");
		data_4_3_6 = new Option("JETNet 5010G", "http://www.astraada.pl/sieci-przemyslowe/switche-zarzadzalne/38-switche-zarzadzalne-modele.html");
	data_4_4 = new Option("Serwery portów szeregowych JETport", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/serwery-portow-szeregowych.html");
		data_4_4_1 = new Option("JETPort 5201/5601", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/serwery-portow-szeregowych/83-serwery-portow-szeregowych-/277-jetport-52015601.html");
		data_4_4_2 = new Option("JETPort 5604", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/serwery-portow-szeregowych/83-serwery-portow-szeregowych-/278-jetport-5604.html");	
	data_4_5 = new Option("Zasilacze obiektowe", "http://www.astraada.pl/zasilacze-obiektowe/zasilacze-astraada-power.html");
	data_4_6 = new Option("Programy komunikacyjne", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne.html");
		data_4_6_1 = new Option("I/O Servers - programy komunikacyjne Wonderware", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/286-io-servers-programy-komunikacyjne-wonderware.html");
		data_4_6_2 = new Option("DAServers - programy komunikacyjne Wonderware", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/285-daservers-programy-komunikacyjne-wonderware.html");
		data_4_6_3 = new Option("FactorySuite Gateway", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/284-factorysuite-gateway.html");
		data_4_6_4 = new Option("Rapid Protocol Modeler", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/283-rapid-protocol-modeler.html");
		data_4_6_5 = new Option("Programy komunikacyjne Direct-Link", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/282-programy-komunikacyjne-direct-link.html");
		data_4_6_6 = new Option("Programy komunikacyjne Kepware", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/1634-programy-komunikacyjne-kepware.html");
		data_4_6_7 = new Option("Programy komunikacyjne Merz", "/produkty-i-technologie/wedlug-kategorii/przemyslowe-systemy-komunikacji/programy-komunikacyjne/85-programy-komunikacyjne/281-proramy-komunikacyjne-merz.html");	
data_5 = new Option("Wizualizacja, HMI, SCADA", "/produkty-i-technologie/wedlug-kategorii/hmi-systemy-scada.html");
	data_5_1 = new Option("Platforma Systemowa Wonderware", "http://www.astor.com.pl/wonderware/index.php/systemy-scada-geoscada/platforma-systemowa-wonderware.html");
	data_5_2 = new Option("Wonderware InTouch", "http://www.astor.com.pl/wonderware/index.php/wizualizacja-hmi/wonderware-intouch.html");	
	data_5_3 = new Option("Platforma Systemowa Wonderware - pakiet jednostanowiskowy", "http://www.astor.com.pl/wonderware/index.php/wizualizacja-hmi/platforma-systemowa-wonderware-pakiet-jednostanowiskowy.html");
	data_5_4 = new Option("Wonderware Information Server", "http://www.astor.com.pl/wonderware/index.php/systemy-scada-geoscada/wonderware-information-server.html");
	data_5_5 = new Option("Zaawansowany analizator historii dla InTouch", "http://www.astor.com.pl/wonderware/index.php/wizualizacja-hmi/zaawansowany-analizator-historii-dla-intouch.html");	
	data_5_6 = new Option("Proficy HMI/SCADA CIMPLICITY", "http://www.astor.com.pl/produkty-i-technologie/wedlug-kategorii/wizualizacja-hmi-scada/1255-proficy-hmi-scada-cimplicity.html");		
data_6 = new Option("Zarządzanie produkcją i wydajnością - MES/EMI", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi.html");
	data_6_1 = new Option("Platforma Systemowa Wonderware", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/platforma-systemowa-wonderware.html");
	data_6_2 = new Option("Wonderware Performance Software", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/wonderware-performance-software.html");
	data_6_3 = new Option("Wonderware Historian", "http://www.astor.com.pl/wonderware/index.php/systemy-scada-geoscada/wonderware-historian.html");
	data_6_4 = new Option("Wonderware Information Server", "http://www.astor.com.pl/wonderware/index.php/systemy-scada-geoscada/wonderware-information-server.html");
	data_6_5 = new Option("Wonderware Manufacturing Execution Module", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/manufacturing-execution-module.html");
	data_6_6 = new Option("Wonderware Operations Software", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/wonderware-operations-software.html");
	data_6_7 = new Option("Wonderware Equipment Operations Module", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/equipment-operations-module.html");
	data_6_8 = new Option("Wonderware InBatch", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/wonderware-inbatch.html");
	data_6_9 = new Option("Wonderware QI Analyst", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/produkty/wonderware-qi-analyst.html");	
data_7 = new Option("Roboty przemysłowe", "http://www.astor.com.pl/robotyka/");
	data_7_1 = new Option("Roboty", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki.html");
		data_7_1_1 = new Option("Seria F", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/seria-f.html");
		data_7_1_2 = new Option("Seria M", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/seria-m.html");
		data_7_1_3 = new Option("Seria Z", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/seria-z.html");
	data_7_2 = new Option("Kontrolery D4X", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/kontrolery/d4x.html");
	data_7_3 = new Option("Kontrolery D7X", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/kontrolery/d7x.html");
	data_7_4 = new Option("Kontrolery C4X", "http://www.astor.com.pl/robotyka/index.php/roboty-kawasaki/kontrolery/c4x.html");
data_8 = new Option("Technologia ArchestrA", "http://www.astor.com.pl/wonderware/index.php/technologia-archestra.html");
data_9 = new Option("Integracja produkcji z ERP", "http://www.astor.com.pl/wonderware/index.php/systemy-mes-emi/integracja-z-erp.html");
data_10 = new Option("Przemienniki częstotliwości", "http://www.astraada.pl/przemienniki/przemienniki-czestotliwosci.html");
	data_10_1 = new Option("CHF100", "http://www.astraada.pl/przemienniki/astraada-drive-chf100.html");
	data_10_2 = new Option("CHE100", "http://www.astraada.pl/przemienniki/seria-che100.html");
	data_10_3 = new Option("CHV100", "http://www.astraada.pl/przemienniki/seria-chv100.html");
	data_10_4 = new Option("CHV160", "http://www.astraada.pl/przemienniki/seria-chv100.html");
	
// other parameters

    displaywhenempty=""
    valuewhenempty=-1

    displaywhennotempty="Wybierz"
    valuewhennotempty=0

function change(currentbox) {
	numb = currentbox.id.split("_");
	currentbox = numb[1];

	setCookie("select_"+currentbox, document.getElementById('combo_'+currentbox).selectedIndex);
//		for (var z=currentbox;z<4;z++) {//ubset subsequent boxes
//			setCookie("select_"+z,0);
//		}


	 //disabling the go button when needed
	 if ( (currentbox==0)&&(document.getElementById('combo_0').selectedIndex==0)) {document.getElementById('gobutton').disabled=true;}
	 else {document.getElementById('gobutton').disabled=false;}

    i=parseInt(currentbox)+1

// I empty all combo boxes following the current one

    while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
           (document.getElementById("combo_"+i)!=null)) {
         son = document.getElementById("combo_"+i);
	     // I empty all options except the first one (it isn't allowed)
	     for (m=son.options.length-1;m>0;m--) son.options[m]=null;
	     // I reset the first option
	     son.options[0]=new Option(displaywhenempty,valuewhenempty)
		 son.style.display="none";//hiding empty combo
	     i=i+1
    }


// now I create the string with the "base" name ("stringa"), ie. "data_1_0"
// to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box to fill

    stringa='data'
    i=0
    while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
           (document.getElementById("combo_"+i)!=null)) {
           eval("stringa=stringa+'_'+document.getElementById(\"combo_"+i+"\").selectedIndex")
           if (i==currentbox) break;
           i=i+1
    }


// filling the "son" combo (if exists)

    following=parseInt(currentbox)+1

    if ((eval("typeof(document.getElementById(\"combo_"+following+"\"))!='undefined'")) &&
       (document.getElementById("combo_"+following)!=null)) {
       son = document.getElementById("combo_"+following);
	   son.style.display="";
       stringa=stringa+"_"
       i=0
       while ((eval("typeof("+stringa+i+")!='undefined'")) || (i==0)) {

       // if there are no options, I empty the first option of the "son" combo
	   // otherwise put "select" in it

	   	  if ((i==0) && eval("typeof("+stringa+"0)=='undefined'"))
	   	      if (eval("typeof("+stringa+"1)=='undefined'")) {
	   	         eval("son.options[0]=new Option(displaywhenempty,valuewhenempty)")
				 son.style.display="none";
			  }
	   	      else
	             eval("son.options[0]=new Option(displaywhennotempty,valuewhennotempty)")
	      	  else
              	 eval("son.options["+i+"]=new Option("+stringa+i+".text,"+stringa+i+".value)")
		  
	      i=i+1
	   }
       //son.focus()
       i=1
       combostatus=''
       cstatus=stringa.split("_")
       while (cstatus[i]!=null) {
          combostatus=combostatus+cstatus[i]
          i=i+1
          }
       return combostatus;
    }
}

var onclickaction=""

function goListGroup(){
	for (i=arguments.length-1;i>=0; i--){
		if (arguments[i].selectedIndex>0){//!=-1
		var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value
		if (selectedOptionvalue!=""){
		if (onclickaction=="alert")
		alert(selectedOptionvalue)
		else
		window.location=selectedOptionvalue
		break
		}
		}
	}
}

function openRecent2()
{
	  	var opened=getCookie("select_0");
		if (opened!=0) 
		{ document.getElementById('combo_0').selectedIndex=opened;}		
		change(document.getElementById('combo_0'));
		
	  	opened=getCookie("select_1");
		if (opened!=0) 
		{ document.getElementById('combo_1').selectedIndex=opened; change(document.getElementById('combo_1'));}
		
	  	opened=getCookie("select_2");
		if (opened!=0) 
		{ document.getElementById('combo_2').selectedIndex=opened; change(document.getElementById('combo_2'));}

	  	opened=getCookie("select_3");
		if (opened!=0) 
		{ document.getElementById('combo_3').selectedIndex=opened; change(document.getElementById('combo_3'));}


}

//-->

