window.name = 'ADSemenov.ru';
var dToday = new Date();
var idD = (''+(dToday.getDate()+100)).substr(1) + (''+(dToday.getMonth()+101)).substr(1) + dToday.getFullYear();
var idH = idD + (''+(dToday.getHours()+100)).substr(1);
var bNs = (navigator.appName=='Netscape')?true:false;
var hTimer1 = 0;
var hTimer2 = 0;
var iCorr = (bNs)?2:0;
var iSwitch = 0;
var iListH;
var iListW;
var iImgListH;
var iImgListW;
var iStep = 64;
var iTick = 64;
var iW;
var i_dH;

function decList(){
 hTimer1 = 0;
 iW -= iStep;
 if(iW > 0){
  frPage.document.getElementById('idShade').style.width = iImgListW + iW;
  frPage.document.getElementById('idShade').style.height = iImgListH + i_dH*iW;
  frPage.document.getElementById('idList').style.width = iImgListW + iW - iCorr;
  frPage.document.getElementById('idList').style.height = iImgListH + i_dH*iW - iCorr;
  hTimer1 = setTimeout('decList()', iTick);
 }else{
  frPage.document.getElementById('idShade').style.visibility = 'hidden';
  frPage.document.getElementById('idList').style.visibility = 'hidden';
  iSwitch = 4;
 }
}
function hideList(){
 if(hTimer1 != 0) clearTimeout(hTimer1);
 if(hTimer2 == 0){
  iSwitch = -1;
  frPage.document.getElementById('idList').style.visibility = 'hidden';
  frPage.document.getElementById('idShade').style.visibility = 'hidden';
  frPage.document.getElementById('idLeft').style.visibility = 'hidden';
 }else clearTimeout(hTimer2);
 hTimer2 = setTimeout('showList()', 128);
}
function incList(){
 hTimer1 = 0;
 iW += iStep;
 if(iImgListW + iW > iListW - iCorr){
  frPage.document.getElementById('idShade').style.width = iListW;
  frPage.document.getElementById('idShade').style.height = iListH;
  frPage.document.getElementById('idList').style.width = iListW - iCorr;
  frPage.document.getElementById('idList').style.height = iListH - iCorr;
  iSwitch = 1;
 }else{
  frPage.document.getElementById('idShade').style.width = iImgListW + iW;
  frPage.document.getElementById('idShade').style.height = iImgListH + i_dH*iW;
  frPage.document.getElementById('idList').style.width = iImgListW + iW - iCorr;
  frPage.document.getElementById('idList').style.height = iImgListH + i_dH*iW - iCorr;
  hTimer1 = setTimeout('incList()', iTick/2);
 }
}
function offList(iFirstTick){
 if(iSwitch == 1){
  iW = iListW - iImgListW;
  iSwitch = 2;
  hTimer1 = setTimeout('decList()', iFirstTick);
 }
}
function onList(){
 iListH = frPage.document.getElementById("idList").offsetHeight;
 iListW = frPage.document.getElementById("idList").offsetWidth;
 frPage.document.getElementById('idShade').style.width = iListW;
 frPage.document.getElementById('idShade').style.height = iListH;
 iImgListH = frPage.document.getElementById("idImgList").offsetHeight;
 iImgListW = frPage.document.getElementById("idImgList").offsetWidth;
 iW = iListW - iImgListW;
 i_dH = (iListH - iImgListH)/iW;
 iSwitch = 1;
 offList(1000);
}
function setList(){
 if(iSwitch == 4){
  frPage.document.getElementById('idShade').style.width = iImgListW;
  frPage.document.getElementById('idShade').style.height = iImgListH;
  frPage.document.getElementById('idShade').style.visibility = 'visible';
  frPage.document.getElementById('idList').style.width = iImgListW - iCorr;
  frPage.document.getElementById('idList').style.height = iImgListH - iCorr;
  frPage.document.getElementById('idList').style.visibility = 'visible';
  iW = 0;
  iSwitch = 3;
  hTimer1 = setTimeout('incList()', iTick/2);
 }
}
function ou(t){t.style.backgroundColor = '';}
function ov(t){t.style.backgroundColor = '#cccc99';}
function show(doc,w,h,t){
 window.open('show.php?f=' + doc + '&t=' + t, '', 'width=' + (w+8) + ',height=' + (h+8) + ',scrollbar=no,resizable=no,left=200,top=100');return void(0);
}
function showList(){
 hTimer2 = 0;
 iSwitch = 4;
 frPage.document.getElementById('idLeft').style.top = frPage.document.body.scrollTop;
 frPage.document.getElementById('idList').style.top = frPage.document.body.scrollTop + 2;
 frPage.document.getElementById('idShade').style.top = frPage.document.body.scrollTop + 8;
 frPage.document.getElementById('idLeft').style.visibility = 'visible';
}
