var vals={};function merge(v,o){for(var k in o){v[k]=o[k]}}function go2part(targ,selObj,restore,perfix,postfix){if(!perfix){perfix='catalog/nokia-'}if(!postfix){postfix='/'}eval(targ+".location='http://allnokia.ru/"+perfix+selObj.options[selObj.selectedIndex].value+postfix+"'");if(restore)selObj.selectedIndex=0}function choice_selected(form_name,el_name,val){var sel=document.forms[form_name].elements[el_name];for(i=0;i<sel.options.length;i++){if(sel.options[i].value==val){sel.options[i].selected=true}}}function choice_selectedById(id,val){var sel=document.getElementById(id);for(i=0;i<sel.options.length;i++){if(sel.options[i].value==val){sel.options[i].selected=true}}}function head_resize(){w=document.body.clientWidth;if(w>1400){document.getElementById('hlogo').style.paddingLeft=0;document.getElementById('h_login').style.marginRight=0}}var ul=0;function AddFavorite(){if(/MSIE/.test(navigator.userAgent)){window.external.AddFavorite(document.location.href,document.title);return false}else if(/Mozilla/.test(navigator.userAgent)){if(typeof window.sidebar=="object")window.sidebar.addPanel(document.title,document.location.href,"");return false}else if(/Opera/.test(navigator.userAgent)){var a=document.createElement('A');if(!a)return false;a.setAttribute('rel','sidebar');a.setAttribute('href',document.location.href);a.setAttribute('title',document.title);a.click();return true}return false}function ajax(go_,for_,to_,rand_,dir_){try{var today=new Date();var script=document.createElement('script');with(script){setAttribute("type","text/javascript",0);setAttribute("charset","windows-1251",0);setAttribute("src",((dir_?dir_:GLOBAL_DIR)+go_+'.php?'+for_+'='+to_+'&time='+(rand_==0?'1'+today.getMonth():today.getTime())),0)}var head=document.getElementsByTagName("head")[0]||document.documentElement;head.insertBefore(script,head.firstChild);script.onload=function(){head.removeChild(script)}}catch(e){alert(e)}}function GetCssData(o){return(o.currentStyle||getComputedStyle(o,''))}function toggle_block(id){if(document.getElementById(id)){var o=document.getElementById(id);if(o.style.display=='none'){o.style.display='block'}else if(GetCssData(o).display=='none'&&o.style.display==''){o.style.display='block'}else{o.style.display='none'}}}function show_hidden_block(id){if(document.getElementById(id)){var object=document.getElementById(id);if(object.style.visibility=='visible'){object.style.visibility='hidden'}else{object.style.visibility='visible'}}}function newForm(a,b,c,d,f){try{var g=(screen.availWidth-c)/2;var h=(screen.availHeight-d)/2;f+='width='+c+',height='+d+',top='+h+',left='+g+', toolbar=no, status=no, menubar=no';var newwindow=window.open(a,b,f);if(window.focus){newwindow.focus()}return newwindow}catch(e){alert(e)}}function ishow(title,text,w,h){try{w=(!w)?350:w;h=(!h)?200:h;iclose();var obj=document.getElementById('infobox');dscroll=self.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop);l=(parseInt(window.innerWidth?window.innerWidth:document.body.offsetWidth)-w)/2;hh=document.documentElement.clientHeight||document.body.clientHeight;t=Math.round((hh-h)/2)+dscroll;mt=h/2-66;text=(text)?text:'<center><img src="/img/wait.66.gif" style="margin-top:'+mt+'px;" alt="Пожалуйста, подождите ..." /></center>';obj.setAttribute('style','');obj.innerHTML='<div id="ib-close" align="right" onclick="iclose()" title="Закрыть">&times;</div><div id="ib-titile">'+title+'</div><br clear="all"/><div id="ib-text">'+text+'</div>';obj.className='ibox';with(obj.style){width=w+'px';height=h+'px';top=t+'px';left=l+'px';display='block';visibility='visible';zIndex=1001}}catch(e){alert(e)}}function ibox2(o,text,w){try{iclose();text=(text)?text:'<center>Подождите &hellip;</center>';o.innerHTML='<div id="ib-close" onclick="iclose()">&times;</div><div id="ib-text">'+text+'</div><div id="ib-ar"></div>';o.className='ibox2';if(w)o.style.width=w+'px'}catch(e){alert(e)}}function iclose(){try{var i=document.getElementById('infobox');i.style.cssText='display:none; visibility:hidden;';i.className='';i.innerHTML=''}catch(e){alert(e)}}function show_login(o){if(ul!=1){var go2=(o&&o.href)?'<input name="go" type="hidden" value="'+encodeURIComponent(o.href.replace(/\#(.*)?$/,''))+'" />':'';ishow('Авторизация','<form method="post" target="login" action="http://allnokia.ru/members/?act=login" style="padding:5px;overflow:visible;z-index:255;"><span style="color:red;" id="l-err" class="more"></span><table align="center" cellpadding="5" cellspacing="5"><tr><td align="right"><label for="auth-name" style="font:bold 16px arial,tahoma;color:#777;">Логин</label></td><td><input id="auth-name" type="text" name="uname" style="font:bold 15px arial,tahoma;color:#777;width:240px" tabindex="1"/></td></tr><tr><td align="right" valign="top"><label for="auth-pass" style="font:bold 16px arial,tahoma;color:#777;">Пароль</label></td><td><input id="auth-pass" name="upass" style="font-size:15px;width:240px" type="password" tabindex="2"/><div style="margin-top:10px"><input id="auth-save" name="save" type="checkbox" value="1" tabindex="3" checked/><label for="auth-save"> Запомнить меня</label></div></td></tr><tr><td colspan="2">'+go2+'<input type="submit" value="&nbsp;" alt="GO!" style="float:right;" class="bok" tabindex="4"/><a href="http://profile.allnokia.ru/new/">Зарегистрироваться</a><br /><a href="http://profile.allnokia.ru/login/lost.php">Напомнить пароль</a></td></tr></table></form>',400,255);return false}else{return true}}function words_counter(v){var w=0;a=v.replace(/\s/g," ");a=a.split(" ");for(i=0;i<a.length;i++){if(a[i].length>0)w++}return w}function sett_form(name,v){var fobj=(typeof(name)=='object')?name:window.document.forms[name];var v;var curField;len=fobj.length;if(v[name]){v=v[name]}else{return}for(var i=0;i<len;i++){var field=fobj.elements[i];if(v[field.name]){if(field.value==''||field.value==v[field.name]){field.value=v[field.name];field.style.color='#B9B9B9'}if(field.addEventListener){field.addEventListener("focus",event_focus,false);field.addEventListener("blur",event_blur,false)}else if(field.attachEvent){field.attachEvent("onfocus",event_focus);field.attachEvent("onblur",event_blur)}}}function event_focus(e){if(window.event)obj=window.event.srcElement;else obj=e.currentTarget;if(v[obj.name]&&v[obj.name]==obj.value){obj.value='';obj.style.color=''}curField=obj;obj.focus()}function event_blur(){if(v[curField.name]&&curField.value==''){curField.value=v[curField.name];curField.style.color='#B9B9B9'}}}function form_check(o,fieldParms,fieldValues,res){var errors='';fields=o.length;for(var k in fieldParms){if(o.elements[k]){var field=o.elements[k];if(fieldValues[field.name]){fieldValue=field.value=field.value.replace(fieldValues[field.name],'')}else{fieldValue=field.value}if(fieldParms[field.name][0]=='s'){fieldValue=fieldValue.replace(/^\s*/g,'');fieldValue=fieldValue.replace(/\s*$/g,'');if(fieldValue.length<fieldParms[field.name][1]||fieldValue.length>fieldParms[field.name][2]){errors+=fieldParms[field.name][4]+";\n"}else if(fieldParms[field.name][3]!=''&&fieldValue.replace(fieldParms[field.name][3],'')!=''){errors+=fieldParms[field.name][4]+";\n"}}else if(fieldParms[field.name][0]=='i'){fieldValue=field.value.replace(/^0(\d+)/g,'$1');fieldValue=parseInt(fieldValue);if(isNaN(fieldValue)){errors+=fieldParms[field.name][4]+";\n"}else{if(fieldValue<fieldParms[field.name][1]||fieldValue>fieldParms[field.name][2]){errors+=fieldParms[field.name][4]+";\n"}}}else{w=words_counter(fieldValue);if(w<fieldParms[field.name][1]||w>fieldParms[field.name][2]){errors+=fieldParms[field.name][4]+";\n"}}}}if(errors!=''){if(!res){errors='Были допущены следующие ошибки:'+"\n\n"+errors;sett_form(o,vall);alert(errors);return false}else{return errors}}else{return true}return false}function login_check(o){for(var i=0;i<2;i++){var field=o.elements[i];if(v[field.name]&&(field.value==''||field.value==v[field.name])){return false}}return true}function subscr_check(o){var errors='';var a=o.elements['email'].value;if(a.length<6||a.replace(/([\w-._]+@[\w-.]+)/gi,'=correct=')!='=correct='){errors+="Некорректный E-Mail. \n"}ch=0;for(var i=0;i<o.elements.length;i++){var f=o.elements[i];if(f.type=='checkbox'&&f.checked){ch++;break}}if(ch==0){errors+="Не выделен ни один канал подписки. \n"}if(errors){errors='Были допущены следующие ошибки:'+"\n\n"+errors;alert(errors);return false}return true}function tab(tabs,id){var ul=document.getElementById(tabs);var li=ul.getElementsByTagName('li');for(i=0;i<li.length;i++){if(id==li[i].id){li[i].className='active'}else{li[i].className=''}if(document.getElementById('tab_'+li[i].id)){var tab=document.getElementById('tab_'+li[i].id);if(id==li[i].id){tab.style.display=''}else{tab.style.display='none'}}}}function wheel(event){var delta=0;if(!event)event=window.event;if(event.wheelDelta){delta=event.wheelDelta/120}else if(event.detail){delta=-event.detail/3}if(delta&&typeof handle=='function'){handle(this,delta);if(event.preventDefault)event.preventDefault();event.returnValue=false}}function iWheel(o,callback){if(o.addEventListener){o.addEventListener('DOMMouseScroll',wheel,false)}o.onmousewheel=wheel;o.onmouseover=function(){handle=callback};o.onmouseout=function(){handle=null}}function go2page(perfix,postfix,total){p=prompt("Введите номер страницы, на которую хотите перейти. Всего страниц: "+total,1);if(p>0&&p<=total){window.location=perfix+p+postfix}}function up_rating(id,v){if(document.getElementById(id)){var o=document.getElementById(id);iv=parseInt(o.innerHTML);v=(!v)?1:v;v=((isNaN(iv))?v:+(iv+v));o.innerHTML=(v>0)?'+'+v:v;var color=o.style.color;var bg=o.style.backgroundColor;if(!color){css=GetCssData(o);color=css.color;bg=css.backgroundColor}o.style.color='#fff';o.style.backgroundColor=color;setTimeout(function(){o.style.color=color;o.style.backgroundColor=bg},190)}}function AddNewOpt(o,text,value,sel){if(o!=null&&o.options!=null){o.options[o.options.length]=new Option(text,value,false,sel)}}function check_searh(o){q=o.elements['request'].value;p=o.elements['part'].value;if(q.length<2||vals[o.name]['request']==q||q=='Поиск'){alert('Слишком короткий запрос');return false}q=q.replace("'","%27").replace(' ','+');if(p=='all'){eval("parent.location='http://allnokia.ru/search/?cx=017019387849631947929%3Agth2b1igw90&cof=FORID%3A11&ie=windows-1251&q="+q+"'");return false}else if(p=='forum'){eval("parent.location='http://forum.allnokia.ru/search/?cx=017019387849631947929%3A5tnngkni9ae&cof=FORID%3A10&ie=windows-1251&q="+q+"'");return false}return true}function createCookie(name,value,days,path){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else var expires="";var path=(path)?'; path='+path:'';document.cookie=name+"="+value+expires+path}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return null}function getPos(o){var s=[0,0];while(o.offsetParent){s[0]+=o.offsetLeft;s[1]+=o.offsetTop;o=o.offsetParent}return s}function add2copy(d,f,g){if(!document.getElementById(d)){return false}var o=document.getElementById(d);var h=document.createElement('span');h.id='hscc';h.innerHTML=(g)?g:'<br />Читать полностью: <a href="'+window.location.href+'">'+window.location.href+'</a>';document.write('<style>#hscc{color:transparent; height:1px; overflow:hidden; position:absolute; width:1px;};</style>');if(o.addEventListener){o.addEventListener("mouseup",mouseup,false);o.addEventListener("mousedown",mousedown,false)}else if(o.attachEvent){o.attachEvent("onmouseup",mouseup);o.attachEvent("onmousedown",mousedown,false)}function mousedown(e){if(h.parentNode){h.parentNode.removeChild(h)}}function mouseup(e){if(window.getSelection){var a=window.getSelection();var b=a.toString();if(!b||b.length<f)return;var c=a.getRangeAt(0);b=c.cloneRange();b.collapse(false);b.insertNode(h);c.setEndAfter(h);a.removeAllRanges();a.addRange(c)}else if(document.selection){var a=document.selection;var c=a.createRange();var b=c.text;if(!b||b.length<f)return;b=c.duplicate();b.collapse(false);b.pasteHTML(h.outerHTML);c.setEndPoint("EndToEnd",b);c.select()}}}function go2url(to){var title=encodeURIComponent(document.title);var url=encodeURIComponent(location.href);var urls=['','twitter.com/home?status='+title+' '+url,'vkontakte.ru/share.php?url='+url+'&title='+title,'www.facebook.com/sharer.php?u='+url+'&title='+title,'connect.mail.ru/share?share_url='+url+'&title='+title,'www.livejournal.com/update.bml?event='+url+'&subject='+title,'friendfeed.com/?title='+title+'&url='+url,'memori.ru/link/?sm=1&u_data[url]='+url+'&u_data[name]='+title,'bobrdobr.ru/addext.html?url='+url+'&title='+title,'www.google.com/buzz/post?url='+url+'&title='+title+'&imageurl=http://allnokia.ru/img/logo100.png','zakladki.yandex.ru/userarea/links/addfromfav.asp?bAddLink_x=1&lurl='+url+'&lname='+title,'www.mister-wong.ru/index.php?action=addurl&bm_url='+url+'&bm_description='+title,'del.icio.us/post?v=4&noui&jump=close&url='+url+'&title='+title];if(urls[to]){ajax('addthislog','r',to+'&u='+url,1,'http://allnokia.ru/click/');setTimeout(function(){window.location.href='http://'+urls[to]},500)}}function addThis(){var titles=['','Twitter','В Контакте','Facebook','Мой Мир','LiveJournal','FriendFeed','Memori','Бобр Добр','Google','Яндекс','Mister Wong','Delicious'];var text='';text+='<div class="tabs bold" style="cursor:pointer; line-height:32px; position:relative" onclick="toggle_block(\'addthis\')">+ В закладки<img src="/img/addthis/but.png" height="16" width="122" style="top:7px; position:absolute; right:0px;" alt="" /></div><div id="addthis" class="tabs_cont" style="display:none; padding:10px 10px 10px 15px;"><ul class="addul"><li class="addli" style="background:url(/img/addthis/0.gif) no-repeat;" onclick="AddFavorite()">Закладки</li>';for(var i=1;i<=6;i++){text+='<li class="addli" style="background:url(/img/addthis/'+i+'.gif) no-repeat;" onclick="go2url('+i+')">'+titles[i]+'</li>'}text+='</ul><ul class="addul"><li class="addli" style="background:url(/img/addthis/rss.gif) no-repeat;"><a href="http://allnokia.ru/rss/">RSS-ленты</a></li>';for(var i=7;i<=12;i++){text+='<li class="addli" style="background:url(/img/addthis/'+i+'.gif) no-repeat;" onclick="go2url('+i+')">'+titles[i]+'</li>'}text+='</ul><br clear="all"></div>';document.write(text)}
