//
//ロールオーバー
//
function initRollovers() {
    if (!document.getElementById) {
        return;
    }
    var aPreLoad = new Array();
    var sTempSrc;
    var aImages = document.getElementsByTagName('img');
    for (var i = 0; i < aImages.length; i++) {        
        if (aImages[i].className == 'imgover') {
            var src = aImages[i].getAttribute('src');
            var ftype = src.substring(src.lastIndexOf('.'), src.length);
            var hsrc = src.replace(ftype, '_a'+ftype);
            aImages[i].setAttribute('hsrc', hsrc);
            aPreLoad[i] = new Image();
            aPreLoad[i].src = hsrc;
            aImages[i].onmouseover = function() {
                sTempSrc = this.getAttribute('src');
                this.setAttribute('src', this.getAttribute('hsrc'));
            }
            aImages[i].onmouseout = function() {
                if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_a'+ftype, ftype);
                this.setAttribute('src', sTempSrc);
            }
        }
    }
}

try {
    window.addEventListener("load", initRollovers, false);
} catch(e) {
    window.attachEvent("onload", initRollovers);
}

//
//ポップアップコントロール
//
function openwin(url) {
	new_win = window.open(url,"new_win","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1");
	new_win.focus();
}

function openpop(url) {
	pop_win = window.open(url,"pop_win","width=600,height=530,toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0");
	pop_win.focus();
}

function openpop_m(url) {
	pop_win = window.open(url,"pop_win","width=700,height=800,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0");
	pop_win.focus();
}

