var aryStyle = new Array(
		"default",
		"alternate1",
		"alternate2"
		);
var currentColorIndex = 0;
var currentFontIndex = 0;
function setImage(mon){
	switch(mon){
	case 0:
	case 1:
	case 2:
	case 3:
	case 4:
	case 5:
	default:
		setActiveStyleSheet(aryStyle[0],'imageChange');
		break;
	case 6:
	case 7:
	case 8:
	case 9:
	case 10:
	case 11:
		setActiveStyleSheet(aryStyle[1],'imageChange');
		break;
	}

	return;
}
function setColor(mon){
	switch(mon){
	case 0:
	case 1:
	case 2:
	case 3:
	case 4:
	case 5:
	default:
		setActiveStyleSheet(aryStyle[0],'colorChange');
		break;
	case 6:
	case 7:
	case 8:
	case 9:
	case 10:
	case 11:
		setActiveStyleSheet(aryStyle[1],'colorChange');
		break;
	}

	return;
}

function setHeader(){
	var now = new Date();
	var mon = now.getMonth();
	setImage(mon);
	setColor(mon);
	return;
}
function switchTopImage()
{
	setHeader();
	var currentColor = getCookie("currentColorIndex");
	var currentFont = getCookie("currentFontIndex");
	if(currentColor == "" || currentColor == "0"){
		currentColorIndex = 0;
	}else{
		currentColorIndex = 1;
	}
	if(currentFont == "" || currentFont == "0"){
		currentFontIndex = 0;
	}else{
		currentFontIndex = 1;
	}

	if(currentColorIndex == 1){
		setActiveStyleSheet(aryStyle[2],'colorChange');	//背景　黒
	}
	if(currentFontIndex == 1){
		setActiveStyleSheet('medium','fontChange');	//文字　大
	}else{
		setActiveStyleSheet('small','fontChange');	//文字　大
	}
	return;
}
function changeColor(){
	if(currentColorIndex == 0){
		setActiveStyleSheet(aryStyle[2],'colorChange');
		currentColorIndex = 1;
 		setCookie("currentColorIndex", "1");
	}else{
		setHeader();
 		setCookie("currentColorIndex", "0");
		currentColorIndex = 0;
	}
	return;
}
function changeFont(size){
	if(size == 1){
		setActiveStyleSheet('medium','fontChange');
		currentFontIndex = 1;
 		setCookie("currentFontIndex", "1");
	}else{
 		setActiveStyleSheet('small','fontChange');
		setCookie("currentFontIndex", "0");
		currentFontIndex = 0;
	}
	return;
}
