function openVideo() {
	//var vidWindow=window.open("videos/CTC-v2.mov", "vidWindow", "menubar=no,width=320,height=256,toolbar=no,status=no");
	var vidWindow= window.open('video.php?videoURL=../videos/TITLE01.flv','popped','width=320,height=240,top='+((screen.height/2)-150)+',left='+((screen.width/2)-200)+',toolbar=no,scrollbars=no,resizable=no,menubar=no,status=no,directories=no,location=no'); void(0);
}

function display() {

  var displayMe = true; 

  document.getElementById('siteList_popup').style.display = "block";

}



function hide() {

  document.getElementById('siteList_popup').style.display = "none";

}



function setLanguage(langcode) {    

  location.href='../ski'+langcode+'/index.php';

}    



  function swap(filePath) {        

    rndimg = new Array(filePath+"1.jpg", filePath+"2.jpg", filePath+"3.jpg", filePath+"4.jpg", filePath+"5.jpg");

    var numimages= rndimg.length; 

    x=(Math.floor(Math.random()*numimages));

    randomimage=(rndimg[x]);        

    if (randomimage != document.getElementById("banner").style.backgroundImage) { 

      document.getElementById("banner").style.backgroundImage="url("+ randomimage +")";

    }

    startList();

  }    



  function startList() {
    if (document.all && document.getElementById) {
      navRoot = document.getElementById("navbar");
      for (i=0; i<navRoot.childNodes.length; i++) 
      {
        node = navRoot.childNodes[i];
        if (node.nodeName=="LI") {
          node.onmouseover=function() {
            this.className+="over";
          }
          node.onmouseout=function() {
            this.className=this.className.replace("over", "");
          }
        }
      }
    }
    updateLeftMenu();
  }
  
  /* This function changes font-weight of selected leftmenu item to bold */
  function updateLeftMenu() {
    var leftmenu = document.getElementById("leftmenu");
    var pagename = document.getElementsByTagName('body')[0].className;
    if (leftmenu) {
      var leftmenu_items = leftmenu.getElementsByTagName('li');
      for (i=0;i<leftmenu_items.length;i++) {
        var listID = leftmenu_items[i].getAttribute('id');
        if (pagename.indexOf(listID) != -1) {
          leftmenu_items[i].getElementsByTagName('a')[0].style.fontWeight = "bold";
        } 
      }   
    }    
  }
  