// Generated by Easy HTML To Any Script Converter
function getCalendarDate()
{
    var now         = new Date();
   var monthnumber = now.getMonth()+1;
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = monthday + "-"+monthnumber+"-"+year;
   return dateString;
} // function getCalendarDate()

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour +
                    ':' +
                    minute +
                    ':' +
                    ap;
   return timeString;
} 
/*document.writeln("");
document.writeln("<table width=\"525\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("  <tr>");
document.writeln("    <td width=\"71\" class=\"redtxt\" style=\"padding-left:8px\"><img src=\"..\/images\/e-mandinew-ticker1.jpg\"><\/td>");
document.writeln("    <td width=\"3\" class=\"redtxt\"><img src=\"../images/spacer.gif\" width=\"5\" height=\"3\" /><\/td>");
document.writeln("    <td width=\"425\" ><!-- news ticker starts-->");
document.writeln("      <script type=\"text/javascript\">");
document.writeln("");
document.writeln("");
document.writeln("var delay = 2000; //set delay between message change (in miliseconds)");
document.writeln("var maxsteps=30; // number of steps to take to change from start color to endcolor");
document.writeln("var stepdelay=40; // time in miliseconds of a single step");
document.writeln("//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect");
document.writeln("var startcolor= new Array(128,130,132); // start color (red, green, blue)");
document.writeln("var endcolor=new Array(128,130,132); // end color (red, green, blue)");
document.writeln("");
document.writeln("var fcontent=new Array();");
document.writeln("begintag=\'<div style=\"font: normal 11px Arial; padding: 3px 0px 3px 10px; text-decoration:none;\">\'; //set opening tag, such as font declarations");
document.writeln("fcontent[0]=\" <a href=\'#\'>For membership enquiry please contact 022-30470801, 022-30470801 / 803 / 804<\/a>\";");
document.writeln("fcontent[1]=\" <a href=\'#\'>For membership enquiry please contact 022-30470801, 022-30470802 / 803 / 804<\/a>\";");
document.writeln("fcontent[2]=\" <a href=\'#\'>For membership enquiry please contact 022-30470801, 022-30470803 / 803 / 804<\/a>\";");
document.writeln("closetag=\'<\/div>\';");
document.writeln("");
document.writeln("var fwidth=\'425px\'; //set scroller width");
document.writeln("var fheight=\'22px\'; //set scroller height");
document.writeln("");
document.writeln("var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.");
document.writeln("");
document.writeln("///No need to edit below this line/////////////////");
document.writeln("");
document.writeln("");
document.writeln("var ie4=document.all&&!document.getElementById;");
document.writeln("var DOM2=document.getElementById;");
document.writeln("var faderdelay=0;");
document.writeln("var index=0;");
document.writeln("");
document.writeln("");  ===== */
//document.writeln("/*Rafael Raposo edited function*/");
/*document.writeln("//function to change content");
document.writeln("function changecontent(){");
document.writeln("  if (index>=fcontent.length)");
document.writeln("    index=0");
document.writeln("  if (DOM2){");
document.writeln("    document.getElementById(\"fscroller\").style.color=\"rgb(\"+startcolor[0]+\", \"+startcolor[1]+\", \"+startcolor[2]+\")\"");
document.writeln("    document.getElementById(\"fscroller\").innerHTML=begintag+fcontent[index]+closetag");
document.writeln("    if (fadelinks)");
document.writeln("      linkcolorchange(1);");
document.writeln("    colorfade(1, 15);");
document.writeln("  }");
document.writeln("  else if (ie4)");
document.writeln("    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;");
document.writeln("  index++");
document.writeln("}");
document.writeln("");
document.writeln("// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////");
document.writeln("// Modified by Dynamicdrive.com");
document.writeln("");
document.writeln("function linkcolorchange(step){");
document.writeln("  var obj=document.getElementById(\"fscroller\").getElementsByTagName(\"A\");");
document.writeln("  if (obj.length>0){");
document.writeln("    for (i=0;i<obj.length;i++)");
document.writeln("      obj[i].style.color=getstepcolor(step);");
document.writeln("  }");
document.writeln("}");
document.writeln(""); ==== */
//document.writeln("/*Rafael Raposo edited function*/");
/*document.writeln("var fadecounter;");
document.writeln("function colorfade(step) {");
document.writeln("  if(step<=maxsteps) {	");
document.writeln("    document.getElementById(\"fscroller\").style.color=getstepcolor(step);");
document.writeln("    if (fadelinks)");
document.writeln("      linkcolorchange(step);");
document.writeln("    step++;");
document.writeln("    fadecounter=setTimeout(\"colorfade(\"+step+\")\",stepdelay);");
document.writeln("  }else{");
document.writeln("    clearTimeout(fadecounter);");
document.writeln("    document.getElementById(\"fscroller\").style.color=\"rgb(\"+endcolor[0]+\", \"+endcolor[1]+\", \"+endcolor[2]+\")\";");
document.writeln("    setTimeout(\"changecontent()\", delay);");
document.writeln("	");
document.writeln("  }   ");
document.writeln("}");
document.writeln(""); ==== */
//document.writeln("/*Rafael Raposo\'s new function*/");
/*document.writeln("function getstepcolor(step) {");
document.writeln("  var diff");
document.writeln("  var newcolor=new Array(3);");
document.writeln("  for(var i=0;i<3;i++) {");
document.writeln("    diff = (startcolor[i]-endcolor[i]);");
document.writeln("    if(diff > 0) {");
document.writeln("      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);");
document.writeln("    } else {");
document.writeln("      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);");
document.writeln("    }");
document.writeln("  }");
document.writeln("  return (\"rgb(\" + newcolor[0] + \", \" + newcolor[1] + \", \" + newcolor[2] + \")\");");
document.writeln("}");
document.writeln("");
document.writeln("if (ie4||DOM2)");
document.writeln("  document.write(\'<div id=\"fscroller\" style=\"border:1px solid #E6E6E7;width:\'+fwidth+\';height:\'+fheight+\'\"><\/div>\');");
document.writeln("");
document.writeln("if (window.addEventListener)");
document.writeln("window.addEventListener(\"load\", changecontent, false)");
document.writeln("else if (window.attachEvent)");
document.writeln("window.attachEvent(\"onload\", changecontent)");
document.writeln("else if (document.getElementById)");
document.writeln("window.onload=changecontent");
document.writeln("");
document.writeln("  <\/script>");
document.writeln("      <!-- news ticker ends--><\/td>");
//document.writeln("<td width=\"110\" class=\"smred\">"+getCalendarDate()+"  I  "+getClockTime()+"<\/td>");
document.writeln("  <\/tr>");
document.writeln("<\/table>"); === */

