function showComment(id){
	if(document.getElementById("show_comment-"+id).style.display=="block"){
		document.getElementById("show_comment-"+id).style.display="none";
		document.getElementById("add_comment-"+id).style.display="none";
	}
	else{
		document.getElementById("add_comment-"+id).style.display="none";
		document.getElementById("show_comment-"+id).style.display="block";
	}
}
function addComment(id){
	if(document.getElementById("add_comment-"+id).style.display=="block"){
		document.getElementById("add_comment-"+id).style.display="none";
		document.getElementById("show_comment-"+id).style.display="none";
	}
	else{
		document.getElementById("show_comment-"+id).style.display="none";
		document.getElementById("add_comment-"+id).style.display="block";
	}
}
function showWindow(name)
	{
				w = 1000;
				h = 750;

//				window.close();

				LeftPosition = (screen.width)  ? ((screen.width  - w) / 2) : 100;
				TopPosition  = (screen.height) ? ((screen.height - h) / 2) : 100;

				settings = 'width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
				initWindow = window.open('', name, settings);

				initWindow.location = '../gallery/gallery.php?directory='+name;
				initWindow.focus();
	}
function showHtmlWindow(url,name,w,h)
	{
				//w = 1000;
				//h = 750;

//				window.close();

				LeftPosition = (screen.width)  ? ((screen.width  - w) / 2) : 100;
				TopPosition  = (screen.height) ? ((screen.height - h) / 2) : 100;

				settings = 'width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
				initWindow = window.open('','htmlGallery',settings);

				initWindow.location = 'showHtmlGallery.php?url='+url+'&file='+name;
				initWindow.focus();
	}