function reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}

  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();

}



function openwin(url) {

  win1 = open(url,"pop","toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=1,width=610,height=400,outerwidth=610,outerheight=400");

  win1.focus();

  reloadPage(true);

}



function openwin4(url) {

  win4 = open(url,"pop4","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=770,height=530,outerwidth=750,outerheight=550,top=130,left=30");

  win4.focus();

  reloadPage(true);

}



function open_befuranai( url ){

  uranai = window.open( url, "BeforeLoginDetail", "scrollbars=yes,resizable=yes,width=610" );

  uranai.focus();

  reloadPage(true);

}



function openwin_main( url ){

  win0 = open(url,"pop_main","toolbar=1,location=1,directories=1,status=1,menubar=1,resizable=1,scrollbars=1");

  win0.focus();

  reloadPage(true);

}



function window1(url){

window.open(url,"name","width=550,height=440,toolbar=no,scrollbars=no,resizable=no,menubar=no");

}



function whatWin(url) {

	win1 = open(url,"whats","toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=1,width=610,height=400,outerwidth=610,outerheight=400,top=100,left=0");

	win1.focus();

}



mac=(navigator.appVersion.indexOf('Mac')!=-1)?true:false;

ie=(navigator.appName.charAt(0) == "M")?true:false;

ns=(navigator.appName.charAt(0) == "N")?true:false;



if(mac) {

    fName = "/co/contents/inc/mac.css";

}

else {

    fName = "/co/contents/inc/win.css";

}



if(fName != null) { 

    document.write("<link rel=stylesheet href='"+fName+"' type='text/css'>");

}

document.write("<link rel=stylesheet href='/co/contents/inc/topstyle.css' type='text/css'>");

document.write("<link rel=stylesheet href='/co/contents/inc/topstyle2.css' type='text/css'>");



reloadPage(true);



function openNewWindow(URLtoOpen,windowName, windowFeatures) { 

newWindow=window.open(URLtoOpen, windowName, windowFeatures); 

} 







  function loginCheck(noTicket_URI, Tikect_URI) {



    var str = document.cookie + ";";

    var pos = str.indexOf('teporeTicket',0);



    if ( pos != -1 ) {

      return Tikect_URI;

    }

    return noTicket_URI;



  }





function banner_contents(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

		str = '<a href="http://www.tepore.com/co2diet/campaign/index.htm?square"><img src="/co/contents/img/right_banner_eco.gif" alt="CO2ダイエットキャンペーン「みんなで作ろうエコ川柳！」" border="0" width="160" height="160"></a>';



	}

	document.write(str);



}





function banner_jack(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

//	str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 width="224" height="33"><param name="movie" value="/co/contents/img/banner_jack1101.swf"><param name="quality" value="high"><embed src="/co/contents/img/banner_jack1101.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="224" height="33"></embed></object>';
//  str = '<a href="http://www.tepore.com/navi/campaign/wellcorp/index.htm?hdcate"><img src="/co/contents/img/breakfield_header_banner.gif" width="224" height="30" alt="忙しいけどやせたい！" border="0"></a>';

	}

	document.write(str);



}

function banner_jack_recipe(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

//	str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 width="224" height="33"><param name="movie" value="/co/contents/img/banner_jack1101_recipe.swf"><param name="quality" value="high"><embed src="/co/contents/img/banner_jack1101_recipe.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="224" height="33"></embed></object>';
//	str = '<a href="http://www.tepore.com/water/campaign/index.htm?reched"><img src="/co/contents/img/water_jack.gif" width="224" height="33" alt="お水を購入して、豪華賞品が当たるチャンス！！" border="0"></a>';

	}

	document.write(str);



}



//各カテゴリスクエアバナー（レシピ以外）

function kbanner_contents(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

//	     str = '<a href="http://www.tepore.com/navi/campaign/wellcorp/index.htm?cate_sq"><img src="/co/contents/img/01t_160_160.gif" width="160" height="160" alt="楽天ランキング1位！満腹なのに痩せちゃう？"  border="0"></a>';		

//	     str = '<a href="http://www.tepore.com/hyper/square_cate1/www.p-advg.com/r?bid=178663" target="_blank"><img src="/co/contents/img/cate_square_nihonsougei.gif" width="160" height="160" border="0" alt="★詳しい案内書を無料送呈中！★"></a>';

//		str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="160" height="160"><param name="movie" value="/co/contents/img/banner_living2.swf"><param name="quality" value="high"><embed src="/co/contents/img/banner_living2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="160"></embed></object>';

	} 

	document.write(str);

}



//各カテゴリスクエアバナー（レシピのみ）

function kbanner_contents_recipe(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

//	     str = '<a href="http://www.tepore.com/cooking/waza/index.htm"><img src="/cooking/img/basic_waza.gif" width="160" height="80" border="0" alt="教えて！料理の基本"></a>';

//    str = '<a href="http://www.tepore.com/hyper/rcp/c.p-advg.com/adpCnt/r?mid=778875&lid=2" target="_blank"><img src="/co/contents/img/ih_school.gif" width="150" height="60" border="0" alt="IHクッキングスクール"></a>';		

//		str = '<a href="http://www.tepore.com/hyper/square_cate2/www.p-advg.com/r?bid=171803" target="_blank"><img src="/co/contents/img/kawagoebana0.gif" width="160" height="160" border="0"></a>';



	} 

	document.write(str);



}

//各カテゴリスクエアバナー（co2dietのみ）

function kbanner_contents_co2(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

//    str = '<a href="/co2diet/smile/index.html?co2" target="_blank"><img src="/co/contents/img/ih_smile.gif" width="150" height="60" border="0" alt="IHでスマイルクッキング！" style="margin-left:5px;"></a>';		


	} 

	document.write(str);



}







function pickup(){

	num = Math.floor(Math.random() * 1);



	str = "";



	if (num == 0) {

		str = '<td colspan="3" align="center" background="/co/contents/img/pickupbg_13.gif"><a href="/navi/campaign/10count/index.htm?tdon10"><img src="/co/contents/img/pick_cam_10count.gif" alt="ドンぴしゃ" width="358" height="152" border="0"></a></td>';

	}

	document.write(str);



}





function pickup2(){

	num = Math.floor(Math.random() * 3);



	str = "";



	if (num == 0) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanCar"><div class="PicRanCarTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">車を買い替える予定なら<a href="/navi/car/satei/index.htm">愛車 無料 査定</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">驚きのお値段があるかも？！<a href="/navi/car/new_car/index.htm">新車 見積</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">自動車保険を徹底比較！<a href="/navi/car/hoken/index.htm">自動車 保険 見積</a><BR></div></div></td></tr></table>';

	} else if (num == 1) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanHou"><div class="PicRanHouTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">快適な住まいづくりのために <a href="/house/petit/index.htm">ぷち リフォーム</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">長く安心して住む家だから <a href="/house/mainte/index.htm">メンテナンス 修理</a><BR></div></div></td></tr></table>';

	} else if (num == 2) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanRec"><div class="PicRanRecTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">読み終わった本は賢く<a href="/navi/brecycle/index.htm">古本買取</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">捨てちゃうなんてもったいない！<a href="/navi/oikura/index.htm">不用品 買取</a><BR></div></div></td></tr></table>';

	}

	document.write(str);



}



//　↓↓特集ページランダムリンク↓↓

function ran_banner2(){

	num = Math.floor(Math.random() * 2);

	str = "";



	if (num == 0) {

		str = '<a href="http://www.tepore.com/water/index.htm?spetop"><img src="img/water_1012.gif" alt="テポーレ ウォーターショップ" width="468" height="60" border="0"></a>';

	} else if (num == 1) {

		str = '<a href="http://select.tepore.com/"><img src="img/select_1012.gif" alt="新生活セレクトショップ" width="468" height="60" border="0"></a>';

	}

	document.write(str);

}



//　↓↓トップページ暮らしのサービス　ランダム表示４つ

function ran_kurashi4(){

	num = Math.floor(Math.random() * 4);



	str = "";



	if (num == 0) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanCar"><div class="PicRanCarTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">車を買い替える予定なら<a href="/navi/car/satei/index.htm">愛車 無料 査定</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">驚きのお値段があるかも？！<a href="/navi/car/new_car/index.htm">新車 見積</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">自動車保険を徹底比較！<a href="/navi/car/hoken/index.htm">自動車 保険 見積</a><BR></div></div></td></tr></table>';

	} else if (num == 1) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanHou"><div class="PicRanHouTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">快適な住まいづくりのために <a href="/house/petit/index.htm">ぷち リフォーム</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">長く安心して住む家だから <a href="/house/mainte/index.htm">メンテナンス 修理</a><BR></div></div></td></tr></table>';

	} else if (num == 2) {

		str = '<table width="100%"  border="0" cellspacing="5" cellpadding="0"><tr><td><div id="PicRanRec"><div class="PicRanRecTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">読み終わった本は賢く<a href="/navi/brecycle/index.htm">古本買取</a><BR><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" vspace="4" border="0" align="absmiddle">捨てちゃうなんてもったいない！<a href="/navi/oikura/index.htm">不用品 買取</a><BR></div></div></td></tr></table>';

	} else if (num == 3) {

		str = '<table width="100%"  border="0" cellpadding="0" cellspacing="5"><tr><td bgcolor="#FFFFFF"><div id="PicRanEdu"><div class="PicRanEduTxt"><img src="http://www.tepore.com/co/contents/img/everyday_icon.gif" width="13" height="13" vspace="4" border="0" align="absmiddle">好きな時間に勉強できる　<a href="http://www.tepore.com/navi/showin/index.htm" target="_top">ショウインキッズ</a><BR></div></div></td></tr></table>';

	}



	document.write(str);



}


//　↓↓20060206_top_recipeバナーランダムリンク↓↓

function ran_banner_recipe(){

	num = Math.floor(Math.random() * 2);

	str = "";



	if (num == 0) {

		str = '<a href="http://www.tepore.com/cooking/waza/index.htm?trecip"><img src="http://www.tepore.com/co/contents/img/cooking_waza_banner.jpg" alt="教えて！料理の基本　保存版" width="230" height="50" border="0"></a>';

	} else if (num == 1) {

		str = '<a href="http://www.tepore.com/cooking/magazine/2006/index.htm?trecip"><img src="http://www.tepore.com/co/contents/img/cooking_mail_banner.jpg" alt="メールマガジン「テポーレお役立ちレシピ」" width="230" height="50" border="0"></a>';

	} else if (num == 2) {

		str = '<a href="http://www.tepore.com/cooking/waza/index.htm?trecip"><img src="http://www.tepore.com/co/contents/img/cooking_waza_banner.jpg" alt="教えて！料理の基本　保存版" width="230" height="50" border="0"></a>';

	}


	document.write(str);

}