// ページトップへ
function gotop() {
	icon = "<a href='#top' class='h3_top'><img src='/common/img/btn/btn_top_h3.gif' width='36' height='13' alt='ページのトップへ'></a>";
	document.write(icon)
} 

function SHitemshop() {
	icon = "<a href='https://game.mk-style.com/mkstyle_portal/view/itempurchase/itemPurchaseTop.html?titleId=5'  target='blank'><img src='/common/img/btn/btn_itemtiket_off.png' style='padding:8px 20px'></a><div class='attention'><dl><dt>MK-STYLEのログインが必要です。</dt></dl></div>";
	document.write(icon)
} 



function newbt() {
	icon ="<img src='/common/img/icon/icon_new.gif' alt='NEW' align='absmiddle'/>";
	document.write(icon)
} 

function DL(){
	//window.open('http://download.mk-style.com/ccmedia/SH/neffy_ccmedia_pop.html','DL')
	location.href = "/main/community/download/"; 
	
}

function jointgo(){
	window.open('https://game.mk-style.com/mkstyle_portal/view/newmemberentry/memberRulesConfirm.html','MK')
}


function guide(){
	window.open('/intro/','SH')
}


// bpref = tab body prefix, hpref = tab header prefix
function seltab(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
      document.getElementById(bpref + i).style.visibility = "visible";
      document.getElementById(bpref + i).style.position = "";
	  document.getElementById(hpref + i).style.display = "none";
      document.getElementById(hpref + i).className = "open";
    } else {
      document.getElementById(bpref + i).style.visibility = "hidden";
      document.getElementById(bpref + i).style.position = "absolute";
	  document.getElementById(hpref + i).style.display = "block";
      document.getElementById(hpref + i).className = "close";
    }
  }
}

// 新

kikan = 7;
icon ="<img src='/common/img/icon/icon_new.gif' alt='NEW' align='absmiddle'/>";
today = new Date();
upday = new Date();
function koushin(y, m, d) {
   upday.setFullYear(y);
   m = m - 1;
   upday.setMonth(m);
   upday.setDate(d);
   difference = today.getTime() - upday.getTime();
   difference = Math.floor(difference / (1000 * 60 * 60 * 24));
   if (difference < kikan) {
      document.write(icon);
   }
} 




function  viewFlash(sURL, sName, sFeatures){ 

	var FLASHCAB = "https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"; 
	var FLASHCID = "CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000";
	var FLASHVER = "9,0,0,0"; 

	var sFeature; 
	var sWidth = "100%"; 
	var sHeight = "100%";
	var pmBoolean = "false";
	var sTempArray; 
	var sParamTag; 

	sFeature = sFeatures.split(/\s*,\s*/); 
	for (var i=0; i< sFeature.length ; i++) { 
		sTempArray = sFeature[i].split(/\s*=\s*/); 
		if (sTempArray[0].toLowerCase() == "width") { 
			sWidth = sTempArray[1]; 
		} else if (sTempArray[0].toLowerCase() == "height") { 
			sHeight = sTempArray[1]; 
		} else { 
			if (sTempArray[1].toLowerCase() == "yes" || sTempArray[1] == "1" || sTempArray[1].toLowerCase() == "true") { 
				pmBoolean = "true" 
			} 
			sParamTag = "<PARAM NAME='"+sTempArray[0]+"'VALUE='" + pmBoolean + "'>\n"+sParamTag; 
		} 
	} 

	document.write("<OBJECT ID='"+sName+"' NAME='"+sName+"' CLASSID='"+FLASHCID+"' CODEBASE='"+FLASHCAB+"#version="+FLASHVER+"' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"'>"); 
	document.write("<PARAM NAME='movie' VALUE='" + sURL + "'>"); 
	document.write("<PARAM NAME='wmode' VALUE='transparent'>");
	document.write("<EMBED SRC='"+sURL+"' MENU='false' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' ID='"+sName+"' NAME='"+sName+"' wmode='transparent' TYPE='application/x-shockwave-flash' PLUGINSPAGE='https://www.macromedia.com/go/getflashplayer'>") 
	document.write("</OBJECT>"); 
} 

