// JavaScript Document

function footerChange(content) {

	//clear all bold styles
	for(i=1;i<4;i++) { $('footer'+i).style.fontWeight = ''; $('footer'+i).style.color = ''  }

	if(content == 1) {
		Element.update('footerContent','<iframe id="aboutIframe" src="/utilities/about.php" marginheight=0 marginwidth=0 border=0 width="600" height="120" frameborder="0" scrolling="no" name="contactFrame"></iframe>');
	}
	if(content == 2) {
		Element.update('footerContent','<iframe id="contactIframe" src="/utilities/contact.php" marginheight=0 marginwidth=0 border=0 width="600" height="120" frameborder="0" scrolling="no" name="contactFrame"></iframe>');
	}
	if(content == 3) {
		Element.update('footerContent','<iframe id="advertIframe" src="/utilities/advertise.php" marginheight=0 marginwidth=0 border=0 width="600" height="120" frameborder="0" scrolling="no" name="advertFrame"></iframe>');
	}	
	$('footer'+content).style.fontWeight = 'bold';		
	$('footer'+content).style.color = '#000000';
}


function init() {
	totalHeight = Element.getHeight ('mainContent');
	if(totalHeight < 1200) { totalHeight = 1200 } else { totalHeight = Element.getHeight ('mainContent') }
	$('sideNav').style.height = totalHeight + 'px';	
	logoHeight = totalHeight - 190;
	$('lucasLogo').style.top = logoHeight+'px';
	Element.show('lucasLogo');
	$('footer1').style.fontWeight = 'bold';		
	$('footer1').style.color = '#000000';
	//set nav
	if(currentPage != '') { $(currentPage).className = 'navLinkHere' }
	//set footer
	footerChange(1);
}


function showRss() {
	Element.toggle('chRss');
	$('rssTab').src='/img/subscribe_tab_open.gif';
}

function showArtText() {
	Element.show('featuredArtDesc');
	new Effect.Fade('featuredArtDesc',{to: 0.7})
	Element.show('featuredArtTxt');
}

function hideArtText() {
	Element.hide('featuredArtDesc');
	Element.hide('featuredArtTxt')
}

function monthOn(thumb) {
	Element.show(thumb);
}

function monthOff(thumb) {
	Element.hide(thumb);
}

function bookmarkActions() {
	action = $F('bookmarksTools');
	window.open(action);
}

function monthBrowser() {
	action = $F('monthList');
	document.location = action;
}

function monthBrowserBottom() {
	action = $F('monthListBottom');
	document.location = action;
}

//set initial visible keyword list
var currKey = 'keywords_recently_used';
	
function keywordChooser() {
	Element.hide(currKey);
	newKey = $F('keywordDropdown');
	Element.show(newKey);
	currKey = newKey;
}

function keyWordOn(row)  {
	$(row).style.backgroundColor = '#009900';
	$(row).style.color = '#99FF00';
}

 function keyWordOff(row) {
 	$(row).style.backgroundColor = '#EFEFEF';
 	$(row).style.color = '#333333';
 	
 
 }
