function open_videos() {
	var div_id = document.getElementById('content');
  	div_id.innerHTML = "<iframe frameborder= 0 src=\"./videos/videos.html\" width=\"100%\" height=\"100%\"></iframe>";	
  	// div_id.innerHTML = "<object src=\"./videos/videos.html\" width=\"100%\" height=\"100%\"></object>";	
}

function open_clip(videostr) {
	// var div_id = parent.document.getElementById('content');
  	// div_id.innerHTML = "<iframe frameborder= 0 src=\"" + videostr + "\" width=\"100%\" height=\"100%\"></iframe>";	

	// alert("1");
  	
  	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
  	} else { // code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
  	
  	
	xmlhttp.onreadystatechange=function() {
  		if (xmlhttp.readyState==4 && xmlhttp.status==200) {
    		document.getElementById("content").innerHTML=xmlhttp.responseText;
    		// document.getElementById("content").innerHTML='test';
    	}
  	}	
  	// In the example above, you may get a cached result. To avoid this, add a unique ID to the URL:
  	xmlhttp.open("GET", videostr + "?t=" + Math.random(),true);
	xmlhttp.send();
	
}

function make_fancy() {
			// alert("Ready");

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'	
			});

			$("a#example4").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});

			$("a#example5").fancybox();

			$("a#example6").fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

			$("a#example7").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example8").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
};

function open_html(htmlstr) {
	// var div_id = document.getElementById('content');
  	// div_id.innerHTML = "<iframe frameborder= 0 src=\"" + htmlstr + "\" width=\"100%\" height=\"100%\"></iframe>";	
  	// div_id.innerHTML = "<object data=\"" + htmlstr + "\" height=\"1000\"></object>"; 
  	
	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
		  xmlhttp=new XMLHttpRequest();
  	} else { // code for IE6, IE5
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	}
  	
  	
	xmlhttp.onreadystatechange=function() {
  		if (xmlhttp.readyState==4 && xmlhttp.status==200) {
    		document.getElementById("content").innerHTML=xmlhttp.responseText;
    		make_fancy();    		
    	}
  	}	
  	// xmlhttp.open("GET","retrospektive.html",true);
  	// In the example above, you may get a cached result. To avoid this, add a unique ID to the URL:
  	xmlhttp.open("GET",htmlstr + "?t=" + Math.random(),true);
	xmlhttp.send();
  	
}
