
DOM = (document.getElementById) ? true : false;
NS  = (document.layers) ? true : false;
IE  = (document.all) ? true : false;

var cetTime = new Date();
cetTime.setTime(clocktime + 1000 * 3600 * cettimezone);

var estTime = new Date();
estTime.setTime(clocktime + 1000 * 3600 * esttimezone);

var pstTime = new Date();
pstTime.setTime(clocktime + 1000 * 3600 * psttimezone);

var korTime = new Date();
korTime.setTime(clocktime + 1000 * 3600 * ksttimezone);

var date = cetTime.getDate();
var hrs = cetTime.getHours();
var min = cetTime.getMinutes();
var sec = cetTime.getSeconds();

var estdate = estTime.getDate();
var esthrs = estTime.getHours();
var estmin = estTime.getMinutes();
var estsec = estTime.getSeconds();

var pstdate = pstTime.getDate();
var psthrs = pstTime.getHours();
var pstmin = pstTime.getMinutes();
var pstsec = pstTime.getSeconds();

var kordate = korTime.getDate();
var korhrs = korTime.getHours();
var kormin = korTime.getMinutes();
var korsec = korTime.getSeconds();

function upclock(){
  sec ++;
  estsec ++;
  korsec ++;
  pstsec ++;
  if (sec > 59) {
    sec = 0;
    estsec = 0;
    pstsec = 0;
    korsec = 0;
    min++
    estmin++
    pstmin++
    kormin++
    if (min > 59) {
      min = 0;
      estmin = 0;
      pstmin = 0;
      kormin = 0;
      hrs++
      esthrs++
      psthrs++
      korhrs++
      if (hrs > 23) {
        hrs = 0;
        esthrs = 0;
        korhrs = 0;
        psthrs = 0;
        date ++;
        estdate ++;
        kordate ++;
        pstdate ++;
      }
    }
  }

        var col = ":";
        var spc = " ";
        var com = ",";
  hrs += '';
  min += '';
  sec += '';

        if (hrs.length==1) hrs="0"+hrs;
        if (min.length==1) min="0"+min;
        if (sec.length==1) sec="0"+sec;
 		str_time = hrs+col+min+col+sec;


        if (DOM){

                document.getElementById('clock').innerHTML = str_time;

        } else if(IE){

                clock.innerHTML = str_time;

        } else if(NS){

		    document.layers('clock').document.open();
		    document.layers('clock').document.write(str_time);
		    document.layers('clock').document.close();

  		}



   /* EST */
  esthrs += '';
  estmin += '';
  estsec += '';

        if (esthrs.length==1) esthrs="0"+esthrs;
        if (estmin.length==1) estmin="0"+estmin;
        if (estsec.length==1) estsec="0"+estsec;
  str_time = esthrs+col+estmin;

          /*if (DOM)
                document.getElementById('estclock').innerHTML = str_time;
        else if(IE)
                estclock.innerHTML = str_time;
        else if(NS) {
    document.layers('estclock').document.open();
    document.layers('estclock').document.write(str_time);
    document.layers('estclock').document.close();

 }*/



   /* pst */
  psthrs += '';
  pstmin += '';
  pstsec += '';

        if (psthrs.length==1) psthrs="0"+psthrs;
        if (pstmin.length==1) pstmin="0"+pstmin;
        if (pstsec.length==1) pstsec="0"+pstsec;
  str_time = psthrs+col+pstmin;

          /*if (DOM)
                document.getElementById('pstclock').innerHTML = str_time;
        else if(IE)
                pstclock.innerHTML = str_time;
        else if(NS) {
    document.layers('pstclock').document.open();
    document.layers('pstclock').document.write(str_time);
    document.layers('pstclock').document.close();

 }*/



   /* kor */
  korhrs += '';
  kormin += '';
  korsec += '';

        if (korhrs.length==1) korhrs="0"+korhrs;
        if (kormin.length==1) kormin="0"+kormin;
        if (korsec.length==1) korsec="0"+korsec;
 		 /* str_time = kordate+spc+month+com+spc+korhrs+col+kormin+col+korsec; */
 		 str_time = korhrs+col+kormin;

          /*if (DOM)
                document.getElementById('kstclock').innerHTML = str_time;
        else if(IE)
                kstclock.innerHTML = str_time;
        else if(NS) {
			    document.layers('kstclock').document.open();
			    document.layers('kstclock').document.write(str_time);
			    document.layers('kstclock').document.close();
 }*/

}


