
var time=1;
var ct = new Array(2);
var cas = 600; //kolko milisekund bude drzat menu
var openedSmenu=''; //ktore submenu bolo otvorene pred zmenami
function ShowID(paCo){
  var oCo = document.getElementById(paCo);
  clearTimeout(ct[paCo]);
  if (oCo.style.display == "none"){
    oCo.style.display = "block";
  }
  time=1;
  return false;
}

function HideID(paCo,paForce){
  var oCo = document.getElementById(paCo);
  if(paForce){
    oCo.style.display = "none";
  }else{
    if(time==1){
      ct[paCo]=window.setTimeout("HideID('"+paCo+"')", cas);
      time=0;
    } else {
      time=1;
      oCo.style.display = "none";
      //open old menu
      if(openedSmenu != ''){
      	var oldCo = document.getElementById(openedSmenu);
      	oldCo.style.display = "block";
      }
    }
  }
  return false;
}


function makeMenoMail(paFrom,paTo){
  window.document.getElementById(paTo).innerHTML = window.document.getElementById(paFrom).value;
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
function alertCookie(pName){
  alert(getCookie(pName));
  //alert(document.cookie);
}

///////////// jquery
var showLat = 200;
var hideLat = 200;
function indexShowHideBox(boxId, elmId) {
	if($('#' + boxId + ' li #' + elmId).css("display") == "none") {
		$('#' + boxId + ' li div').slideUp(hideLat);
		$('#' + boxId + ' li #' + elmId).slideDown(showLat);
	} else {
		$('#' + boxId + ' li #' + elmId).slideUp(hideLat);
	}
}

function showHideImageScheme(schemeCss, showHide) {
  if(showHide) {
    $('#imageScheme').addClass(schemeCss);
    $('#imageScheme').animate({"opacity": "show"}, 300, "", function(){
    if(!$('#imageScheme').hasClass(schemeCss)) {
      $('#imageScheme').hide();
    }
    });
  } else {    
    //$('#imageScheme').animate({"opacity": "hide"}, 10, "", function(){});
    $('#imageScheme').hide();
    $('#imageScheme').removeClass(schemeCss);
  }
}

//function 

function indexShowHideBoxGreen(elmId) {
	indexShowHideBox('box-green', elmId);
}
$(document).ready(function(){
	$('#box-green li div').hide();

  $('.index-imgshow').hover(function(){
    //alert($('.index-imgshow span').height());
    
    $(this).addClass('imgshow');
  },function(){
    $(this).removeClass('imgshow');
  });  
});



/*elements definition*/
var elmBr = '<br />';
var elmP = '<p>';
var elmEndP = '</p>';
var elmStrong = '<strong>';
var elmEndStrong = '</strong>';

