// JScript source code
function loadthumbs()
{
	loc=document.forms[0].Select1.value
	
	if ( !document.forms[0].Select1.selectedIndex )
	{
		document.getElementById('infoframe').src="Welcome.html"
		resetlist()
	}
	else
	{
		document.getElementById('tnails').src="getlist.php?dirname="+loc
		theval=document.getElementById(loc).innerHTML
		document.getElementById('loaded').innerHTML=theval
	}
	
	picloaded('');
}

function resetlist()
{
	document.forms[0].Select1.selectedIndex=0;
}

function sectionchange()
{
	pardoc = window.parent.document
	pardoc.getElementById('infoframe').src="admin.php?addbook=0&select=" + document.forms[0].listselect.selectedIndex

	pardoc.getElementById('loaded').innerHTML="Admin Screen"
}

function mainsectionchange()
{
	loc=document.forms[0].Select1.value
	
	if ( !document.forms[0].Select1.selectedIndex )
	{
		document.getElementById('infoframe').src="Welcome.html"
		resetlist()
	}
	else
	{
		document.getElementById('booklist').src="booklist.php?listname="+loc+"&admin=0"
		theval=document.getElementById(loc).innerHTML
		document.getElementById('loaded').innerHTML=theval
	}
}

function loadinfo()
{
	loc=document.forms[0].Select1.value
	pardoc = window.parent.document
	
	if ( !document.forms[ 0 ].Select1.selectedIndex )
	{
		pardoc.getElementById('infoframe').src=loc+".html"
	}
	else
	{
		pardoc.getElementById('infoframe').src=loc+".html"
		theval=document.getElementById(loc).innerHTML
		pardoc.getElementById('loaded').innerHTML=theval
	}
}

function loadadmin()
{
	pardoc = window.parent.document
	pardoc.getElementById('infoframe').src="admin.php?select=0"
	pardoc.getElementById('loaded').innerHTML="Admin Screen"
}

function reloadbooklist( listname )
{
	pardoc = window.parent.document;
	pardoc.getElementById('blist').src="booklist.php?listname=" + listname + "&admin=1";
}

function picloaded( pic )
{
	pardoc = window.parent.document
	
	pardoc.getElementById('thepic').innerHTML=pic
}

function showdate()
{
	document.getElementById( 'Date' ).innerHTML="Last Modified: " + document.lastModified
}

function displaytitle()
{
	pardoc = window.parent.document
	pardoc.getElementById('loaded').innerHTML=document.getElementById('atitle').innerHTML
}

function dispsqcover( pic )
{
	window.open(pic, 'ZiggyPopup','status=0,resizable=0,width=520,height=520',true)
}

function disptallcover( pic )
{
	window.open( pic, 'ZiggyPopupT','status=0,resizable=0,width=280,height=390',true)
}

function dispwidecover( pic )
{
	window.open( pic, 'ZiggyPopupW','status=0,resizable=0,width=390,height=280',true)
}

