﻿var DHTML_SUITE_THEME_FOLDER="";var DHTML_SUITE_THEME="gray";var IMAGE_PATH="../../";var TABLE_ID="";function WinUnload(){DHTML_SUITE_THEME_FOLDER=null;DHTML_SUITE_THEME=null;IMAGE_PATH=null;valsBG=null;valsSUB=null;valsMain=null;valsChar=null;hexColString=null;imgPath=null;LinkDivH=null;win=null;winId=null;}function Init(){window.onunload=WinUnload;if(navigator.userAgent.indexOf("MSIE") < 0){(function(){for(var property in Event.prototype){if(property.match(/MOUSE|CLICK|OUT|OVER/)){window.addEventListener(property.toLowerCase(), function(e){window.event=e;}, true);}}}());};Grad("copy1","ff0000","0000ff");Grad("copy2","ff00ff","ffff00");var index=document.getElementById("menu");if(index != null){document.getElementById("initial").style.backgroundImage="url(i" + Math.floor(Math.random() * 14) + ".gif)";Nifty("#menu p","transparent top");Nifty("#ad","big transparent top");}else{if(document.getElementById("initial") != null){document.getElementById("initial").style.backgroundImage="url(" + IMAGE_PATH + "img/sozai/i" + Math.floor(Math.random() * 15) + ".gif)";}var objTables=document.getElementById("container").getElementsByTagName("TABLE");if(objTables.length > 0){TABLE_ID=objTables[0].id;for(var i=0; i < objTables.length; i++){objTables[i].onmousedown=TableRightClick;objTables[i].oncontextmenu=function(){return false;};}}if(navigator.userAgent.indexOf("MSIE") >= 0){var boxHTML=document.getElementById("box").innerHTML;document.getElementById("box").innerHTML="<p><a href='#' onclick='window.open(\"ie7.html\");return false;'>IE 7 利用者へ</a> 画像変更 ↓</p><p><input type='file' id='limg' name='local' size='8' /></p>" + boxHTML;}else if(window.opera){document.onmousedown=function(){return false;};}}}function Init2(winN){window.onunload=WinUnload;DHTML_SUITE_THEME_FOLDER='../css/goodies/';IMAGE_PATH="../";switch ( winN){

case "link":Nifty("TH","top same-height");break;default:Nifty("div#container p","transparent top");break;}Grad("copy1","ff0000","0000ff");Grad("copy2","ff00ff","ffff00");if(document.getElementById("initial") != null){document.getElementById("initial").style.backgroundImage="url(" + IMAGE_PATH + "img/sozai/i" + Math.floor(Math.random() * 15) + ".gif)";}}function BookMark(siteNo){switch (siteNo){

case 1:window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+encodeURIComponent(document.title)+'&u=http://fx-cashback-fx.com/&opener=bm&ei=UTF-8','popup','width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50',0);break;

case 2:window.open('http://www.google.com/bookmarks/mark?op=edit&title='+encodeURIComponent(document.title)+'&bkmk=http://fx-cashback-fx.com/');break;

case 3:window.open('http://buzzurl.jp/entry/http://fx-cashback-fx.com/');break;

case 4:window.open('http://pookmark.jp/post?title='+encodeURIComponent(document.title)+'&url=http://fx-cashback-fx.com/');break;

case 5:window.open('http://b.hatena.ne.jp/append?http://fx-cashback-fx.com/');break;

case 6:window.open('http://del.icio.us/post?title='+encodeURIComponent(document.title)+'&url=http://fx-cashback-fx.com/');break;

case 7:window.open('http://clip.livedoor.com/redirect?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 8:window.open('http://digg.com/submit?phase=2?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 9:window.open('http://www.bloglines.com/sub?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 10:window.open('http://rss.drecom.jp/shortcut/add_clip?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 11:window.open('http://clip.nifty.com/create?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 12:window.open('http://pingking.jp/bookmark/create?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 13:window.open('http://choix.jp/submit?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 14:window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 15:window.open('http://bluedot.us/Authoring.aspx?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 16:window.open('http://www.technorati.com/faves?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 17:window.open('https://favorites.live.com/quickadd.aspx?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;


case 18:window.open('http://blinklist.com/index.php?Action=Blink/addblink.php&Url='+encodeURIComponent(location.href)+'&Title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 19:window.open('http://bookmark.fc2.com/user/post?title='+encodeURIComponent(document.title)+'&link=http://fx-cashback-fx.com/');break;

case 20:window.open('http://clip.nifty.com/create?title='+encodeURIComponent(document.title)+'&url=http://fx-cashback-fx.com/');break;

}}function TableRightClick(){if(event.button == 2){var thisObj;



if(navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Safari") >= 0 ) thisObj=event.srcElement;else thisObj=event.target;if(thisObj.tagName == "TD" || thisObj.tagName == "TH"){if(location.href.indexOf("jiscolor") > 0 || location.href.indexOf("colorname") > 0 || location.href.indexOf("japan") > 0){if(thisObj.tagName == "TD" ) return;}if(thisObj.innerHTML.length < 6 || thisObj.innerHTML.indexOf(" / ") > 0){return;}var strColHtml=thisObj.innerHTML;if(strColHtml.indexOf("#") < 0 ) strColHtml="#" + strColHtml;if(navigator.userAgent.indexOf("MSIE") >= 0){document.documentElement.style.backgroundColor=strColHtml;}else{document.body.setAttribute("style", "background:" + strColHtml + ";");}}return true;}}function SetObjColor(obj,funcFlg,pageFlg){Init();if(navigator.userAgent.indexOf("MSIE") >= 0){document.documentElement.onscroll=MoveBox;window.onresize=MoveBox;}else if(navigator.userAgent.indexOf("Safari") >= 0){document.onscroll=MoveBoxSafari;window.onresize=MoveBoxSafari;}else{document.onscroll=MoveBox;window.onresize=MoveBox;}var prefix="";var arrayObj=document.getElementsByTagName(obj);if(arrayObj.length > 0){if(arrayObj[0].innerHTML.indexOf('#') == -1 ) prefix="#";if(navigator.userAgent.indexOf("MSIE") >= 0){if(funcFlg == 0){for(var x=0; x < arrayObj.length; x++){arrayObj[x].style.backgroundColor=prefix + arrayObj[x].innerHTML;}}else{var r,g,b;for(var x=0; x < arrayObj.length; x++){var hexcode=arrayObj[x].innerHTML.replace('#','');


arrayObj[x].parentNode.appendChild(hogeTD);}}}}MoveBox();}function EachVal(kind){var prefix="";

Texts[2]=document.getElementById("MainColor");Texts[3]=document.getElementById("CharColor");for(var i=0; i < Texts.length; i++){if(Texts[i].value.length > 0){if(Texts[i].value.indexOf("#") < 0 && obj.checked){Texts[i].value="#" + Texts[i].value;}else if(Texts[i].value.indexOf("#") >= 0 && !obj.checked){Texts[i].value=Texts[i].value.replace("#","");}}}}function DelChar(tag){var tbls=document.getElementById("container").getElementsByTagName("TABLE");for(var i=0; i < tbls.length; i++){var cells=tbls[i].getElementsByTagName(tag);for(var j=0; j < cells.length; j++){cells[j].style.color=cells[j].style.backgroundColor;}}}function ReChar(tag){var cellCol="#ffffff";for(var i=0; i < tbls.length; i++){var cells=tbls[i].getElementsByTagName(tag);for(var j=0; j < cells.length; j++){cells[j].style.color=cellCol;}}}function TableOver(e){if(navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Safari") >= 0){if(e.srcElement.tagName == "TD"){e.srcElement.parentNode.style.backgroundColor="lime";}}else{if(e.target.tagName == "TD" ) e.target.parentNode.style.backgroundColor="lime";}}function TableOut(e){if(navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Safari") >= 0){if(e.srcElement.tagName == "TD"){e.srcElement.parentNode.style.backgroundColor="";}}else{if(e.target.tagName == "TD" ) e.target.parentNode.style.backgroundColor="";}}function BgClear(){var divBox=document.getElementById("box");var pTags=divBox.getElementsByTagName("P");for(var i=0; i < pTags.length; i++){pTags[i].style.backgroundColor="";}if(navigator.userAgent.indexOf("MSIE") >= 0){document.documentElement.style.backgroundColor="#ffffff";}else{document.body.setAttribute("style", "background:#ffffff;");}document.getElementById("cInfo").innerHTML="";}function ViewCode(obj,no,pageFlg){var objsTABLE=document.getElementById("container").getElementsByTagName("TABLE");if(no == -1){for (var i=0; i < objsTABLE.length; i++){var objsTH_TD=objsTABLE[i].getElementsByTagName(obj);for(var j=0; j < objsTH_TD.length; j++){objsTH_TD[j].style.color=objsTH_TD[j].style.backgroundColor;}}}else{var strCol="#ffffff";if(pageFlg == 2 ) strCol="#00008b";for (var i=0; i < objsTABLE.length; i++){var objsTH_TD=objsTABLE[i].getElementsByTagName(obj);for(var j=0; j < objsTH_TD.length; j++){objsTH_TD[j].style.color=strCol;}}}}function createHttpRequest(){if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch ( ex1){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch ( ex2){return null;}}}else if(window.XMLHttpRequest){return new XMLHttpRequest();}else{return null;}}function requestFile(path, val){var httpobj=createHttpRequest();httpobj.open("GET", path, true);httpobj.onreadystatechange=function(){if(httpobj.readyState == 4){WriteData(httpobj, val);}};httpobj.send('');}function RemoveElement(){if(addFlag){for(var i=0; i < trNodes.length; i++){trNodes[i].removeChild(trNodes[i].lastChild);}addFlag=false;}}var trNodes;var addFlag=false;function WriteData(oj, cval){var res=oj.responseXML;var colorNodes=res.getElementsByTagName("hex");if(addFlag){if(navigator.userAgent.indexOf("MSIE") >= 0){for (var i=0; i < colorNodes.length; i++){var hogeTD=document.createElement("TD");hogeTD.innerHTML=colorNodes[i].firstChild.nodeValue;hogeTD.style.backgroundColor="#" + colorNodes[i].firstChild.nodeValue;trNodes[i + 1].replaceChild(hogeTD, trNodes[i + 1].lastChild);}var hogeTH=document.createElement("TH");hogeTH.innerHTML=res.getElementsByTagName("colorlist")[0].getAttributeNode("kind").text;trNodes[0].replaceChild(hogeTH, trNodes[0].lastChild);}else{for (var i=0; i < colorNodes.length; i++){var hogeTD=document.createElement("TD");hogeTD.innerHTML=colorNodes[i].firstChild.nodeValue;hogeTD.setAttribute("bgcolor", "#" + colorNodes[i].firstChild.nodeValue);trNodes[i + 1].replaceChild(hogeTD, trNodes[i + 1].lastChild);}var hogeTH=document.createElement("TH");hogeTH.innerHTML=res.getElementsByTagName("colorlist")[0].getAttribute("kind");trNodes[0].replaceChild(hogeTH, trNodes[0].lastChild);}}else{trNodes=document.getElementById("domTbl").getElementsByTagName("TR");if(navigator.userAgent.indexOf("MSIE") >= 0){for (var i=0; i < colorNodes.length; i++){var hogeTD=document.createElement("TD");hogeTD.innerHTML=colorNodes[i].firstChild.nodeValue;hogeTD.style.backgroundColor="#" + colorNodes[i].firstChild.nodeValue;trNodes[i + 1].appendChild(hogeTD);}var hogeTH=document.createElement("TH");hogeTH.innerHTML=res.getElementsByTagName("colorlist")[0].getAttributeNode("kind").text;trNodes[0].appendChild(hogeTH);}else{for (var i=0; i < colorNodes.length; i++){var hogeTD=document.createElement("TD");hogeTD.innerHTML=colorNodes[i].firstChild.nodeValue;hogeTD.setAttribute("bgcolor", "#" + colorNodes[i].firstChild.nodeValue);trNodes[i + 1].appendChild(hogeTD);}var hogeTH=document.createElement("TH");hogeTH.innerHTML=res.getElementsByTagName("colorlist")[0].getAttribute("kind");trNodes[0].appendChild(hogeTH);}}addFlag=true;}function GetXMLColor(selectObj){var fName="";switch ( selectObj.selectedIndex){case 1:fName="vivid";break;case 2:fName="light";break;case 3:fName="strong";break;case 4:fName="deep";break;case 5:fName="pale";break;case 6:fName="soft";break;case 7:fName="dull";break;case 8:fName="dark";break;case 9:fName="very_pale";break;case 10:fName="light_grayish";break;case 11:fName="grayish";break;case 12:fName="dark_grayish";break;case 13:fName="very_dark";break;default:return;break;}if(navigator.userAgent.indexOf("MSIE") >= 0){requestFile("http://www.nicopon.com/color_xml/" + fName + ".xml", 0);}else{requestFile("../../color_xml/" + fName + ".xml", 0);}}function ColorClick2(e,colorTagName,prefix,pageFlag){var exFlag=false;var thisObj;if(navigator.userAgent.indexOf("MSIE") >= 0 ) thisObj=e.srcElement;else thisObj=e.target;if(thisObj.parentNode.id == "tblHeader" ) return;var inHTML=thisObj.innerHTML;var tName=thisObj.tagName;if(inHTML.length < 6 || inHTML.indexOf(" / ") > 0){if(pageFlag < 90){return;}}var topObj=document.getElementById("TopColor");var subObj=document.getElementById("SubColor");var mainObj=document.getElementById("MainColor");var charObj=document.getElementById("CharColor");var currentObj=topObj;var checkFlag=-1;var strColHtml="";if(tName == colorTagName){strColHtml=prefix + inHTML;}else if(tName == "TD" || tName == "TH"){strColHtml=prefix + thisObj.parentNode.firstChild.innerHTML;}else{exFlag=true;}if(!exFlag){if(!document.getElementById("chk0").checked ) strColHtml=strColHtml.replace('#','');for(var i=0; i < 4; i++){if(document.getElementById("rdo" + i).checked ) checkFlag=i;}if(checkFlag == -1){if(topObj.value.length == 0 ) {currentObj=topObj;}else{if(subObj.value.length == 0 ) {currentObj=subObj;}else{if(mainObj.value.length == 0 ) {currentObj=mainObj;}else{currentObj=charObj;}}}}else if(checkFlag == 0){currentObj=topObj}else if(checkFlag == 1){currentObj=subObj;}else if(checkFlag == 2){currentObj=mainObj;}else if(checkFlag == 3){currentObj=charObj;}currentObj.value=strColHtml;if(!document.getElementById("chk0").checked){currentObj.parentNode.style.backgroundColor="#" + strColHtml;RGBtoCMYK(currentObj.id,strColHtml.substr(0,2), strColHtml.substr(2,2), strColHtml.substr(4,2),0);}else{currentObj.parentNode.style.backgroundColor=strColHtml;RGBtoCMYK(currentObj.id,strColHtml.substr(1,2), strColHtml.substr(3,2), strColHtml.substr(5,2),0);}}}function MoveBox(){var left=bytefx.$position(document.getElementById("container")).x + 635;bytefx.move(document.getElementById('box'), {x:left, y:document.documentElement.scrollTop + 180}, 10);}function MoveBoxSafari(){var left=bytefx.$position(document.getElementById("container")).x + 635;bytefx.move(document.getElementById('box'), {x:left, y:document.body.scrollTop + 180}, 10);}function Grad(obj,start,end){var objHTML=document.getElementById(obj).innerHTML;var objLen=objHTML.length;var gradString="";var rgb=new Array(3);rgb[0]=new Array(2);rgb[1]=new Array(2);rgb[2]=new Array(2);rgb[0][0]=parseInt(start.substring(0,2),16);rgb[1][0]=parseInt(start.substring(2,4),16);rgb[2][0]=parseInt(start.substring(4,6),16);rgb[0][1]=Math.floor((rgb[0][0] - parseInt(end.substring(0,2),16)) / objLen);rgb[1][1]=Math.floor((rgb[1][0] - parseInt(end.substring(2,4),16)) / objLen);rgb[2][1]=Math.floor((rgb[2][0] - parseInt(end.substring(4,6),16)) / objLen);var cCode=new Array(3);var tagFlag=false;for(var i=0; i < objLen; i++){if(objHTML.charAt(i) == "<"){tagFlag=true;gradString+=objHTML.charAt(i);}else if(objHTML.charAt(i) == ">"){tagFlag=false;gradString+=objHTML.charAt(i);}else{if(tagFlag){gradString+=objHTML.charAt(i);}else{for(var j=0; j < 3; j++){var temp=rgb[j][0] - rgb[j][1] * i;if(temp < 0 ) cCode[j]=0;else if(temp > 255 ) cCode[j]=255;else cCode[j]=temp;cCode[j]=cCode[j].toString(16);if(cCode[j].length == 1 ) cCode[j]="0" + cCode[j];}gradString+=objHTML.charAt(i).fontcolor("#" + cCode[0] + cCode[1] + cCode[2]);}}}document.getElementById(obj).innerHTML=gradString;}var valsBG;var valsSUB;var valsMain;var valsChar;var hexColString;var imgPath;function GetImgPath_StringColor(v1,v2,v3,v4,path){valsBG=RetCMYK(v1.substring(1,3),v1.substring(3,5),v1.substring(5,7));valsSUB=RetCMYK(v2.substring(1,3),v2.substring(3,5),v2.substring(5,7));valsMain=RetCMYK(v3.substring(1,3),v3.substring(3,5),v3.substring(5,7));valsChar=RetCMYK(v4.substring(1,3),v4.substring(3,5),v4.substring(5,7));hexColString="背景色は [<strong> " + v1 + " </strong>] サブ色は [<strong> " + v2 + " </strong>]<br>メイン色は [<strong> " + v3 + " </strong>] 文字色は [<strong> " + v4 + " </strong>]";imgPath=path + "img/sozai/sample1.jpg";var objImg=document.getElementById("limg");if(objImg != null){if(objImg.value.length != 0){imgPath=objImg.value;}}}function RetHTMLString1(id,path,v1,v2,v3,v4,winFlag){var writeHTML="";var strChar="■ 配色のサンプルを表示しています。<br><br>";GetImgPath_StringColor(v1,v2,v3,v4,path);if(id >= 0){if(winFlag > 0){writeHTML+="<input id='hideCMYK" + id + "' type='hidden' value='" + document.getElementById("cInfo").innerHTML + "'>";}else{writeHTML+="<input type='hidden'>";}var sp="&nbsp;&nbsp;&nbsp;&nbsp;";strChar="<div style='color:" + v4 + "'>";strChar+="■ 背景色 (Background)<p style='margin:5px;'> C [ " + valsBG[0] + " ]" + sp + "M [ " + valsBG[1] + " ]" + sp + " Y [ " + valsBG[2] + " ]" + sp + "K [ " + valsBG[3] + " ]</p>";strChar+="■ サブ色 (Sub)<p style='margin:5px;'> C [ " + valsSUB[0] + " ]" + sp + "M [ " + valsSUB[1] + " ]" + sp + "Y [ " + valsSUB[2] + " ]" + sp + "K [ " + valsSUB[3] + " ]</p>";strChar+="■ メイン色 (Main)<p style='margin:5px;'> C [ " + valsMain[0] + " ]" + sp + "M [ " + valsMain[1] + " ]" + sp + "Y [ " + valsMain[2] + " ]" + sp + "K [ " + valsMain[3] + " ]</p>";strChar+="■ 文字色 (Char)<p style='margin:5px;'> C [ " + valsChar[0] + " ]" + sp + "M [ " + valsChar[1] + " ]" + sp + "Y [ " + valsChar[2] + " ]" + sp + "K [ " + valsChar[3] + " ]</p>";sp="<p style='margin:5px 0px;'>---- 配色のサンプルを表示しています -----</p>";strChar+="<br>" + sp + sp + "</div>";}else{strChar=strChar + strChar + strChar + strChar + strChar + strChar;}writeHTML+="<div class='cw1_0'><div class='cw1_1' style='background:" + v1 + ";'>";writeHTML+="<h2 class='cwTitle'>Color Sample</h2>配色のサンプルイメージを表示しています。<br>" + hexColString + " を使用しています。</div>";writeHTML+="<div class='cw1_2' style='background:" + v2 + ";'></div><div class='cw1_3' style='background:" + v3 + ";'>";writeHTML+="<table class='cw1_3_tbl' cellpadding='5' cellspacing='0' border='0'><tr>";writeHTML+="<td class='cw1_3_td1'><img id='" + id + "_img1' width='320' height='240' src='" + imgPath + "' /></td>";writeHTML+="<td class='cw1_3_td2' style='color:" + v4 +";'>" + strChar + "<span class='print'></span>";writeHTML+="</td></tr></table></div><div class='cw1_2' style='background:" + v2 + ";'></div>";writeHTML+="<div class='cw1_5' style='background:" + v1 + ";'><br />(c) nicopon.com All Rights Reserved.</div></div>";if(winFlag > 0){writeHTML+="<div style='margin:5px 0px 0px 10px;color:black;'>● 印刷 や 配色イメージの一時保存用に <a href=\"javascript:OpenOtherWin(" + id + ",'" + path + "','" + v1 + "','" + v2 + "','" + v3 + "','" + v4 + "',1)\">別画面</a> で開く";writeHTML+="&nbsp;&nbsp;&nbsp;&nbsp;● この配色を親のBOXに <a href=\"javascript:SetVal(" + id + ",'" + v1 + "','" + v2 + "','" + v3 + "','" + v4 + "')\">セット</a> する</div>";}return writeHTML;}function RetHTMLString2(id,path,v1,v2,v3,v4,winFlag){var writeHTML="";var strChar="■ 配色のサンプルを表示しています。<br><br>";if(id >= 0){writeHTML+="<input type='hidden' id='tab2_hide" + id + "'>";var sp="&nbsp;&nbsp;&nbsp;&nbsp;";strChar="<div style='color:" + v4 + "'>";strChar+="■ 背景色 (Background)<p style='margin:5px;'> C [ " + valsBG[0] + " ]" + sp + "M [ " + valsBG[1] + " ]" + sp + " Y [ " + valsBG[2] + " ]" + sp + "K [ " + valsBG[3] + " ]</p>";strChar+="■ サブ色 (Sub)<p style='margin:5px;'> C [ " + valsSUB[0] + " ]" + sp + "M [ " + valsSUB[1] + " ]" + sp + "Y [ " + valsSUB[2] + " ]" + sp + "K [ " + valsSUB[3] + " ]</p>";strChar+="■ メイン色 (Main)<p style='margin:5px;'> C [ " + valsMain[0] + " ]" + sp + "M [ " + valsMain[1] + " ]" + sp + "Y [ " + valsMain[2] + " ]" + sp + "K [ " + valsMain[3] + " ]</p>";strChar+="■ 文字色 (Char)<p style='margin:5px;'> C [ " + valsChar[0] + " ]" + sp + "M [ " + valsChar[1] + " ]" + sp + "Y [ " + valsChar[2] + " ]" + sp + "K [ " + valsChar[3] + " ]</p>";sp="<p style='margin:5px 0px;'>---- 配色のサンプルを表示しています -----</p>";strChar+="<br>" + sp + sp + "</div>";}else{strChar=strChar + strChar + strChar + strChar + strChar + strChar;}writeHTML+="<div class='cw2_0' style='border-color:" + v1 + ";background:" + v3 + ";'>";writeHTML+="<div class='cw2_1' style='background:" + v1 + ";border-color:" + v2 + ";'><div class='cw2_1_1' style='background:" + v2 + ";'></div><p onclick='ChgCol(this,\"#ff0000\")'>■ Red</p><p onclick='ChgCol(this,\"#FFA500\")'>■ Orange</p><p onclick='ChgCol(this,\"#ffff00\")'>■ Yellow</p><p onclick='ChgCol(this,\"#9ACD32\")'>■ YellowGreen</p><p onclick='ChgCol(this,\"#008000\")'>■ Green</p><p onclick='ChgCol(this,\"#00FFFF\")'>■ Cyan</p><p onclick='ChgCol(this,\"#0000ff\")'>■ Blue</p><p onclick='ChgCol(this,\"#800080\")'>■ Purple</p><p onclick='ChgCol(this,\"#FFc0cb\")'>■ Pink</p><p onclick='ChgCol(this,\"#FF1493\")'>■ DeepPink</p><p onclick='ChgCol(this,\"#fff\")'>■ White</p><p onclick='ChgCol(this,\"#808080\")'>■ Gray</p><p onclick='ChgCol(this,\"#000\")'>■ Black</p></div>";writeHTML+="<div class='cw2_2' style='background:" + v2 + ";border-color:" + v1 + ";'><h2 class='cwTitle'>Color Sample</h2><div style='padding-top:5px;'>" + hexColString + "</div></div>";writeHTML+="<div class='cw2_3' style='background:" + v3 + ";color:" + v4 + ";'>";writeHTML+="<table cellspacing='0' cellpadding='5' style='font-size:9pt;text-align:center;margin-top:10px;'><tr><td><img style='border:solid " + v2 + " 1px;' id='" + id + "_img2' width='200' height='150' src='" + imgPath + "'></td><td rowspan='2'><div style='margin:0px;height:325px;width:248px;border:solid " + v2 + " 1px;'><p style='margin:0px;background:" + v2 + ";'>&nbsp;</p><br>" + strChar + "<span class='print'></span></div></td></tr><tr><td><div style='margin:0px;height:160px;width:200px;border:solid " + v2 + " 1px;'><p style='margin:0px;background:" + v2 + ";'>&nbsp;</p></div></td></tr></table>";writeHTML+="</div>";writeHTML+="<div class='cw2_4' style='background:" + v3 + ";color:" + v4 + ";'>(c) nicopon.com All Rights Reserved.</div>";writeHTML+="</div>";if(winFlag > 0){writeHTML+="<div style='margin:5px 0px 0px 10px;color:black;'>● 印刷 や 配色イメージの一時保存用に <a href=\"javascript:OpenOtherWin(" + id + ",'" + path + "','" + v1 + "','" + v2 + "','" + v3 + "','" + v4 + "',2)\">別画面</a> で開く";writeHTML+="&nbsp;&nbsp;&nbsp;&nbsp;● この配色を親のBOXに <a href=\"javascript:SetVal(" + id + ",'" + v1 + "','" + v2 + "','" + v3 + "','" + v4 + "')\">セット</a> する</div>";}return writeHTML;}var preCharCol="#ffffff";function ChgCol(obj,strCol){bytefx.color(obj.parentNode,"color",preCharCol,strCol,4);bytefx.color(obj.parentNode.parentNode.childNodes[1],"color",preCharCol,strCol,4);preCharCol=strCol;}function SetVal(winNo, v1, v2, v3, v4){var arrayObj=new Array("TopColor","SubColor","MainColor","CharColor");var arrayVal=new Array(v1,v2,v3,v4);for(var i=0; i < arrayObj.length; i++){var thisObj=document.getElementById(arrayObj[i]);thisObj.value=arrayVal[i];thisObj.parentNode.style.backgroundColor=arrayVal[i];}document.getElementById("cInfo").innerHTML=document.getElementById("hideCMYK" + winNo).value;}function OpenOtherWin(id, path, v1, v2, v3, v4, tab){var otherWin=window.open("","","location=0,menubar=1,resizable=1,status=0,width=620,height=500.left=100,top=100");var strHTML="<html><head><title>ColorSample</title>";strHTML+="<meta http-equiv='content-type' content='text/html; charset=UTF-8'>";strHTML+="<meta http-equiv='content-style-type' content='text/css'>";strHTML+="<meta http-equiv='content-script-type' content='text/javascript'>";strHTML+="<link rel='stylesheet' href='../../css/common.css' type='text/css'>";strHTML+="</head><body style='margin:0px;font-family:sans-serif'>";if(tab == 1){strHTML+=RetHTMLString1(id,path,v1,v2,v3,v4,-1);}else if(tab == 2){strHTML+=RetHTMLString2(id,path,v1,v2,v3,v4,-1);}else if(tab == 3){strHTML+=RetHTMLString3(id,path,v1,v2,v3,v4,-1);}strHTML+="</body></html>";strHTML=strHTML.replace("<span class='print'></span>","<p><input type='button' onclick='if(confirm(\"色が印刷されるかどうかは[ ファイル ]から[ 印刷プレビュー ]で確認できます。\\n色が印刷されない場合の設定方法は当サイト内の操作方法を参照して下さい。\\n印刷を実行しますか？\")){print();}' value='印 刷' style='color:" + v4 + ";background:" + v3 + ";font-size:9pt;border:solid 1px " + v4 + ";' /></p>");otherWin.document.open();otherWin.document.write(strHTML);otherWin.document.close();}var win;var winId=0;function AjaxWindowOpen(){var topCol=document.getElementById("TopColor").value;var subCol=document.getElementById("SubColor").value;var mainCol=document.getElementById("MainColor").value;var charCol=document.getElementById("CharColor").value;if(topCol.length == 6 ) {topCol="#" + topCol} else if(topCol.length == 0){topCol="#330800"};if(subCol.length == 6 ) {subCol="#" + subCol} else if(subCol.length == 0){subCol="#ff2a00"};if(mainCol.length == 6 ) {mainCol="#" + mainCol} else if(mainCol.length == 0){mainCol="#ffd4cc"};if(charCol.length == 6 ) {charCol="#" + charCol} else if(charCol.length == 0){charCol="#661100"};var strHTML1=RetHTMLString1(winId,"../../",topCol,subCol,mainCol,charCol,1);var strHTML2=RetHTMLString2(winId,"../../",topCol,subCol,mainCol,charCol,1);var yVal=100;var plusXPos=bytefx.$position(document.getElementById("container")).x + 10 + (winId % 5 * 20);var plusYPos=winId % 5 * 40;if(navigator.userAgent.indexOf("Safari") >= 0){yVal=( document.body.scrollTop == 0 ) ? 150 + plusYPos : document.body.scrollTop + 150 + plusYPos;}else{yVal=( document.documentElement.scrollTop == 0 ) ? 100 + plusYPos : document.documentElement.scrollTop + 150 + plusYPos;}var win=new DHTMLSuite.windowModel({windowsTheme:true,id:'sampleWin' + winId,title:'Color Sample',xPos:plusXPos,yPos:yVal,width:630,height:540,minWidth:150,minHeight:100 } ); win.addTab({ id:winId + '_Tab1',htmlElementId:winId + '_Tab1',tabTitle:'sample1',textContent:strHTML1 } );win.addTab({ id:winId + '_Tab2',htmlElementId:winId + '_Tab2',tabTitle:'sample2',textContent:strHTML2 } );var winWid=new DHTMLSuite.windowWidget(win);winWid.init();winWid.close=function(){this.purge();};var cols=new Array("photo1","photo2","photo3","photo4","photo5","photo6","photo7","photo8","photo9");var statusText="";for(var i=0; i < cols.length; i++){statusText +=" <a href='javascript:ChgImg(" + winId + ",\"" + cols[i] + "\")'>" + cols[i] + "</a> ";}winWid.setStatusBarText(statusText);winId++;}function ChgImg(id,col){document.getElementById(id + "_img1").src=IMAGE_PATH + "img/sample/" + col + ".jpg";document.getElementById(id + "_img2").src=IMAGE_PATH + "img/sample/" + col + ".jpg";}function sWinOpen(topCol,subCol,mainCol,charCol,imgName){var strHTML1=RetHTMLString1(winId,"../",topCol,subCol,mainCol,charCol,-1);var strHTML2=RetHTMLString2(winId,"../",topCol,subCol,mainCol,charCol,-1);var yVal=100;var plusXPos=bytefx.$position(document.getElementById("container")).x + 10 + (winId % 5 * 20);var plusYPos=winId % 5 * 30;if(navigator.userAgent.indexOf("Safari") >= 0){yVal=( document.body.scrollTop == 0 ) ? 150 + plusYPos : document.body.scrollTop + 150 + plusYPos;}else{yVal=( document.documentElement.scrollTop == 0 ) ? 150 + plusYPos : document.documentElement.scrollTop + 150 + plusYPos;}var win=new DHTMLSuite.windowModel({windowsTheme:true,id:'coloringWin' + winId,title:'Color Sample',xPos:plusXPos,yPos:yVal,width:630,height:520,minWidth:150,minHeight:100 } ); win.addTab({ id:winId + '_Tab1',htmlElementId:winId + '_Tab1',tabTitle:'sample1',textContent:strHTML1 } );win.addTab({ id:winId + '_Tab2',htmlElementId:winId + '_Tab2',tabTitle:'sample2',textContent:strHTML2 } );var winWid=new DHTMLSuite.windowWidget(win);winWid.init();if(imgName == null){ChgImg(winId,"photo4");}else{ChgImg(winId,imgName);}var cols=new Array("photo1","photo2","photo3","photo4","photo5","photo6","photo7","photo8","photo9");var statusText="";for(var i=0; i < cols.length; i++){statusText +=" <a href='javascript:ChgImg(" + winId + ",\"" + cols[i] + "\")'>" + cols[i] + "</a> ";}winWid.setStatusBarText(statusText);winWid.close=function(){this.purge();};winId++;}var LinkDivH;function Show(no){var h=LinkDivH[no];bytefx.size(document.getElementById("div" + no),{width:770,height:h},40);}function Hidden(no){bytefx.size(document.getElementById("div" + no),{width:770,height:0},40);}function GetLinkDivHeight(cnt){LinkDivH=new Array(cnt);for(var i=0; i < cnt; i++){LinkDivH[i]=bytefx.$size(document.getElementById("div" + i)).height;}}function AllLinkClose(){for(var i=0; i < LinkDivH.length; i++){bytefx.size(document.getElementById("div" + i),{width:770,height:0},40);}}function AllLinkShow(){for(var i=0; i < LinkDivH.length; i++){bytefx.size(document.getElementById("div" + i),{width:770,height:LinkDivH[i]},40);}}function LinkOpen(no){for(var i=0; i < LinkDivH.length; i++){if(no == i){bytefx.size(document.getElementById("div" + i),{width:770,height:LinkDivH[i]},40);}else{bytefx.size(document.getElementById("div" + i),{width:770,height:0},40);}}}function RetCMYK(hexR,hexG,hexB){var r=parseInt(hexR,16) / 255;var g=parseInt(hexG,16) / 255;var b=parseInt(hexB,16) / 255;var k=RetMin(1 - r, 1 - g, 1 - b);var c=Math.round(((1 - r - k) / (1 - k)) * 100);var m=Math.round(((1 - g - k) / (1 - k)) * 100);var y=Math.round(((1 - b - k) / (1 - k)) * 100);k=Math.round(k * 100);return new Array(c,m,y,k);}function RGBtoCMYK(objID,hexR,hexG,hexB,tblEx){var vals=RetCMYK(hexR,hexG,hexB);var c=vals[0];var m=vals[1];var y=vals[2];var k=vals[3];var strName="";if(objID == "TopColor"){strName="背景";}else if(objID == "SubColor"){strName="サブ";}else if(objID == "MainColor"){strName="メイン";}else if(objID == "CharColor"){strName="文字";}var objcInfo=document.getElementById("cInfo");var objCMYK=document.getElementById("CMYK");if(objCMYK != null){var hogeHTML=objcInfo.innerHTML;hogeHTML=hogeHTML.toUpperCase();var strTR="<TD>" + strName +"</TD><TD>" + c + "</TD><TD>" + m + "</TD><TD>" + y + "</TD><TD>" + k + "</TD>";var arrayTR=objCMYK.getElementsByTagName("TR");var rdoVal=-1;if(objCMYK.getElementsByTagName("TR").length < 5){for(var k=0; k < arrayTR.length; k++){if(arrayTR[k].innerHTML.indexOf(strName) > 0){rdoVal=1;}}}else{rdoVal=1;}if(rdoVal == -1){var strHTML="<TR>" + strTR + "</TR></TBODY></TABLE>";hogeHTML=hogeHTML.replace("</TBODY></TABLE>",strHTML);objcInfo.innerHTML=hogeHTML;}else{for(var j=0; j < arrayTR.length; j++){if(arrayTR[j].innerHTML.indexOf(strName) > 0){var hogeTR=arrayTR[j].innerHTML.toUpperCase();hogeHTML= hogeHTML.replace(hogeTR,strTR);}}objcInfo.innerHTML=hogeHTML;}}else{objcInfo.innerHTML="<table id=\"CMYK\"><tbody><tr><th class=\"CMYK_TH1\"></th><th>C</th><th>M</th><th>Y</th><th>K</th></tr><tr><td>" + strName + "</td><td>" + c + "</td><td>" + m + "</td><td>" + y + "</td><td>" + k + "</td></tr></tbody></table>";}}function RetMin(v1,v2,v3){if ((v1 <= v2) && (v1 <= v3)) return v1;if ((v2 <= v1) && (v2 <= v3)) return v2;return v3;}
