function ExpandFeature(WhatToExpand){
	switch(WhatToExpand){
		case 'edit'	:	var msg = "When a folder, subcategory, or link is edited that element is displayed in green. All information for this element will be saved once changes are commited." ;
							break ;
		case 'new'	:	var msg = "Items that have been added this session but not yet saved appear in italics. Commiting changes will save these elements to the library. NOTE: These elements will be lost if the changes are cleared." ;
							break ;
		case 'del'	:	var msg = "These items have been marked for deletion. They will be removed from the library once changes are commited. To undo this, clear all changes which will restore the library to its initial state." ;
							break ;
		default		:	var msg = "This feature is coming soon." ;
	}
	
	alert(msg) ;
}

function ShowSSHelp(){
	var url = "help/about_jpgs.php" ;
	window.open(url,"SSHelp","menubar=no,width=470,height=400,toolbar=no,scrollbars=yes");
	
}

function ShowImgUploadForm(){
	document.getElementById( "thmb_img_formthmbimage" ).className = "" ;
	document.getElementById( "showformlink" ).className = "noshow" ;	
}

function SwitchTab(whichTab){
	document.getElementById( 'tabs' ).className = whichTab ;
	SwapToEditWarning() ;
	allLi = document.getElementById( 'change_logs' ).getElementsByTagName('li') ;
	for(x=0;x<allLi.length;x++){
		allLi[x].className = "" ;
	}
}

function ExpandLog(element){
	allLi = document.getElementById( 'change_logs' ).getElementsByTagName('li') ;
	for(x=0;x<allLi.length;x++){
		allLi[x].className = "" ;
	}
	element.parentNode.className = 'expanded' ;
}

function SwapToEditForm(){
	theP = document.getElementById( 'tab_add' ).getElementsByTagName('p') ;
	for(x=0;x<theP.length;x++){
		theP[x].className = 'noshow' ;
	}
	
	theUL = document.getElementById( 'tab_add' ).getElementsByTagName('ul') ;
	for(x=0;x<theUL.length;x++){
		theUL[x].className = 'noshow' ;
	}
	
	theForm = document.getElementById( 'tab_add' ).getElementsByTagName('form') ;
	theForm[0].className = '' ;
}

function SwapToEditWarning(){
	theP = document.getElementById( 'tab_add' ).getElementsByTagName('p') ;
	for(x=0;x<theP.length;x++){
		theP[x].className = '' ;
	}
	
	theUL = document.getElementById( 'tab_add' ).getElementsByTagName('ul') ;
	for(x=0;x<theUL.length;x++){
		theUL[x].className = '' ;
	}
	theForm = document.getElementById( 'tab_add' ).getElementsByTagName('form') ;
	for(x=0;x<theForm.length;x++){
		theForm[x].className = 'noshow' ;
	}
}

function AddSlideout(){
	document.getElementById( 'slideout_inputs' ).className = '' ;
	document.getElementById( 'thmb_img_form' ).className = '' ;
	document.getElementById( 'thumbnail_image' ).src = "" ;
	document.getElementById( 'slideout_thumbnail' ).className = "nothumb" ;
}

function RemoveSlideout(){
	document.getElementById( 'slideout_inputs' ).className = 'noshow' ;
	document.forms[0].slideout_title.value = '' ;
	document.forms[0].description.value = '' ;
	document.getElementById( 'thmb_img_form' ).className = 'noshow' ;
}
