Bfi={};Bfi.hidediv=function(id){$(id).setStyle('display','none');}
Bfi.print_r=function(theObj){if(theObj.constructor==Array||theObj.constructor==Object){document.write("
")
for(var p in theObj){if(theObj[p].constructor==Array||theObj[p].constructor==Object){document.write("- ["+p+"] => "+typeof(theObj)+"
");document.write("")
print_r(theObj[p]);document.write("
")}else{document.write("- ["+p+"] => "+theObj[p]+"
");}}
document.write("
")}}
Bfi.trim=function(str){str=str.replace(/^\s+/,'');return str.replace(/\s+$/,'');};Bfi.strlen=function(str){str=Bfi.trim(str);return str.length;}
Bfi.substr=function(f_string,f_start,f_length){f_string+='';if(f_start<0){f_start+=f_string.length;}
if(f_length==undefined){f_length=f_string.length;}else if(f_length<0){f_length+=f_string.length;}else{f_length+=f_start;}
if(f_length',', ',content);promt=new MooPrompt(title,content,{buttons:1,width:300,button1:ok,onButton1:function(){;}});}
Bfi.preImage=function(url,css_id,width){$(css_id).innerHTML='
';}
Bfi.delEl=function(id){var el=$(id);el.parentNode.removeChild(el);}
Bfi.datediff=function(start,end,interval){var arr=start.split('/');start=new Date(parseInt(arr[2]),(parseInt(arr[1])-1),parseInt(arr[0]));arr=end.split('/');end=new Date(parseInt(arr[2]),(parseInt(arr[1])-1),parseInt(arr[0]));var one_day=1000*60*60*24;var diff=Math.ceil((end.getTime()-start.getTime())/(one_day));return diff;}
Bfi.dateVal=function(d){var arr=d.split('/');var d_val=arr[2]+arr[1]+arr[0];d_val=parseInt(d_val);return d_val;}
Bfi.getLoadingHTML=function(){var html='';return html;}
Bfi.loaderInit=false;Bfi.setLoaderDiv=function(id){var el=$('bfi_loading');if(!Bfi.loaderInit){el.innerHTML=Bfi.getLoadingHTML();Bfi.loaderInit=true;}
var w=parseInt($(id).getStyle('width'));var h=parseInt($(id).getStyle('height'));el.setStyle('padding-left',((w/2))+'px');el.setStyle('padding-right',((w/2))+'px');el.setStyle('padding-top',(parseInt(h/2))+'px');el.setStyle('padding-bottom',(parseInt(h/2))+'px');el.setStyle('height',0+'px');el.setStyle('width',0+'px');pos=Bfi.getPosition($(id));el.setStyle('position','absolute');el.setStyle('top',pos.top);el.setStyle('left',pos.left);el.setStyle('display','');$(id).setStyle('opacity',0.6);el.setStyle('background','none');}
Bfi.resetLoaderDiv=function(id){$(id).setStyle('opacity',1);$('bfi_loading').setStyle('display','none');}
Bfi.getPosition=function(obj){var topValue=0;var leftValue=0;while(obj){leftValue+=obj.offsetLeft;topValue+=obj.offsetTop;obj=obj.offsetParent;}
finalvalue={'left':leftValue,'top':topValue};return finalvalue;}
Bfi.setLoader=function(css_id){var el=$('bfi_loading');if(!Bfi.loaderInit){el.innerHTML=Bfi.getLoadingHTML();Bfi.loaderInit=true;var w=Window.getWidth()-parseInt(el.getStyle('width'));el.setStyle('padding-left',(w/2)+'px');el.setStyle('padding-right',(w/2)+'px');el.setStyle('opacity',0.8);window.addEvent('scroll',function(){$('bfi_loading_img').setStyle('top',(Window.getScrollTop()+200)+'px');});window.addEvent('resize',function(){$('bfi_loading_img').setStyle('top',(Window.getScrollTop()+200)+'px');});}
el.setStyle('height',Window.getScrollHeight()+'px');$('bfi_loading_img').setStyle('top',(Window.getScrollTop()+200)+'px');$('bfi_loading_img').setStyle('position','absolute');el.setStyle('display','');}
Bfi.resetLoader=function(css_id){$('bfi_loading').setStyle('display','none');}
Bfi.confirm=function(func,txt,title){if(confirm(txt)){eval(func);}}
Bfi.selectOneTab=function(pane_id,tab_id){tabs=$('tabs_'+pane_id);if(tabs==null)
return false;tab_id='bfitab_'+tab_id;descs=tabs.getElements('dd');titles=tabs.getElements('dt');var found=false;var title=null;var desc=null;for(var i=0,l=titles.length;i