function openSimpleCP(url) {
var madoName = "cpUpload";
window.open(url,madoName);
return false;
}
function openSimpleAR(url) {
var madoName = "artShow";
window.open(url,madoName);
return false;
}
function mailAddrs(madr){
 var adr = madr;
 var srh = '@';
 var tgt = adr.replace('_at_mar9_',srh);
 var wd0 = 'ＯＫのクリックで(標準の)メーラーが起動。\n';
 var wd1 = '投稿者のアドレスを収集ロボットから守る\nスパムメール対策で直接表示しません。\n\nアドレスは [ ';
 var wd2 = ' ] です。';
 flg = confirm(wd0 + wd1 + tgt + wd2);
 if (flg==true) {
 location.href='mailto:' + tgt;
 }

}
function helpAlerts(msgs){
 var flgm = msgs;
 var msg;
 if (flgm == 'subject') {
 msg = '返信の件名は、投稿内容にあわせて変更できます。';
 } else if (flgm == 'emails') {
 msg = 'メールアドレスは必須です。\n投稿者各位に迷惑メールが流れないように\nアドレスをさらさない対策を施しています。';
 } else if (flgm == 'noemails') {
 msg = 'メールアドレスは必須ではありません。\n投稿者各位に迷惑メールが流れないように\nアドレスをさらさない対策を施しています。';
 } else if (flgm == 'posts') {
 msg = '普通に投稿なさる方は問題ありません。\n\n俗称「掲示板荒らし」対策をしています。\n例えば、投稿本文の内容に日本語が必須で\n「あ～ん」か「ア～ン」の文字が必要です。\nまた、URLアドレスの列挙はエラーになります。';
 } else {
 msg = 'メッセージダイアログが呼び出されました。\nヘルプ文章内容が準備できていません。';
 }
 alert (msg);

}


function helpAlert(msgs){
 var msg = msgs;
 if (msg == '') {
 msg = 'メッセージダイアログが呼び出されました。\nヘルプ文章内容が準備できていません。';
 } else {
 alert (msg);
 }
}

function SimpleOpenWindow(ImgOrUrl,targetWinName,imgSize) {
  window.open(ImgOrUrl,targetWinName,imgSize);
}

function center_win(url,windowname,width,height) {
 var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}


function clipCopy(contents) {
  if (window.clipboardData) {
    window.clipboardData.setData("Text",contents);
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="../skin/stnmlx/_clipboard.swf" FlashVars="clipboard='+escape(contents)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
  }
}

function submitNewWin(windowname, width, height) {

	var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
	if (width) {
		if (window.screen.width > width)
		features+=", left="+(window.screen.width-width)/2;
		else width=window.screen.width;
		features+=", width="+width;
	}
	if (height) {
		if (window.screen.height > height)
		features+=", top="+(window.screen.height-height)/2;
		else height=window.screen.height;
		features+=", height="+height;
	}
	//① blankウィンドウを開く。
	var win = window.open("", windowname, features);
	//② myformのaction属性を取り出し保存
	var action = document.CartAddItem.action;
	//③ 押下されたボタンがbtnSubmitボタンであることをサーバに通知
	document.CartAddItem.action = action + "?btnSubmit=dummy";
	//④ レスポンスはmyNewWnd画面が受け取るように設定
	document.CartAddItem.target = windowname;
	//⑤ フォームのサブミット
	document.CartAddItem.submit();
	//⑥ myNewWnd画面がフォーカスをあてる
	win.focus();
	//⑦ 他のボタンに影響をしないようにtarget及びactionの値を元に戻す
	document.CartAddItem.target = "_self";
	document.CartAddItem.action = action;
	return false;
}

function seeCargoWin(windowname, width, height) {

	var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
	if (width) {
		if (window.screen.width > width)
		features+=", left="+(window.screen.width-width)/2;
		else width=window.screen.width;
		features+=", width="+width;
	}
	if (height) {
		if (window.screen.height > height)
		features+=", top="+(window.screen.height-height)/2;
		else height=window.screen.height;
		features+=", height="+height;
	}
	//① blankウィンドウを開く。
	var win = window.open("", windowname, features);
	//② myformのaction属性を取り出し保存
	var action = document.CartSeeItem.action;
	//③ 押下されたボタンがbtnSubmitボタンであることをサーバに通知
	document.CartSeeItem.action = action + "?btnSubmit=dummy";
	//④ レスポンスはmyNewWnd画面が受け取るように設定
	document.CartSeeItem.target = windowname;
	//⑤ フォームのサブミット
	document.CartSeeItem.submit();
	//⑥ myNewWnd画面がフォーカスをあてる
	win.focus();
	//⑦ 他のボタンに影響をしないようにtarget及びactionの値を元に戻す
	document.CartSeeItem.target = "_self";
	document.CartSeeItem.action = action;
	return false;
}

//function TxtFrmSbmt(theForm) {
//var nom = theForm;
//document.getElementById(nom).submit();
//document.forms[' + nom + '].submit();
//}

var dummy = "スティションネット";
/*日本語*/

