function winwidth(){
 if (document.getElementById){
  if (window.innerWidth)
   return window.innerWidth;
  if (document.documentElement&&document.documentElement.clientWidth)
   return document.documentElement.clientWidth;
  if (document.body&&document.body.clientWidth)
   return document.body.clientWidth;
 }
}
 function winheight(){
 if (document.getElementById){
  if (window.innerHeight)
   return window.innerHeight;
  if (document.documentElement&&document.documentElement.clientHeight)
   return document.documentElement.clientHeight;
  if (document.body&&document.body.clientHeight)
   return document.body.clientHeight;
 }
}
     
function showPreviews(){
     for(var n in fX) fX[n].style.visibility= 'visible';
}

function hidePreviews(){
     for(var n in fX) fX[n].style.visibility= 'hidden';
}

function hideCenter(){
        bar.style.visibility= 'hidden';
        cnvs.style.visibility= 'hidden';
        hidePreviews();
}

function showCanvas(){
        bar.style.visibility = 'visible';
        cnvs.style.visibility = 'visible';
}

function cleanUp(){
    updateAnim64(curIcon,true);
}

function msg(m){
    // uptight browser architects appear to have disabled this
    // functionality but i'll do it just in case cooler
    // heads prevail (as if such a thing couldn't be configured by uptight
    // browser users instead of being made a default, paranoid dysfunction!)
    self.status = m;
}

function myalert(m){
	bar.innerHTML = '<table cellpadding="0" width="400"><tr><td align="center" valign="top">'+m+'</tr></td></table>';
        //document.getElementById("ring").innerHTML=m;
}

function placeBox(parent,id,x,y,w,h,z,c){
   var el = document.getElementById(id);
   if(el != undefined){
	 el.style.left = x+'px';
	 el.style.top = y+'px';
	 return el;
   }
   var obj = document.createElement("div"); 
   obj.style.position='absolute';
   obj.style.left=x+'px';
   obj.style.top=y+'px';
   obj.style.width=w+'px';
   obj.style.height=h+'px';
   obj.style.margin='0px';
   obj.style.padding='0px';
   obj.style.zindex=z;
   obj.style.background=c;
   obj.id = id;
   parent.appendChild(obj);
   return obj;
}

function parseImageData(data){
 if(data==null || data.length==0) return "";
 else if(data.length==128) return data;
 var valid = "0123456789";
 var expanded = "";
 var num = "";
 for(var k=0;k<data.length;k++){
    var c = data.charAt(k);
    if(valid.indexOf(c) != -1) {
        num += c;
    }else{
      if(num.length>0){
         for(var i = 0; i<num;i++){
           expanded += c;
         }
         num = "";
      }else{
         expanded += c;
      }
    }
 } 
 if(expanded.length!=128) myalert("Data decompression error: "+expanded.length);
 return expanded;
}

function initHTTP(){
   var xmlhttp = null;
   try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      // okay, if not that, try this...
      try {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        // okay must be mozilla
         if ( (typeof XMLHttpRequest) != 'undefined' ){
             xmlhttp = new XMLHttpRequest();
         }
      }
   } 
   return xmlhttp; 
} 

function getData2(fF,tF){
   var data;
   var xmlhttp = false;
   xmlhttp = initHTTP();
   if ( xmlhttp) {
     var rand = (""+Math.random()).substring(10);
     xmlhttp.open("POST", "postRLE.php?id="+curIcon+"&z=z"+fF+"&"+rand, true);
     xmlhttp.setRequestHeader('X-Referer', document.location);
     xmlhttp.onreadystatechange = function(){
        if(xmlhttp.readyState != 4 || xmlhttp.status != 200)  return;
        data = parseImageData(xmlhttp.responseText);
        displayImageData(data);
        showCanvas();
     };
     xmlhttp.send("tF="+tF);
   }
   else{
       alert('Sorry. This browser does not support the XMLHttpRequest object');
       myalert('Use Firefox! It\'s free.');
   }
}

function getData(){
   var data;
   var xmlhttp = false;
   xmlhttp = initHTTP();
   if ( xmlhttp) {
     var rand = (""+Math.random()).substring(10);
     xmlhttp.open("GET", "getRLE.php?id="+curIcon+"&z=z"+curFrame+"&"+rand, true);
     xmlhttp.onreadystatechange = function(){
        if(xmlhttp.readyState != 4 || xmlhttp.status != 200)  return;
        data = parseImageData(xmlhttp.responseText);
        displayImageData(data);
        showCanvas();
     };
     xmlhttp.send(null);
   }
   else{
       alert('Sorry. This browser does not support the XMLHttpRequest object');
       myalert('Use Firefox! It\'s free.');
   }
}

function displayImageData(data){
 var n = -2;
 for(var i=0;i<data.length;i++){
  var c = data.charAt(i);
  n+=2;
  p0 = document.getElementById(""+(n));
  p1 = document.getElementById(""+(n+1));
	if(p0==null) return;
  p0.style.backgroundImage='';
  p1.style.backgroundImage='';
  if(c == '-'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == '<'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == '>'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == '&'){ 
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == '/'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == '+'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == '~'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == '?'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == '%'){
    p0.style.backgroundColor=getColor(0);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == '='){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'A'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'B'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'C'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'D'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == 'E'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 'F'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 'G'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'H'){
    p0.style.backgroundColor=getColor(1);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == 'I'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'J'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'K'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'L'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'M'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == 'N'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 'O'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 'P'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'Q'){
    p0.style.backgroundColor=getColor(2);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == 'R'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'S'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'T'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'U'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'V'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == 'W'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 'X'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 'Y'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'Z'){
    p0.style.backgroundColor=getColor(3);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == '['){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == ';'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == ']'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == '^'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == '_'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == '`'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 'a'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 'b'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'c'){
    p0.style.backgroundColor=getColor(4);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == 'd'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'e'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'f'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'g'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'h'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == 'i'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 'j'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 'k'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'l'){
    p0.style.backgroundColor=getColor(5);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == 'm'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'n'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'o'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'p'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'q'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == 'r'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == 's'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == 't'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == 'u'){
    p0.style.backgroundColor=getColor(6);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == 'v'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == 'w'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == 'x'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == 'y'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == 'z'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == '{'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == '}'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == '|'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == '!'){
    p0.style.backgroundColor=getColor(7);
    p1.style.backgroundColor=getColor(8);
  }
  else if(c == '#'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(0);
  }
  else if(c == '$'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(1);
  }
  else if(c == '('){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(2);
  }
  else if(c == ')'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(3);
  }
  else if(c == '@'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(4);
  }
  else if(c == ':'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(5);
  }
  else if(c == '*'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(6);
  }
  else if(c == '.'){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(7);
  }
  else if(c == ','){
    p0.style.backgroundColor=getColor(8);
    p1.style.backgroundColor=getColor(8);
  }
 }
}

function getColor(c){ 
     if(c==0)      return "#f00";    
     else if(c==1) return "#00f";
     else if(c==2) return "#ff0";
     else if(c==3) return "#0B0";
     else if(c==4) return "#E70";
     else if(c==5) return "#f0f";
     else if(c==6) return "#fff";
     else if(c==7) return "#000";    
     else          return "#0ff";
}  

 function draw(x1,y1){
    try{
      (pixels[""+x1+"px"+y1+"px"]).style.background = color;
    }catch(err){
       //myalert("draw problem: x1="+x1+" y1="+y1+" err="+err);
       myalert("Your browser's zoom level needs adjustment.");
    }
 }

function line(x1, y1, x2, y2) {
   //
   // Bresenham's Line algorithm.
   // Thanks to Kitya Karlson for typing it and putting it online.
   //
   var E, Delta1, Delta2, temp;
   var pX=(x1<x2) ? pixelSz : -pixelSz;
   var pY=(y1<y2) ? pixelSz : -pixelSz;
   var X=x1;
   var Y=y1;
   var I=1;
   if (x1>x2) { temp = x1; x1=x2; x2=temp; }
   if (y1>y2) { temp = y1; y1=y2; y2=temp; }
   var dX=x2-x1;
   var dY=y2-y1;

  if (dX>=dY) {
       Delta1=dY<<1;
       Delta2=(dY-dX)<<1;
       E=Delta1-dX;
       for (X+=pX; I<=dX; I+=pixelSz, X+=pX) {
          if (E>0){
              E+=Delta2;
              Y+=pY;
          }
          else E+=Delta1;
          draw(X, Y);
       }
    }
   else{
       Delta1=dX<<1;
       Delta2=(dX-dY)<<1;
       E=Delta1-dY;
       for(Y+=pY; I<=dY; I+=pixelSz, Y+=pY){
          if (E>0){
              E+=Delta2;
              X+=pX;
          }
          else E+=Delta1;
          draw(X,Y);
       }
    }
 }

 function connect(t0,t1){
     try{
        var x  = parseInt(t0.style.left);
        var y  = parseInt(t0.style.top);
        var ox = parseInt(t1.style.left);
        var oy = parseInt(t1.style.top);
      }catch(err){
        myalert("connect problem: "+err);
      }
      line(x,y,ox,oy);
 }

 function compressImageData(){
     var c0, c1;
     var odd = false;
     buf="";
     for(var key in pixels){
        switch( pixels[key].style.backgroundColor){
          case "rgb(255, 0, 0)":     c1 = 0; break;     
          case "rgb(0, 0, 255)":     c1 = 1; break;
          case "rgb(255, 255, 0)":   c1 = 2; break;
          case "rgb(0, 187, 0)":     c1 = 3; break;
          case "rgb(238, 119, 0)":   c1 = 4; break;
          case "rgb(255, 0, 255)":   c1 = 5; break;
          case "rgb(255, 255, 255)": c1 = 6; break;
          case "rgb(0, 0, 0)":       c1 = 7; break;
          case "rgb(0, 255, 255)":   c1 = 8; break;
          case "#f00": c1 = 0; break;     
          case "#00f": c1 = 1; break;
          case "#ff0": c1 = 2; break;
          case "#0b0": c1 = 3; break;
          case "#e70": c1 = 4; break;
          case "#f0f": c1 = 5; break;
          case "#fff": c1 = 6; break;
          case "#000": c1 = 7; break;
          case "#0ff": c1 = 8; break;
          case "#ff0000": c1 = 0; break;     
          case "#0000ff": c1 = 1; break;
          case "#ffff00": c1 = 2; break;
          case "#00bb00": c1 = 3; break;
          case "#ee7700": c1 = 4; break;
          case "#ff00ff": c1 = 5; break;
          case "#ffffff": c1 = 6; break;
          case "#000000": c1 = 7; break;
          case "#00ffff": c1 = 8; break;
          default: c1 = 6;
        }
        if(odd) getByte(c0,c1);
        else    c0 = c1;
        odd = !odd;
     }
   sendData(buf);
 }

 function runLengthCompress(big){
    var small = "";
    var c = big.charAt(0);
    var cnt = 1;
    for(var i=1;i<big.length;i++){
        if(big.charAt(i)==c) cnt++;
        else{
          if(cnt>1) small+= (cnt+c);
          else small += c;
          cnt = 1;
          c = big.charAt(i);
        }
    }
    if(cnt>1) small+= (cnt+c);
    else small += c;
    if(small.length>=128) return big;
    return small;
 }

 function getByte(c0,c1){
  if(c0 == 0){
 	if(c1 == 0) 		  buf += "-"; 
	else if(c1 == 1) 	  buf += "<"; 
	else if(c1 == 2) 	  buf += ">"; 
	else if(c1 == 3) 	  buf += "&"; 
	else if(c1 == 4) 	  buf += "/"; 
	else if(c1 == 5) 	  buf += "+"; 
	else if(c1 == 6) 	  buf += "~"; 
	else if(c1 == 7) 	  buf += "?"; 
	else if(c1 == 8) 	  buf += "%"; 
  }
  else if(c0 == 1){
 	if(c1 == 0) 		  buf += "="; 
	else if(c1 == 1) 	  buf += "A"; 
	else if(c1 == 2) 	  buf += "B"; 
	else if(c1 == 3) 	  buf += "C"; 
	else if(c1 == 4) 	  buf += "D"; 
	else if(c1 == 5) 	  buf += "E"; 
	else if(c1 == 6) 	  buf += "F"; 
	else if(c1 == 7) 	  buf += "G"; 
	else if(c1 == 8) 	  buf += "H"; 
  }
  else if(c0 == 2){
 	if(c1 == 0) 		  buf += "I"; 
	else if(c1 == 1) 	  buf += "J"; 
	else if(c1 == 2) 	  buf += "K"; 
	else if(c1 == 3) 	  buf += "L"; 
	else if(c1 == 4) 	  buf += "M"; 
	else if(c1 == 5) 	  buf += "N"; 
	else if(c1 == 6) 	  buf += "O"; 
	else if(c1 == 7) 	  buf += "P"; 
	else if(c1 == 8) 	  buf += "Q"; 
  }
  else if(c0 == 3){
 	if(c1 == 0) 		  buf += "R"; 
	else if(c1 == 1) 	  buf += "S"; 
	else if(c1 == 2) 	  buf += "T"; 
	else if(c1 == 3) 	  buf += "U"; 
	else if(c1 == 4) 	  buf += "V"; 
	else if(c1 == 5) 	  buf += "W"; 
	else if(c1 == 6) 	  buf += "X"; 
	else if(c1 == 7) 	  buf += "Y"; 
	else if(c1 == 8) 	  buf += "Z"; 
  }
  else if(c0 == 4){
 	if(c1 == 0) 		  buf += "["; 
	else if(c1 == 1) 	  buf += ";"; 
	else if(c1 == 2) 	  buf += "]"; 
	else if(c1 == 3) 	  buf += "^"; 
	else if(c1 == 4) 	  buf += "_"; 
	else if(c1 == 5) 	  buf += "`"; 
	else if(c1 == 6) 	  buf += "a"; 
	else if(c1 == 7) 	  buf += "b"; 
	else if(c1 == 8) 	  buf += "c"; 
  }
  else if(c0 == 5){
 	if(c1 == 0) 		  buf += "d"; 
	else if(c1 == 1) 	  buf += "e"; 
	else if(c1 == 2) 	  buf += "f"; 
	else if(c1 == 3) 	  buf += "g"; 
	else if(c1 == 4) 	  buf += "h"; 
	else if(c1 == 5) 	  buf += "i"; 
	else if(c1 == 6) 	  buf += "j"; 
	else if(c1 == 7) 	  buf += "k"; 
	else if(c1 == 8) 	  buf += "l"; 
  }
  else if(c0 == 6){
 	if(c1 == 0) 		  buf += "m"; 
	else if(c1 == 1) 	  buf += "n"; 
	else if(c1 == 2) 	  buf += "o"; 
	else if(c1 == 3) 	  buf += "p"; 
	else if(c1 == 4) 	  buf += "q"; 
	else if(c1 == 5) 	  buf += "r"; 
	else if(c1 == 6) 	  buf += "s"; 
	else if(c1 == 7) 	  buf += "t"; 
	else if(c1 == 8) 	  buf += "u"; 
  }
  else if(c0 == 7){
 	if(c1 == 0) 		  buf += "v"; 
	else if(c1 == 1) 	  buf += "w"; 
	else if(c1 == 2) 	  buf += "x"; 
	else if(c1 == 3) 	  buf += "y"; 
	else if(c1 == 4) 	  buf += "z"; 
	else if(c1 == 5) 	  buf += "{"; 
	else if(c1 == 6) 	  buf += "}"; 
	else if(c1 == 7) 	  buf += "|"; 
	else if(c1 == 8) 	  buf += "!"; 
  }
  else if(c0 == 8){
 	if(c1 == 0) 		  buf += "#"; 
	else if(c1 == 1) 	  buf += "$"; 
	else if(c1 == 2) 	  buf += "("; 
	else if(c1 == 3) 	  buf += ")"; 
	else if(c1 == 4) 	  buf += "@"; 
	else if(c1 == 5) 	  buf += ":"; 
	else if(c1 == 6) 	  buf += "*"; 
	else if(c1 == 7) 	  buf += "."; 
	else if(c1 == 8) 	  buf += ","; 
  }
}


