function checkimage(){if(im.complete){inner=scr+"<img src='"+src+"' width='"+width+"' height='"+height+"' id='puzzle' /><div id='answer'><a href='"+src+"' class='answ'>посмотреть ответ</a>&nbsp;|&nbsp<a href='javascript:void(0)' class='favor'>добавить пазл в закладки</a><div id='bookmarks' class='bm_p'><a href='javascript:void(0)' class='fav' style='float: left;'>Добавить в избранное</a><a href='javascript:void(0)' id='bkm_hide' style='float: right;'>Скрыть</a><div style='clear: both; height: 7px;'></div><ul id='list_bookmark'><li><a style='background-position: 0px 0pt;' alt='БобрДобр' title='Добавить в &lt;БобрДобр&gt;' rel='nofollow' target='_blank' href='http://bobrdobr.ru/addext.html?url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title#%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -16px 0pt;' alt='Memori' title='Добавить в &lt;Memori&gt;' rel='nofollow' target='_blank' href='http://memori.ru/link/?sm%3D1%26u_data%5Burl%5D%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26u_data%5Bname%5D%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -32px 0pt;' alt='Мистер Вонг' title='Добавить в &lt;Мистер Вонг&gt;' rel='nofollow' target='_blank' href='http://www.mister-wong.ru/index.php?action%3Daddurl%26bm_url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26bm_description%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -48px 0pt;' alt='del.icio.us' title='Добавить в &lt;del.icio.us&gt;' rel='nofollow' target='_blank' href='http://del.icio.us/post?v%3D4%26noui%26jump%3Dclose%26url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li>	    <li><a style='background-position: -64px 0pt;' alt='Яндекс.Закладки' title='Добавить в &lt;Яндекс.Закладки&gt;' rel='nofollow' target='_blank' href='http://zakladki.yandex.ru/userarea/links/addfromfav.asp?bAddLink_x%3D1%26lurl%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26lname%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -80px 0pt;' alt='Закладки Google' title='Добавить в &lt;Закладки Google&gt;' rel='nofollow' target='_blank' href='http://www.google.com/bookmarks/mark?op%3Dadd%26bkmk%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -96px 0pt;' alt='Текст 2.0' title='Добавить в &lt;Текст 2.0&gt;' rel='nofollow' target='_blank' href='http://text20.ru/add/?source%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net%26text%3D'></a></li><li><a style='background-position: -112px 0pt;' alt='Писали' title='Добавить в &lt;Писали&gt;' rel='nofollow' target='_blank' href='http://pisali.ru/load_article/'></a></li><li><a style='background-position: -128px 0pt;' alt='News2' title='Добавить в &lt;News2&gt;' rel='nofollow' target='_blank' href='http://news2.ru/add_story.php?url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"'></a></li><li><a style='background-position: -144px 0pt;' alt='СМИ 2' title='Добавить в &lt;СМИ 2&gt;' rel='nofollow' target='_blank' href='http://smi2.ru/add/'></a></li><li><a style='background-position: -160px 0pt;' alt='AddScoop' title='Добавить в &lt;AddScoop&gt;' rel='nofollow' target='_blank' href='http://myscoop.ru/add/?URL%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -176px 0pt;' alt='МоёМесто' title='Добавить в &lt;МоёМесто&gt;' rel='nofollow' target='_blank' href='http://moemesto.ru/post.php?url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -192px 0pt;' alt='RuSpace' title='Добавить в &lt;RuSpace&gt;' rel='nofollow' target='_blank' href='http://www.ruspace.ru/index.php?link%3Dbookmark%26action%3DbookmarkNew%26bm%3D1%26url%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26title%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -208px 0pt;' alt='Сто Закладок' title='Добавить в &lt;Сто Закладок&gt;' rel='nofollow' target='_blank' href='http://www.100zakladok.ru/save/?bmurl%3Dhttp%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"%26bmtitle%3D%CF%E0%E7%EB%FB+-+Crosswords-world.net'></a></li><li><a style='background-position: -240px 0pt;' alt='Ваау!' title='Добавить в &lt;Ваау!&gt;' rel='nofollow' target='_blank' href='http://www.vaau.ru/submit/?action%3Dstep2%26url%3D1http%3A%2F%2Fcrosswords-world.net%2Fpuzzle%2F%3Fpid%3D"+id+"'></a></li><li><a style='background-position: -256px 0pt;' alt='Твиттер' title='Добавить в &lt;Твиттер&gt;' rel='nofollow' target='_blank' href='http://twitter.com/home/?status=%D0%9F%D0%B0%D0%B7%D0%BB+%23"+id+"+%3A+http://crosswords-world.net/puzzle/?pid="+id+"'></a></li></ul></div></div>";$("#content").html(inner)}else{setTimeout("checkimage()",100)}}$(document).ready(function(){var h=0;var i=34;var j=510;var k=$("#links_tbl").width();src=width=height=scr="";var m=null;if(counter>15&&h==0){h=-i*(counter-15);$("i.prev").removeClass("disable")}if(parseInt(k)<=j||k==i*counter)$("i.next").addClass("disable");$.post(window.location.protocol+'//'+window.location.host+'/include/loaders/puloader.php',{pid:starter},function(a){$("#links_tbl").css("left",h+"px");var b=a.indexOf(",",0);var c=a.indexOf(",",b+1);var d=a.indexOf(",",c+1);var e=a.indexOf(",",d+1);id=a.substring(3,b);src=a.substring(b+5,c);width=a.substring(c+7,d);height=a.substring(d+8,e);scr=a.substring(e+1,a.length);im=new Image();im.src=window.location.protocol+'//'+window.location.host+src;if(id!='error'){checkimage()}else{$("#content").html('Такого пазла в базе нет.')}});$("a.link").click(function(){var f=$(this);var t=$(this).attr("href");var g=t.indexOf("=");num=t.substring(g+1,t.length);$("#content").html('<div id="spinner" style="margin:160px auto"></div>');$.post(window.location.protocol+'//'+window.location.host+'/include/loaders/puloader.php',{pid:num},function(a){var b=a.indexOf(",",0);var c=a.indexOf(",",b+1);var d=a.indexOf(",",c+1);var e=a.indexOf(",",d+1);id=a.substring(3,b);src=a.substring(b+5,c);width=a.substring(c+7,d);height=a.substring(d+8,e);scr=a.substring(e+1,a.length);im=new Image();im.src=window.location.protocol+'//'+window.location.host+src;checkimage();$("div.cell > a.select").toggleClass("select");f.addClass("select")});return false});function nextClick(){var l=$("#links_tbl").css("left");$("i.prev").removeClass("disable");if(Math.abs(parseInt(l.substring(0,l.length-2)))<(parseInt(k)-j)){h-=i;$("#links_tbl").css("left",h+"px");if((Math.abs(parseInt(l.substring(0,l.length-2)))+i)>=(parseInt(k)-j)){$("i.next").addClass("disable");$("i.next").css("background-position","-20px 0");if(m>0)clearInterval(m)}}}function prevClick(){var l=$("#links_tbl").css("left");if($("i.next").hasClass("disable"))$("i.next").removeClass("disable");if(parseInt(l.substring(0,l.length-2))<0){h+=i;$("#links_tbl").css("left",h+"px");if((parseInt(l.substring(0,l.length-2))+i)>=0){$("i.prev").addClass("disable");$("i.prev").css("background-position","0 0");if(m>0)clearInterval(m)}}}$("i.next").click(nextClick);$("i.next").mousedown(function(){$("i.next").css("background-position","-20px 2px");m=setInterval(nextClick,200)});$("i.next").mouseup(function(){$("i.next").css("background-position","-20px 0");clearInterval(m)});$("i.next").mouseout(function(){$("i.next").css("background-position","-20px 0");clearInterval(m)});$("i.prev").click(prevClick);$("i.prev").mousedown(function(){$("i.prev").css("background-position","0 2px");m=setInterval(prevClick,200)});$("i.prev").mouseup(function(){$("i.prev").css("background-position","0 0");clearInterval(m)});$("i.prev").mouseout(function(){$("i.prev").css("background-position","0 0");clearInterval(m)})});