<!-- НАЧАЛО МОИ_ЗАКЛАДКИ v.01 -->
<script type="text/javascript">
function pakCodeURI (sPak) { //alert("Длина входной строки >"+sPak.length)
sPak=sPak.replace(/^([^%])/g,"<$1");//alert(sPak)
sPak=sPak.replace(/(%(?:[\d]|[A-F]){2})(?!%)/mg,"$1<");
sPak=sPak.replace(/(<[^%<]+)/mg,"$1>");//alert(sPak)
sPak=sPak.replace(/%D0/mg,"%G"); sPak=sPak.replace(/%D1/mg,"%b");
sPak=sPak.replace(/%20/mg,"%c"); sPak=sPak.replace(/%B0/mg,"%d");
sPak=sPak.replace(/%BE/mg,"%e"); sPak=sPak.replace(/%80/mg,"%f");
sPak=sPak.replace(/%81/mg,"%g"); sPak=sPak.replace(/%82/mg,"%h");
sPak=sPak.replace(/%83/mg,"%i"); sPak=sPak.replace(/%BD/mg,"%j");
sPak=sPak.replace(/%B5/mg,"%k"); sPak=sPak.replace(/%B8/mg,"%m");
sPak=sPak.replace(/%BB/mg,"%n"); sPak=sPak.replace(/%B1/mg,"%o");
sPak=sPak.replace(/%BA/mg,"%p"); sPak=sPak.replace(/%BE/mg,"%q");
sPak=sPak.replace(/%B9/mg,"%r"); sPak=sPak.replace(/%BF/mg,"%s");
sPak=sPak.replace(/%8B/mg,"%t"); sPak=sPak.replace(/%2C/mg,"%u");
sPak=sPak.replace(/%B2/mg,"%v"); sPak=sPak.replace(/%B4/mg,"%w");
sPak=sPak.replace(/%8F/mg,"%x"); sPak=sPak.replace(/%09/mg,"%y");
sPak=sPak.replace(/%G%e%b/mg,"%H"); sPak=sPak.replace(/%G%e%G/mg,"%Y");
sPak=sPak.replace(/%G%m%G/mg,"%I"); sPak=sPak.replace(/%G%j%b%t/mg,"%J");
sPak=sPak.replace(/%G%j%u/mg,"%K"); sPak=sPak.replace(/%G%j/mg,"%L");
sPak=sPak.replace(/%G%k/mg,"%M"); sPak=sPak.replace(/%G%d/mg,"%N");
sPak=sPak.replace(/%G%9/mg,"%O"); sPak=sPak.replace(/%M%N%K/mg,"%P");
sPak=sPak.replace(/%G%A/mg,"%R"); sPak=sPak.replace(/%G%s/mg,"%S");
sPak=sPak.replace(/%G%m/mg,"%T"); sPak=sPak.replace(/%G%r/mg,"%X");
sPak=sPak.replace(/%b%f/mg,"%U"); sPak=sPak.replace(/%b%h/mg,"%W");
sPak=sPak.replace(/%M%G/mg,"%Z"); sPak=sPak.replace(/%b%8/mg,"%V");
sPak=sPak.replace(/%G%B/mg,"%&"); sPak=sPak.replace(/%u%O/mg,"%#");
sPak=sPak.replace(/%G%v/mg,"%a"); sPak=sPak.replace(/%b%g/mg,"%z");
sPak=sPak.replace(/%&C/mg,"%]");
//alert("2(До % delete > "+sPak.length)//alert(sPak)
sPak=sPak.replace(/%/mg,"");//alert("Ужатие URI>"+sPak.length)//alert(">>>"+sPak)
return sPak;
} //End/Упаковка encodeURIComponent
//======== Распаковка encodeURIComponent ==================
function unpakCodeURI (str_unpak) {//alert("function unpakCodeURI"+str_unpak)
str_unpak=str_unpak.replace(/(^(?:[^<>]+)(?:<|$))|(>(?:[^<>]+)(?:<|$))/mg,function(a,b,c) {
//alert("a23="+a)
a=a.replace(/\]/g,"&C"); a=a.replace(/z/g,"bg");
a=a.replace(/a/g,"Gv"); a=a.replace(/#/g,"uO");
a=a.replace(/&/g,"GB"); a=a.replace(/\V/g,"b8");
a=a.replace(/Z/g,"MG");
a=a.replace(/W/g,"bh"); a=a.replace(/U/g,"bf");
a=a.replace(/X/g,"Gr"); a=a.replace(/T/g,"Gm");
a=a.replace(/S/g,"Gs"); a=a.replace(/R/g,"GA");
a=a.replace(/P/g,"MNK"); a=a.replace(/O/g,"G9");
a=a.replace(/N/g,"Gd"); a=a.replace(/M/g,"Gk");
a=a.replace(/L/g,"Gj"); a=a.replace(/K/g,"Gju");
a=a.replace(/J/g,"Gjbt"); a=a.replace(/I/g,"GmG");
a=a.replace(/Y/g,"GeG"); a=a.replace(/H/g,"Geb");
a=a.replace(/y/g,"09"); a=a.replace(/x/g,"8F");
a=a.replace(/w/g,"B4"); a=a.replace(/v/g,"B2");
a=a.replace(/u/g,"2C"); a=a.replace(/t/g,"8B");
a=a.replace(/s/g,"BF"); a=a.replace(/r/g,"B9");
a=a.replace(/q/g,"BE"); a=a.replace(/p/g,"BA");
a=a.replace(/o/g,"B1"); a=a.replace(/n/g,"BB");
a=a.replace(/m/g,"B8"); a=a.replace(/k/g,"B5");
a=a.replace(/j/g,"BD"); a=a.replace(/i/g,"83");
a=a.replace(/h/g,"82"); a=a.replace(/g/g,"81");
a=a.replace(/f/g,"80"); a=a.replace(/e/g,"BE");
a=a.replace(/d/g,"B0"); a=a.replace(/c/g,"20");
a=a.replace(/b/g,"D1"); a=a.replace(/G/g,"D0");
a=a.replace(/([^%]*?)((?:[\d]|[A-F]){2})/g,"$1%$2");//
//alert("T0 "+a.length)//alert("a0="+a)
return a;});
str_unpak=str_unpak.replace(/<|>/gm,"");
//alert("URI-Code >"+str_unpak.length)//alert(str_unpak)
return decodeURIComponent(str_unpak);
} // End/Распаковка (decodeURIComponent)
// Библиотека для кукисов
function setCookie33(name, value, expires, path, domain, secure) {
if (!name || !value) return false; //alert("HELLO>>"+value)
var today = new Date();
today.setTime( today.getTime() );
var expires_date = new Date( today.getTime() + (expires) );
value = encodeURIComponent(value);
if (value.length > 1000) value="1$"+pakCodeURI(value);
var str = encodeURIComponent(name) + '=' + value;//alert(value)
if (expires) str += '; expires=' + expires_date.toGMTString();
if (path) str += '; path=' + path;
if (domain) str += '; domain=' + domain;
if (secure) str += '; secure';
document.cookie = str;
return true;
}
function getCookie33(name) {
name= encodeURIComponent(name)
var pattern = "(?:; )?" + name + "=([^;]*);?";
var regexp = new RegExp(pattern,"g");
if (regexp.test(document.cookie)){
NumPak = RegExp["$1"].replace(/^((?:\d{1,2})\$)?([^\$]*)$/g,"$1")
if(NumPak == "1$" ) return unpakCodeURI(RegExp["$2"]);
return decodeURIComponent(RegExp["$2"])
}
return false
}
function deleteCookie33( name, path, domain ) {
if ( getCookie33( name ) ) name= encodeURIComponent(name);document.cookie = name + '=' +
( ( path ) ? ';path=' + path : '') +
( ( domain ) ? ';domain=' + domain : '' ) +
';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}
//Обработка селекторов по событиям( перевод this в $(this)
var numb_event=0;
function THiS(a){numb_event++;var b=numb_event, d='numb_event';
if(a.getAttribute(d)==null){a.setAttribute(d,b);}else{b=a.getAttribute(d)}
return $("#pun *[numb_event='"+b+"']")
}
document.write("<style>.item11 {text-align:center;}.item11 .child li{width:95%!important;}.item11 .child {text-align:right;}.item11:hover .child{display:inline!important;}.item11 .child li{position:relative;z-index:100; text-align:right!important;padding:3px 3px 3px 0;margin:0px;border:1px solid #ccc!important;font-size:11px!important;background:#f0f0f0 !important;display:block!important;}.item11 .child{background-image:url(http://forum.mybb.ru/i/blank.gif)!important;position:relative;z-index:100;margin-top: -3px!important;margin-left: -20px!important;}.item11 .child li a{color:#000!important;font-weight:normal!important;}.item11 .child li .a2{text-align:left!important;position:absolute;display:none!important;margin-top: -6px;}.item11 .child li .a2 a[href*=\"/viewforum.php?id=\"]{margin-top:-12px!important;}.item11 .child li:hover{background-image:none!important;background-color:#626262;}.item11 .child li:hover a{color:#747474!important;}.item11 .child li:hover .a2{display:inline!important;}.item11 .child li .a2 span{font-weight:bold!important;}.item11 .child li .a2 a{display:block!important;margin:0px;color:#333!important; border:1px solid #B7B7B7!important;background:#e2e2e2;font-weight:normal;padding:3px;height:19px;} .item11 .child li .a2 a:hover {background:#f0f0f0 !important;}</style>")
var stBookmark="<span class=\"span_Bookmark\" style=\"float:right;\" ><div onclick=\"MarkClick(THiS(this))\" class=\"Bookmark\" style=\"margin-top: "
var endBookmark="px;margin-left:-712px!important;float:right;position:absolute;z-index:100;\"><img src=\"http://forum.mybb.ru/i/blank.gif\" style=\"display:block!important;position:absolute!important;margin-top:7px;margin-left:500px; width:100px;height:82px;z-index:2;border:solid transparent 1px!important;\" onclick=\"MarkClose(THiS(this))\"/><p style=\"position:absolute;margin-left:309px;margin-top:23px;height:20px;padding-top:11px;width:405px;border:1px solid transparent;\" onmousedown=\"THiS(this).find('button').show();\" ><button onclick=\"button_clck(THiS(this));\" type=button style=\"width:94px;position:absolute;display:none;margin-top:20px;margin-left:14px;font-size:12px;color:#000;\">Сохранить</button><input type=\"text\" class=\"inBookmark\" value=\"asdasgshgjjk;l;\" size=\"30\" maxlength=\"22\" style=\"font-size:11px;font-family:'Verdana';position: absolute; right: 400px; top: 34px;padding:0;z-index:2;background-color:transparent;color:#000;border:inset #8ACBEE 2px!important;\"/></p><img src=\"http://images.vfl.ru/ii/1436217104/bc315916/9220433.png\"/></div></span>";
var MyBookmark={}; //MyBookmark[i]=[post,scrol,Idfor,IdTem,txtM];
var sep0r=String.fromCharCode(11)
function SetPst(){
var ByMymark={};
var L=getCookie33('MarkCooki')
if(L){setCookie33('MarkCooki',L,30*24*60*60*1000);
L=L.split(sep0r+sep0r),a=[];
if(L.length>1){
for (var i=0; i<L.length-1; i++) {
var a=L[i];a=a.split(sep0r);
ByMymark[a[0]]=a;
}
} else {deleteCookie33('MarkCooki');}
}return ByMymark;
}
var MyBookmark=SetPst();
Pst=MyBookmark;
function SetTitl(){
var TemaTitle={};
var L=getCookie33('LTemTitl')//alert(L);
if(L){setCookie33('LTemTitl',L,30*24*60*60*1000);
L=L.split(sep0r);
if(L.length>1){
for (var i=0; i<L.length-1; i+=2) {
TemaTitle[L[i]]=L[i+1];
}
} else {deleteCookie33('LTemTitl');}
}return TemaTitle;}
LTemTit=SetTitl();//alert(LTemTit);
/*Поправлено от 8.01.2012*/
document.write('<style>#TRyams{display:inline-block!important;z-index:1000!important;position:relative!important;}</style>');
var strL0="<li class=\"item11\"><span id=\"TRyams\"><ul class=\"child\" style=\"float:left;padding-top:16px;z-index:200;position:absolute;display:none\"></ul></span><a href=\"http://911tm.9bb.ru/viewtopic.php?id=687#p34454\">Мои Закладки</a></li>";
$("#pun-ulinks a[href$='search.php?action=show_recent']").parent('li').after(strL0);
var LstM=$("#pun-ulinks li.item11 ul");//alert(LstM.html())
function SetMarkUlink (LstM) {
var str1="<li><a href=\"http://"+ location.hostname+"/viewtopic.php?pid=";
var str2="\">";
var str3="</a><span class=\"a2 ";
var str4="\"></span></li>";
var str21="<a href=\"http://"+ location.hostname + "/viewforum.php?id=";
var str22="\"><span>В форуме: </span>";
var str23="</a>";
var str31="<a class=\"tema\" href=\"http://"+ location.hostname + "/viewtopic.php?id=";
var str32="\"><span> В Теме: </span>";
var str33="</a>";
// Предустановка Закладок в "Закладках"
var i=0,a,b,Ifor=$(".category .tcl .tclcon h3");
LstM.html('');
for(var key in Pst){
a=key.substring(2);b=a+'#p'+a;
LstM.prepend(str1+b+str2+Pst[key][4]+str3+'pr'+a+str4)
LstM.find("span.a2.pr"+key.substring(2)).attr("alt",Pst[key][3])
} //alert(MarkCooki)
LstM.find("span.a2[alt]").each(function(J){
var tid=$(this).attr("alt");//alert(tid);
d=LTemTit[tid]
var a=str31+tid+str32+d+str33;//
$(this).append(a);
});
if( $(".punbb").attr("id")=="pun-index"){
for(var key in Pst){
a=Ifor.find("a[href*='id="+Pst[key][2]+"']").html();
if(a!=null){
b=str21+Pst[key][2]+str22+a+str23;//alert(b);
LstM.find("span.a2.pr"+key.substring(2)).prepend(b);
}
}
}
var L=$(".My_Bookmarks[alt^='Шесть важных']");
if(L.html()!=null){
var DArr=[]
L.find("p").each(function(J){
if(J<6){
DArr[J]=$(this).text().split(",");//alert(DArr[J]+J)
}else return false;
});
var L='';
var Ls1='<span style="color:red;font-weight:bold;text-shadow:#6F95A7 1px -1px 1px;">';
var Ls2='<span style="color:blue;>';
var Ls3='</span>';
for (k=0; k<DArr.length; k+=2){//LstM.prepend()
L+='<li><a href="'+DArr[k][0]+str2+Ls1+DArr[k][1].substring(0,18)+Ls3+str3+'info-forum'+'">';
if( $(".punbb").attr("id")=="pun-index"){
L+=str21+0+'" style="margin-top:-12px!important;'+str2+'<center>= Info =</center>'+str23;}
L+='<a style="margin-top:0!important;" class="tema" href="'+DArr[k+1][0]+str2+DArr[k+1][1]+str23;
L+='</span></li>';//End element
} LstM.prepend(L);//alert(L)
}
}
SetMarkUlink (LstM)
// Предустановка Закладок в постах
var Pst=MyBookmark;
$("#pun-viewtopic .post").each(function(){
var pst='#'+$(this).attr("id");//alert(pst); //alert(Pst[pst][0])
if(Pst[pst]!=undefined){
$(this).prepend(stBookmark+Pst[pst][1]+endBookmark);
$(this).find(".span_Bookmark input.inBookmark").val(Pst[pst][4]);
$(this).find(".span_Bookmark input.inBookmark").attr("alt",Pst[pst][4]);
}
});
function ReReseTm(){
var L00=''
for(var id in LTemTit){
var settD=1;
for(var key in Pst){//alert("LTemTit[id]>"+id+"?"+Pst[key][3])
if(id==Pst[key][3]){
settD=0;break;}
}
if(settD){delete LTemTit[id];
}else {L00+=sep0r+id+sep0r+LTemTit[id]}
} //alert("L00="+L00);
return L00.replace(sep0r,'');
}
function makeBookmark (pst,scrl,Idfor,IdTem,txtM,TemTitl) {
if(Pst[pst]!=undefined){delete Pst[pst];ReReseTm ();
}
if(typeof(scrl)!='undefined'||typeof(txtM)!='undefined'){Pst[pst]=[pst,scrl,Idfor,IdTem,txtM];
LTemTit[IdTem]=TemTitl;}
//======== Функция Tst-SetCooki
var FirstKey,y=0; for(var key in Pst) {if(!y){FirstKey=key;} y++;}
if(y>15){delete Pst[FirstKey],ReReseTm();}
var MarkCooki='';
for(var key in Pst){
for(var i in Pst[key]){
MarkCooki+=Pst[key][i]+sep0r;
} MarkCooki+=sep0r;
} //alert(MarkCooki)
var L=ReReseTm();
if(y){setCookie33('MarkCooki',MarkCooki,30*24*60*60*1000);//alert(getCookie33('MarkCooki'))
setCookie33('LTemTitl',L,30*24*60*60*1000);//alert(getCookie33('LTemTitl'))
}else {deleteCookie33('MarkCooki');deleteCookie33('LTemTitl');}
//=========
}
function ReloadBookmark (pst,scrl,txtM) {
var TemaTitl=$("#pun-main h1:first span").html().substring(0,34)//alert(TemaTitl);
var Mforum=$("html head:first link[rel='up']").attr("href").replace(/^.+php\?id=/img,"");//alert(Mforum);
var Mtema=$("html head:first link[rel='alternate']").attr("href").replace(/^.*tid=/img,""); //alert(Mtema);
$(pst+" .span_Bookmark").replaceWith('');
makeBookmark(pst,scrl,Mforum,Mtema,txtM,TemaTitl);
$(pst).prepend(stBookmark+scrl+endBookmark);
$(pst+" .span_Bookmark").find("input.inBookmark").val(txtM);
$(pst+" .span_Bookmark").find("input.inBookmark").attr("alt",txtM);
}
function SetBookmark(postselekt,top) {
var today = new Date();
var d=parseInt(today.getDate());if(d<10){d="0"+d}
var m=parseInt(today.getMonth())+1;if(m<10){m="0"+m;}
var yea1=today.getFullYear();
var Ti=today.toTimeString().replace(/ .+$/img,"")
var M_text='От:'+d+'/'+m+'/'+yea1+' '+Ti;//alert(M_text);
var Mpost="#"+postselekt; //alert(Mpost);
var scrol_M=(parseInt(top)+14);
ReloadBookmark(Mpost,scrol_M,M_text);
}
//Определение координат смещения
var MyTopMouse;
$(document).bind('mousemove',function(e){ //$("#log").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY);
MyTopMouse=e.pageY;});
var BusyPost=false;
function MarkClick(Sel) {
BusyPost=true;//alert("A");
setTimeout('BusyPost=false;',370);
}
function MarkClose(Sel) {
postselekt=Sel.parents(".post").attr("id");
//Удалям предыдущую закладку и вызываем чтения запись Коки и )
$("#"+postselekt+" .span_Bookmark").replaceWith("");
makeBookmark("#"+postselekt)
}
function inpReload(inpUT) { if(inpUT.attr("alt")!=inpUT.val()){//Описание изменено ?
var pst='#'+inpUT.parents(".post").attr("id");
// alert(pst);
if(Pst[pst]!=undefined){
inpUT.parent().find('button').show(); return false;
}
}
}
function button_clck(L){
inpUT=L.parent().find('input.inBookmark');
var pst='#'+inpUT.parents(".post").attr("id");
if(inpUT.val()){
if(inpUT.attr("alt")!=inpUT.val())
{
ReloadBookmark (pst,Pst[pst][1],inpUT.val())
}
} else alert('Запись не должна быть пустой!');
}
$(".post").dblclick(function (){
if(!BusyPost){//alert(BusyPost);
var postselekt=$(this).attr("id");
var offset=$(this).offset();
var L=Math.round(parseInt(MyTopMouse)-parseInt(offset.top));
SetBookmark(postselekt,L);}
});
</script>
<style>
.post .Bookmark img[src$="i/blank.gif"]{
cursor:pointer;
}
</style>
<script type="text/javascript">
var L=$("#My_Bookmarks2").html();$(".item11 .child").prepend(L)
</script>
<!-- КОНЕЦ МОИ_ЗАКЛАДКИ v.01 -->