function coolMenu(elemID,newClass){
     var elem = document.getElementById(elemID);
     elem.className = newClass;
    }           	              		          


function setHome()
{
   document.body.style.behavior='url(#default#homepage)';
  document.body.setHomePage("http://www.pdbasket.com");
}


function FcasX() {
  var hours, minutes, seconds;
  var intHours, intMinutes, intSeconds;
  var today;
  today = new Date();
  intHours = today.getHours();
  intMinutes = today.getMinutes();
  intSeconds = today.getSeconds();
  if (intHours == 0) {
     hours = "12:";
  } else if (intHours < 12) { 
     hours = intHours+":";
  } else if (intHours == 12) {
     hours = "12:";
  } else {
     intHours = intHours - 12
     hours = 12+intHours + ":";
  }
  if (intMinutes < 10) {
     minutes = "0"+intMinutes+":";
  } else {
     minutes = intMinutes+":";
  }
  if (intSeconds < 10) {
     seconds = "0"+intSeconds+" ";
  } else {
     seconds = intSeconds+" ";
  } 
  timeString = hours+minutes+seconds;
  window.setTimeout("Fcas();", 100);
 
 
// var para2=document.getElementById("cas");
//	para2.firstChild.nodeValue = timeString;
  
}



//function nahodneFoto(){		
//		cislo = Math.round(Math.random()*5);
//		var videoB = document.getElementById("videoB");
//		var fotorandom = document.getElementById("foto");
//		fotorandom.src = "Img/MainPictures/player_" + cislo + ".jpg";
//	
//}





// rozbalovanie ------------------------------------------------------------------------------------------------

function minimalize(elem)
{
 if(elem.style.display == "block"){
        elem.style.display = "none";
    }
    else{
        elem.style.display = "block";
    }
}

window.onload =  function(){
	
	//Fcas();
	
}

var pocetFotiek = 12;




// fotogaleria - nova------------------------------------------------------------------------------------------------



function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}

//schovavacie menu fotogaleria
function initMenu() 
    {
      var lkbMenuX = document.getElementById("lkbMenu");
      image = document.getElementById("wrapperText");
      imageBig = document.getElementById('fotogaleriaAll');
      if (lkbMenuX.lastChild.nodeValue == "OSTATNÉ GALÉRIE")
           {
                   lkbMenuX.lastChild.nodeValue = "SCHOVAJ MENU";
                   setOpacityMenu(image, 0);
                   image.style.display = "block";
                   image.style.height = imageBig.scrollHeight + "px";
                   fadeInMenu("wrapperText", 0);
           } 
         else 
         {
         	lkbMenuX.lastChild.nodeValue = "OSTATNÉ GALÉRIE";
         image.style.display =  "none";
         
         }
    }

    function setOpacityMenu(obj, opacity)
     {
      opacity = (opacity == 70)?69.999:opacity;
      
      // IE/Win
      obj.style.filter = "alpha(opacity:"+opacity+")";
      
      // Safari<1.2, Konqueror
      obj.style.KHTMLOpacity = opacity/100;
      
      // Older Mozilla and Firefox
      obj.style.MozOpacity = opacity/100;
      
      // Safari 1.2, newer Firefox and Mozilla, CSS3
      obj.style.opacity = opacity/100;
    }

    function fadeInMenu(objId,opacity) 
      {
        if (document.getElementById) {
        obj = document.getElementById(objId);
        if (opacity <= 70) {
          setOpacityMenu(obj, opacity);
          opacity += 10;
          window.setTimeout("fadeInMenu('"+objId+"',"+opacity+")", 100);
        }
      }
     }

function schovajMenu()
      {
       wrapperText = document.getElementById('wrapperText');
       wrapperText.style.visibility = 'hidden';
       }


// fotogaleria - stara------------------------------------------------------------------------------------------------

//function gallery(fotoNum)
//    {
//     var bigImage;
//     var oldLinka = fotoNum.src;
//     var newLinka;
//     var newSmerovanie;
//     newLinka = oldLinka.replace("/small", "");
//     document.images.bigImage.src = newLinka;
//    }
//    
// 

//j=0; 

//function nextPicture(maxim,linka) {
// j++;

//if ( j <= (maxim-7)) changePicture(linka); 

//}

//function prewPicture(linka) {
// j--;
// if (j<0) j=0;
// changePicture(linka);
// 
//}



//function changePicture(linka)
//{
//    var mainDiv = document.getElementById("mainDiv");
//    var images = mainDiv.getElementsByTagName("img");
//    var start = parseInt(images[0].getAttribute("src").substring(images[0].getAttribute("src").search("image")+5, images[0].getAttribute("src").search("image")+7));
//    for (var i = 0; i < 6; i++)
//    {
//        images[i].setAttribute("src", "Fotogaleria/" + linka + "/image" + (i+j+1) + ".jpg");
//    }
//}

