// JavaScript Document


$(function(){
	/*-------------
	flatHeight
	--------------*/
	($.browser.safari ? $(window).load : $).call($(window), function () {
		/**
		* 【使い方】
		*
		* 1.親要素のclassに flatHeight-（1行の子要素数） を指定する。
		*   設定可能な親要素はdivとulのみ。
		*   例）<ul class="clearfix flatHeight-4">
		* 
		* 2.全子要素の高さを揃えたい場合は、
		*   親要素のclassに flatHeightParent を指定する。
		*   例）<ul class="clearfix flatHeightParent">
		*
		* 3.孫要素の高さを揃えたい場合は、
		*   親要素のclassに flatHeight-（1行の子要素数）C（孫要素のindex（0～）） を指定する。
		*   例）<ul class="clearfix flatHeight-4C1">
		*         <li>
		*           <div>                   </div>
		*           <div>このdivの高さが揃う</div>
		*           <div>                   </div>
		*
		* setFlatHeightElements()を実行することで要素リストが作成される。
		* ページがロードされた時、または、動的に作成された要素の高さを揃えたい場合に実行する。
		* 
		*/
		setFlatHeightElements();
	});
});


/*--------------------
ポップアップ
--------------------*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MaxWin(HREF){
	maxWin = window.open(HREF,"","toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=yes");
	maxWin.moveTo(0,0);
	maxWin.resizeTo(screen.availWidth,screen.availHeight);
}
function MonsterWin(){
	maxWin =window.open("http://exile.jp/monster/index.html","","toolbar=no,menubar=no,location=no,status=no,scrollbars=yes,resizable=yes");
	maxWin.moveTo(0,0);
	maxWin.resizeTo(screen.availWidth,screen.availHeight);
}


/*--------------------
NEW ICON
--------------------*/
function newUp(y, m, d, c) {
  delDay = 7; // 何日後に削除するか
  oldDay = new Date(y + "/" + m + "/" +d);
  newDay = new Date();
  d =(newDay - oldDay) / (1000 * 24 * 3600);
  if(d <= delDay) {
    if(c == "new") document.write("<img src='/common/img/new.gif' border='0' hspace='2'>");
  }
}
