function changeWings(){
if(document.body.clientWidth>1100){
leftWing.width="11%";
rightWing.width="10%";
mainScr.width="79%";
}
else{
leftWing.width="6%";
rightWing.width="5%";
mainScr.width="89%";
}
}


function changeXWings(){
if(document.body.clientWidth>1100){
leftWing.width="11%";
rightWing.width="10%";
xWing.width="10%";
yWing.width="60%";
mainScr.width="79%";
}
else{
leftWing.width="6%";
rightWing.width="5%";
xWing.width="5%";
yWing.width="65%";
mainScr.width="89%";
}
}


function voteSubmit(){
sendm.submit();
}

function gotoVrt(){
document.location="/vrt/";
}

function gotoLab(){
document.location="/lab/";
}

function activeBank(){
document.getElementById("isBank").src="/img/cordbanky.gif";
}

function passiveBank(){
document.getElementById("isBank").src="/img/cordbankx.gif";
}

function activeVrt(){
document.getElementById("isVrt").src="/img/vrt.gif";
}

function passiveVrt(){
document.getElementById("isVrt").src="/img/vrtx.gif";
}

function activeLab(){
document.getElementById("isLab").src="/img/lab.gif";
}

function passiveLab(){
document.getElementById("isLab").src="/img/labx.gif";
}

function activeCdbank(){
document.getElementById("isCdbank").src="/img/cdbanky_.gif";
}

function passiveCdbank(){
document.getElementById("isCdbank").src="/img/cdbanky.gif";
}

function activeDon(){
document.getElementById("isDon").src="/img/don_.gif";
}

function passiveDon(){
document.getElementById("isDon").src="/img/don.gif";
}

function activeLd(){
document.getElementById("isLd").src="/img/ldy_.gif";
}

function passiveLd(){
document.getElementById("isLd").src="/img/ldy.gif";
}

function activeLb(){
document.getElementById("isLb").src="/img/lby_.gif";
}

function passiveLb(){
document.getElementById("isLb").src="/img/lby.gif";
}

function activeRd(){
document.getElementById("isRd").src="/img/rd_.gif";
}

function passiveRd(){
document.getElementById("isRd").src="/img/rdx_.gif";
}



function gotoBank(){
document.location="/cordbank/";
}

function showStepsTexts(id){
document.getElementById("steps"+id).className="shownone";
document.getElementById("bigsteps"+id).className="showall";
}

function changeFoto(way){
if (way==1){
if (picscounter<(pictures.length-1)){picscounter++;}
else{picscounter=0;}
}
if (way==2){
if (picscounter>0){picscounter--;}
else{picscounter=pictures.length-1;}
}
if (navigator.appName == "Microsoft Internet Explorer"){
piclayer.style.filter="blendTrans(duration=0.5)";
piclayer.filters.blendTrans.Apply();
piclayer.filters.blendTrans.Play();
}
document.getElementById("piclayer").style.backgroundImage="url("+pictures[picscounter].src+")";
if (!isEmpty(bigpici[picscounter])){
document.getElementById("picmain").innerHTML="<a href=/download/"+bigpici[picscounter]+" onclick=\"return hs.expand(this)\"><img src=/img/pix.gif width=302 height=230 border=0></a>";
}
else{
document.getElementById("picmain").innerHTML="<img src=/img/pix.gif width=302 height=230 border=0>";
}
if (!isEmpty(textpic[picscounter])){document.getElementById("pictext").innerHTML='<div style="padding-top:30;">'+textpic[picscounter]+'</div>';}
else{document.getElementById("pictext").innerHTML='<img src=/img/pix.gif width=1 height=1>';}
autook=0;
}

function getPictures(){
pictures = new Array();
for (ii=0;ii<pici.length;ii++){
pictures[ii] = new Image();
pictures[ii].src = "/download/"+pici[ii];
}
}


function autostartPictures(){
if (autook==1){
if (picscounter<(pictures.length-1)){picscounter++;}
else{picscounter=0;}
if (navigator.appName == "Microsoft Internet Explorer"){
piclayer.style.filter="blendTrans(duration=0.5)";
piclayer.filters.blendTrans.Apply();
piclayer.filters.blendTrans.Play();
}
document.getElementById("piclayer").style.backgroundImage="url("+pictures[picscounter].src+")";
if (!isEmpty(bigpici[picscounter])){
document.getElementById("picmain").innerHTML="<a href=/download/"+bigpici[picscounter]+" onclick=\"return hs.expand(this)\"><img src=/img/pix.gif width=302 height=230 border=0></a>";
}
else{
document.getElementById("picmain").innerHTML="<img src=/img/pix.gif width=302 height=230 border=0>";
}
if (!isEmpty(textpic[picscounter])){document.getElementById("pictext").innerHTML='<div style="padding-top:30;">'+textpic[picscounter]+'</div>';}
else{document.getElementById("pictext").innerHTML='<img src=/img/pix.gif width=1 height=1>';}
setTimeout("autostartPictures()",3000);
}
}



function isEmpty(str) {
  for (var i = 0; i < str.length; i++)
     if (" " != str.charAt(i))
         return false;
     return true;
}

function focusField(){
if (document.getElementById("yourmail").value=='укажите Ваш e-mail'){document.getElementById("yourmail").value='';}
}

function blurField(){
if (document.getElementById("yourmail").value==''){document.getElementById("yourmail").value='укажите Ваш e-mail';}
}

function focusSearch(){
document.getElementById("keyword").value='';
}

function checkBns(){
if (document.getElementById("bns")){
if (document.body.scrollHeight>1600){document.getElementById("bns").className="showall";}
}
if (document.getElementById("bns2")){
if (document.body.scrollHeight>2200){document.getElementById("bns2").className="showall";}
}
}


function showAllComments(){
document.getElementById("fullcomments").className="showall";
document.getElementById("allcomments").className="shownone";
}

function showBlogForm(){
document.getElementById("blogcomments").className="shownone";
document.getElementById("mycomments").className="showall";
location.hash="mycomments";
}
