    var howQuick = 1;
    var running = true;
    var iWhere = 0;
    var fWidth=0;
    var fHeight=0;
    var heightInformatie=50; // in stappen van 5
    var heightHoofd=50;

    function setBtn(div) {
      if(div=='btnImg1') {
        document.getElementById('btnImg2').className = 'itemHidden';
        document.getElementById('btnImg3').className = 'itemHidden';
      }
      if(div=='btnImg2') {
        document.getElementById('btnImg1').className = 'itemHidden';
        document.getElementById('btnImg3').className = 'itemHidden';
      }
      if(div=='btnImg3') {
        document.getElementById('expMenu2').className = 'itemHidden';
        document.getElementById('btnImg1').className = 'itemHidden';
        document.getElementById('btnImg2').className = 'itemHidden';
      }
    }

    function scrollBackGround(div){
      var height;

      if(div=='expMenu1') {
        document.getElementById('expMenu2').className = 'itemHidden';
        height = heightHoofd;
      }
      if(div=='expMenu2') {
        document.getElementById('expMenu1').className = 'itemHidden';
        height = heightInformatie;
      }

      document.getElementById(div).className = 'expandedMenu';
      if(running) {
        iWhere = iWhere + 5;
        if (iWhere >= height) running = false;
        document.getElementById(div).style.height = iWhere + 'px';
        window.setTimeout('scrollBackGround(\''+div+'\')',howQuick);
      } else {
        running = true;
        iWhere = 0;
      }
    }

    function expandMenu(div)
    {
      if(div=='expMenu1') {
        document.getElementById(div).style.height = heightHoofd + 'px';
        document.getElementById(div).className = 'expandedMenu';
      }
      if(div=='expMenu2') {
        document.getElementById(div).style.height = heightInformatie + 'px';
        document.getElementById(div).className = 'expandedMenu';
      }
    }

    function stopButton(el) {
      if (document.getElementById(el).className!='button_img_click') {
        window.setTimeout('mouseOut(\''+el+'\')',500);
      }
    }

    function mouseOut(div){
      document.getElementById(div).className='itemHidden';
    }

    function goFullscreen() {
      top.window.moveTo(0,0);
      if (document.all) {
        top.window.resizeTo(screen.availWidth,screen.availHeight);
      }
      else if (document.layers||document.getElementById) {
        if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
          top.window.outerHeight = screen.availHeight;
          top.window.outerWidth = screen.availWidth;
        }
      }
      (opener=self).close();
      window.open('index.php', '', 'channelmode');
    }

    function goNormal(){
      (opener=self).close();
      window.open('index.php', '', 'channelmode=no, toolbar=yes, status=yes, menubar=yes, location=yes, direcoties=yes, resizable=yes');
    }

    function resizeContent(type) {
      var oldWidth = 540;
      var oldHeight = 440;

      var newWidth = 840;
      var newHeight = 640;

      if (type=='1') {

        var factor;

        if ( (newWidth - oldWidth) > (newHeight - oldHeight) ) {
          factor = (newWidth - oldWidth) / (newHeight - oldHeight);
        } else {
          factor = (newHeight - oldHeight) / (newWidth - oldWidth);
        }

        if(running) {
          if ( (newWidth - oldWidth) < (newHeight - oldHeight) ) {
            fWidth = fWidth + 20;
            fHeight = fHeight + 20 * factor;
          } else {
            fWidth = fWidth + 20 * factor;
            fHeight = fHeight + 20;
          }

          if ((fHeight >= (newHeight-oldHeight)) || (fWidth >= (newWidth-oldWidth))) running = false;

          document.getElementById('div_content').style.width = newWidth + 'px';
          document.getElementById('div_content').style.marginLeft =  -290 - (fWidth) / 2 + 'px';
          document.getElementById('div_content').style.height = newHeight + 'px';
          document.getElementById('div_content').style.marginTop = -180 - (fHeight) / 2 + 'px';
          document.getElementById('div_contentMainTop').style.width = 425 + (fWidth) + 'px';
          document.getElementById('div_contentMain').style.height = 243 + (fHeight) + 'px';
          document.getElementById('div_contentMainCont').style.height = 205 + (fHeight) + 'px';
          document.getElementById('div_contentLogo').style.width = 82 + (fWidth) + 'px';
          document.getElementById('div_contentLogo').style.height = 295 + (fHeight) + 'px';
          document.getElementById('div_contentHeader').style.width = 425 + (fWidth) + 'px';
          document.getElementById('div_contentRightTop').style.left = 525 + (fWidth) + 'px';
          document.getElementById('div_contentMenu').style.height = 206 + (fHeight) + 'px';
          document.getElementById('div_contentMenuBottom').style.top = 318 + (fHeight) + 'px';
          window.setTimeout('resizeContent(\'1\')',howQuick);
        } else {
          running = true;
          fWidth = 0;
          fHeight = 0;
        }
      } else if (type=='0') {
          document.getElementById('div_content').style.width = newWidth + 'px';
          document.getElementById('div_content').style.marginLeft =  -290 - (newWidth - oldWidth) / 2 + 'px';
          document.getElementById('div_content').style.height = newHeight + 'px';
          document.getElementById('div_content').style.marginTop = -180 - (newHeight - oldHeight) / 2 + 'px';
          document.getElementById('div_contentMainTop').style.width = 425 + (newWidth - oldWidth) + 'px';
          document.getElementById('div_contentMain').style.height = 243 + (newHeight - oldHeight) + 'px';
          document.getElementById('div_contentMainCont').style.height = 205 + (newHeight - oldHeight) + 'px';
          document.getElementById('div_contentLogo').style.width = 82 + (newWidth - oldWidth) + 'px';
          document.getElementById('div_contentLogo').style.height = 295 + (newHeight - oldHeight) + 'px';
          document.getElementById('div_contentHeader').style.width = 425 + (newWidth - oldWidth) + 'px';
          document.getElementById('div_contentRightTop').style.left = 525 + (newWidth - oldWidth) + 'px';
          document.getElementById('div_contentMenu').style.height = 206 + (newHeight - oldHeight) + 'px';
          document.getElementById('div_contentMenuBottom').style.top = 318 + (newHeight - oldHeight) + 'px';
      }
    }

    function changeBtn(el) {
      if (document.getElementById(el).className != 'button_img_click') document.getElementById(el).className='button_img';
    }

    function writeFlashObject(source) {
      document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="475" HEIGHT="50" ALIGN="">');
      document.write('<PARAM NAME="movie" VALUE="' + source + '">');
      document.write('<PARAM NAME="quality" VALUE="high">');
      document.write('<PARAM NAME="bgcolor" VALUE="#5C636B">');
      document.write('<PARAM NAME="wmode" value="transparent">');
      document.write('<EMBED src="'+ source +'" quality="high" wmode="transparent" WIDTH="475" HEIGHT="50" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
      document.write('</OBJECT>');
    }


    function startContentWheel(){
      if(event.wheelDelta > 0) {
        document.getElementById('div_contentMainCont').scrollTop -= 100;
      } else {
        document.getElementById('div_contentMainCont').scrollTop += 100;
      }
    }
 
		function startContentScrollDown() {
			
			document.getElementById('div_contentMainCont').scrollTop+=20 /*2*/;
			
			var self = this;
			this.scrollPosition = window.setTimeout('startContentScrollDown()');
		}
		function startContentScrollUp() {
			document.getElementById('div_contentMainCont').scrollTop-=20 /*2*/;
			
			var self = this;
			this.scrollPosition = window.setTimeout('startContentScrollUp()');
		}
		function stopContentScroll() {
			window.clearTimeout(this.scrollPosition);
		}
