//<![CDATA[
	function getXmlHttpObject()
		{
		var xmlhttp=false;
		/*@cc_on @*/
		/*@if (@_jscript_version >= 5)
		// JScript gives us Conditional compilation, we can cope with old IE versions.
		// and security blocked creation of the objects.
		 try {
		  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) {
		  try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		  } catch (E) {
		   xmlhttp = false;
		  }
		 }
		@end @*/
		if (!xmlhttp && typeof XMLHttpRequest!='undefined')
			{
			xmlhttp = new XMLHttpRequest();
			}
		return xmlhttp;
		}
	

	var oldGroup = 0;
	function openGroup(id)
		{
		fotohttp = getXmlHttpObject();
		fotohttp.open("GET", "fotos_function.php?mode=opengroup&foto_group="+id,true);//method, target, async (set always true!)
	
		fotohttp.onreadystatechange=function() {
			if (fotohttp.readyState==4) {
				document.getElementById('foto_dir_'+id).innerHTML = fotohttp.responseText;
				if (oldGroup>0)
					{
					document.getElementById('foto_dir_'+oldGroup).style.display = 'none';
					document.getElementById('foto_group_'+oldGroup).style.borderWidth = '1px';
					document.getElementById('img_foto_group_'+oldGroup).style.display = 'block';
					}
				document.getElementById('img_foto_group_'+id).style.display = 'none';
				document.getElementById('foto_dir_'+id).style.display = 'block';
				document.getElementById('foto_group_'+id).style.borderWidth = '2px';
				oldGroup = id;
				//alert(document.getElementById('randomimg').src);
			}
		}
		fotohttp.send(null);
		}

	function openDir (id)
		{
		fotohttp = getXmlHttpObject();
		fotohttp.open("GET", "fotos_function.php?mode=opendir&foto_dir="+id,true);//method, target, async (set always true!)
	
		fotohttp.onreadystatechange=function() {
			if (fotohttp.readyState==4) {
				document.getElementById('fotocol').innerHTML = fotohttp.responseText;
				document.getElementById('fotocol').style.display = 'block';
			}
		}
		fotohttp.send(null);
		}
	
	function closeDir ()
		{
		document.getElementById('fotocol').style.display = 'none';
		}

	function closeFoto ()
		{
		document.getElementById('fotoscroll').style.display = 'none';
		}

	function fotoscroll (id)
		{
		fotohttp = getXmlHttpObject();
		fotohttp.open("GET", "fotos_function.php?mode=fotoscroll&foto="+id,true);//method, target, async (set always true!)
	
		fotohttp.onreadystatechange=function() {
			if (fotohttp.readyState==4) {
				if (document.body.scrollTop > 150)
					document.getElementById('fotoscroll').style.top = document.body.scrollTop;
				document.getElementById('fotoscroll').innerHTML = fotohttp.responseText;
				document.getElementById('fotoscroll').style.display = 'block';
			}
		}
		fotohttp.send(null);
		}
// ]]>