<!--
image_path = "images/";
num_image_path = image_path + "clock/";

function preLoadImage() {
   var doc = document; 
   if(doc.images) { 
      if(!doc.val) doc.val = new Array();
      for(loop=0; loop<=9; loop++) {
         doc.val[loop] = new Image; 
         doc.val[loop].src = num_image_path + loop + ".gif";
      }
      doc.val[10] = new Image; 
      doc.val[10].src = image_path + "colon.gif";
      doc.val[11] = new Image; 
      doc.val[11].src = image_path + "localtime.gif";
      doc.val[12] = new Image;
      doc.val[12].src = image_path + "photo_trans.gif";
   }
}

preLoadImage();

function sr_DigitalClock() {
   //don't need to mention the document object everytime!
    with(document){
        var date = new Date();
        var hour = date.getHours();
        var minute = date.getMinutes();
        var second = date.getSeconds();

        var h2 = hour % 10;
        var h1 = (hour - h2) / 10;
        var m2 = minute % 10;
        var m1 = (minute - m2) / 10;
        var s2 = second % 10;
        var s1 = (second - s2) / 10;

        //now the appropriate image to the appropriate position
        document.hour_h.src = num_image_path + h1 + ".gif";
        document.hour_l.src = num_image_path + h2 + ".gif";

        document.minute_h.src = num_image_path + m1 + ".gif";
        document.minute_l.src = num_image_path + m2 + ".gif";

        document.second_h.src = num_image_path + s1 + ".gif";
        document.second_l.src = num_image_path + s2 + ".gif";
     
        document.colon1.src = image_path + "colon.gif";
        document.colon2.src = image_path + "colon.gif";
        document.localtime.src = image_path + "localtime.gif";
    }
    ID = window.setTimeout("sr_DigitalClock()", 1000);
}

function copyText(obj){
	obj = document.getElementById(obj);
	var rng = document.body.createTextRange();
	rng.moveToElementText(obj);
	rng.scrollIntoView();
	rng.select();
	rng.execCommand("Copy");
	rng.collapse(false);
}
function copyToClipBoard(str,str1){
	var clipBoardContent='';
	//clipBoardContent+=document.all('span_Title').innerText;
	clipBoardContent+=str;
	window.clipboardData.setData("Text",clipBoardContent);
	alert(str1);
}
function addFeeling(file,elementid){
    var toAdd = "<img src=\"images/feeling/" + file + "\">";
    var element = document.getElementById(elementid);
    if(element != null){
        element.value += toAdd;
        element.focus();
    }
}
 
function showdiv(div_id){
  if(document.all.item("div"+div_id).style.display == "block"){
    document.all.item("div"+div_id).style.display = "none";
  }else{
    document.all.item("div"+div_id).style.display = "block";
  }
}

function confirmDel(){
  if(!confirm("È·¶¨É¾³ý£¿"))
    return false;
}

function load_img(p_src,write_id){
var t_html;
if(p_src!=''){
t_html="<img src='"+p_src+"' onLoad='javascript:if(this.width>150){this.width=150;}'>";
}else{
t_html="";
}
write_id.innerHTML=t_html;
}

-->