function __RP_Callback_Helper(str, strCallbackEvent, splitSize, func){var event = null;if (strCallbackEvent){event = document.createEvent('Events');event.initEvent(strCallbackEvent, true, true);}if (str && str.length > 0){var splitList = str.split('|');var strCompare = str;if (splitList.length == splitSize)strCompare = splitList[splitSize-1];var pluginList = document.plugins;for (var count = 0; count < pluginList.length; count++){var sSrc = '';if (pluginList[count] && pluginList[count].src)sSrc = pluginList[count].src;if (strCompare.length >= sSrc.length){if (strCompare.indexOf(sSrc) != -1){func(str, count, pluginList, splitList);break;}}}}if (strCallbackEvent)document.body.dispatchEvent(event);}function __RP_Coord_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Coord_Callback = str;pluginList[index].__RP_Coord_Callback_Left = splitList[0];pluginList[index].__RP_Coord_Callback_Top = splitList[1];pluginList[index].__RP_Coord_Callback_Right = splitList[2];pluginList[index].__RP_Coord_Callback_Bottom = splitList[3];};__RP_Callback_Helper(str, 'rp-js-coord-callback', 5, func);}function __RP_Url_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Url_Callback = str;pluginList[index].__RP_Url_Callback_Vid = splitList[0];pluginList[index].__RP_Url_Callback_Parent = splitList[1];};__RP_Callback_Helper(str, 'rp-js-url-callback', 3, func);}function __RP_TotalBytes_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_TotalBytes_Callback = str;pluginList[index].__RP_TotalBytes_Callback_Bytes = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}function __RP_Connection_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Connection_Callback = str;pluginList[index].__RP_Connection_Callback_Url = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}

function menuFix() {

    var sfEls = document.getElementById("nav").getElementsByTagName("li");

    for (var i=0; i<sfEls.length; i++) {

        sfEls[i].onmouseover=function() {

        this.className+=(this.className.length>0? " ": "") + "sfhover";

        }

        sfEls[i].onMouseDown=function() {

        this.className+=(this.className.length>0? " ": "") + "sfhover";

        }

        sfEls[i].onMouseUp=function() {

        this.className+=(this.className.length>0? " ": "") + "sfhover";

        }

        sfEls[i].onmouseout=function() {

        this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), 

"");

        }

    }

}

var myIncludeHtmls = new Array();
myIncludeHtmls['header.html'] = '\
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">\
\
    <tbody>\
\
      <tr> \
\
        <td width="18%" height="110" rowspan="2" align="center"><img src="/image/tvlogo.jpg" width="145" height="104"></td>\
\
        <td width="61%" rowspan="2" align="center"><img src="/image/logo_words.jpg" width="308" height="104"></td>\
\
        <td width="18%" height="90" align="right" valign="bottom"><div>\
\
          <p><span class="c1">聯絡電話:</span> <span class="c2">(925)963-6688</span></p>\
\
          <p>Email : <a href="mailto:ccictv@yahoo.com">ccictv@yahoo.com</a></p>\
\
        </div></td>\
\
        <td width="3%" rowspan="2" align="right">&nbsp;</td>\
\
      </tr>\
\
      <tr>\
\
        <td align="right" valign="bottom">&nbsp;</td>\
\
      </tr>\
\
      <tr> \
\
        <td height="30" colspan="4" align="right" valign="top" bgcolor="#728740"\
\
		\
\
		class="A1">\
\
        \
\
 <div style="float:right;">\
<UL id=nav>\
<LI style="MARGIN-LEFT: 50px"><A href="/index.html" title="Chinese Church in Christ - Tri Valley">首 页</A></LI>\
\
<LI><A href="/ccictv-introduction.html" title="三谷基督徒會堂 會堂簡介 Chinese Church in Christ Tri-Valley Church Introduction">會堂簡介</A>\
  <UL>\
  <LI><A href="/ccictv-intro/01_belief.html" title="三谷基督徒會堂 信仰 Chinese Church in Christ Tri-Valley Belief">信仰與使命</A></LI>\
    <LI><A href="/ccictv-intro/02_leaders.html" title="ccictv-introduction_leaders">教牧同工</A></LI>\
 <LI><A href="/ccictv-intro/03_calendar.html" title="ccictv-churhlife_calendar">年度行事曆</A></LI>\
  <LI><A href="/ccictv-intro/04_newsletters.html" title="三谷基督徒會堂 三谷恩泉 Chinese Church in Christ Church Newsletters">教會簡訊</A></LI>\
  <LI><A href="/ccictv-intro/05_churchbuilding.html" title="三谷基督徒會堂 購堂簡訊 Chinese Church in Christ  Church Building">購堂簡訊</A></LI></UL></LI>\
\
\
<LI><A href="/ccictv-sunday.html" title="三谷基督徒會堂 主日聚會  Chinese Church in Christ Sunday">主日聚會</A>\
<UL>\
<LI><A href="/ccictv-sunday/01_sermon_2012.html" title="ccictv-churchlife_sermons_2012">主日信息</A></LI>\
<LI><A href="/ccictv-sunday/02_sundayschool.html" title="ccictv-churchlife_sundayschool">成人主日學</A></LI></UL></LI>\
\
<LI><A href="/ccictv-homegroups.html" title="三谷基督徒會堂 家庭團契 Chinese Church in Christ Homegroups">團契小組</A></LI>\
\
<LI><A title=""><font color="#ffffff">靈修資源</font></A>\
<UL>\
<LI><A href="/ccictv-devotions/01_websites.html" title="ccictv-churchlife_devotions">網上靈修資源</A></LI>\
<LI><A href="/ccictv-devotions/02_library.html" title="ccictv-churchlife_devotions">圖書館 </A></LI>\
<LI><A href="/ccictv-devotions/03_devotions.html" title="ccictv-churchlife_devotions">每日靈修</A></LI>\
</UL>\
</LI>\
\
<LI><A title=""><font color="#ffffff">教會事工</font></A>\
<UL>\
  <LI><A href="/ccictv-ministry/01_youth.html" title="ccictv-youth_impact">青少年事工</A></LI>\
  <LI><A href="/ccictv-ministry/02_children.html" title="cictv-children_awana">兒童事工</A></LI>\
  <LI><A href="/ccictv-ministry/03_mission.html" title="ccictv-mission">宣教与福音</A></LI>\
</UL>\
</LI>\
\
<LI><A title=""><font color="#ffffff">教會活動</font></A>\
  <UL>\
  <LI><A href="/ccictv_activities/01_specialtopics.html" title="三谷基督徒會堂 專題講座 Chinese Church in Christ Church Special Sermons">特別聚會</A></LI>\
  <LI><A href="/ccictv_activities/02_pictures.html" title="三谷基督徒會堂 生活剪影">生活剪影</A></LI>\
 </UL></LI>\
 \
<LI><A href="" title="">&nbsp;</A></LI>\
</UL>\
\
</div>\
</td>\
\
      </tr>\
\
    </tbody>\
\
  </table>';

myIncludeHtmls['footer.html'] = '\
\
 <div style="clear:both;background-image: url(images/COD_FooterBg.gif); background-repeat: no-repeat; background-position: left top;margin-top:15px">\
\
    <p><span class="c1">Copyright 2012, Chinese Church in Christ - Tri Valley,\
\
      Pleasanton, California, USA. All rights reserved. </span><br>\
\
    </p>\
\
</div>';

function myOnLoadFun() {
// replace header include
var myIncludeHtmlElement = document.getElementById('header.html');
if (myIncludeHtmlElement) {
	myIncludeHtmlElement.innerHTML = myIncludeHtmls['header.html'];
}

// replace footer include
myIncludeHtmlElement = document.getElementById('footer.html');
if (myIncludeHtmlElement) {
	myIncludeHtmlElement.innerHTML = myIncludeHtmls['footer.html'];
}

menuFix();
}
window.onload=myOnLoadFun;

