// get our flash movie object
      var flashMovie;
      function init() {
         if (document.getElementById) {
            flashMovie = document.getElementById("mpl");
         }
      }

      // wait for the page to fully load before initializing
      window.onload = init;
   
      // for updating the color box
      function PlayVideo(FileName) {
       
            flashMovie.PlayVideo(FileName);
        
      }
	  
	  function PlayAudio(FileName, caption) {
			flashMovie.PlayAudio(FileName, caption, image);
        
      }
	  
	  function PlayContent(FileName, caption) {
		
			flashMovie.PlayContent(FileName, caption);
        
      }
	  
	  function GoWebCam() {
       
            flashMovie.GoWebCam();
			       
      }
	  
	  function GoPlayer() {
       
            flashMovie.GoPlayer();
        
      }
	  
//set the iframe height content by element defined in function param
function setIframeHeight (TheElement, TheframeId) {
var the_height = document.getElementById(TheElement).offsetHeight;

if (typeof document.body.style.maxHeight != "undefined") {
  // IE 7, mozilla, safari, opera 9
  BrowserOffset = 12;
} else {
  // IE6, older browsers
  BrowserOffset = 0;
}

		  
document.getElementById(TheframeId).height = the_height  + BrowserOffset  - 120;
}
function opslim(gallery, url, caption) {
      Slimbox.open('extra/live2008/gallery/' + gallery + '/big/' + url, caption);
}

/* Ajax refresher per div sms */
window.addEvent('domready', function() {
	var timer = 30; 
// periodical and dummy variables for later use
var periodical, dummy; 
	$('log').addClass('ajax-loading');
	var refresh = (function() {
	// we add out fancy spinner
	$('log').addClass('ajax-loading');
	// requests of our php plus dummy as query
	req.send();
}); 
 
if (!window.demo_path) window.demo_path = '';
var demo_path = window.demo_path;
// --
		
	//We can use one Request object many times.

	var req = new Request.HTML({url:demo_path + SMSURL + $time() + $random(0, 100), 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('smstab').set('text', '');
			//Inject the new DOM elements into the results div.
			$('log').removeClass('ajax-loading'); 
			$('smstab').adopt(html);
			scr.update(); 
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('smstab').set('text', 'The request failed.');
		}
	});
	
	$clear(periodical);
	//periodical = refresh.periodical(timer * 1000, req.send());

//make first request
req.send();
});


