/*----------------------------------------------------------

       JSファイルのインポート

----------------------------------------------------------*/

//▼ SETTING ///////////////////////////////////////////////

// JSファイルを格納するディレクトリ
var uri="/common/js/";

// @fileの設定
function myfile(n) {
  this.length = n;
    for (i = 0; i < n; i++) {
      this[i] = null
    }
}

// 呼び出したいJSファイル
var n = 5;//ファイル数
var file = new myfile(n);
file[0] = "jquery-1.3.2.min.js";//jquery本体
file[1] = "jquery.rollover.js";//画像ロールオーバー
file[2] = "smartRollover.js";//画像ロールオーバー
file[3] = "scrollsmoothly.js";//画像スクロール
file[4] = "heightLine.js";//高さ調整

/*"smartRollover.js";//画像ロールオーバー*/

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."))
{
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);
}// JavaScript Document

//▼ MAIN PROGRAM //////////////////////////////////////////

// head内にタグを記述
for (i = 0; i < n; i++) {
  document.write('<script type="text/javascript" src="',uri,file[i],'"></script>');
}


/*----------------------------------------------------------

       ページ表示時の処理

----------------------------------------------------------*/

