var WF={
	each:function(o,fn){
		for(var i=0,l=o.length;i<l;i++){
			fn.apply(o[i],[i,o[i]]);
		}
	},
	join:function(){
		return [].join.call(arguments,'');
	},
	htmlencode:function(s){
		return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
	},
	G:function(id){
		return document.getElementById(id);
	},
	sub:function(str,num,ad){
		ad = ad || '...';
		return str.length < num ? str : (str.substring(0,num-1)+ad);
	},
	str:function(s){
		for(var i=1;i<arguments.length;i++){
			s = s.replace('{'+i+'}',arguments[i]);
		}
		return s;
	},
	show:function(id){
		WF.G(id).style.display = 'block';
	},
	hide:function(id){
		WF.G(id).style.display = 'none';
	},
	IE:/msie/.test(navigator.userAgent.toLowerCase()) && !/opera/.test(navigator.userAgent.toLowerCase())
};
