﻿// JScript File
function buttonON(ovl)
{
    if (ovl.className)
    {
        
       if (new String(ovl.className).substr(new String(ovl.className).length-3)!="_ON")
            ovl.className+="_ON";
    }
}

function buttonOFF(ovl)
{
    if (ovl.className)
    {
          if (new String(ovl.className).substr(new String(ovl.className).length-3)=="_ON")
            ovl.className=new String(ovl.className).substr(0,new String(ovl.className).length-3);
    }
}

function nav_active(ovl)
{
   if (ovl.className)
    {
        
       if (new String(ovl.className).substr(new String(ovl.className).length-4)!="_akt")
            ovl.className+="_akt";
    }
}

function nav_disactive(ovl)
{
    if (ovl.className)
    {
          if (new String(ovl.className).substr(new String(ovl.className).length-4)=="_akt")
            ovl.className=new String(ovl.className).substr(0,new String(ovl.className).length-4);
    }
}

function getViewportHeight() {
	if (window.innerHeight!=window.undefined) return window.innerHeight;
	if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
	if (document.body) return document.body.clientHeight; 
	return window.undefined; 
   }   

	function vratCislo(str)
	{
		var num
		var i;
		var out;
		num = new String("0123456789");
		out="";
		for (i=0;i<str.length;i++)
		{
		if (num.indexOf(new String(str).charAt(i))>-1)
			{
			out=out+str.charAt(i);
			}
		}
		return out
	}

