var expdate = new Date ();
FixCookieDate (expdate); // Correct for Mac date bug - call only once for given Date object!
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000) * 365 ); // 6 months from now
var showImages=false;
var playBGSound=true;
if (	document.cookie==null
	||	document.cookie==""){
	document.Settings.toPlayBGSound.checked=true;
	SetPlayBGSound();
	showImages=false;
	document.Settings.toShowImages.checked=false;
	SetCookie (	"showImages",
				showImages,
				expdate,
				path,
				domain);
}
function SetShowImages(){
	showImages=document.Settings.toShowImages.checked;
	SetCookie (	"showImages",
				showImages,
				expdate,
				path,
				domain);
	ShowImages(document.Settings.toShowImages.checked);
}
function GetShowImages(){
	showImages=eval(GetCookie ("showImages"));
	document.Settings.toShowImages.checked=showImages;
	ShowImages(document.Settings.toShowImages.checked);
}

function SetPlayBGSound(){
	playBGSound=document.Settings.toPlayBGSound.checked;
	SetCookie (	"playBGSound",
				playBGSound,
				expdate,
				path,
				domain);
	play_stop(1,document.Settings.toPlayBGSound.checked);
}
function GetPlayBGSound(){
	playBGSound=eval(GetCookie ("playBGSound"));
	document.Settings.toPlayBGSound.checked=playBGSound;
	play_stop(1,document.Settings.toPlayBGSound.checked);
}
function alert_settings(){
	alert("showImages="+showImages+"\nplayBGSound="+playBGSound);
}