// Button & Menu Options ---------------------------------//

// Use animation menus
// Requires jQuery
	var anim_menus = 1;

//Auto link buttons to overview pages
	var use_overview_pages = 1;

//Show sub-menus for current section( 0=no, 1=yes)
	var section_subs = 1;

//Other button definitions
//"btn_name,menu_name(|menu_direction),section_id,img_src,img_src_on"
//Ex. "ql_btn,ql_menu,0,uploaded/images/ql_btn.gif,uploaded/images/ql_btn.gif"
var otherBtns = new Array( "ql_btn,ql_menu|up,0,uploaded/images/home/ql_btn.gif,uploaded/images/home/ql_btn.gif ");

// List other images that need to be pre-loaded
var otherImages = new Array();

//other JS functions to run onLoad
function loadJS(){
	if(pageid==1){createStories();}
 
	if(pageid==819){accountCheck();}
	
}


var saveUn;

function accountCheck () {
	
	document.getElementById('accountCheck').onclick = function(){
		//saveUn
		if(saveUn){ //saveUn is true, turn it off
			document.getElementById('accountCheck').src = 'uploaded/images/account_check.gif';
			document.getElementById('accountCheck').saved = false;
		}else{
			//turn on the checkbox and prep for saving
			document.getElementById('accountCheck').src = 'uploaded/images/account_check_on.gif';
			document.getElementById('accountCheck').saved = true;
		}
	}
	
	window.onbeforeunload = function () {
		//if save username is checked create cookie, else delete it
		if( document.getElementById('accountCheck').saved ){
			un = escape(document.toplogin.username.value);
			//if username is already filled out, save it
			if(un.length > 0){
				createCookie('acctCheck',un,365);
			}
		}else{
			//delete cookie
			createCookie('acctCheck','',-1);
		}
	}
	
	// check for cookie onload and set username field and checkbox
	if(readCookie('acctCheck') != null ){
		document.toplogin.username.value = unescape(readCookie('acctCheck'));
		document.getElementById('accountCheck').src = 'uploaded/images/account_check_on.gif';
		document.getElementById('accountCheck').saved = true;
		saveUn = true;
	}else{
		document.toplogin.username.value = "";
		document.toplogin.password.value = "";
		document.getElementById('accountCheck').src = 'uploaded/images/account_check.gif';
		document.getElementById('accountCheck').saved = false;
		saveUn = false;
	}
}



