//font size
var typenum = "";
typenum = eval(getCookie('style'));
if(!typenum){typenum=2;}
var typeList=new Array('small','medium','large');
value_style=typeList[typenum-1];


//button
function size_btn(){
document.write('<p><img src="../common/size_txt.gif" width="60" height="13" alt="text size">');
document.write('<a href="#" onclick="setStyle(-1);return false;"><img src="../common/size_minus.gif" width="14" height="13" alt="ensmall"></a>');
document.write('<img src="../common/size_'+value_style+'.gif" alt="'+value_style+'" width="13" height="13">');
document.write('<a href="#" onclick="setStyle(+1);return false;" ><img src="../common/size_plus.gif" width="14" height="13" alt="enlarge"></a></p>');
}

//css write
function setCss(){
document.write( '<link href="../lib/style-'+value_style+'.css" rel="stylesheet" type="text/css" media="all">');
}

//Cookie get
function getCookie(name){
var cookieStr = document.cookie
var existNum = cookieStr.indexOf(name)
if(existNum != -1){
start = existNum + name.length + 1
end = cookieStr.indexOf(";" , start)
if(end == -1){
end = cookieStr.length
}
var cookieValue = cookieStr.substring(start,end)
return cookieValue
} else {
return ""
}
}

//Cookie write
function setStyle(num,Lv){
if(num){
typenum+=num;
if( 1 > typenum ){ typenum="1"; }else if( typenum > 3){ typenum="3"; }
}
styletype=typenum;
sizeString='style=' ;
sizeString+=escape(styletype);
//sizeString+= "; domain=bc-6.com";
sizeString+= "; path=/";
document.cookie =sizeString ;
window.location.reload();
}
setCss();

function sav_cook() {
coknam = "jssample";
coktxt = document.frm1.txt1.value;
day0 = new Date();
day0.setTime(day0.getTime()+60*60*24*1000);
endday = day0.toGMTString();
document.cookie = coknam+"="+escape(coktxt)+";expires="+endday;
}

//pop up
openwin = new Array() ;
function owd(jsn, url, ww, hh) {
own = jsn ;
openwin[own]=window.open(url, own , "width="+ww+",height="+hh+",resizable=yes,scrollbars=yes") ;
openwin[own].focus();
        }

//FLASH
var MM_contentVersion = 5;
var 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;
		var MM_PluginVersion = words[i]; 
                }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');

}

function swf_play(swfID) {
if (swfID =="InsideAdventure"){
if ( MM_FlashCanPlay ) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="700" height="500" id="inside9" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="inside9.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#000000" />');
	document.write('<embed src="inside9.swf" quality="high" bgcolor="#000000" width="700" height="500" name="inside9" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
	} else{
	document.write('<img src="images/inside_noflash.jpg" width="661" height="461" usemap="#Map"> ');
	document.write('<map name="Map">');
	document.write('<area shape="rect" coords="17,358,108,391" href="http://www.adobe.com/shockwave/download/index.cgi?Lang=Japanese&P5_Language=Japanese&P1_Prod_Version=ShockwaveFlash&P5_Lang" target="_blank">');
	document.write('</map>');
	}
}else{
if ( MM_FlashCanPlay ) {
	var myMovieWidth = "146";var myMovieBgcolor = "FFFFFF"; if (swfID =="recruit"){myMovieWidth ="299";myMovieBgcolor = "FFFFFF";}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' id="'+swfID+'" width="699" height="'+myMovieWidth+'" align="">');
	document.write(' <param name="movie" value="images/'+swfID+'.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#'+myMovieBgcolor+'">  '); 
	document.write(' <embed src="images/'+swfID+'.swf" quality="high" bgcolor="#'+myMovieBgcolor+'" ');
	document.write(' swliveconnect="false" width="699" height="'+myMovieWidth+'" name="'+swfID+'" align="" ');
	document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </embed>');
	document.write(' </object>');
	} else{
	document.write('<img src="images/'+swfID+'_noflash.jpg" width="699" height="'+myMovieWidth+'" alt="SHINKO">');
	}
}
}