﻿//------------------------------------------
//  澳門網站 JavaScript 
//  該 JavaScript 構建中文頁面左側部分
//  由 EAEDP David 收集整理
//  創建日期：      2008-1-14
//  最后修改日期：  2008-1-17
//  更新文檔可以在 document 目錄内找到
//  Left_Document.htm
//------------------------------------------

//構建左側頂部裝飾圖片
//LeftImage:    裝飾圖片左側所使用的圖片
//MiddleImage:  裝飾圖片中間的背景圖片
//RightImage:   裝飾圖片右側使用的圖片
function CreateLeftTop(LeftImage,MiddleImage,RightImage)
{
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%\"><tr><td style=\"vertical-align: top; width: 5%; text-align: left\">");
    document.write("<img src=\"whp_images/whp_pl_template/"+LeftImage+"\" alt=\"\"/>");
    document.write("</td><td style=\"background-image: url(whp_images/whp_pl_template/"+MiddleImage+"); vertical-align: top; width: 94%; text-align: left\"></td>");
    document.write("<td style=\"vertical-align: top; width: 1%; text-align: right\">");
    document.write("<img src=\"whp_images/whp_pl_template/"+RightImage+"\" alt=\"\"/>");
    document.write("</td></tr></table>");
}

//構建一幅圖片
//ImageName: 圖片名稱
function CreateImage(ImageName)
{
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%\"><tr>");
    document.write("<td style=\"vertical-align: top; text-align: left\">");
    document.write("<img src=\"whp_images/whp_pl_template/"+ImageName+"\" alt=\"\"/>");
    document.write("</td></tr></table>");
}

//構建一幅背景圖片
//ImageName:    背景圖片名稱
//TalbeHeigh:   表格高度
function CreateBackGroundImage(ImageName, TableHeigh)
{
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%; height: "+TableHeigh+"px;\"><tr>");
    document.write("<td style=\"vertical-align: top; text-align: left; background-image: url(whp_images/whp_pl_template/"+ImageName+");\">");
    document.write("</td></tr></table>");
}

//構建左側導航的一級項目
//MenuImageName:        菜單圖片
//MenuImageOverName:    菜單鼠標經過圖片
//MenuLink:             菜單點擊鏈接
//MenuLinkDesc:         菜單鏈接提示
//IsPopUp:              是否打開新窗口
function CreateLeftMenu(MenuImageName, MenuImageOverName, MenuLink, MenuLinkDesc, IsPopUp)
{
    var popUp;
    if(IsPopUp)
        popUp="_blank";
    else
        popUp="_self";
        
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%\"><tr>");
    document.write("<td style=\"vertical-align: top; text-align: left\">");
    document.write("<a href=\""+MenuLink+"\" target=\""+popUp+"\" >");
    document.write("<img alt=\""+MenuLinkDesc+"\" src=\"whp_images/whp_pl_template/"+MenuImageName+"\" onmouseover='this.src=\"whp_images/whp_pl_template/"+MenuImageOverName+"\"' onmouseout='this.src=\"whp_images/whp_pl_template/"+MenuImageName+"\"' alt=\"\" style=\"border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none\" />");
    document.write("</a></td></tr></table>");
}

//構建一條分割綫
function CreateDivider()
{
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%\"><tr>");
    document.write("<td style=\"vertical-align: top; text-align: left\">");
    document.write("<img src=\"whp_images/whp_pl_template/left_nav_divider.gif\" alt=\"\"/>");
    document.write("</td></tr></table>");
}

//構建左側導航的二級項目
//MenuText:     文本
//MenuLink:     鏈接
//MenuLinkDesc: 鏈接説明
//IsPopUp:      是否在新窗口中打開該頁面
function CreateLeftSubMenu(MenuText, MenuLink, MenuLinkDesc, IsPopUp)
{
    var popUp;
    if(IsPopUp)
        popUp = "_blank";
    else
        popUp = "_self";
        
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-image: url(whp_images/whp_pl_template/left_nav_bg2.gif); width: 100%; height:18px;\"><tr><td style=\"vertical-align: middle; width: 1%; text-align: left\">");
    document.write("<img src=\"whp_images/whp_pl_template/spacer.gif\" style=\"width: 27px; height: 1px;\" alt=\"\"/></td>");
    document.write("<td style=\"vertical-align: top; text-align: center; width: 1%;\">");
    document.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%\"><tr><td>");
    document.write("<img src=\"whp_images/whp_pl_template/left_nav_bullet.gif\" /></td></tr></table></td>");
    document.write("<td style=\"vertical-align: middle; width: 1%; text-align: left\">");
    document.write("<img src=\"whp_images/whp_pl_template/spacer.gif\" style=\"width: 5px; height: 1px;\" /></td>");
    document.write("<td style=\"vertical-align: middle; width: 97%; text-align: left\" class=\"left_menu\" >");
    document.write("<a href=\""+MenuLink+"\" target=\""+popUp+"\" title=\""+MenuLinkDesc+"\">"+MenuText+"</a></td></tr></table>");

}