// JavaScript Document


function text(txt) {
   window.status = txt;
}

function updateRecord(recordId,formname)
{
	
		window.location.href = formname+"?updateRecord&record=" + recordId;
	
}
function deleteRecord(recordId,formname)
{
	if (confirm('Delete this Record?')) 
	{
		window.location.href = formname+"?deleteRecord&record=" + recordId;
	}
	
	
}		
function toggleVisibility() { 
	
 if( document.getElementById("display1").style.visibility == "hidden" ) 
 	{
    	document.getElementById("display1").style.visibility = "visible";
		document.getElementById("display2").style.visibility = "hidden"; 
		document.getElementById("display3").style.visibility = "hidden"; 
		document.getElementById("display4").style.visibility = "hidden"; 
	 
		document.getElementById("display6").style.visibility = "hidden"; 
		document.getElementById("display7").style.visibility = "hidden"; 
	
		document.getElementById("display9").style.visibility = "hidden"; 
		document.getElementById("display10").style.visibility = "hidden"; 
		document.getElementById("display11").style.visibility = "hidden"; 
	
  	} 
  else 
  { 
    	document.getElementById("display1").style.visibility = "hidden";
		document.getElementById("display2").style.visibility = "visible"; 
		document.getElementById("display3").style.visibility = "visible"; 
		document.getElementById("display4").style.visibility = "visible"; 
	
		document.getElementById("display6").style.visibility = "visible"; 
		document.getElementById("display7").style.visibility = "visible"; 
	
		document.getElementById("display9").style.visibility = "visible"; 
		document.getElementById("display10").style.visibility = "visible"; 
		document.getElementById("display11").style.visibility = "visible"; 
  }
} 
	
function toggleDisplay() 
{ 
	if( document.getElementById("display1").style.display == "none" ) 
	{
		document.getElementById("display2").style.display = "none"; 
    	document.getElementById("display1").style.display = "block";
	
  	} 
	else 
	{ 
    	document.getElementById("display1").style.display = "none"; 
		document.getElementById("display2").style.display = "none"; 
	}
}
function deleteAlbum(albumId)
{
	if (confirm('Delete this album?')) {
		window.location.href = 'list.php?deleteAlbum&album=' + albumId;
	}
}

function viewImage(albumId) {
	if (albumId != '') {
		window.location.href = 'list-image.php?album=' + albumId;
	} else {
		window.location.href = 'list-image.php';
	}
}
function viewslide(albumId) {
	if (albumId != '') {
		window.location.href = 'image_slide.php?album=' + albumId;
	} else {
		window.location.href = 'image_slide.php';
	}
}
function deleteImage(albumId, imgId) 
{
	if (confirm('Delete this image?')) {
		window.location.href = 'list-image.php?delete&album=' + albumId + '&imgId=' + imgId;
	}
}
function deleteVideo(vidId) 
{
	if (confirm('Delete this video?')) {
		window.location.href = 'list-video.php?delete&vidId=' + vidId ;
	}
}
function deleteMusic(mId) 
{
	if (confirm('Delete this Music?')) {
		window.location.href = 'list-music.php?delete&mId=' + mId ;
	}
}
function viewLargeImage(imageName)
{
	imgWindow = window.open('', 'largeImage', "width=" + screen.availWidth + ",height="  + screen.availHeight + ",top=0,left=0,screenY=0,screenX=0,status=yes,scrollbars=yes,resizable=yes,menubar=no");
	imgWindow.focus();
	imgWindow.location.href = '../image_gallery/viewImage.php?type=glimage&name=' + imageName;
}

