//windowopen
function popup01_win(){
	popup01Win = window.open("semi_popup01.html","popup01","width=494,height=525,scrollbars=no,resizable=no,status=no");
	popup01Win.focus();
}
function popup02_win(){
	popup02Win = window.open("semi_popup02.html","popup02","width=570,height=475,scrollbars=no,resizable=no,status=no");
	popup02Win.focus();
}
function popup_item_win(tArget){
	var nameheAd = '/faircrea/lineup_';
	var nameEnd = '.html';
	var wname = "lineup";
	var w = "586"; var h = "410";
	var scr = "no"; var res = "no";
	var where = nameheAd+tArget+nameEnd;;
	var agent = navigator.userAgent ; var appve = navigator.appVersion ; var appna = navigator.appName ;
	var wf = ""; var userOs	= null ; var browser = null ; var version = null ;
	if ( agent.indexOf('Win') != -1 ){ userOs = "Win";}else if ( agent.indexOf('Mac') != -1 ){ userOs = "Mac" ;}else{ userOs = "other" ;}
	if ( appna == "Microsoft Internet Explorer" ){browser = "MSIE";version = agent.substring((agent.indexOf('MSIE') + 5),(agent.indexOf('MSIE') + 8)) ;}else if ( appna == "Netscape" ){browser = "NN";version = appve.substring( 0,3 ) ;}	
	if (scr == 'yes'){if ( userOs == "Win" && ( browser == "MSIE" && version > 4 )) {w = String(eval(w) + 18);}else if ( browser == "NN" ) {w =  String(eval(w) + 16);}}
	wf = wf + "width=" + w; wf = wf + ",height=" + h; wf = wf + ",resizable=" + res; wf = wf + ",scrollbars=" + scr;wf = wf + ",menubar=no,toolbar=no,directories=no,location=no,status=no";
	w = window.open(where,wname,wf);
	w.focus();
}

function message_win(){
	messageWin = window.open("character.html","comment","width=560,height=495,scrollbars=no,resizable=no,status=no");
	messageWin.focus();
}

function step_win(){
	stepWin = window.open("step.html","step","width=580,height=600,scrollbars=yes,resizable=yes,status=no");
	stepWin.focus();
}

function newlotion_win(){
	newlotionWin = window.open("restriction.html","newlotion","width=560,height=520,scrollbars=no,resizable=no,status=no");
	newlotionWin.focus();
}

//whitelotionset
function wlgset_win(){
	wlgsEtWin = window.open("nt_wlgset.html","comment","width=586,height=600,scrollbars=yes,resizable=yes,status=no");
	wlgsEtWin.focus();
}

//skincare
function skincare_win(){
	skincareWin = window.open("skincare.html","skincare","width=586,height=600,scrollbars=yes,resizable=no,status=no");
	skincareWin.focus();
}
//basemakeup
function basemakeup_win(){
	basemakeupWin = window.open("basemakeup.html","basemakeup","width=586,height=600,scrollbars=yes,resizable=no,status=no");
	basemakeupWin.focus();
}

//UVcareup
function uVcareup_win(){
	uvcareupWin = window.open("uvcare_pop.html","uvcareup","width=586,height=600,scrollbars=yes,resizable=no,status=no");
	uvcareupWin.focus();
}


//windowopen_MAKE_STEP
function makestep_win(){
	makeWin = window.open("make_step.html","make_s","width=580,height=600,scrollbars=yes,resizable=yes,status=no");
	makeWin.focus();
}


//windowopenNEXTMAKE_STEP
function makestepnext_win(){
	makestep_win();
	window.close();
}


// Flash control
var flag_Fplay;
function load_Flash(tArSrc,wId,hEi){
	Check_Fplay();
	if ( flag_Fplay ) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="');
		document.write('http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="' + hEi + '" width="' + wId + '">');
		document.write('<param name="movie" value="' + tArSrc + '.swf">');
		document.write('<param name="quality" value="best">');
		document.write('<param name="play" value="true">');
		document.write('<param name="menu" value="false">');
		document.write('<embed height="' + hEi + '" pluginspage="http://www.macromedia.com/go/getflashplayer" src="');
		document.write(tArSrc + '.swf" menu="false" type="application/x-shockwave-flash" width="' + wId +'" quality="best" play="true">');
		document.write('</object>');
	} else{
		document.write('<span class="px_12"><br><br><br><br><br><br><br><br><br><br>当サイトをお楽しみ頂くためには、Macromedia Flash Player 最新版が必要になります。<br><br><br><br><a href="http://www.macromedia.com/shockwave/download/download.cgi?P5_Language=Japanese&Lang=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese" target="_blank"><img src="image/get_flash_player.gif" alt="Skip" width="88" height="31" border="0"></a></span>');
	}
}
// top_menu
function load_top_menu_Flash(){
	Check_Fplay();
	if ( flag_Fplay ) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="83" width="767">');
		document.write('<param name="movie" value="top_menu.swf">');
		document.write('<param name="quality" value="best">');
		document.write('<param name="play" value="true">');
		document.write('<param name="menu" value="false">');
		document.write('<embed src="top_menu.swf" height="83" width="767" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false" type="application/x-shockwave-flash" quality="best" play="true">');
		document.write('</object>');
	} else{
		document.write('<img src="/image/top_menu.gif" alt="" width="767" height="83" usemap="#top_menu" border="0">\n');
		document.write('<map name="top_menu">\n');
		document.write('<area shape="rect" coords="0,6,135,60" href="/faircrea/index.html" alt="FAIRCREA WHITE" title="FAIRCREA WHITE">\n');
		document.write('<area shape="rect" coords="145,8,184,55" href="/faircrea/top.html" alt="TOP" title="TOP">\n');
		document.write('<area shape="rect" coords="208,8,320,54" href="/faircrea/concept.html" alt="ブランドメッセージ" title="ブランドメッセージ">\n');
		document.write('<area shape="rect" coords="339,8,414,54" href="/faircrea/lineup.html" alt="ラインナップ"title="ラインナップ">\n');
		document.write('<area shape="rect" coords="438,8,519,56" href="/faircrea/new_comodity.html" alt="新商品"title="新商品">\n');
		document.write('<area shape="rect" coords="542,7,632,55" href="/faircrea/history.html" alt="美白ヒストリー" title="美白ヒストリー">\n');
		document.write('<area shape="rect" coords="655,8,752,55" href="/faircrea/cm.html" alt="CMライブラリー" title="CMライブラリー">\n');
		document.write('</map>\n');
	}
}
// menu
function load_menu_Flash(pageID){
	Check_Fplay();
	if ( flag_Fplay ) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="61" width="767">');
		document.write('<param name="movie" value="menu.swf">');
		document.write('<param name="FlashVars" value="pageID='+pageID+'">');
		document.write('<param name="quality" value="best">');
		document.write('<param name="play" value="true">');
		document.write('<param name="menu" value="false">');
		document.write('<embed src="menu.swf" FlashVars="pageID='+pageID+'" height="61" width="767" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false" type="application/x-shockwave-flash" quality="best" play="true">');
		document.write('</object>');
	} else{
		document.write('<span class="px_12">当サイトをお楽しみ頂くためには、Macromedia Flash Player 最新版が必要になります<a href="http://www.macromedia.com/shockwave/download/download.cgi?P5_Language=Japanese&Lang=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese" target="_blank"><img src="image/get_flash_player.gif" alt="Skip" width="88" height="31" border="0"></a></span>');
	}
}
function Check_Fplay(){
	chk_contentVersion = 6;
	plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i){if (isNaN(parseInt(words[i])))continue; chk_PluginVersion = words[i]; }
		flag_Fplay = chk_PluginVersion >= chk_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); 
		document.write('on error resume next \n');
		document.write('flag_Fplay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & chk_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}	
}
//image
function imgChange(n){
	var imgsrc = document.images[n].src;
	if(imgsrc.indexOf("_on") < 0){document.images[n].src=imgsrc.substring(0,imgsrc.length-4) +"_on.gif";}
	else{document.images[n].src=imgsrc.substring(0,imgsrc.length-7) +".gif";}
}

//win
function parentWinJump (target) {
	var where = "";
	var mainWin = '';
	switch(target)
	{
			case 'pre': where = 'present.html'; break;
		default:where = 'top.html';
	}
	if ((navigator.userAgent.indexOf("Mac") > -1)){
		if (window.opener){window.opener.location.href = where;}
		else {
		mainWin = window.open('','mainWindow','scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes');
		mainWin.location.href = where;
		}
	}else{
		if (!window.opener.closed){window.opener.location.href = where;}
		else {
		mainWin = window.open('','mainWindow','scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes');
		mainWin.location.href = where;
 		}
	}
	window.close();

}


