/*
. . . . . . . . . . . . . . . . . . . ________
. . . . . .. . . . . . . . . . . ,.-СФ. . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-Ф. . . . . . . . . . . . . . . . . .У-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . Ф:,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:Ф. . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . .У~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . Ф~,_. . . ..У~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . .Ф=,_. . . .У-,_. . . ,.-~-,}, .~Ф; /. .. .}
. . .. . .((. . .*~_. . . .Ф=-._. . .У;,,./`. . /Ф . . . ./. .. ../
. . . .. . .\`~,. . ..У~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-Ф
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--==``
. . . . . . . . . . . . . . . . . . . . _\. . . . . ._,-%. . . ..`\
*/$(document).ready(function(){if(document.getElementById('blog_share'))CreateShareButton();if(document.getElementById('blog_share1'))CreateShareButton1();if(document.getElementById('main_page'))CreateFunPlus();if(document.getElementById('workers_page'))CreateWorkersPlage();if(document.getElementById('select_map_type'))CreateContPlage();RejectMe();SetContBtn();ResizeWorksLine();ResizeFolioLine();SetFolioScroll();GetCurrentScrollElement();MM_preloadImages('/images/catalog_goright_2.png');MM_preloadImages('/images/catalog_goleft_2.png');InitFun();VK.init({apiId:2313145,onlyWidgets:true});if(document.getElementById('vk_comments')){VK.Widgets.Comments("vk_comments",{limit:15,width:"300",attach:"*",autoPublish:0});}});$(window).resize(function(){ResizeWorksLine();ResizeFolioLine();ResizeFuns();});function CreateContPlage(){var $select_map_type=$('#select_map_type');var $selected_map=$('#selected_map').find('.one_map_scroll');var map_2_loaded=false;$select_map_type.delegate('.one_slector','click',function(){var $this=$(this);var active_map=$this.attr('id').substr(11);$select_map_type.find('.active').removeClass('active');$this.addClass('active');$selected_map.animate({top:active_map*(-398)+"px"},{duration:500,queue:false});if(active_map==1&&!(map_2_loaded)){map_2_loaded=true;var map2=new YMaps.Map(YMaps.jQuery("#one_map2")[0]);map2.setCenter(new YMaps.GeoPoint(36.595629,55.104308),16,YMaps.MapType.MAP);map2.addControl(new YMaps.Zoom());map2.addControl(new YMaps.ToolBar());YMaps.MapType.PMAP.getName=function(){return"Народная";};map2.addControl(new YMaps.TypeControl([YMaps.MapType.MAP,YMaps.MapType.SATELLITE,YMaps.MapType.HYBRID,YMaps.MapType.PMAP],[0,1,2,3]));YMaps.Styles.add("constructor#pmlbmPlacemark",{iconStyle:{href:"http://api-maps.yandex.ru/i/0.3/placemarks/pmlbm.png",size:new YMaps.Point(28,29),offset:new YMaps.Point(-8,-27)}});YMaps.Styles.add("constructor#FF3732c85Polyline",{lineStyle:{strokeColor:"FF3732c8",strokeWidth:5}});map2.addOverlay(createObject("Placemark",new YMaps.GeoPoint(36.594009,55.106428),"default#busIcon","автобусная остановка"));map2.addOverlay(createObject("Placemark",new YMaps.GeoPoint(36.59225,55.104286),"default#arrowDownLeftIcon","здание церкви, пройти можно по территории"));map2.addOverlay(createObject("Placemark",new YMaps.GeoPoint(36.592078,55.103616),"default#buildingsIcon","вам сюда :)"));map2.addOverlay(createObject("Polyline",[new YMaps.GeoPoint(36.594073,55.106416),new YMaps.GeoPoint(36.594385,55.106231),new YMaps.GeoPoint(36.593333,55.105727),new YMaps.GeoPoint(36.593988,55.104952),new YMaps.GeoPoint(36.592947,55.104441),new YMaps.GeoPoint(36.592775,55.104368),new YMaps.GeoPoint(36.592614,55.104269),new YMaps.GeoPoint(36.591853,55.103986),new YMaps.GeoPoint(36.592003,55.103716)],"constructor#FF3732c85Polyline",""));}});YMaps.jQuery(window).load(function(){var map=new YMaps.Map(YMaps.jQuery("#one_map1")[0]);map.setCenter(new YMaps.GeoPoint(36.595629,55.104308),16,YMaps.MapType.MAP);map.addControl(new YMaps.Zoom());map.addControl(new YMaps.ToolBar());YMaps.MapType.PMAP.getName=function(){return"Народная";};map.addControl(new YMaps.TypeControl([YMaps.MapType.MAP,YMaps.MapType.SATELLITE,YMaps.MapType.HYBRID,YMaps.MapType.PMAP],[0,1,2,3]));YMaps.Styles.add("constructor#pmlbmPlacemark",{iconStyle:{href:"http://api-maps.yandex.ru/i/0.3/placemarks/pmlbm.png",size:new YMaps.Point(28,29),offset:new YMaps.Point(-8,-27)}});YMaps.Styles.add("constructor#FF3732c85Polyline",{lineStyle:{strokeColor:"FF3732c8",strokeWidth:5}});map.addOverlay(createObject("Placemark",new YMaps.GeoPoint(36.592314,55.103537),"default#buildingsIcon",""));map.addOverlay(createObject("Placemark",new YMaps.GeoPoint(36.593558,55.10381),"default#attentionIcon","Тут проехать не получится :("));map.addOverlay(createObject("Polyline",[new YMaps.GeoPoint(36.598826,55.103297),new YMaps.GeoPoint(36.598107,55.102928),new YMaps.GeoPoint(36.597013,55.103666),new YMaps.GeoPoint(36.596005,55.104343),new YMaps.GeoPoint(36.594106,55.103463),new YMaps.GeoPoint(36.593741,55.103703),new YMaps.GeoPoint(36.592947,55.103303),new YMaps.GeoPoint(36.592797,55.103328),new YMaps.GeoPoint(36.592164,55.103783)],"constructor#FF3732c85Polyline",""));map.addOverlay(createObject("Polyline",[new YMaps.GeoPoint(36.594428,55.106299),new YMaps.GeoPoint(36.593365,55.105813),new YMaps.GeoPoint(36.594352,55.105198),new YMaps.GeoPoint(36.59461,55.105296),new YMaps.GeoPoint(36.595962,55.104374)],"constructor#FF3732c85Polyline",""));});function createObject(type,point,style,description){var allowObjects=["Placemark","Polyline","Polygon"],index=YMaps.jQuery.inArray(type,allowObjects),constructor=allowObjects[(index==-1)?0:index];description=description||"";var object=new YMaps[constructor](point,{style:style,hasBalloon:!!description});object.description=description;return object;}}
function CreateWorkersPlage(){current_hash=document.location.hash.substr(1);if(current_hash.length>0){if(document.getElementById(current_hash)){$('#'+current_hash).addClass('scaled');setTimeout(function(){$('#'+current_hash).removeClass('scaled');},600);}}}
function CreateFunPlus(){$('.plus').live('click',function(){var s=document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='/js/fun.js';void(0);});if(document.getElementById("big_baner_304")!=null){$big_baner_304=$('#big_baner_304');$big_baner_304.find('.to_left').remove();$big_baner_304_in=$big_baner_304.children('.in');$big_baner_304_in.html('<div class="fade_left"></div><div class="fade_right" ></div><div class="corners" ></div><div class="logo" ></div><div class="hofs"><div class="one_hof one_hof1" ></div><div class="one_hof one_hof2" ></div><div class="one_hof one_hof3" ></div><div class="one_hof one_hof4" ></div><div class="one_hof one_hof5" ></div><div class="one_hof one_hof6" ></div><div class="one_hof one_hof7" ></div><div class="one_hof one_hof8" ></div><div class="one_hof one_hof9" ></div><div class="one_hof one_hof10" ></div><div class="one_hof one_hof11" ></div></div>');}}
function ResizeFuns(){if(document.getElementById("one_work_268")!=null){one_work_268=$('#one_work_268');work268_canvas=$('.work268_canvas');canvas_wrap_left=one_work_268.position().left;canvas_wrap_w=one_work_268.width();canvas_wrap_show=one_work_268.css('display');work268_canvas.css('left',canvas_wrap_left).css('width',canvas_wrap_w).css('display',canvas_wrap_show);}}
function InitFun(){if(document.getElementById("one_work_274")!=null){animation_frames=('<div class="radico_ani frame_off" id="radico_1" style="display: none;"></div>');$('#one_work_274 .item_a_img').append(animation_frames);var play_animation_274=false,radico_1=$('#radico_1');$('#one_work_274').bind({mouseover:function(){radico_1.fadeIn(1000);$(this).parent().addClass('hovered');},mouseout:function(){radico_1.fadeOut(1000);$(this).parent().removeClass('hovered');}});}
if(document.getElementById("one_work_246")!=null){if($.browser.msie&&$.browser.version.substr(0,1)<9){}else{new jClock('/images/px.png',$('#one_work_246 .item_a_img canvas').get(0));}}
if(document.getElementById("one_work_268")!=null&&!($.browser.msie&&$.browser.version.substr(0,1)<9)){var SCREEN_WIDTH=125,SCREEN_HEIGHT=300,HALF_WIDTH=SCREEN_WIDTH/2,HALF_HEIGHT=SCREEN_HEIGHT/2;if(document.getElementById("works_12")!=null){canvas_wrap=document.createElement('div');canvas_wrap.className='work268_canvas';canvas=document.createElement('canvas');canvas_wrap.appendChild(canvas);document.getElementById("works_12").appendChild(canvas_wrap);one_work_268=$('#one_work_268');work268_canvas=$('.work268_canvas');canvas_wrap_left=one_work_268.position().left;canvas_wrap_w=one_work_268.width();canvas_wrap_show=one_work_268.css('display');work268_canvas.css('left',canvas_wrap_left).css('width',canvas_wrap_w).css('display',canvas_wrap_show);}else{canvas=$('#one_work_268 .item_a_img canvas').get(0);}
var context=canvas.getContext('2d'),mouseDown=false,particles=[],MAX_PARTICLES=120,particleImage=new Image(),clean_clock=0,stats;window.my_mouseX=HALF_WIDTH;window.my_mouseY=HALF_HEIGHT*1.5;function init(){canvas.width=SCREEN_WIDTH;canvas.height=SCREEN_HEIGHT;particleImage.src='/images/ParticleSmoke.png';}
function loop()
{makeParticle(1);context.fillStyle="rgba(0,0,0,0)";context.fillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);canvas.width=canvas.width;for(i=0;i<particles.length;i++)
{var particle=particles[i];particle.render(context);particle.update();}
while(particles.length>MAX_PARTICLES)
particles.shift();}
function makeParticle(particleCount)
{for(var i=0;i<particleCount;i++)
{var particle=new ImageParticle(particleImage,window.my_mouseX,window.my_mouseY);particle.velX=randomRange(-0.7,0.7);particle.velY=0;particle.size=randomRange(0.1,0.2);particle.maxSize=1.5;particle.alpha=randomRange(0.1,0.3);particle.gravity=-0.1;particle.drag=0.96;particle.shrink=1.04;particle.fade=0.005;particle.rotation=randomRange(0,360);particle.spin=randomRange(-5,5);particle.compositeOperation='lighten';if(mouseDown)
{particle.size*=0;particle.fade*=0.8;}
particles.push(particle);}}
init();window.smoke_loop=null;window.leave_timeout=null;$('#one_work_268').bind({mouseenter:function(){if(window.smoke_loop!=null){mouseDown=false;}else{particles=[];mouseDown=false;window.smoke_loop=setInterval(loop,1000/30);}
if(window.leave_timeout!=null){clearTimeout(window.leave_timeout);window.leave_timeout=null;}},mouseleave:function(){mouseDown=true;if(window.smoke_loop!=null){window.leave_timeout=setTimeout(function(){clearInterval(window.smoke_loop);window.smoke_loop=null;},1700);}}});}
if(document.getElementById("one_work_258")!=null){img258=$('#one_work_258').find('img');window.ow258_play=true;$('#one_work_258 a').bind({mouseover:function(){if(window.ow258_play==true){window.ow258_play=false;go_up_or=true;window.frame_258=-1;(function(){if(go_up_or==true){window.frame_258++;}else{window.frame_258--;}
if(window.frame_258>3)go_up_or=false;img258.css('background-position','0px -'+window.frame_258*128+'px');if((go_up_or==false)&&(window.frame_258<1)){window.ow258_play=true;}else{setTimeout(arguments.callee,100);}})();}}});}
if(document.getElementById('works_12')){$('.one_work div a img, .one_work div a canvas, .one_work div .h3text').bind({mouseover:function(){$(this).parent('a').parent('div').parent('.one_work').addClass('hovered');},mouseout:function(){$(this).parent('a').parent('div').parent('.one_work').removeClass('hovered');}});}else{$('.one_work a img, .one_work a canvas').bind({mouseover:function(){$(this).parent('a').parent('.one_work').addClass('hovered');},mouseout:function(){$(this).parent('a').parent('.one_work').removeClass('hovered');}});$('.one_work .h3text').bind({mouseover:function(){$(this).parent('.one_work').addClass('hovered');},mouseout:function(){$(this).parent('.one_work').removeClass('hovered');}});}}
function RejectMe(){$.reject({reject:{all:false,msie5:true,msie6:true},display:['firefox','chrome','msie','safari','opera','gcf'],browserInfo:{firefox:{text:'Firefox 3.5+',url:'http://www.mozilla.com/firefox/'},safari:{text:'Safari 4+',url:'http://www.apple.com/safari/download/'},opera:{text:'Opera 10+',url:'http://www.opera.com/download/'},chrome:{text:'Chrome 3+',url:'http://www.google.com/chrome/'},msie:{text:'Internet Explorer 8+',url:'http://www.microsoft.com/windows/Internet-explorer/default.aspx'},gcf:{text:'Google Chrome Frame',url:'http://code.google.com/chrome/chromeframe/',allow:{all:false,msie:true}}},header:'ј вы знали, что ваш браузер сильно устарел?',paragraph1:'¬аш браузер больше не поддерживаетс€ разработчками. —корее всего наш сайт будет отображатьс€ неверно. Ќиже представлен список самых попул€рных браузеров.',paragraph2:'ѕросто нажмите на иконку, дл€ перехода на страницу закачки браузера.',close:true,closeMessage:'«акрыва€ это окно, вы должны понимать, что увиденна€ вами страница будет сильно отличатьс€ от того, что нами было задумано',closeLink:'«акрыть окно! ћне не страшно!',closeURL:'#',closeESC:true,closeCookie:false,imagePath:'/images/',overlayBgColor:'#000',overlayOpacity:0.8,fadeOutTime:'fast'});}
function SetContBtn(){$("#cont_send_btn").mousemove(function(){document.getElementById('cont_send_btn').src='/images/send_btn2.png';});$("#cont_send_btn").mouseout(function(){document.getElementById('cont_send_btn').src='/images/send_btn.png';});}
function ResizeWorksLine(){if($('.one_work').length){greed12w=$("#works_12").width();el_count=Math.floor(greed12w/240);one_el_w=Math.floor(greed12w/el_count)- 7;$(".one_work").css("width",one_el_w+"px");for(i=el_count+ 1;i<8;i++){$("#on_work"+ i).css("display","none");}
for(i=1;i<el_count+ 1;i++){$("#on_work"+ i).css("display","block");}}}
function SetFolioScroll(){$('.scroll_item').click(function(){el_name=new String($(this).attr("id"));el_name=el_name.slice(9);document.location.hash='#work_'+ $(this).children('img').attr('id');current_scroll_count=(el_name- current_on_center);ScrollLongFor(current_scroll_count);});}
function GetCurrentScrollElement(){if(window.current_el_id){el_img=$('#item_'+ current_el_id).parent();el_img.click();}}
function ScrollLongFor(how_m_els){if(current_element+ how_m_els>0&&current_element+ how_m_els<=max_element){document.getElementById("goleft_work").src="/images/scroll_goleft_text.png";document.getElementById("goright_work").src="/images/scroll_goright_text.png";for(t=current_on_left;t<(current_on_left+ current_el_count+ 1);t++)$("#port_item"+ t+" img").css("border","none");current_on_left=current_on_left+ how_m_els;current_on_center=(current_el_count- 1)/2+ current_on_left;$("#port_item"+ current_on_center+" img").css("border","solid 2px #de4e45");item_link=new String($('#port_item'+ current_on_center+' img').attr("alt"));item_link=item_link.split("/");load_buffer="/portfolio_light/"+ item_link[2]+"/"+ item_link[3]+"/";$("#long_scroll_line").animate({left:"-="+ how_m_els*one_scroll_w},function(){if(load_buffer!=0)$('#inthe_item_ajax').load(load_buffer,{"my_action":"ajax_new_folio"},function(){VK.Widgets.Like("vk_like",{type:"button",pageUrl:"http://formadesign.ru/portfolio/"+ item_link[2]+"/"+ item_link[3]+"/"});load_buffer=0;});});current_element=current_on_center;}
if(current_element==1)document.getElementById("goleft_work").src="/images/scroll_goleft_text_gr.png";if(current_element==max_element)document.getElementById("goright_work").src="/images/scroll_goright_text_gr.png";}
var load_buffer=0;var one_scroll_w=130;var view_part_w=600;var current_on_left=1;var current_on_center=2;var current_el_count=3;var current_element=0;var max_element=1;function ResizeFolioLine(){view_part_w=$("#portfolio_line").width()- 340;current_el_count=Math.floor(view_part_w/130);if((current_el_count/2)==(Math.floor(current_el_count/2)))current_el_count=current_el_count+ 1;one_scroll_w=Math.floor(view_part_w/current_el_count);current_on_center=current_on_left+(current_el_count- 1)/2;if(current_element==0)current_element=current_on_center;$(".scroll_item").css("width",one_scroll_w+"px");$("#long_scroll_line").css("left",(170-(current_on_left- 1)*one_scroll_w)+"px");}
function portfolio_go_prev(){top.location.href=document.getElementById("id_prev").getAttribute("href");return false;};function portfolio_go_next(){top.location.href=document.getElementById("id_next").getAttribute("href");return false;};<!--
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+ 1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length- 2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+ 2];}}
var prev_comment=0;function cr(comment_id){if(prev_comment&&prev_comment!=comment_id){document.getElementById(prev_comment).style.display='none';}
var div=document.getElementById(comment_id);if(div.style.display!='block'){div.style.display='block';}else{div.style.display='none';}
prev_comment=comment_id;}
function CreateShareButton(){$(".mini_share_btn").each(function(){$(this).bind({click:function(){parent_h3=$(this).parents().filter('.one_blog_rec').children('.blog_line').children('.blog_title').children('a');current_url_text=parent_h3.text();current_url_a=parent_h3.attr('href');if($(this).hasClass('mini_share_btn4')){window.open('http://www.livejournal.com/update.bml?event='+ Url.encode(current_url_text)+ Url.encode(': http://formadesign.ru'+ current_url_a)+'&subject='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn1')){window.open('http://twitter.com/home?status='+ Url.encode(current_url_text)+': http://formadesign.ru'+ current_url_a,'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn2')){window.open('http://vkontakte.ru/share.php?url=http://formadesign.ru'+ current_url_a+'&title='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn3')){window.open('http://www.facebook.com/sharer.php?u=http://formadesign.ru'+ current_url_a+'&t='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}}});});}
function CreateShareButton1(){$(".mini_share_btn").each(function(){$(this).bind({click:function(){parent_h3=$('.prefix_1.grid_8.art_rec h2');current_url_text=parent_h3.text();current_url_a=document.location.href;if($(this).hasClass('mini_share_btn4')){window.open('http://www.livejournal.com/update.bml?event='+ Url.encode(current_url_text)+ Url.encode(': '+ current_url_a)+'&subject='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn1')){window.open('http://twitter.com/home?status='+ Url.encode(current_url_text)+': '+ current_url_a,'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn2')){window.open('http://vkontakte.ru/share.php?url='+ current_url_a+'&title='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}
if($(this).hasClass('mini_share_btn3')){window.open('http://www.facebook.com/sharer.php?u='+ current_url_a+'&t='+ Url.encode(current_url_text),'ѕоделитьс€','width=800,height=800');}}});});}
var Url={encode:function(string){return escape(this._utf8_encode(string));},decode:function(string){return this._utf8_decode(unescape(string));},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+ 1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}else{c2=utftext.charCodeAt(i+ 1);c3=utftext.charCodeAt(i+ 2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}}
