
function local_gazou_chenge(file)
{
    document.mainimg.src = file;
}

function local_gazou_kakudai(url)
{
    url += "?url=" + document.mainimg.src;
    window.open(url,"_target","width=800,height=600");
}

function local_gazou_passget()
{
    var url = location.href;
    point = url.indexOf("url=",0);
    pass = url.substr(point+4);
    return pass;
}

function local_kakudai_bodyget()
{
    var tag = "";
    var img = local_gazou_passget();

    tag = "<img width='800' height='600' src='" + img + "'>";
    document.getElementById("gazo").innerHTML = tag;
}

function counter()
{
    hits=getCookie("sit0777")
    if (hits == "") {
        hits=1;
    }
    hits++;
    setCookie("sit0777", hits);
    function getCookie(key){
        tmp=document.cookie+";";
        tmp1=tmp.indexOf(key, 0);
        if(tmp1!=-1){
            tmp=tmp.substring(tmp1, tmp.length);
            first=tmp.indexOf("=",0)+1;
            end=tmp.indexOf(";",first);
            return(unescape(tmp.substring(first,end)));
        }
        return("");
    }
    function setCookie(key, val) {
        tmp=key+"="+escape(val)+";";
        setdays = new Date();
        setdays.setTime(setdays.getTime()+(24*60*60*1000));
        tmp+="expires="+setdays.toGMTString();
        document.cookie=tmp;
    }
}


