
Object.extend(String.prototype,{loadScripts:function(){var all_files=new Array();var all_scripts=new Array();var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');var scripts=(this.match(matchAll)||[]).map(function(scriptTag){var match_js_file=new RegExp('src="(.*)"','im');var file=(scriptTag.match(match_js_file)||['',''])[1];if(file)
all_files.push(file);else{var code=(scriptTag.match(matchOne)||['',''])[1];all_scripts.push(code);}});var active_load=all_files.length;all_files.map(function(file){var script_tags=$$('script');for(i=0;script_tags[i];++i)
{if(!script_tags[i].src){continue;}
if(script_tags[i].src.match(file)){active_load--;return;}}
var js_element=new Element("script",{'language':'JavaScript','type':'text/javascript','src':file}).observe('load',function(){active_load--;});var head=$$('head')[0];head.appendChild(js_element);});var interval=neu=window.setInterval(function(){if(active_load==0){window.clearInterval(interval);all_scripts.map(function(code){eval(code);});}},100);}});Element.addMethods({template:function(element,template,data){element.update(new Template(template).evaluate(data));return element;},toggle2:function(element,type,options,callback){new Effect.toggle(element,type||'blind',options);return element;},morph:function(element,options){new Effect.Morph(element,options);return element;},morphStyle:function(element,argument){new Effect.Morph(element,{style:argument});return element;},highlight:function(element,options){new Effect.Highlight(element,Object.extend({queue:{scope:element.id,position:'end'}},options||{}));return element;},blindDown:function(element,options){new Effect.BlindDown(element);return element;},slideDown:function(element,options){new Effect.SlideDown(element);return element;},countChars:function(element,ignore_nl){var chars=element.value.length;if(ignore_nl===true){var new_lines=element.value.split('\n').length-1;chars-=new_lines}
return chars;},checkFreeChars:function(element,max,ignore_nl,callback){var chars=element.value.length;if(ignore_nl===true){var new_lines=element.value.split('\n').length-1;chars-=new_lines}
var free_chars=max-chars;if(free_chars<=0){free_chars=0;element.value=element.value.substr(0,max+new_lines);}
if(typeof(callback)=='function')
callback(free_chars);}});var Popup={open:function(options)
{this.options={url:'#',width:800,height:600,name:"_blank",location:"no",menubar:"no",toolbar:"no",status:"yes",scrollbars:"yes",resizable:"yes",left:"",top:"",normal:true}
Object.extend(this.options,options||{});if(this.options.normal){this.options.menubar="no";this.options.status="no";this.options.toolbar="no";this.options.location="no";}
this.options.width=this.options.width<screen.availWidth?this.options.width:screen.availWidth;this.options.height=this.options.height<screen.availHeight?this.options.height:screen.availHeight;var openoptions='width='+this.options.width+',height='+this.options.height+',location='+this.options.location+',menubar='+this.options.menubar+',toolbar='+this.options.toolbar+',scrollbars='+this.options.scrollbars+',resizable='+this.options.resizable+',status='+this.options.status
if(this.options.top!="")
openoptions+=",top="+this.options.top;if(this.options.left!="")
openoptions+=",left="+this.options.left;window.open(this.options.url,this.options.name,openoptions);return false;}}

// Cache: 2010-07-29 20:58:54 | MTime: 2010-05-21 11:57:44 | Packer: JSMin | prototype_addons.js