<!--odkaz START-->

	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}

<!--odkaz END-->


<!--ovladanie okna kosika START-->

    function openkosik()
    {
kos = document.getElementById("window_kosik");
$("#window_kosik").slideDown(250);
kos.style.display = "block";
	}
    
    function closekosik()
    {
kos = document.getElementById("window_kosik");
$("#window_kosik").slideUp(250);
kos.style.display = "none";
	}
	
<!--ovladanie okna kosika END-->


<!--zobrazenie oznamu o akcii START-->

function hide_hlaska(){
 $("#oznam").slideUp(500);
 }
 
 window.setInterval("hide_hlaska()", 6000);
 
<!--zobrazenie oznamu o akcii END-->


<!--otvorenie vlastnosti v kosiku START-->

function SetCookie(nazev, hodnota, doba){
	var datum= new Date(); // získá aktuální datum v milisekundách
	datum.setTime(datum.getTime() + 1000 * 60 * 60 * 24 * doba); // k datu přidá počet dnů
	
	// samotný zápis cookie, lze pak číst klasicky v PHP
	document.cookie = nazev +"="+ hodnota +";path=/;expires=" + datum.toGMTString();
}
	
function penfac(ind, allind)
{
	var s = document.getElementById("fac" + ind);

	if (s.style.display == "none")
	{
		for (inda = 1; inda <= allind; inda++)
		{
			$("#fac" + inda).slideUp("slow");
			SetCookie("fac"+inda, "none", 1); // nastavím cookie na 1rok
		}
		
		$("#fac" + ind).slideDown("slow");
		SetCookie("fac"+ind, "block", 1); // nastavím cookie na 1rok
	}
	else
	{
		$("#fac" + ind).slideUp("slow");
		SetCookie("fac"+ind, "none", 1); // nastavím cookie na 1rok
	}
}

<!--otvorenie vlastnosti v kosiku END-->


<!--kontrola vyplnenia formulara START-->

	function checkrequired(which, mess1, mess2)
	{
		var pass=true
		if (document.images){
		for (i=0;i<which.length;i++)
		{
			var tempobj=which.elements[i]
			if (document.getElementById("same_check").checked == true)
			{
				if (tempobj.name.substring(0,3)=="vd_")
				{
					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1))
					{
						pass=false
						break
					}
				}
			}
			else
			{
				if (tempobj.name.substring(0,3)=="vd_" || tempobj.name.substring(0,3)=="vf_")
				{
					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1))
					{
						pass=false
						break
					}
				}
			}
		}
	}
	
	if (!pass){
		alert(mess1)
		return false
	}
	else
		if (confirm(mess2)) {
				return true;
			}
		else {
			return false;
		}
	}
	
<!--kontrola vyplnenia formulara END-->



<!--resizable poznamka v objednavkovom formulari START-->

  $(function init()
    {
        // copyright Drupal, GNU General Public License
        $('textarea.resizable:not(.textarea-processed)').each(function() {
            var textarea = $(this).addClass('textarea-processed'), staticOffset = null;

            // When wrapping the text area, work around an IE margin bug.  See:
            // http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout
            $(this).wrap('<div class="resizable-textarea"><span></span></div>')
                .parent().append($('<div class="grippie"></div>').mousedown(startDrag));

            var grippie = $('div.grippie', $(this).parent())[0];
            grippie.style.marginRight = (grippie.offsetWidth - $(this)[0].offsetWidth) +'px';

            function startDrag(e) {
                staticOffset = textarea.height() - e.pageY;
                textarea.css('opacity', 0.70);
                $(document).mousemove(performDrag).mouseup(endDrag);
                return false;
            }

            function performDrag(e) {
                textarea.height(Math.max(70, staticOffset + e.pageY) + 'px');
                return false;
            }

            function endDrag(e) {
                $(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
                textarea.css('opacity', 1);
            }
        });
    });
	
<!--resizable poznamka v objednavkovom formulari END-->



<!--overenie kliku tlacitka START-->

	function varovanie(msg) {
			if (confirm(msg)) {
					return true;
				}
			else {
				return false;
			}
	}
	
<!--overenie kliku tlacitka END-->

