var sopili_cib={loadjscssfile:function(filename,filetype){if(filetype=="js"){var fileref=document.createElement('script');fileref.setAttribute("type","text/javascript");fileref.setAttribute("src",filename)}else if(filetype=="css"){var fileref=document.createElement("link");fileref.setAttribute("rel","stylesheet");fileref.setAttribute("type","text/css");fileref.setAttribute("href",filename)}if(typeof fileref!="undefined")document.getElementsByTagName("head")[0].appendChild(fileref)},base64_decode:function(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=ac=0,dec="",tmp_arr=[];data+='';do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac++]=String.fromCharCode(o1)}else if(h4==64){tmp_arr[ac++]=String.fromCharCode(o1,o2)}else{tmp_arr[ac++]=String.fromCharCode(o1,o2,o3)}}while(i<data.length);dec=tmp_arr.join('');dec=this.utf8_decode(dec);return dec},utf8_decode:function(str_data){var tmp_arr=[],i=ac=c1=c2=c3=0;str_data+='';while(i<str_data.length){c1=str_data.charCodeAt(i);if(c1<128){tmp_arr[ac++]=String.fromCharCode(c1);i++}else if((c1>191)&&(c1<224)){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}return tmp_arr.join('')},function_exists:function(function_name){if(typeof function_name=='string'){return(typeof window[function_name]=='function')}else{return(function_name instanceof Function)}},in_array:function(needle,haystack,strict){var found=false,key,strict=!!strict;for(key in haystack){if((strict&&haystack[key]===needle)||(!strict&&haystack[key]==needle)){found=true;break}}return found},run:function(){if(this.function_exists("prettyPrint")){prettyPrint()}else{setTimeout("sopili_cib.run()",200)}},start:function(){var code=this.base64_decode(sopili_cib_code);var lang=sopili_cib_lang;var css_class='';var base_url='http://blogstore-files.sopili.net/service/prettify/lib/';var plugin_list=new Array('css','hs','lisp','lua','ml','proto','sql','vb','wiki');this.loadjscssfile(base_url+'prettify.css','css');this.loadjscssfile(base_url+'prettify.js','js');if(this.in_array(lang,plugin_list))this.loadjscssfile(base_url+'lang-'+lang+'.js','js');if(lang==''){css_class='prettyprint'}else{css_class='prettyprint lang-'+lang}var id='id'+parseInt(Math.random()*10000);document.writeln("<pre id='"+id+"' class='"+css_class+"'>");document.writeln(code);document.writeln("</pre>");document.writeln("<div style='margin-top:2px;font-size:12px;'>power by <a style='' target='_blank' href='http://tools.sopili.net/'>Sopili Tools</a></div>");this.run()}};sopili_cib.start();
