<html><head>
<title>FC2blog Template Editor</title>
<script type="text/javascript"><!--
tName=location.href.split("template=")[1].split("&")[0];
if(location.href.indexOf('<%url>')!=-1){
 location.href="<%server_url><%blog_id>/?template="+tName+"&index";
}
//--></script>
<!--index_area-->
</head>
<script type="text/javascript"><!--
document.writeln('<frameset rows="20,*" border="0">');
document.writeln('<frame src="<%server_url><%blog_id>/?template='+tName+'&page=0" name="TOP">');
document.writeln('<frame src="<%server_url><%blog_id>/?template='+tName+'&cat=0" name="Main">');
document.writeln('<noframes>フレーム</noframes>');
document.writeln('</frameset>');
//--></script>
<!--/index_area-->

<!--not_index_area-->
<style type="text/css">
html,body,form {height:100%; width:100%; overflow:hidden; margin:0; padding:0;}
body { font-size:12px; text-align:center; background:#090;}
a {text-decoration:none}
h1 {font-size:50px; color:#DDD;line-height:100px; padding-top:99px; font-family:verdana,arial;}
h1 span {font-size:16px;}
#BOX {width:100%; height:100%; margin:auto; overflow:hidden;}
#F,#HTMLcode,#CSScode { width:100%; height:100%;  }
#Box,#DMY,#HTMLcode,#CSScode,#MENU { display:none; }
#MENU span {color:#DFD; float:left; font-size:14px; line-height:20px}
#AD {color:silver;  padding:3px;}  #AD a {color:silver; padding:0 3px;} 
#AD a,#MENU a {color:white; font-weight:bolder;}
#HTMLcode {background:#FFC url(http://blog-imgs-24.fc2.com/p/c/a/pcafe/HTMLwp.gif) bottom right no-repeat}
#CSScode  {background:#FFC url(http://blog-imgs-24.fc2.com/p/c/a/pcafe/CSSwp.gif) bottom right no-repeat}
</style>
<script type="text/javascript"><!--
Flg=0; TURL="<%server_url><%blog_id>/?template="; Oname="空文or外部起源";
function del(ID){ document.getElementById(ID).style.display="none" }
function shw(ID){ document.getElementById(ID).style.display="block" }
function M1(){del("HTMLcode");del("CSScode");shw("F");Flg=1}
function M2(){del("F");del("CSScode");shw("HTMLcode");Flg=2}
function M3(){del("F");del("HTMLcode");shw("CSScode");Flg=3}
function Cls(){ if(window.V)window.V.close() }
function Save(){
 del("HTMLcode");del("CSScode");shw("F");
 if(window.confirm(Oname+" のソースを "+Tname+" に保存します\nよろしいですか ?") ) {
  F.document.edit.action='#editform';
  F.document.edit.mode.value='design';
  F.document.edit.target='_self';
  F.document.edit.html.value= document.getElementById("HTMLcode").value; 
  F.document.edit.css.value= document.getElementById("CSScode").value; 
  F.document.edit.submit(); if(Flg==2){M2()} else{if(Flg==3){M3()} }
} }
function Load(){
 document.getElementById("HTMLcode").value=F.document.edit.html.value;
 document.getElementById("CSScode").value=F.document.edit.css.value;
 Oname=Tname;
}
function Begin(){
 del("Cover");shw("BOX"); Tname=""; var A=F.document.getElementsByTagName("H3");
 for(i=1;i<A.length;i++){ k=A[i].innerHTML;
  if(k.indexOf("のHTML編集")>0){ Tname=k.split("のHTML編集")[0];break }
 }
 if(Tname==""){ parent.TOP.del("MENU"); parent.TOP.shw("AD");
 } else {
  parent.TOP.del("AD"); parent.TOP.shw("MENU");
  parent.TOP.document.getElementById("TN").innerHTML=Tname;
  parent.TOP.document.getElementById("TN").href=TURL+Tname+"&index";
  alert(Tname+" を編集できます");
} }
//--></script>
</head><body>
<!--not_category_area-->
<div id="AD"><%ad> <%ad2></div>
<div id="MENU">
<span>&nbsp; Editing &nbsp; <a href="#" target="V" title=" PREVIEW " id="TN">.</a></span>
<input type="button" value="Control" onclick="parent.Main.M1()"> 
<input type="button" value="HTML" onclick="parent.Main.M2()"> 
<input type="button" value="CSS" onclick="parent.Main.M3()">       
<input type="button" value="LOAD" onclick="parent.Main.Load()">
<input type="button" value="SAVE" onclick="parent.Main.Save()">
</div><!--/not_category_area-->

<!--category_area-->
<h1 id="Cover">FC2 Template Editor<br /><span>by FCafe</span></h1>
<div id="BOX">
<iframe src="<%server_url>control.php?mode=design" frameborder="0" name="F" id="F" onload="Begin()">
EditForm</iframe>
<textarea id="HTMLcode" name="HTMLcode">.</textarea>
<textarea id="CSScode" name="CSScode">.</textarea>
</div><!--/category_area-->

</body><!--/not_index_area-->
</html>