function showAndHide(theId){ 
	var el = document.getElementById(theId) 
	if (el.style.display=="none") { 
		el.style.display="block"; //show element 
	} 
	else { 
		el.style.display="none"; //hide element 
	} 
} 

function gotoPage(strURL){
	var ajaxRequest;  // The variable that makes Ajax possible!	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			document.getElementById("contentArea").innerHTML = ajaxRequest.responseText;
			initLightbox();
			myLightbox.updateImageList();
		}
	}
	ajaxRequest.open("GET", strURL, true);
	ajaxRequest.send(null);
}

function gotoWindowPage(strURL){
	var ajaxRequest;  // The variable that makes Ajax possible!	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//document.myForm.time.value = ajaxRequest.responseText;
			window.opener.document.getElementById("contentArea").innerHTML = ajaxRequest.responseText;
			initLightbox();
			myLightbox.updateImageList();
		}
	}
	ajaxRequest.open("GET", strURL, true);
	ajaxRequest.send(null);
}

function popUp(strURL){
	newwindow=window.open(strURL,'name',"menubar=no,width=600,height=400,toolbar=no,resizable=no");
	if (window.focus) {newwindow.focus()}
}
function popUpPlayer(){
	newwindow=window.open('pop_player.php','name',"menubar=no,width=412,height=180,toolbar=no,resizable=no");
	if (window.focus) {newwindow.focus()}
}
function privacy(){
	newwindow=window.open('http://www.umusic.co.uk/privacy.html','name',"menubar=no,width=560,height=608,toolbar=no,resizable=no,scrollbars=yes");
	if (window.focus) {newwindow.focus()}
}

function popUploader(loc,directory){
/*
loc = relative path of script from file calling the uploader
dir = upload path, relative to script location
*/
	newwindow=window.open(loc+"scripts/uploader/index.php?dir="+directory,'Uploader',"menubar=no,width=350,height=110,toolbar=no,resizable=no");
	if (window.focus) {newwindow.focus()}
}
function toggleEnabled(el){
	if(document.getElementById(el).value != ""){
		document.getElementById(el).disabled = false;
	}
}