/* ----------------------------------
GƒgƒbƒvMV—pSWF
---------------------------------- */
function writeGtopMvSwf(swfSrc){
  var swfH = 398;
  var swfW = 938;
//  var swfH = 415;
//  var swfW = 954;
  var htmlSrc  = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" ';
      htmlSrc += 'width="' + swfW + '" height="' + swfH + '" id="mv_01" align="middle">';
      htmlSrc += '<param name="allowScriptAccess" value="sameDomain" />';
      htmlSrc += '<param name="allowFullScreen" value="false" />';
      htmlSrc += '<param name="movie" value="' + swfSrc + '" />';
      htmlSrc += '<param name="quality" value="high" />';
      htmlSrc += '<param name="salign" value="lt" />';
      htmlSrc += '<param name="wmode" value="transparent" />';
      htmlSrc += '<param name="bgcolor" value="#ffffff" />';
      htmlSrc += '<embed src="' + swfSrc + '" quality="high" salign="lt" wmode="transparent" bgcolor="#ffffff" ';
      htmlSrc += 'width="' + swfW + '" height="' + swfH + '" name="mv_01" align="middle" allowScriptAccess="sameDomain" ';
      htmlSrc += 'allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
  $('#mv_swf').html(htmlSrc);
}

/* ----------------------------------
‰æ‘œcŽ²’†SŠñ‚¹
---------------------------------- */
function setVarticalImg(tgt){
  var w = $(tgt).outerWidth();
  var h = $(tgt).outerHeight();
  var ph = $(tgt).parent().height();
  var mt = (ph - h)/2;
  $(tgt).css({"margin-top": mt});
}


/* ----------------------------------
H1ƒ^ƒCƒgƒ‹cŽ²’†SŠñ‚¹
---------------------------------- */
function setVerticalH1title(){
		var hh = $('div#header_main h1').height();
		var t  = (98-hh)/2 + 'px';
		$('div#header_main h1').css({"padding-top":t});
}

/* ----------------------------------
“®‰æƒ^ƒCƒgƒ‹cŽ²’†SŠñ‚¹
---------------------------------- */
function setVerticalMovtitle(){		
		$('div.main_col2 div.col_box div.title div.body').each(function(){
				var h2H = $(this).children('h2').innerHeight();
				if(h2H >16){
					$(this).children('h3').css({"padding-top":"10px"});	
				}
		});
}

/* ----------------------------------
BOX‚‚³‘µ‚¦
---------------------------------- */
function setHeightBox(){
		var hhh = 0;
		$('div.box_col2 div.box div.body').each(function(){
		  if($(this).height()	> hhh){
					 hhh = $(this).height();
				}
		});
		var setH = hhh + 'px';
		$('div.box_col2 div.box div.body').css({"height":setH});
}



/* ----------------------------------
Gƒiƒr—pSWF
---------------------------------- */
function writeGnav(c){
	if (!c) { c = ''}
	var swf = 'gnav_01';
	var htmlSrc  = '';
	    htmlSrc += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="990" height="51" id="gnav_01" align="middle">';
	    htmlSrc += '<param name="allowScriptAccess" value="sameDomain" />';
	    htmlSrc += '<param name="allowFullScreen" value="false" />';
	    htmlSrc += '<param name="movie" value="../_common/swf/' + swf + '.swf?cat=' + c + '" />';
	    htmlSrc += '<param name="quality" value="high" />';
	    htmlSrc += '<param name="scale" value="noscale" />';
	    htmlSrc += '<param name="salign" value="lt" />';
	    htmlSrc += '<param name="wmode" value="opaque" />';
	    htmlSrc += '<param name="bgcolor" value="#000000" />';
	    htmlSrc += '<embed src="../_common/swf/' + swf + '.swf?cat=' + c + '" quality="high" scale="noscale" salign="lt" wmode="opaque" bgcolor="#000000" width="990" height="51" name="gnav_01" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	    htmlSrc += '</object>';
	 window.document.write(htmlSrc);
}


/* ----------------------------------
Popup
---------------------------------- */
$(function() {
	$(".popup").click(function(){
		window.open(this.href, "WindowName","width=730,height=730,resizable=no,scrollbars=yes");
		return false;
	});
});


