	new Control.ColorPicker("colorfield", { "swatch" : "colorbox" });
	function fnt() {
		this.fonts;
		this.res;
		this.tmpl;
		this.font_str;
		this.put_str;

		//get default
		this.get_default = function() {
			this.get_fontlist();
			this.get_result();
			this.get_tmpl();
		}

		//get fontlist
		this.get_fontlist=function(){
			if (navigator.appName.indexOf("Microsoft") != -1) {
				var swfObj = window["fontlist"];
			}
			else {
				var swfObj = document["fontlist"];
			}
			this.fonts = swfObj.getFontList();		
		}
		//get result
		this.get_result=function(){
			this.res=document.getElementById('result');
		}

		//get template
		this.get_tmpl=function(){
			this.tmpl='';
			this.tmpl+='<table>';
			for(var i=0;i<this.fonts.length;i++){
				this.tmpl+='<tr><td>' + this.fonts[i] + ':</td><td><font id="font_id" size=6px color=#000000 face="' + this.fonts[i] + '">__fonts__</font></td></tr>';
			}
			this.tmpl+='</table>';
		}

		//get font_str
		this.get_font_str=function(){
			this.font_str=document.getElementById('font_str').value;
		}

		//change font string
		this.change_font_string=function(){
			this.get_font_str();
			this.res.innerHTML=this.tmpl.replace(/__fonts__/g,this.font_str);
		}
		
		//change font color
		this.change_font_color=function(){
			var color_cd=document.getElementById('colorfield').value;
			this.res.innerHTML=this.res.innerHTML.replace(/color=......./g,'color='+ color_cd +'');
		}

		//change font size		
		this.change_font_size=function(){
			var font_size=document.getElementById('font_size').value;
			this.res.innerHTML=this.res.innerHTML.replace(/size=[0-9]*/g,'size='+ font_size + 'px');
		}
		
		//put tmpl
		this.put=function(){
			this.res.innerHTML=this.put_str;
		}
		
		//ing on
		this.ing_on=function(){
			this.res.innerHTML='<img src="ing.gif">';
		}
		
	}
		var xxx=new fnt();
	window.onload = function() {

		xxx.get_default();
		xxx.ing_on();
		xxx.change_font_string();
		xxx.change_font_size();
		xxx.change_font_color();
	}