function loop()
{
for ( i = sosu; i > 0; i-- )
{
total = i
if ((category2 =="nocate") && (i == sosu-21)) { break; }
if ((total > 9) && (total < 100)) { total = '0' + total; }
if ( total < 10 ) { total = '00' + total; }
eval('webno' + total + '();' );
}
/*
document.write ('<span class="koma" style="margin: 5px;"><table width="120" height="180" border="0" cellspacing="0" cellpadding="0"><tr><td><a href="guide_all.html"><img src="images/all.gif" width="120" height="180" border="0" /></a></td></tr></table></span><span class="koma" style="margin: 5px;"><table width="105" height="180" border="0" cellspacing="0" cellpadding="0"><tr><td><a href="guide_tiff.html"><img src="images/tiff.gif" width="105" height="180" border="0" /></a></td></tr></table></span>');
*/
}

function menu()
{
menu1 = '<span class="menu_bot"><a href="javascript:void(0);" onclick="setCate('
menu2 = ');return false;"><img src="images/navi_'
menu3 = '.jpg" width="70" height="20" alt="'
menu4 = '" border="0" class="up" /></a></span>'
document.write ( menu1 + '&quot;spri&quot;' + menu2 + 'spri' + menu3 + '春' + menu4
+ menu1 + '&quot;summ&quot;' + menu2 + 'summ' + menu3 + '夏' + menu4
+ menu1 + '&quot;autu&quot;' + menu2 + 'autu' + menu3 + '秋' + menu4
+ menu1 + '&quot;wint&quot;' + menu2 + 'wint' + menu3 + '冬' + menu4
+ menu1 + '&quot;flow&quot;' + menu2 + 'flow' + menu3 + '花' + menu4
+ menu1 + '&quot;sora&quot;' + menu2 + 'sora' + menu3 + '空' + menu4
+ menu1 + '&quot;tree&quot;' + menu2 + 'tree' + menu3 + '樹' + menu4
+ menu1 + '&quot;nature&quot;' + menu2 + 'nature' + menu3 + '自然' + menu4
+ menu1 + '&quot;pat&quot;' + menu2 + 'pat' + menu3 + 'パターン' + menu4
+ menu1 + '&quot;others&quot;' + menu2 + 'others' + menu3 + 'その他' + menu4
+ menu1 + '&quot;all&quot;' + menu2 + 'all' + menu3 + 'すべて' + menu4
);
}

function koma()
{
document.write ('<span class="koma" style="margin: 5px;"><table width="120" height="40" border="0" cellspacing="0" cellpadding="0" background="images/koma_' + category + '_top.jpg"><tr><td height="20"><div class="koma_no">　No.' + webno + '</div></td></tr><tr><td height="20"><div class="koma_caption">　' + title + '</div></td></tr></table><table width="120" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999"><tr><td><table width="118" height="118" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><tr><td align="center" valign="middle"><a href="web/' + webno + '.jpg" target="_blank" rel="lightbox" title="' + title + '"><img src="s/' + webno + '.jpg" border="0" class="hoverImg" /></a></td></tr></table></td></tr></table><table width="120" height="22" border="0" cellpadding="0" cellspacing="0" background="images/koma_' + category + '_bot.jpg"><tr><td align="center" valign="middle"><a href="http://www.yasbox.com/cgi-bin/download/download.cgi/' + webno + '.jpg" target="_blank"><img src="images/button_' + size + '.jpg" width="80" height="15" border="0" class="on" /></a></td></tr></table></span>');
}

function check()
{
if (category2 == category) { koma(); }
if (category2 =="all") { koma(); }
if (category2 =="ran") { koma(); }
if (category2 =="nocate") { koma(); }
}


function ran()
{
for ( i = 1; i < 8; i++ )
{
ransu = Math.floor( Math.random() * sosu );
ransu = ransu + 1;
if ((ransu > 9) && (ransu < 100)) { ransu = '0' + ransu; }
if ( ransu < 10 ) { ransu = '00' + ransu; }
eval('webno' + ransu + '();' );
}
}

function setCate(cate)
{
setCookie("yasbox", cate);
function setCookie(key, val) {
    tmp = key + "=" + escape(val) + ";";
    document.cookie = tmp;
}
location.href = "photo.html";return false;
}

function getCookie(key) {
    tmp = document.cookie + ";";
    tmp1 = tmp.indexOf(key,0);
        if (tmp1 != -1) {
        tmp = tmp.substring(tmp1,tmp.length);
        start = tmp.indexOf("=",0);
        end = tmp.indexOf(";",start);
        return(unescape(tmp.substring(start + 1, end)));
        }
    return("");
}
cate = getCookie("yasbox");
if (cate =="")
{
cate ="nocate";
}
