﻿/*
####################################################

	▽ナビゲーション表示

####################################################
*/


function load_navi(){
	document .write (				 
	'<div id="header">',
	'<div id="header_logo">',
	'<div id="logo"><a href="javascript:HOME();"><img src="'+dir+'img/head_logo.png" alt="Cocoonist"></a></div>',
	'<div id="sitemap"><a href="javascript:SITEMAP();"><img src="'+dir+'img/head_sitemap.png" alt="Site Map"></a></div>',
	'</div>',

	'<div id="header_navi">',
	'<ul id="nav-one">',
	'<li class="N01"><a href="javascript:ABOUT();"><img src="'+dir+'nav/nav01.png" alt="about Cocoonist"></a></li>',
	'<li class="N02"><a href="javascript:NEWS();"><img src="'+dir+'nav/nav02.png" alt="News"></a></li>',
	'<li class="N03"><a href="#"><img src="'+dir+'nav/nav03.png" alt="Product"></a>',
	'	<ul>',
	'	<li class="fk_top"><img src="'+dir+'nav/nav_sub_top.gif" alt=""></li>',
	'	<li><a href="javascript:DEADSEA();"><img src="'+dir+'nav/nav02_sub01.gif" alt="Dead Sea SPA"></a></li>',
	'	<li><a href="javascript:ESSENTIALOIL();"><img src="'+dir+'nav/nav02_sub02.gif" alt="Essential Oil"></a></li>',
	'	<li><a href="javascript:ILLUST();"><img src="'+dir+'nav/nav02_sub03.gif" alt="Illustrated by Jun Iida"></a></li>',
	//'	<li><a href="javascript:SELECT();"><img src="'+dir+'nav/nav02_sub04.gif" alt="Select Brand"></a></li>',
	'	<li class="fk_bottom"><img src="'+dir+'nav/nav_sub_bottom.gif" alt=""></li>',
	'	</ul>',
	'</li>',
	'<li class="N04"><a href="javascript:DOWNLOAD();"><img src="'+dir+'nav/nav04.png" alt="Download"></a>',
	'	<ul>',
	'	<li class="fk_top"><img src="'+dir+'nav/nav_sub_top.gif" alt=""></li>',
	'	<li><a href="javascript:BLOGPARTS();"><img src="'+dir+'nav/nav03_sub01.gif" alt="Blog Parts"></a></li>',
	'	<li><a href="javascript:WALLPAPER();"><img src="'+dir+'nav/nav03_sub02.gif" alt="Wallpaper"></a></li>',
	'	<li><a href="javascript:MESSAGE();"><img src="'+dir+'nav/nav03_sub03.gif" alt="Message Picture"></a></li>',
	'	<li class="fk_bottom"><img src="'+dir+'nav/nav_sub_bottom.gif" alt=""></li>',
	'	</ul>',
	'</li>',
	'<li class="N05"><a href="javascript:MEMBERS();"><img src="'+dir+'nav/nav05.png" alt="Members"></a>',
	'	<ul>',
	'	<li class="fk_top"><img src="'+dir+'nav/nav_sub_top.gif" alt=""></li>',
	'	<li class="members-sub"><a href="javascript:MEMBERS();"><img src="'+dir+'nav/nav04_sub01.gif" alt=""></a></li>',
	'	<li class="fk_bottom"><img src="'+dir+'nav/nav_sub_bottom.gif" alt=""></li>',
	'	</ul>',
	'</li>',
	'<li class="N06"><a href="javascript:SHOPINFO();"><img src="'+dir+'nav/nav06.png" alt="Shop Info"></a>',
	'	<ul>',
	'	<li class="fk_top"><img src="'+dir+'nav/nav_sub_top.gif" alt=""></li>',
	'	<li><a href="javascript:SHOPLIST();"><img src="'+dir+'nav/nav05_sub01.gif" alt="Shop List"></a></li>',
	'	<li><a href="javascript:STAMPCARD();"><img src="'+dir+'nav/nav05_sub02.gif" alt="Wrapping"></a></li>',
	'	<li><a href="javascript:WRAPPING();"><img src="'+dir+'nav/nav05_sub03.gif" alt="Stamp Card"></a></li>',
	'	<li class="fk_bottom"><img src="'+dir+'nav/nav_sub_bottom.gif" alt=""></li>',
	'	</ul>',
	'</li>',
	'<li class="N07"><a href="javascript:BLOG();"><img src="'+dir+'nav/nav07.png" alt="Staff Blog"></a></li>',
	'<li class="N08"><a href="javascript:ONLINESHOP();"><img src="'+dir+'nav/nav08.png" alt="Online Shop"></a></li>',
	'</ul>',
	'</div><!--EOD_header_navi-->',
	'</div><!--EOD_header-->',
	'<br clear="all">'
	);
	}

/*
########################################################

   サイド表示部

########################################################
*/

function load_side(){
	document .write (
	'<div><a href="'+dir+'members/index.html#m-present"><img src="'+dir+'nav/pick_up.jpg"></a></div>',
	//'<div><a href="http://www.cocoonist.net/pc/news/post/624summer-sale20off.html"><img src="'+dir+'nav/banner_summer_sale.gif" /></a></div>',
	'<div><a href="'+dir+'horoscope/index.html"><img src="'+dir+'nav/banner_horoscope.gif" /></a></div>',
	'<div><a href="'+dir+'members/index.html"><img src="'+dir+'nav/banner_members.gif" /></a></div>',
	'<div><a href="'+dir+'staff_blog/jump.html" target="_blank"><img src="'+dir+'nav/banner_staff_blog.jpg" /></a></div>',
	'<div><a href="'+dir+'shopinfo/index.html"><img src="'+dir+'nav/banner_shop_info.jpg" /></a></div>',
	'<div><img src="'+dir+'nav/banner_mobile.gif" /></div>',
	'<div><a href="http://twitter.com/CocoonistWeb" target="_blank"><img src="'+dir+'nav/banner_twitter.gif" /></a></div>',
	'<div><a href="http://www.icl-inc.co.jp/recruit/" target="_blank"><img src="'+dir+'nav/banner_recruit.gif" /></a></div>'
	);
	}

	
/*
########################################################

   フッター表示部

########################################################
*/
function load_footer(){
	document .write (
	'<div id="footer">',

	'<div id="pagetop"><a href="#header" onClick="jumpToPageTop(); return false;" onFocus="this.blur();"><img src="'+dir+'img/foot_pagetop.gif" alt="Page Top"></a></div>',
	'<div id="bottom">',
	'<a href="javascript:RECRUIT();"><img src="'+dir+'img/foot_navi01.gif" alt="Recruit"></a><img src="'+dir+'img/foot_navi_kugiri.gif" alt="｜"><a href="javascript:SITEMAP();"><img src="'+dir+'img/foot_navi02.gif" alt="Site Map"></a><img src="'+dir+'img/foot_navi_kugiri.gif" alt="｜"><a href="javascript:COMPANY();"><img src="'+dir+'img/foot_navi03.gif" alt="Company Profile"></a><img src="'+dir+'img/foot_navi_kugiri.gif" alt="｜"><a href="javascript:WEBSITE();"><img src="'+dir+'img/foot_navi04.gif" alt="Webasite Policy"></a><img src="'+dir+'img/foot_navi_kugiri.gif" alt="｜"><a href="javascript:PRIVACY();"><img src="'+dir+'img/foot_navi05.gif" alt="Privacy Policy"></a><img src="'+dir+'img/foot_navi_kugiri.gif" alt="｜"><a href="javascript:CONTACT();"><img src="'+dir+'img/foot_navi06.gif" alt="Contact"></a>',
	'<div id="copyright"><img src="'+dir+'img/foot_copyright.gif" alt="Copyright(C)ICL Inc. All rights Reserved."></div>',
	'</div>'
	);
	}

/*
####################################################

	DIV開閉設定

####################################################
*/

//開く
function open_div(id){
	var obj = document.getElementById(id);
	obj.style.display = '';
	return false;
	}
//閉じる
function close_div(id){
	var obj = document.getElementById(id);
	obj.style.display = 'none';
	return false;
	}

/*
####################################################

	ナビゲーション設定

####################################################
*/
/*
menubar	yes/no	メニューバー有無
toolbar	yes/no	ツールバー有無
location	yes/no	アドレスバー有無
status	yes/no	ステータスバー有無
resizable	yes/no	リサイズ可否
scrollbars	yes/no
*/

//ホーム
function HOME() {
	document.location.href = dir+"index.html";//Home
	}

//about Cocoonist
function ABOUT() {
	document.location.href = dir+"about/index.html";
	}
	
//News
function NEWS() {
	document.location.href = dir+"news/index.html";
	//window.open(w_msg,'MSG','width=780,height=610,resizable=yes,scrollbars=yes,');
	}
//Product
function PRODUCT() {
	document.location.href = dir+"product/index.html";
	//window.open(w_msg,'MSG','width=780,height=610,resizable=yes,scrollbars=yes,');
	}
	
	//Dead SEA SPA
	function DEADSEA() {
		document.location.href = dir+"product/deadsea/index.html";
		}
	//Essential Oil
	function ESSENTIALOIL() {
		document.location.href = dir+"product/essentialoil/index.html";
		}
	//イイダジュンさんイラスト
	function ILLUST() {
		document.location.href = dir+"product/illust/index.html";
		}
	//Select Brand
	function SELECT() {
		document.location.href = dir+"product/select_brand/index.html";
		}
		
//Download
function DOWNLOAD() {
	document.location.href = dir+"download/index.html";
	}
	
	//Blog Parts
	function BLOGPARTS() {
		document.location.href = dir+"download/index.html#blogparts";
		}
	//wallpaper
	function WALLPAPER() {
		document.location.href = dir+"download/index.html#wallpaper";
		}
	//Message Picture
	function MESSAGE() {
		document.location.href = dir+"download/index.html#message_picture";
		}


//Members
function MEMBERS() {
	document.location.href = dir+"members/index.html";
	}
	//Mail Magazine
	function MAILMAGAZINE() {
		document.location.href = dir+"members/index.html#privilege";
		}
	//Present
	function PRESENT() {
		document.location.href = dir+"members/index.html#m-present";
		}
	
//Shop Info
function SHOPINFO() {
	document.location.href = dir+"shopinfo/index.html";
	}
	//Shop List
	function SHOPLIST() {
		document.location.href = dir+"shopinfo/index.html#shoplist";
		}
	//Wrapping
	function WRAPPING() {
		document.location.href = dir+"shopinfo/index.html#wrapping";
		}
	//Stamp Card
	function STAMPCARD() {
		document.location.href = dir+"shopinfo/index.html#stampcard";
		}

//Staff Blog
function BLOG() {
	blog_url = dir+"staff_blog/jump.html";
	window.open(blog_url,'StaffBlog','resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,');
	}
//Online Shop
function ONLINESHOP() {
	ec_url = dir+"online_shop/jump.html";
	window.open(ec_url,'OnlineShop','resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,');
	}

//リクルート
function RECRUIT() {
	rec_url = dir+"recruit/jump.html";
	window.open(rec_url,'Recruit','resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes,');
	}
	
//Site Map
function SITEMAP() {
	document.location.href = dir+"sitemap/index.html";
	}
	
//Company Profile
function COMPANY() {
	document.location.href = dir+"company_profile/index.html";
	}
//Website Policy
function WEBSITE() {
	document.location.href = dir+"website_policy/index.html";
	}
//Privacy Policy
function PRIVACY() {
	document.location.href = dir+"privacy_policy/index.html";
	}
//Contact
function CONTACT() {
	contact_url = dir+"contact/jump.html";
	window.open(contact_url,'Contact','width=600,height=620,menubar=no,titlebar=no,status=no,location=no,toolbar=no,scrollbars=yes,resizable=yes');
	}

/*
####################################################

	サイドのリンク設定

####################################################
*/



//サブウィンドウを開く(汎用)
function openWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
	}
function opWin(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
	}
	

/*
####################################################

	スムーズスクロールの設定

####################################################
*/

var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var Moz = navigator.userAgent.indexOf("Gecko") != -1;
var Vmajor = parseInt(navigator.appVersion);	// ex. 3
var Vminor = parseFloat(navigator.appVersion);	// ex. 3.01

var MacIE4 = ((Mac && navigator.appVersion.indexOf('MSIE 4.',0) != -1));
var MacIE3 = ((Mac && navigator.appVersion.indexOf('MSIE 3.',0) != -1));

// --------------------
// [window] scroll
// --------------------

function getScrollLeft() { // 020225
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollLeft;
 } else if (window.pageXOffset) {
  return window.pageXOffset;
 } else {
  return 0;
 }
}

function getScrollTop() { // 020225
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollTop;
 } else if (window.pageYOffset) {
  return window.pageYOffset;
 } else {
  return 0;
 }
}

function getScrollWidth() { // 010317
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollWidth;
 } else if (window.innerWidth) {
  return window.innerWidth;
 }
 return 0;
}

function getScrollHeight() { // 010317
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollHeight;
 } else if (window.innerHeight) {
  return window.innerHeight;
 }
 return 0;
}
