var d=0
function title(str){
self._frtag='<title>'+str+'</title>\n'
}
function frameset(cr,size,opt){
if(cr!='end'){
d++
_frtag+='<frameset '+(cr=='rows'?'rows':'cols')+'="'+size+'"'+(opt?' '+opt:'')+'>\n'
}else{
d--
_frtag+='</frameset>\n'
if(d==0)document.write(_frtag)
}
}
function frame(name,src,opt){
_frtag+='<frame name="'+name+'" src="'+src+'"'+(opt?' '+opt:'')+'>\n'
}
function framesetsize(num,size){
if(window.opera&&!document.createTextNode)return
/* 再描画されないことがあるためN4と同じ方法を使う if(document.getElementsByTagName&&!document.all)document.all={tags:function(t){return document.getElementsByTagName(t)}} */
if(document.all){
var o=document.all.tags("frameset")[num]
o.setAttribute(o.getAttribute("cols")?"cols":"rows",size)
return
}

var x=-1,i=0
do
x=_frtag.indexOf('<frameset ',x+1)
while(i++<num)
x+=16
_frtag='<html>\n<script src="./frame.js"></'+'script>\n<script>window.onload=function(){if(document.layers)location.href="./frame.js";_frtag=String.fromCharCode('+E(_frtag)+')}</'+'script>\n'
+_frtag.substring(0,x)+size+_frtag.substring(_frtag.indexOf('"',x))+'\n</html>'
//document.open()
document.write(_frtag)
document.close()
}

function E(s){
var tmp=""
for(i=0;i<s.length;i++)
tmp+=s.charCodeAt(i)+","
tmp=tmp.replace(/,\s*$/,"")
return tmp
}
