function loadPage(pageURL){
    location.href = pageURL.options[pageURL.selectedIndex].value
    }

function readfull(rcode)
        { window.open('readfull.php?id='+rcode,'add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=500,height=360,left=16,top=16'); }

function mail(rcode)
        { window.open('mail.php?id='+rcode,'add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=300,height=360,left=16,top=16'); }

function edit(rcode)
        { window.open('edit.php?id='+rcode,'add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=500,height=700,left=16,top=16'); }

function comm_add(rcode)
        { window.open('comment_add.php?id='+rcode,'add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=400,height=300,left=16,top=16'); }

function delit(rcode)
        { window.open('delit.php?id='+rcode,'add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=200,height=100,left=16,top=16'); }

function rempass()
        { window.open('rempass.php','add','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=300,height=200,left=16,top=16'); }


var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}
function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}
function displaylimit(theform,thelimit){
var limit_text='<font size=1 face=Verdana><b><span id="'+theform.toString()+'">'+thelimit+'</span></b></font>'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
}
}


function Set_Cookie( name, value, expires, path, domain, secure )
{
    var expires_date = new Date();
    expires_date.setTime (expires_date.getTime() + (expires*1000))

    document.cookie = name + "=" +escape( value ) +
    ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
    ( ( path ) ? ";path=" + path : "" ) +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ( ( secure ) ? ";secure" : "" );

}




/* google analytics */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2329256-5']);
_gaq.push(['_trackPageview']);

(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

/*  begun.ru */
/*
var js = document.createElement('script');
var ava_nocache = Math.round( Math.random() * 100000 );
js.src = 'http://a.ava.com.ua/a/showA.js?partner=831&block=2103&context=' + encodeURIComponent(document.title) + '&encoding=windows-1251&limit=&holdertype=div&holder=avaholder_74039&nocache='+ava_nocache;
var head = document.getElementsByTagName('head')[0];head.appendChild(js);*/


