var dateObj = new Date();
month1 = dateObj.getMonth()+1;

if(month1==12){
	month2 = 1;
}else{
month2 = dateObj.getMonth()+2;
}

calendar1 = "images/calendar"+month1+".gif"
calendar2 = "images/calendar"+month2+".gif"
calendar1b = "images/calendar"+month1+"_b.gif"
calendar2b = "images/calendar"+month2+"_b.gif"

function saveData(name1,val1,name2,val2)
{
	theDay   = 7;
	setDay = new Date();
	setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
	expDay = setDay.toGMTString();
	document.cookie = name1 + "="+escape(val1)+";expires="+expDay;
	document.cookie = name2 + "="+escape(val2)+";expires="+expDay;
	window.location.href="https://www.sapporotoyota.co.jp/salesoffice/ask.htm";
}


function loadData(name1,name2)
{
	theData   = "";
	theName   = name1;
	theCookie = document.cookie+";";
	start = theCookie.indexOf(theName);
	if (start != -1)
	{
		end = theCookie.indexOf(";",start);
		theData = unescape(theCookie.substring(start+theName.length,end));
	}
	document.shop_title.src="/salesoffice/images/shop/"+theData;
	
	theData2   = "";
	theName2   = name2;
	theCookie2 = document.cookie+";";
	start = theCookie2.indexOf(theName2);
	if (start != -1)
	{
		end = theCookie2.indexOf(";",start);
		theData2 = unescape(theCookie2.substring(start+theName2.length,end));
	}
	document.form.id.value=theData2;
}

