// JavaScript Document
function MyAreaMenu(Type) {
	var OldSource = MyAreaPress + ".gif"; 
	var Source = Type + "_f3.gif"; 
	var OldLayer = MyAreaPress + "Layer"
	var NewLayer = Type + "Layer"
	SwapPicRoll(MyAreaPress, OldSource);
	MyAreaPress = Type;
	SwapPicRoll(Type, Source);
	
	showHideLayer(OldLayer,'','hide');
	showHideLayer(NewLayer,'','show');
	
	expiredate = new Date;
	expiredate.setMonth(expiredate.getMonth()+1);
	document.cookie = "MyAreaSection="+MyAreaPress+";expires"+expiredate.toGMTString();
}
function checkPw(form) {
	pw1 = form.pw1.value;
	pw2 = form.pw2.value;
	if (pw1 != pw2) {
		alert ("\nYou did not enter the same password twice. Please re-enter your password.")
		return false;
	}
}
function SubmitControl(SelectBox, Section, Type, Form) {
	if (SelectBox.selectedIndex >= 0 && SelectBox.value != 0) {
		if (Type == "Download") {
			CreateWindow2(Section + SelectBox.value); }
		else {
			if (Type == "Preview") {
				CreateWindow(Section + SelectBox.value, 500, 400); }
			else {
				if(confirm('Are you sure you want to delete this item?')){window.location= Section + '?ID='+ SelectBox.value}
			}
		}
	}
	else {
		alert('Please choose an item from the menu.');
	}
}