﻿function movepic(img_name,img_src) {
document[img_name].src=img_src;}

function dateformat()
{
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "(日)"
if(today.getDay()==1) day = "(一)"
if(today.getDay()==2) day = "(二)"
if(today.getDay()==3) day = "(三)"
if(today.getDay()==4) day = "(四)"
if(today.getDay()==5) day = "(五)"
if(today.getDay()==6) day = "(六)"
document.write("<font style='font-size:9pt'>"+(today.getMonth() + 1 ) + "月" + today.getDate() + "日" + day + '</font>');

}

function substrb (f_string, f_start, f_length) {
    // http://kevin.vanzonneveld.net
    // +     original by: Martijn Wieringa
    // +     bugfixed by: T.Wild
    // +      tweaked by: Onno Marsman
    // *       example 1: substr('abcdef', 0, -1);
    // *       returns 1: 'abcde'
    // *       example 2: substr(2, 0, -6);
    // *       returns 2: ''
 
    f_string += '';
 
    if (f_start < 0) {
        f_start += f_string.length;
    }
 
    if (f_length == undefined) {
        f_length = f_string.length;
    } else if (f_length < 0){
        f_length += f_string.length;
    } else {
        f_length += f_start;
    }
 
    if (f_length < f_start) {
        f_length = f_start;
    }
 
    return f_string.substring(f_start, f_length);
}


function disp_current_directory()
{
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="50%" border="0">');

			   
var dirs=window.location.href.split('/'),cdir=dirs[dirs.length-2];
var length = dirs.length;
var cdir=new Array();
var indexlink = '<a href= http://yen.hkfyg.org.hk/yen2009/index.php>主頁</a> > ';
var aboutlink = '<a href= http://yen.hkfyg.org.hk/yen2009/contactus.php>關於我們</a> > ';
var allservicelink = '<a href= http://yen.hkfyg.org.hk/yen2009/allservice.php>服務總覽</a> > ';
var hotsearchlink = '<a href= http://yen.hkfyg.org.hk/yen2009/Employment/hotsearch.php>筍工Hot Search</a> > ';
var emprlink = '<a href= http://yen.hkfyg.org.hk/yen2009/Employment/empr.php>僱主專區</a> > ';
var erblink = '<a href= http://yen.hkfyg.org.hk/yen2009/Erb/erb_list.php>人才發展計劃 (ERB)</a> > ';
var lifelink = '<a href= http://yen.hkfyg.org.hk/yen2009/lifebanking.php>生涯規劃</a> > ';
var ypytlink = '<a href= http://yen.hkfyg.org.hk/yen2009/ypyt/ypyt.php>展翅、青見計劃</a> > ';
var cyberspotlink = '<a href= http://yen.hkfyg.org.hk/yen2009/cyberspot.php>Cyber SPOT</a> > ';
var yselink = '<a href= http://yen.hkfyg.org.hk/yen2009/yse/yse.php>社會企業</a> > ';
var testlink = '<a href= http://yen.hkfyg.org.hk/yen2009/lifebanking/test.php>職業性向測試</a> > ';
var ybhklink = '<a href= http://yen.hkfyg.org.hk/ybhk/new/index.htm>香港青年創業計劃 (YBHK)</a> > ';
var establishlink = '創業 > '; 
var livewirelink = '<a href= http://yen.hkfyg.org.hk/yen2009/livewire.php>創業奇兵</a> > ';
var ywetslink = '<a href= http://yen.hkfyg.org.hk/yen2009/ywets/ywets.php>特別就業計劃</a> > ';
var jobsublink  = '<a href= http://yen.hkfyg.org.hk/yen2009/jobsub.php>職場起動</a> > ';
var journallink  = '<a href= http://yen.hkfyg.org.hk/yen2009/lifebanking/journal.php>職頁季刊</a> > ';
var newslink  = '<a href= http://yen.hkfyg.org.hk/yen2009/news.php>就業新聞</a> > ';
var presslink  = '<a href= http://yen.hkfyg.org.hk/yen2009/press.php>新聞稿</a> > ';
var courselink  = '<a href= http://yen.hkfyg.org.hk/yen2009/course.php>課程</a> > ';
var activitylink  = '<a href= http://yen.hkfyg.org.hk/yen2009/activity.php>最新活動</a> > ';
var privacylink  = '<a href= http://yen.hkfyg.org.hk/yen2009/privacy.php>個人資料政策</a> > ';
//var newdetaillink = '就業新聞列表 > ';

var erbcourse;
var ypyt;
var job_result;
var newdetaillink;

for (i=length;i>=0;i--)
{
cdir[i] = dirs[dirs.length-i];
if(cdir[i] == 'yen2009'){document.write('&nbsp;&nbsp;');document.write(indexlink);};
if(cdir[i] == 'Employment'){;};

//document.write('&nbsp;&nbsp;');document.write(emprlink);
//document.write(cdir[i+1]);
//document.write(cdir[i-1]);
if(cdir[i] == 'contactus.php'){document.write('&nbsp;&nbsp;');document.write(aboutlink);};
if(cdir[i] == 'empr.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_login.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_lost_password.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_change_password.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_job.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_apply.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_apply2.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_edit.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'career_expo.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_training.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_reg_before.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'empr_reg.php'){document.write('&nbsp;&nbsp;');document.write(emprlink);};
if(cdir[i] == 'hotsearch.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'mem_login.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'mem_lost_password.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'mem_change_password.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'job_search.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
//if(cdir[i] == 'job_result.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'empe_apply_result.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'resume_edit.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'member_edit.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'mem_register_before.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'mem_register.php'){document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};
if(cdir[i] == 'Erb'){document.write('&nbsp;&nbsp;');document.write(erblink);};
if(cdir[i] == 'lifebanking'){document.write('&nbsp;&nbsp;');document.write(lifelink);};
if(cdir[i] == 'ypyt.php'){document.write('&nbsp;&nbsp;');document.write(ypytlink);};
if(cdir[i] == 'livewire.php'){document.write('&nbsp;&nbsp;');document.write(livewirelink);};
if(cdir[i] == 'cyberspot.php'){document.write('&nbsp;&nbsp;');document.write(cyberspotlink);};
if(cdir[i] == 'yse'){document.write('&nbsp;&nbsp;');document.write(yselink);};
if(cdir[i] == 'test.php'){document.write('&nbsp;&nbsp;');document.write(testlink);};
if(cdir[i] == 'ywets'){document.write(ywetslink);};
if(cdir[i] == 'Establish'){document.write('&nbsp;&nbsp;');document.write(establishlink);};
if(cdir[i] == 'jobsub.php'){document.write('&nbsp;&nbsp;');document.write(jobsublink);};
if(cdir[i] == 'journal.php'){document.write('&nbsp;&nbsp;');document.write(journallink);};
if(cdir[i] == 'ybhk.php'){document.write('&nbsp;&nbsp;');document.write(ybhklink);};
if(cdir[i] == 'news.php'){document.write('&nbsp;&nbsp;');document.write(newslink);};
if(cdir[i] == 'press.php'){document.write('&nbsp;&nbsp;');document.write(presslink);};
if(cdir[i] == 'course.php'){document.write('&nbsp;&nbsp;');document.write(courselink);};
if(cdir[i] == 'activity.php'){document.write('&nbsp;&nbsp;');document.write(activitylink);};
if(cdir[i] == 'privacy.php'){document.write('&nbsp;&nbsp;');document.write(privacylink);};
//if(cdir[i] == 'new_detail.php'){document.write('&nbsp;&nbsp;');document.write(newdetaillink);};
if(cdir[i] == 'allservice.php'){document.write('&nbsp;&nbsp;');document.write(allservicelink);};
//if(strcmp(cdir[i],'erb_detail.php')) {document.write('&nbsp;&nbsp;');document.write(erblink);};


newdetaillink = substrb(cdir[i], 0, 10);
if(newdetaillink == "new_detail")
	{document.write('&nbsp;&nbsp;');document.write(newslink);};

job_result = substrb(cdir[i], 0, 10);
if(job_result == "job_result")
	{document.write('&nbsp;&nbsp;');document.write(hotsearchlink);};

erbcourse = substrb(cdir[i], 0, 10);
if(erbcourse == "erb_detail")
	{document.write('&nbsp;&nbsp;');document.write(erblink);};

ypyt = substrb(cdir[i], 0, 11);
if(ypyt == "ypyt_detail")
	{document.write('&nbsp;&nbsp;');document.write(ypytlink);};

}

document.write('</td><td align = "right" width="40%" border="0">');			   


dateformat();
document.write('</td></tr></table>');
//timeclock();


}


// Browser Slide-Show script. With image cross fade effect for those browsers
// that support it.
// Script copyright (C) 2004-08 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
var slideCache = new Array();
function RunSlideShowWithLinks(pictureID,linkID,imageLinks,displaySecs)
{
  var separator = imageLinks.indexOf(";");
  var nextImage = imageLinks.substring(0,separator);
  if (slideCache[nextImage] && slideCache[nextImage].loaded)
  {
    var futureImages = imageLinks.substring(separator +1,imageLinks.length) + ';' + nextImage;
    separator = futureImages.indexOf(";");
    var nextLink = futureImages.substring(0,separator);
    futureImages= futureImages.substring(separator +1,imageLinks.length) + ';' + nextLink;
    var picture=document.getElementById(pictureID);
    if (picture.filters)
    {
      picture.style.filter="blendTrans(duration=2)";
      picture.filters.blendTrans.Apply();
    }
    picture.src = nextImage;
    document.getElementById(linkID).href = nextLink;
    if (picture.filters)
    {
      picture.filters.blendTrans.Play();
    }
    setTimeout("RunSlideShowWithLinks('"+pictureID+"','"+linkID+"','"+futureImages+"',"+displaySecs+")",
     displaySecs*1000);
    // Identify the next image to cache.
    separator = futureImages.indexOf(";");
    nextImage = futureImages.substring(0,separator);
  } else {
    setTimeout("RunSlideShowWithLinks('"+pictureID+"','"+linkID+"','"+imageLinks+"',"+displaySecs+")",250);
  }
  // Cache the next image to improve performance.
  if (slideCache[nextImage] == null) {
    slideCache[nextImage] = new Image;
    slideCache[nextImage].loaded = false;
    slideCache[nextImage].onload = function(){this.loaded=true};
    slideCache[nextImage].src = nextImage;
  }		
}



function showPopup(url) { 
newwindow=window.open(url,'name','height=1000,width=650,top=200,left=300,resizable,scrollbars'); 
if (window.focus) {newwindow.focus()} 
} 

