//カレンダー表示用メソッド
function printDate() {  
	youbi		= new Array("日","月","火","水","木","金","土");  
	myDate		= new Date();  
	theDate		= myDate.getDate();  
	theDay		= youbi[myDate.getDay()];  
	theFyear	= myDate.getFullYear();  
	theMonth	= myDate.getMonth() + 1;  
	document.write(theFyear + "年" + theMonth + "月" + theDate + "日" + "(" + theDay + ")");  
}  

//お気に入りボタン表示メソッド
function checkAndWriteBt(){
	var apl = navigator.appName;
	var ver = navigator.appVersion;
	var ie = false;

	if(apl.indexOf("Microsoft") >= 0){
		ie = true;
	
	}
	
	if(ie){
		//ユーザ毎にURLとタイトルの指定が必要
		document.write("<input type=\"button\" name=\"submit\" value=\"お気に入りに!!\" onClick=\"JavaScript:window.external.AddFavorite('http://www.v-frontier.com', '不動産情報　フロンティア技研');\">");
	}
}

function createstep1(which){
if (!document.layers)
document.forms.step2.step2code.disabled=false

thecode='<script language="JavaScript1.2">\n\n\// Drop-in content box- By Dynamic Drive\n// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com\n// This credit MUST stay intact for use\n\n'

if (which==3)
thecode+='//Specify rate of display (1/freq)\nvar freq=5\n\nvar random_num=Math.floor(Math.random()*freq)\nif (random_num==0)\nwindow.onload=initbox\n'

if (!document.layers)
thecode+=document.forms.cache.cache2.value+'\n'
else
thecode+=document.nscache.document.forms.cache.cache2.value+'\n'


if (which==1)
thecode+='\nwindow.onload=initbox\n'
else if (which==2)
thecode+='\nfunction get_cookie(Name) {\nvar search = Name + "="\nvar returnvalue = ""\nif (document.cookie.length > 0) {\noffset = document.cookie.indexOf(search)\nif (offset != -1) {\noffset += search.length\nend = document.cookie.indexOf(";", offset)\nif (end == -1)\nend = document.cookie.length;\nreturnvalue=unescape(document.cookie.substring(offset, end))\n}\n}\nreturn returnvalue;\n}\n\nfunction dropornot(){\nif (get_cookie("droppedin")==""){\nwindow.onload=initbox\ndocument.cookie="droppedin=yes"\n}\n}\ndropornot()'

thecode+='\n<\/script>'
document.forms.step2.step2code.value=thecode

}
