//あ
function MM_preloadImages() {//v3.0
    var d = document;
    if (d.images) {
        if (!d.MM_p) {
            d.MM_p = new Array;
        }
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
        for (i = 0; i < a.length; i++) {
            if (a[i].indexOf("#") != 0) {
                d.MM_p[j] = new Image;
                d.MM_p[j++].src = a[i];
            }
        }
    }
}

function MM_swapImgRestore() {//v3.0
    var i, x, a = document.MM_sr;
    for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) {
        x.src = x.oSrc;
    }
}

function MM_findObj(n, d) {//v4.01
    var p, i, x;
    if (!d) {
        d = document;
    }
    if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document;
        n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) {
        x = d.all[n];
    }
    for (i = 0; !x && i < d.forms.length; i++) {
        x = d.forms[i][n];
    }
    for (i = 0; !x && d.layers && i < d.layers.length; i++) {
        x = MM_findObj(n, d.layers[i].document);
    }
    if (!x && d.getElementById) {
        x = d.getElementById(n);
    }
    return x; 
}

function MM_swapImage() {//v3.0
    var i, j = 0, x, a = MM_swapImage.arguments;
    document.MM_sr = new Array;
    for (i = 0; i < a.length - 2; i += 3) {
        if ((x = MM_findObj(a[i])) != null) {
            document.MM_sr[j++] = x;
            if (!x.oSrc) {
                x.oSrc = x.src;
            }
            x.src = a[i + 2];
        }
    }
}

function headonload() {
    MM_preloadImages(
        '../img/btn_brand_f2.gif',
        '../img/btn_campaign_f2.gif',
        '../img/btn_cm_f2.gif',
        '../img/btn_jewely_f2.gif',
        '../img/btn_shopping_f2.gif',
        '../img/btn_recruit_f2.gif',
        '../img/btn_blog_f2.gif',
        '../img/btn_info_f2.gif',
        '../img/foot_company_f2.gif',
        '../img/foot_privacy_f2.gif',
        '../img/foot_term_f2.gif',
        '../img/foot_contact_f2.gif',
        '../img/sub_btn_blog_f2.gif',
        '../img/sub_btn_campaign_f2.gif',
        '../img/sub_btn_cm_f2.gif',
        '../img/sub_btn_jewely_f2.gif',
        '../img/sub_btn_shop_f2.gif',
        '../img/sub_btn_top_f2.gif',
        '../img/sub_btn_rec_f2.gif',
        '../img/sub_menu_btn_contact.gif',
        '../img/sub_menu_btn_term.gif',
        '../privacy/img/sub_menu_btn_company.gif',
        '../img/sub_btn_brand_f2.gif',
        '../info/img/sidebar_infomation.gif'
        );
}

function header(){
    //margin
    document.write([
        '<table width="910" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">',
        '  <tbody>',
        '    <tr>',
        '      <td bgcolor="#FFFFFF"><img src="../img/spacer.gif" width="30" height="1" /><\/td>',
        '      <td bgcolor="#FFFFFF">',

        //table start
        //logo
        '        <table width="850" border="0" cellspacing="0" cellpadding="0">',
        '          <tbody>',
        '            <tr>',
        '              <td height="20" colspan="2"><img src="../img/spacer.gif" width="1" height="20" /><\/td>',
        '            <\/tr>',
        '            <tr>',
        '              <td width="135"><a href="/"><img src="../img/head_logo.gif" alt="gc55.jp" width="135" height="39" border="0" longdesc="http://gc55.jp/" /><\/a><\/td>',
        '              <td>&nbsp;<!--202×42バナーを差し込むこと可能--><\/td>',
        '            <\/tr>',
        '          <\/tbody>',
        '        <\/table>',

        //menu
        '        <table width="850" border="0" cellspacing="0" cellpadding="0">',
        '          <tbody>',
        '            <tr>',
        '              <td colspan="8">&nbsp;<\/td>',
        '            <\/tr>',
        '            <tr>',
        '              <td width="103"><a href="/"><img src="../img/sub_btn_top.gif" alt="トップページ" name="btn_top" width="103" height="31" border="0" id="btn_top" onmouseover="MM_swapImage(\'btn_top\',\'\',\'../img/sub_btn_top_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107" align="right"><a href="/brand/"><img src="../img/sub_btn_brand.gif" alt="ブランド一覧" name="btn_brand" width="103" height="31" border="0" id="btn_brand" onmouseover="MM_swapImage(\'btn_brand\',\'\',\'../img/sub_btn_brand_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107"><a href="/campaign/"><img src="../img/sub_btn_campaign.gif" alt="キャンペーン" name="btn_campaign" width="107" height="31" border="0" id="btn_campaign" onmouseover="MM_swapImage(\'btn_campaign\',\'\',\'../img/sub_btn_campaign_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107"><a href="/cm/"><img src="../img/sub_btn_cm.gif" alt="コマーシャル情報" name="btn_cm" width="107" height="31" border="0" id="btn_cm" onmouseover="MM_swapImage(\'btn_cm\',\'\',\'../img/sub_btn_cm_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107"><a href="../jewel/heartarrow.html"><img src="../img/sub_btn_jewely.gif" alt="ジュエリー情報" name="btn_jewely" width="107" height="31" border="0" id="btn_jewely" onmouseover="MM_swapImage(\'btn_jewely\',\'\',\'../img/sub_btn_jewely_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107"><a href="http://gemart.jp/" target="_blank"><img src="../img/sub_btn_shop.gif" alt="オンライン通販ジェマート" name="btn_shop" width="107" height="31" border="0" id="btn_shop" onmouseover="MM_swapImage(\'btn_shop\',\'\',\'../img/sub_btn_shop_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        //'              <td width="107"><a href="/info/"><img src="../img/sub_btn_info.gif" alt="最新情報" name="btn_info" width="107" height="31" border="0" id="btn_info" onmouseover="MM_swapImage(\'btn_info\',\'\',\'../img/sub_btn_info_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td width="107"><a href="http://www.gemcerey-recruit.jp/" target="_blank"><img src="../img/sub_btn_rec.gif" alt="採用情報" name="btn_rec" width="107" height="31" border="0" id="btn_rec" onmouseover="MM_swapImage(\'btn_rec\',\'\',\'../img/sub_btn_rec_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '              <td><a href="http://gemcerey-no1.jp/" target="_blank"><img src="../img/sub_btn_blog.gif" alt="社長ブログ" name="btn_blog" width="103" height="31" border="0" id="btn_blog" onmouseover="MM_swapImage(\'btn_blog\',\'\',\'../img/sub_btn_blog_f2.gif\',1)" onmouseout="MM_swapImgRestore()" /><\/a><\/td>',
        '            <\/tr>',
        '          <\/tbody>',
        '        <\/table>'
        ].join("\r\n"));
}
