<!--//--><![CDATA[//><!--
		
		/*
			pridavani eventu - o dost vylepsena verze onload v body
		*/
		function addEvent(obj, evType, fn) {
			if (obj.addEventListener) {
				obj.addEventListener(evType, fn, true);
				return true;
			}
			else if (obj.attachEvent) {
				var r = obj.attachEvent("on"+evType, fn);
				return r;
			}
			else {
				return false;
			}	//if
		}	//function

		
		// ---
		/*
		    Written by Jonathan Snook, http://www.snook.ca/jonathan
		    Add-ons by Robert Nyman, http://www.robertnyman.com
		*/
		/*
			Revised to support looking for multiple class names,
			no matter in which order they're applied to the element
		*/
		function getElementsByClassName(oElm, strTagName, oClassNames)
		{
			var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
			var arrReturnElements = new Array();
			var arrRegExpClassNames = new Array();
			if(typeof oClassNames == "object")
			{
				for(var i=0; i<oClassNames.length; i++)
				{
					arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
				}
			}
			else
			{
				arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
			}
			var oElement;
			var bMatchesAll;
			for(var j=0; j<arrElements.length; j++)
			{
				oElement = arrElements[j];
				bMatchesAll = true;
				for(var k=0; k<arrRegExpClassNames.length; k++)
				{
					if(!arrRegExpClassNames[k].test(oElement.className))
					{
						bMatchesAll = false;
						break;
					}
				}
				if(bMatchesAll)
				{
					arrReturnElements.push(oElement);
				}
			}

			return (arrReturnElements);

		}
		// ---
		// Array support for the push method in IE 5
		if(typeof Array.prototype.push != "function")
		{
			Array.prototype.push = ArrayPush;
			function ArrayPush(value)
			{
				this[this.length] = value;
			}
		}
		// ---
		/*
			Examples of how to call the function:

			To get all a elements in the document with a "info-links" class:
		    getElementsByClassName(document, "a", "info-links");

			To get all div elements within the element named "container", with a "col" and a "left" class:
		    getElementsByClassName(document.getElementById("container"), "div", ["col", "left"]);
		*/
		// ---
		//END of Robert Nyman code ---
		
		
		// projedeme tabulky
		// a obarvime radky
		function alternate_table_rows()
		{
			if(!document.getElementsByTagName || !document.getElementById)
			{
				return false;
			}
					
			//tabulky
			var tables_body = document.getElementsByTagName('tbody');
			
			//projedeme tabulky
			for(var i=0; i<tables_body.length; i++)
			{
				//vytahneme si jejich rady
				var rows = tables_body[i].getElementsByTagName('tr');
				
				//projedeme rady
				for(var j=0; j<rows.length; j++)
				{
					if(j%2 == 0)
					{
						rows[j].className = 'emRow';
					}
					
				}//for j
				
			}//for i
			
		}//END  alternate_table_rows 
		
		
		/*
				toggle visibility of div element
				with specified ID
		*/
			//ALL CREDITS TO SIMON WILLISON
			//http://simon.incutio.com/archive/2003/11/06/easytoggle

			var et_toggleElements = [];

			/* Initialisation */
			etInit = function et_init()
			{
				var i, link, id, first, adresa, argument, aktualniID;
				
				//pokud neni v URL #id
				//tak chceme otevrit prvni
				//jinak chceme otevrit podle #id
				adresa = window.location.toString();
				// alert(adresa);
				// alert(adresa.split('#')[1]);
				argument = adresa.split('?')[1];
				if( argument )
				{
					aktualniID = argument.split('=')[1];
					if( aktualniID.split('#')[1] )
					{
						if( aktualniID.split('#')[1] != 'specToggleMenu' )
						{
							aktualniID = aktualniID.split('#')[1];
						}
						else
						{
							aktualniID = aktualniID.split('#')[0];
						}
					}
				}
				else
				{
					aktualniID = false;
				}
				//alert(aktualniID);
				
				
				if( !aktualniID 
						|| (
							(aktualniID!='technickaData') 
							&& (aktualniID!='vykon') 
							&& (aktualniID!='dokumentace') 
							&& (aktualniID!='vykresy') 
							&& (aktualniID!='prislusenstvi') 
							&& (aktualniID!='ctyrtaktni')
							&& (aktualniID!='dvoutaktni')
							&& (aktualniID!='ctyrtaktniNecertifikovane')
							&& (aktualniID!='ctyrtaktniCertifikovane')
							)
					)
				{
					first = true;//true for the first element to display
				}
				else
				{
					first = false;
				}
				
				
				
				for (i = 0; (link = document.links[i]); i++)
				{
					if (/\btoggle\b/.exec(link.className))
					{						
						id = link.href.split('#')[1];
						et_toggleElements[et_toggleElements.length] = document.getElementById(id);
						
						if (first)
						{
							first = false;
						}
						else
						{
							if( id == aktualniID )
							{
								et_toggleElements[et_toggleElements.length - 1].style.display = 'block';
								link.className = 'toggle switchedOn';
							}
							else
							{
								et_toggleElements[et_toggleElements.length - 1].style.display = 'none';
								link.className = 'toggle';
							}
							
						}
						link.onclick = et_toggle;
					}	//if
				}	//for
			}	//function
			
			
			// samotne prepinani zobrazeni
			//
			function et_toggle(e)
			{
				if (typeof e == 'undefined')
				{
					var e = window.event;
				}
				
				//prepinani menu
				for (i = 0; (link = document.links[i]); i++)
				{
					if ( /\btoggle\b/.exec(link.className) )
					{
						if( link.className == 'toggle switchedOn' )
						{
							link.className = 'toggle';
						}
					}
				}
				
				
				//pridame class, aby tlacitko
				//vypadalo zmacknuty
				//a taky promitneme zmenu do URL
				if(this.className == 'toggle')
				{
					//class pro prepinaci tlacitko
					this.className = 'toggle switchedOn';
					
											
					//reflektovat ID v URL
					adresa = this.href.split('?')[0];
					argument = this.href.split('?')[1];
					if( !argument )
					{
						adresa = this.href.split('#')[0];
						id = this.href.split('#')[1];
					}
					else
					{
						id = argument.split('=')[1];
						if( id.split('#')[1] )
						{
							id = id.split('#')[1];
						}
					}
					//doc_loc = adresa+"#"+id;
					
					doc_loc = adresa+"?idSpecMenu="+id+'#specToggleMenu';
					window.location = doc_loc;
					
				}//if className == toggle
				
				
				
				var targ;
				if (typeof e.target != 'undefined') {
					targ = e.target;
				}
				else if (typeof e.srcElement != 'undefined')
				{
					targ = e.srcElement;
				}
				else
				{
					return true;
				}
				
				if (targ.nodeType == 3) {
					targ = targ.parentNode;
				}
				if (targ.nodeName.toLowerCase() != 'a') {
					for (var i = 0; (elem = et_toggleElements[i]); i++) {
						elem.style.display = 'block';
					}
					return true;
				}   
				id = targ.href.split('#')[1];
				var elem;
				for (var i = 0; (elem = et_toggleElements[i]); i++) {
					if (elem.id != id) {
						//turn other clicable thingy invisible
						elem.style.display = 'none';
					}
					else
					{
						//allow toggle single element on/off
						if(elem.style.display == 'block')
						{
							elem.style.display = 'block';
						}
						else
						{
							elem.style.display = 'block';
						}
					}
				}
				return false;
			}
			//END   TOGGLE VISIBILITY
			
	
//--><!]]>
