function ChangeColor(Color){ if (Color == 'random'){ Random_color = new Array('red','blue','yellow','green','gray'); n = Math.floor(Math.random()*Random_color.length); Color = Random_color[n]; } document.getElementById('board_logo').src = 'img/' + Color + '/board01.gif'; document.getElementById('board_body').style.backgroundImage = 'url(img/' + Color + '/board02.gif)'; document.getElementById('board_foot').style.backgroundImage = 'url(img/' + Color + '/board03.gif)'; ReloadForm(); } function ChangeAlign(align){ if (align == 'left'){ var MarginLeft = '0px'; var MarginRight = 'auto'; } else if(align == 'right') { var MarginLeft = 'auto'; var MarginRight = '0px'; } else { var MarginLeft = 'auto'; var MarginRight = 'auto'; } document.getElementById('board_head').style.marginLeft = MarginLeft; document.getElementById('board_head').style.marginRight = MarginRight; document.getElementById('board_body').style.marginLeft = MarginLeft; document.getElementById('board_body').style.marginRight = MarginRight; document.getElementById('board_foot').style.marginLeft = MarginLeft; document.getElementById('board_foot').style.marginRight = MarginRight; ReloadForm(); } function ChangeVmargin(){ var Vmargin = document.set.valign.value; if(Vmargin > 50){ alert('上下の余白は、50以内に設定して下さい。'); document.set.valign.value = 10; } else { document.getElementById('board_head').style.marginTop = Vmargin + 'px'; document.getElementById('board_foot').style.marginBottom = Vmargin + 'px'; } ReloadForm(); } function AddLine(No){ var Face = document.set.copy_text[No].value; if(Face.match(/\"/)){ alert('半角ダブルコーテーションは使用出来ません。\n全角に変換します。'); Face = Face.replace(/\"/g, "”"); document.set.copy_text[No].value = Face; } if(Face.match(/\ /)){ alert('半角スペースは使用出来ません。\n全角に変換します。'); Face = Face.replace(/\ /g, "\ "); document.set.copy_text[No].value = Face; } if (Face != ""){ document.getElementById('face' + No).innerHTML = Face; document.getElementById('button' + No).innerHTML = ''; document.getElementById('field' + No).style.display = ''; document.getElementById('line' + No).style.display = ''; } else { document.getElementById('face' + No).innerHTML = ""; document.getElementById('button' + No).innerHTML = ""; document.getElementById('field' + No).style.display = 'none'; document.getElementById('line' + No).style.display = 'none'; } ReloadForm(); } function ReloadForm(){ document.getElementById('paste').value = ''; document.getElementById('paste').value += '