function yandex_direct(){yandex_partner_id=32019;yandex_site_bg_color='FFFFFF';yandex_site_charset='windows-1251';yandex_ad_format='direct';yandex_font_size=0.9;yandex_direct_type='vertical';yandex_direct_limit=4;yandex_direct_bg_color='FFFFFF';yandex_direct_title_color='D62002';yandex_direct_url_color='999999';yandex_direct_all_color='999999';yandex_direct_text_color='333333';yandex_direct_hover_color='02D61C';document.write('<sc'+'ript type="text/javascript" src="http://an.yandex.ru/resource/context.js?rnd='+Math.round(Math.random()*100000)+'"></sc'+'ript>');}
function imgOpen(imgURL,Title,w,h)
{w=0+Number(w);h=0+Number(h);hiddenImg=new Image();hiddenImg.src=imgURL;if(w>0&&h>0){imgWidth=w;imgHeight=h;}
else{imgWidth=hiddenImg.width;imgHeight=hiddenImg.height;}
var imgWndw=window.open('','_blank','width='+imgWidth+',height='+imgHeight+',toolbar=no,menubar=no,location=no,status=no,'+'resizable=yes,scrollbars=no, top=300,left=400');var imgTitle=(Title)?Title:imgURL+": "+imgWidth+'x'+imgHeight;with(imgWndw.document){open();write('<ht'+'ml><he'+'ad><ti'+'tle>'+imgTitle+'</ti'+'tle>'+'</he'+'ad><bo'+'dy leftmargin="0" topmargin="0" '+'rightmargin="0" bottommargin="0" marginwidth="0" '+'marginheight="0"><a href="javascript:history.go(0);" onclick="window.close();"><img src="'+imgURL+'" width="'+imgWidth+'" height="'+imgHeight+'" border="0" alt="'+imgTitle+'"></a></bo'+'dy></ht'+'ml>');close();}
return false;}
function set_cookie(sName,sValue){document.cookie=sName+"="+escape(sValue)+"; expires=Tue, 14 Dec 2010 23:59:59 GMT; path=/;";}
function getwindow(){var d=document,v=window,w,h,l,t;if(typeof v.innerWidth==='number'){w=v.innerWidth;h=v.innerHeight;l=v.pageXOffset;t=v.pageYOffset;}else if((v=d.documentElement)&&typeof v.clientWidth==='number'&&v.clientWidth!==0||(v=d.body)){w=v.clientWidth;h=v.clientHeight;l=v.scrollLeft;t=v.scrollTop;}
return{w:w,h:h,l:l,t:t};}
function getmouse(e){e=e||window.event||{};var moux,mouy,w=getwindow(),minx=w.l,miny=w.t,maxx=w.w+w.l,maxy=w.h+w.t;if(typeof e.pageX==='number'){moux=e.pageX;mouy=e.pageY;}else{moux=e.x+w.l;mouy=e.y+w.t;}
mouseX=moux;mouseY=mouy;}
window.onscroll=getmouse;window.onresize=getmouse;window.document.onmousemove=getmouse;function getyScroll()
{yScroll=0;if(window.innerHeight&&window.scrollMaxY||window.innerWidth&&window.scrollMaxX)
{yScroll=window.innerHeight+window.scrollMaxY;xScroll=window.innerWidth+window.scrollMaxX;var deff=document.documentElement;var wff=(deff&&deff.clientWidth)||document.body.clientWidth||window.innerWidth||self.innerWidth;var hff=(deff&&deff.clientHeight)||document.body.clientHeight||window.innerHeight||self.innerHeight;xScroll-=(window.innerWidth-wff);yScroll-=(window.innerHeight-hff);}
else if(document.body.scrollHeight>document.body.offsetHeight||document.body.scrollWidth>document.body.offsetWidth)
{yScroll=document.body.scrollHeight;xScroll=document.body.scrollWidth;}
else{yScroll=document.body.offsetHeight;xScroll=document.body.offsetWidth;}
return yScroll;}
function show_log(){var str='';str='<form action="/login/" method="post" name="log_form" id="logform"><center> \
 <a href="javascript:void(0);"><img onClick="show_log();" src="/img/site/krest.gif" style="float:right;margin:5px;"  border="0"  alt="закрыть" /></a> \
 <table width="300" cellpadding="3" cellspacing="0"> \
 <tr><td ><span>Логин:</span></td></tr> \
 <tr><td><input tabindex="1" class="edit" type="text" name="login" value="" /></td></tr><tr><td><span>Пароль:</span></td></tr> \
 <tr><td><input class="edit" tabindex="2" type="password" name="password" value="" /></td></tr> \
 <tr><td><input type="checkbox" value="1" name="remember" id="membermy" checked="checked" /> <span style="font-size:12px;"><i>запомнить пароль</i></span> \
 </td></tr><tr><td><input type="submit"  tabindex="3" value="Вход" style="border:1px green solid; font-size:20px;" /></td></tr> \
 <tr><td><i><a href="/forgot/">Забыли пароль?</a> &nbsp;&nbsp;&nbsp;<a href="/reg/">Регистрация</a></i></td></tr> \
 </table></center></form>';$('#div_login2').html(str);$('#logform').focus();if($('#div_login2').css('display')=='none'){$('#div_login2').show();$('#screen').show();}
else{$('#div_login2').hide();$('#screen').hide();}
$('#screen').css('height',getyScroll()+'px');}
function showhide(id,link){if($('#h'+id).attr('class')=='hide'){link.innerHTML='скрыть &larr;';$('#h'+id).removeClass('hide');}
else{link.innerHTML='читать дальше &rarr;';$('#h'+id).addClass('hide');}}
function showhidediv(id,link){if($('#h'+id).attr('class')=='hide'){$('#h'+id).removeClass('hide');}
else{$('#h'+id).addClass('hide');}}
function checkEmail(email){re2=new RegExp("^([a-zA-Z0-9_\-]+\.)*[a-zA-Z0-9_\-]+@([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.)+[a-zA-Z]{2,4}$");if(re2.test(email)){return true;}
else{return false;}}
function show_div(d1,d2){$('#'+d1).show();$('#'+d2).hide();}