
//ロールオーバー後画像の語尾に「-on」「-off」をつけ、同じ画像フォルダ内に収納

function smartRollover() {
if(document.getElementsByTagName) {
var images = document.getElementsByTagName("img");

for(var i=0; i < images.length; i++) {
if(images[i].getAttribute("src").match("-off."))
{


//「-on」の画像をプリロード
fileName = new Array(images[i].getAttribute("src").replace("-off.", "-on."));
preImages = new Array();
for (j=0; j<fileName.length; j++)
{
preImages[j] = new Image();
preImages[j].src = fileName[j]; 
}


images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace("-off.", "-on."));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace("-on.", "-off."));
}
}
}
}
}

if(window.addEventListener) {
window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
window.attachEvent("onload", smartRollover);
}



//ポップアップウィンドウ
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



//システム部の印刷ボタン
function PrintPage()
{
 if( document.getElementById || document.layers )
  {
  window.print();
  }
}
