/**
 * 全体用JavaScript
 *
 * @author Takeyoshi Tanaka <t-tanaka@e-coms.co.jp>
 * @since  2008/01/15
 */


/**
 *
 * OS & browser判別
 * 
 *
 */
var Win=(navigator.userAgent.indexOf("Win")!=-1);
var Mac=(navigator.userAgent.indexOf("Mac")!=-1);
var Explorer=(navigator.appName.indexOf("Explorer")!=-1);
var Netscape=(navigator.appName.indexOf("Netscape")!=-1);
var Version=navigator.appVersion.charAt(0);

if
(Win && Explorer && Version=="4")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/win_ie.css" type="text/css">');}

else if
(Win && Netscape && Version=="5")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/win_nn6.css" type="text/css">');}

else if
(Win && Netscape && Version=="4")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/win_nn4.css" type="text/css">');}

else if
(Explorer && Mac && Version=="4")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/mac_ie.css" type="text/css">');}

else if
(Mac && Netscape && Version=="5")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/mac_nn6.css" type="text/css">');}

else if
(Mac && Netscape && Version=="4")
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/mac_nn4.css" type="text/css">');}

else
{document.write('<link rel="stylesheet" href="{/literal}/_css/portal{literal}/win_ie.css" type="text/css">');}


/**
 *
 * ヘルプ画面出力
 * 
 * @param	string		a_helpurl_s	出力プログラムURL
 *
 */
function openHelp(a_helpurl_s)
{
	openNewHelpWindow(a_helpurl_s ,"help", 740, 680);
}


/**
 *
 * ヘルプ画面生成
 * 
 * @param	string		a_url_s		出力プログラムURL
 * @param	string		a_name_s	出力画面名
 * @param	integer		a_width_i	出力画面サイズ(横幅)
 * @param	integer		a_height_i	出力画面(高さ)
 *
 */
function openNewHelpWindow(a_url_s, a_name_s, a_width_i, a_height_i)
{
	newWin = window.open(a_url_s,a_name_s,
						'toolbar=no,location=no,directories=no,status=no,menubar=no,'+
						'scrollbars=yes,resizable=yes,left=0,top=0,width='+a_width_i+',height='+a_height_i
						);
}

/**
 *
 * ブックマーク登録(IE/Firefox対応)
 * 
 * @param	string		title		ページタイトル
 * @param	string		url         URL
 * @return  boolean
 */
function addBookmark(title,url) { 
  if (window.sidebar) { 
    window.sidebar.addPanel(title, url,""); 
  } else if( document.all ) { 
    window.external.AddFavorite( url, title); 
  } else if( window.opera && window.print ) { 
    return true; 
  }
}

function sss_banner()
{
  document.write('<div style="margin:10px auto 0px;">\n');
  document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=6,0,0,0" width="200" height="90">\n');
  document.write('<PARAM name="MOVIE" value="/_image/portal/ad/sss.swf">\n');
  document.write('<PARAM name="PLAY" value="true">\n');
  document.write('<PARAM name="LOOP" value="true">\n');
  document.write('<PARAM name="QUALITY" value="High">\n');
  document.write('<EMBED src="/_image/portal/ad/sss.swf" width="200" height="90" type="a">\n');
  document.write('</object>\n');
  document.write('</div>\n');
}
