/*
 * zss jsf objects
 */
(function () {
	zssjsf.jqid = function(id){//escape jsf id in jquery
		return "#"+id.replace(/:/g,"\\:")
	};
	zssjsf.fixSize = function(zssid){
		setTimeout(function(){//in some other jsf component(e.x tab), I have to delay it
			zWatch.fireDown("onSize", zk.Widget.$(zssid));
		},25);
	};
	zssjsf.fixTomcatTrunkIssue = function(zssid){
		var fn = function(i, e) {
			e = jq(e);
			if (!e.attr('name')) {
				e.attr('name', 'zkfix');
			}
		};
		jq('#' + zssid + ' input').each(fn);
		jq('#' + zssid + ' textarea').each(fn);
	}
	zssjsf.isDomExist = function(zssid){
		var wgt = zk.Widget.$(zssid);
		if(wgt!=null){
			var dom = wgt.$n();
			if(dom!=null){
				return jq('#'+dom.id).size()>0;
			}
		}
		return flase;
	}
})();

