var theData,theName,theCookie,start
//クッキー呼び出し
theData   = "";
theName   = "colorchange=";
theCookie = document.cookie+";";
start = theCookie.indexOf(theName);
if (start != -1){
	end = theCookie.indexOf(";",start);
	theData = unescape(theCookie.substring(start+theName.length,end));
}

function change(url){
	if(theData==2){
		//クッキー登録
		theName  = "colorchange";
		theDay   = 7;
		setDay = new Date();
		setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
		expDay = setDay.toGMTString();
		document.cookie = theName + "="+escape(1)+";expires="+expDay;
		window.location.href = document.URL;
	}
	else{
		//クッキー登録
		theName  = "colorchange";
		theDay   = 7;
		setDay = new Date();
		setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
		expDay = setDay.toGMTString();
		document.cookie = theName + "="+escape(2)+";expires="+expDay;
		window.location.href = document.URL;
	}
}
if(theData==2){
	document.write('<link rel="stylesheet" href="../style/style2.css" type="text/css">');

}
else{
	document.write('<link rel="stylesheet" href="../style/style1.css" type="text/css">');

}
