﻿//var bannerData = new Array();


function bannerInit() {
document.write('<ul class="clear"><li><a href="http://marc.meijo-u.ac.jp/" target="_blank"><img src="imgs/flash/bn_02.jpg" alt="名城大学アジア研究所" width="146" height="33" border="0" /></a></li><li><a href="gp/index.html" target="_blank"><img src="imgs/flash/bn_03.jpg" alt="GP" width="146" height="33" border="0" /></a></li><li><a href="http://meidas.meijo-u.ac.jp/" target="_blank"><img src="imgs/flash/bn_04.jpg" alt="研究者データシステム Meidas" width="146" height="33" border="0" /></a></li><li><a href="http://emspd.meijo-u.ac.jp/" target="_blank"><img src="imgs/flash/bn_06.jpg" alt="大学･学校づくり研究科" width="146" height="33" border="0" /></a></li><li><a href="law_school/index.html" target="_blank"><img src="imgs/flash/bn_07.jpg" alt="法務研究科　法務専攻（法科大学院)" width="146" height="33" border="0" /></a></li> <li><a href="classes/gakubu/rikougaku/jabee.html" target="_blank"><img src="imgs/flash/bn_08.jpg" alt="Jabee 認定への取り組み" width="146" height="33" border="0" /></a></li><li><a href="rikou/index.html" target="_blank"><img src="imgs/flash/bn_09.jpg" alt="理工学部：学科別募集：工学系による募集" width="146" height="33" border="0" /></a></li></ul>');
/*	var temp = new Array();
    temp["url"] = "http://marc.meijo-u.ac.jp/";
    temp["img"] = "imgs/flash/bn_02.jpg";
    temp["alt"] = "名城大学アジア研究所";
    bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "/gp/index.html";
    temp["img"] = "imgs/flash/bn_03.jpg";
    temp["alt"] = "GP";
    bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "http://meidas.meijo-u.ac.jp/";
    temp["img"] = "imgs/flash/bn_04.jpg";
    temp["alt"] = "研究者データシステム Meidas";
    bannerData[bannerData.length] = temp;

//   temp = new Array();
//   temp["url"] = "http://www.meijo-u.ac.jp/topics/open2007/";
//   temp["img"] = "imgs/flash/bn_05.jpg";
//   temp["alt"] = "Open Campus";
//   bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "http://emspd.meijo-u.ac.jp/";
    temp["img"] = "imgs/flash/bn_06.jpg";
    temp["alt"] = "大学・学校づくり研究科";
    bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "law_school/index.html";
    temp["img"] = "imgs/flash/bn_07.jpg";
    temp["alt"] = "法務研究科　法務専攻（法科大学院)";
    bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "/classes/gakubu/rikougaku/jabee.html";
    temp["img"] = "imgs/flash/bn_08.jpg";
    temp["alt"] = "Jabee 認定への取り組み";
    bannerData[bannerData.length] = temp;

    temp = new Array();
    temp["url"] = "/rikou/index.html";
    temp["img"] = "imgs/flash/bn_09.jpg";
    temp["alt"] = "理工学部 学科別募集 工学系による募集";
    bannerData[bannerData.length] = temp;

//    temp = new Array();
//    temp["url"] = "http://www.geocities.jp/meijodaisai/index.html";
//    temp["img"] = "imgs/flash/bn_10.jpg";
//    temp["alt"] = "名城大学 大学祭　今年のテーマは『 spice　-想造する現在- 』";
//    bannerData[bannerData.length] = temp;

bannerFlash();
}

function bannerFlash() {
    var bannerIndex = new Array();
    var bannerSize = bannerData.length;
    if(checkFlashPlugin() >= 7) {
        document.write('<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="600" height="53" id="bannerflash" align="middle">');
        document.write('<param name="allowScriptAccess" value="sameDomain" />');
        document.write('<param name="movie" value="imgs/flash/banner.swf" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#ffffff" />');
        document.write('<embed src="imgs/flash/banner.swf" quality="high" bgcolor="#ffffff" width="600" height="53" name="bannerflash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object></p>');
    } else {
        document.write('<ul class="clear">');

        for (var i = 0; i < 4; i++) {
            while (true) {
                // 重複フラグ(重複有：true, 重複無：false)
                isDuplication = false;

                var temp = Math.floor(Math.random() * bannerSize);

                for (var j = 0; j < bannerIndex.length; j++) {
                    if (temp == bannerIndex[j]) {
                        // これまでに取得した変数に重複有
                        isDuplication = true;
                        break;
                    }
                }

                if (!isDuplication) {
                    bannerIndex[i] = temp;
                    break;
                }
            }
        }

        for(i = 0; i < bannerIndex.length; i++) {
            var index = bannerIndex[i];
            var data = bannerData[index];

            var source='<li><a href="' + data["url"] + '" target="_blank"><img src="' + data["img"] + '" alt="' + data["alt"] + '" width="146" height="33"></li>';

            document.write(source);
        }

        document.write('</ul>');
    }
*/
}