/*
 *	Root-Space.eu JavaScript Library v1.0.0
 *
 */

function More()
{
	document.getElementById("morelink").style.display = "none"; 
	document.getElementById("morebox").style.display = ""; 
}

function Upload()
{
	button = document.getElementById("button");
	button.style.fontWeight = "normal";
	button.value = " Uploading... ";
	button.disabled = true;
}

function highlight(field)
{
    field.focus();
    field.select();
}

//Confim before delete
function delCheck(txt,url)
{
  txt = txt.replace(/\+/g,' ');
  txt = txt.replace(/oe/g,'ö');
  
  check = confirm(txt+'?');
  
  if(check == true)
    this.location.href = url;
}


function clip(id)
{
	if (document.getElementById("span_" + id).style.display == 'none')
	{
		document.getElementById("img_" + id).src = "minuszeichen.gif";
		document.getElementById("span_" + id).style.display = "block"; 
	}
	else
	{
		document.getElementById("img_" + id).src = "pluszeichen.gif";
		document.getElementById("span_" + id).style.display = "none"; 
	} 
}

function AjaxRequest(url)
{
	var request = new XMLHttpRequest();
	request.open('get', "http://root-space.eu/"+url, true);
	request.send(null);
}

function loadRndImages()
{
	button = document.getElementById("loadnew");
	button.style.fontWeight = "normal";
	button.disabled = true;
	// document.loadnew.disabled = true;

	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("rndimages").innerHTML=xmlhttp.responseText;
			button.disabled = false;
		}
	}
	xmlhttp.open("GET","rnd_images.php",true);
	xmlhttp.send();
	
}
