// ページトップへ
function gotop() {
	icon = "<a href='#top'><img src='/global/img/bt_pagetop.png' width='35' height='12' alt='ページのトップへ'></a>";
	document.write(icon)
} 
function ico_new() {
	icon = "<img src='/main/img/common/ico_new.gif' alt='new' align='absmiddle'/>";
	document.write(icon)
} 
function pv() {
		//entryLink= 'pv.php' ; 
		var pvlink ; 
		pvlink = "/main/pv.php"+"?TB_iframe=true&height=400&width=630";
		tb_show("", pvlink , false);
} 
function thickboxSS(int){
		entryLink = int;  
		tb_show("", entryLink , false);
}

function TAticket() {
	icon = "<div style='text-align:center'><a href='https://game.mk-style.com/mkstyle_portal/view/itempurchase/itemPurchaseTop.html?titleId=7' target='_blank'><img src='http://image.mk-style.com/TA/main/shop/bt_goitemshop.jpg' alt='タルタロスアイテムチケットショップ' width='569' height='74'></a></div>";
	document.write(icon)
} 


// 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='/main/img/common/ico_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);
   }
} 

// Flash Plyer- navi
function GnxFlashActivate( strFlashUrl , n4Witdh , n4Height , strWmode , strId , strClassName , strFlashvar, strFullScreen ){
	if (n4Witdh != 0) {
		objSize_attribute = " width='"+ n4Witdh +"' height='"+ n4Height +"'";
	} else {
		objSize_attribute = "";
	}
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}
	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} else {
		className_attribute = "";
	}
	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} else {
		wmode_param = "";
		wmode_attribute = "";
	}
	if (strFlashvar != 0) {
		Flashvar_param = "<param name='flashvars' value='" + strFlashvar + "' />";
		Flashvar_attribute = " Flashvars='" + strFlashvar + "'";
	} else {
		Flashvar_param = "";
		Flashvar_attribute = "";
	}
	if (strFullScreen != undefined){
		FullScreen_param = "<param name='allowFullScreen' value='" + strFullScreen + "' />";
		FullScreen_attribute = " allowFullScreen='" + strFullScreen + "'";
	}else{
		FullScreen_param = "";
		FullScreen_attribute = "";
	}
	document.writeln( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " + objSize_attribute + objId_IE_attribute + className_attribute + ">" );
	document.writeln( "<param name='movie' value='"+ strFlashUrl +"' />" );
	document.writeln( "<param name='quality' value='high' />" );
	document.writeln( "<param name='menu' value='0' />" );
	document.writeln( "<param name='name' value='pdsMovie' />" );
	document.writeln( "<param name='allowScriptAccess' value='always' />" );
	document.writeln( "<param name='scale' value='noscale' />" );
	document.writeln( "<param name='salign' value='t' />" );
	document.writeln( wmode_param );
	document.writeln( Flashvar_param );
	document.writeln( FullScreen_param );
	document.writeln( "<!-- Hixie method -->" );
	document.writeln( "<!--[if !IE]> <-->" );
	document.writeln( "<object type='application/x-shockwave-flash' showLiveConnect='true' allowScriptAccess='always' data='"+ strFlashUrl +"'" + Flashvar_attribute + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + FullScreen_attribute + "></object>" );
	document.writeln( "<!--> <![endif]-->" );
	document.writeln( "</object>" );
}


// Flash Plyer

function  viewFlash(sURL, sName, sFeatures){ 

	var FLASHCAB = "http://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("<PARAM NAME='allowScriptAccess' VALUE='always'>");
	document.write("<EMBED SRC='"+sURL+"' MENU='false' WIDTH='"+sWidth+"' HEIGHT='"+sHeight+"' ID='"+sName+"' NAME='"+sName+"' wmode='transparent' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>") 
	document.write("</OBJECT>"); 
} 

