<!--
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Jeff Manning ::  */
function encode_utf8( s )
{
  return unescape( encodeURIComponent( s ) );
}

function decode_utf8( s )
{
  return decodeURIComponent( escape( s ) );
}
function cut(string1)
{
  var string2=new String(17);
  var i,j;
  len=string1.length;
  
  string2=string1.substr(len-17, 17);
  
  return string2;
}
function showm(ob,pict,len,pick) {
  strOne = cut(document.getElementById(pict).src);
  strTwo = "images/arrowd.gif";
  pick_name="pick_"+pict;
 /*/alert(document.getElementById(ob).style.height);*/
  if (pick==0)
      {
        if (document.getElementById(pick_name).value==0)
        if(strOne==strTwo) {
        /* len broi vruzki*/
        /*  for (wid=(len+1)*200;wid!=0;wid--)
          {
             document.getElementById(ob).style.height = wid+"px";
             for(i=0;i<1000;i++);
          }*/
          document.getElementById(ob).style.display = 'none'
          document.getElementById(pict).style.marginTop = '2px'
          document.getElementById(pict).src = "images/arrowl.gif"
        }
        else {
          /* len broi vruzki*/
         
          document.getElementById(ob).style.display = ''
          /* for (wid=0;wid!=(len+1)*200;wid++)
          {
             document.getElementById(ob).style.height = wid+"px";
             for(i=0;i<1000;i++);
          }*/
          document.getElementById(pict).style.marginTop = '5px'
          document.getElementById(pict).src = "images/arrowd.gif"
        }
      }
 else
     {
        if(strOne!=strTwo || document.getElementById(pick_name).value==1) {
    /*      document.getElementById(ob).style.display = 'none'
          document.getElementById(pict).style.marginTop = '2px'
          document.getElementById(pict).src = "images/arrowl.gif"*/
          document.getElementById(pick_name).value=0
        }
        else {
  /*        document.getElementById(ob).style.display = ''
          document.getElementById(pict).style.marginTop = '5px'
          document.getElementById(pict).src = "images/arrowd.gif"*/
          document.getElementById(pick_name).value=1

     }
}
}
function regroupDate(obj)
{

//  alert(obj);
}

function calculate()
{
   document.getElementById("beginTravel").value=document.getElementById("hour").selectedIndex*60+document.getElementById("minutes").selectedIndex;
}
function calculateEpsilon(obj)
{
   document.getElementById("epsilonMin").value=obj.value*60;
}

function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function clearRadioGroupe()
{
    //alert(obj)
    if (searchForm.connections[1].checked)
        {
            document.getElementById("Stay").style.display=""
        }
    else
        {
            document.getElementById("Stay").style.display="none"
        }
}

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

/* validirane na dannite */
//-->


