//winoepn Default
function Wopen(url,w,h,n) {
	var winName = n;
	var Width   = 'width='   + w;
	var Height  = ',height=' + h;
	var Left    = ',left='   + ((screen.width - w) / 2);
	var Top     = ',top='    + ((screen.height- h) / 2);
	var Option = ',status=1,menubar=0,scrollbars=0,resizable=0';
	var features = Width + Height + Left + Top + Option;
	winName = window.open(url,winName,features);
	if (window.focus) {
		winName.focus();
	}
}
//winoepn Scrollあり
function WopenScroll(url,w,h,n) {
	var winName = n;
	var Width   = 'width='   + w;
	var Height  = ',height=' + h;
	var Left    = ',left='   + ((screen.width - w) / 2);
	var Top     = ',top='    + ((screen.height- h) / 2);
	var Option = ',status=1,menubar=0,scrollbars=1,resizable=0';
	var features = Width + Height + Left + Top + Option;
	winName = window.open(url,winName,features);
	if (window.focus) {
		winName.focus();
	}
}
//イメージ切り替え
function onImg(iName,str)
{
	document.images[iName].src = str;
}

//Goods Window
function goodsOpen(url) {
	var w		=320;
	var h		=280;
	var winName = 'goodslist';
	var Width   = 'width='   + w;
	var Height  = ',height=' + h;
	var Left    = ',left='   + ((screen.width - w) / 2);
	var Top     = ',top='    + ((screen.height- h) / 2);
	var Option = ',status=1,menubar=0,scrollbars=0,resizable=0';
	var features = Width + Height + Left + Top + Option;
	winName = window.open(url,winName,features);
	if (window.focus) {
		winName.focus();
	}
}
//ロールオーバー・ロールアウト
function RollOver (obj,val) {
  obj.src = val;
} 

//ツリー
function exMenu(tName){
  tMenu = document.getElementById(tName).style;
  if (tMenu.display == 'none') tMenu.display = "block"; else tMenu.display = "none";
}

/****************************************
 *  SWF write (2006/05)
 *  Copyright(C) Groony co.,ltd.
 *  http://www.groony.jp
*****************************************/
function Flash(swf, id, width, height){
  this.swf    = swf;
  this.id     = id;
  this.width  = width;
  this.height = height;
  this.param  = new Array();

  //init params
  this.setParam("allowScriptAccess", "sameDomain");
  this.setParam("loop"   , "false");
  this.setParam("menu"   , "false");
  this.setParam("quality", "high");
  this.setParam("wmode", "transparent");
  this.setParam("bgcolor", "");

  return this;
}

function __Flash_method_setParam(key, val){
  this.param[key] = val;
}

function __Flash_method_write(){
  var html   = new String();
  var params = new String();
  var attrs  = new String();

  this.setParam('movie', this.swf);
  for(var i in this.param){
   if(this.param[i]){
     params += '<param name="' + i + '" value="' + this.param[i] + '"/>';
     attrs  += ' '+ i + '="' + this.param[i] + '"';
   }
  }

  html = '<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="'  + this.width  + '"'
                 + ' height="' + this.height + '"'
                 + ' id="'     + this.id     + '">';
  html += params;
  html += '<embed src="' + this.swf    + '" ' + attrs 
                + ' width="'   + this.width  +'"'
                + ' height="'  + this.height + '"'
                + ' name="'    + this.id     +'"'
                + ' type="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></embed></object>';

  document.write(html);
}

Flash.prototype.setParam = __Flash_method_setParam;
Flash.prototype.write    = __Flash_method_write;


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; 
    } 
} 
