var hlp={xhr:function(o){var options=Object.extend({module:false,loader:false,async:false,params:{},callback:null,eval:false,action:'ajax'},o||{});var xhr={method:'post',parameters:options.params};var uri='/'+sp.tic+'/'+options.module+'/'+options.action;if(options.callback)
xhr.onComplete=function(t){this(t.headerJSON?t.headerJSON:t.responseText);}.bind(options.callback);if(options.async){xhr.asynchronous=false;var res=new Ajax.Request(uri,xhr);return res.transport.responseText;}else new Ajax.Request(uri,xhr);},validate:{mail:function(address){return!(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(address)==false);}},bookmark:function(title){if(window.sidebar)
window.sidebar.addPanel(title,self.location.href,"");else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',self.location.href);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();}else if(ui.browser.ie)
window.external.AddFavorite(self.location.href,title);},addCssRule:function(selector,declaration){var style_node=document.createElement("style");style_node.setAttribute("type","text/css");style_node.setAttribute("media","screen");if(!ui.browser.isIE())style_node.appendChild(document.createTextNode(selector+" {"+declaration+"}"));document.getElementsByTagName("head")[0].appendChild(style_node);if(ui.browser.isIE()&&document.styleSheets&&document.styleSheets.length>0){var last_style_node=document.styleSheets[document.styleSheets.length-1];if(typeof(last_style_node.addRule)=="object")last_style_node.addRule(selector,declaration);}},ucfirst:function(str){var f=str.charAt(0).toUpperCase();return f+str.substr(1);},findKey:function(o,key){if(typeof(o)=='object'){if(o[key])
return o[key]
else{for(var k in o){var r=hlp.findKey(o[k],key);if(r)
return r;}}}}};