var picflag=1; var interval=10; var counter=0; var lens=0; var lift=0; var timer=0; var centerx=465; var centery=370; var wtop=0; var wleft=0; var height=0; var maxheight=600; var minheight=10; var width=0; var maxwidth=600; var minwidth=10; var picname='crown'; var pic2name='crown'; var picheight=550; var showcurrent="show"; var shownext="show"; a1=new Image;a1.src="img/background.jpg"; a2=new Image;a2.src="img/logo.jpg"; a3=new Image;a3.src="img/line_1.jpg"; a4=new Image;a4.src="img/bg_text.jpg"; a5=new Image;a5.src="img/2_1.jpg"; a6=new Image;a6.src="img/2_1r.jpg"; a7=new Image;a7.src="img/2_2.jpg"; a8=new Image;a8.src="img/2_3.jpg"; a9=new Image;a9.src="img/2_4.jpg"; a10=new Image;a10.src="img/2_5.jpg"; a11=new Image;a11.src="img/1_1.jpg"; a12=new Image;a12.src="img/1_2.jpg"; a13=new Image;a13.src="img/1_3.jpg"; a14=new Image;a14.src="img/1_3p.jpg"; a15=new Image;a15.src="img/1_4.jpg"; a16=new Image;a16.src="img/1_5.jpg"; a17=new Image;a17.src="img/1_6.jpg"; a18=new Image;a18.src="img/1_7.jpg"; a19=new Image;a19.src="img/1_8.jpg"; a20=new Image;a20.src="img/1_9.jpg"; a21=new Image;a21.src="img/1_10.jpg"; a22=new Image;a22.src="img/button_144x24.jpg"; a23=new Image;a23.src="img/button_120x24.jpg"; a24=new Image;a24.src="img/button_120x48.jpg"; function over(img,ref) // Подкрашиватели { document.images[img].src = ref; } function out(img,ref) { document.images[img].src = ref; } function showframe(x,y,pic,pic2,show,show2,photoname) // Развертывание фона со скоросью х пикс / 10 ms и проявление картинки со скоросью y ступеней / 10 ms { // ================================= прием параметров lift=x; lens=y; counter=0; picflag=1; picname=pic; pic2name=pic2; showcurrent=show; shownext=show2; if(typeof(document.all.shownext.innerText)!='undefined') { if(pic2name!="None") { document.all.shownext.innerText=shownext; } else { document.all.shownext.innerText=""; } document.all.showname.innerText=photoname; } else { if(pic2name!="None") { document.all.shownext.textContent=shownext; } else { document.all.shownext.textContent=""; } document.all.showname.textContent=photoname; } loadpicture1=new Image; loadpicture1.src="preview/"+picname+".jpg"; loadpicture2=new Image; loadpicture2.src="preview/"+pic2name+".jpg"; // ================================= стартовые установки width=minwidth; height=minheight; document.all.maskdiv.style.visibility="visible"; document.all.picdiv.style.top=Math.round(centery-height*0.5); document.all.picdiv.style.left=Math.round(centerx-width*0.5); document.all.picdiv.style.width=width; document.all.picdiv.style.height=height; document.all.picdiv.style.visibility="visible"; timer=window.setInterval("floatframe()",interval); } function hideframe() // Растворение картинки и свертывание фона { lens=-lens; lift=-lift; picflag=1; document.all.buttondiv.style.visibility="hidden"; timer=window.setInterval("level(1)",interval); } function changepicframe() // Перерисовка картинки без свертывания фона { if(pic2name!="None") { lens=-lens; document.all.buttondiv.style.visibility="hidden"; timer=window.setInterval("level(0)",interval); } } function hidepicframe() { document.all.crowndiv.style.visibility="hidden"; document.all.crown.style.visibility="hidden"; document.all.crown.src="preview/wait.gif"; timer=window.setInterval("floatframe()",interval); } function finishframe() // Сокрытие фона { document.all.picdiv.style.visibility="hidden"; document.all.maskdiv.style.visibility="hidden"; } function showpic() // Проявление картинки { picload(); timer=window.setInterval("level(1)",interval); } function replacepic() // Подмена картинки { document.all.crowndiv.style.visibility="hidden"; document.all.crown.style.visibility="hidden"; var oldpicname=picname; var oldshowtext=shownext; picname=pic2name; pic2name=oldpicname; shownext=showcurrent; showcurrent=oldshowtext; if(typeof(document.all.shownext.innerText)!='undefined') { document.all.shownext.innerText=shownext; } else { document.all.shownext.textContent=shownext; } picload(); timer=window.setInterval("level(1)",interval); } function finishpic() // Сокрытие картинки { document.all.crown.style.filter='Alpha(Opacity="0")'; document.all.crown.style.opacity=0; document.all.crowndiv.style.visibility="hidden"; hideframe(); } function showbutton() // Отображение кнопок { document.all.buttondiv.style.visibility="visible"; } function floatframe() // Равертывание-свертывание фона { if(lift!=0) { height+=lift; width+=lift; if(height>maxheight) height=maxheight; if(width>maxwidth) width=maxwidth; if(height0) { hidepicframe(); } else { lens=-lens; replacepic(); } } if(counter>99) { counter=100; clearInterval(timer); showbutton(); } document.all.crown.style.filter='Alpha(Opacity='+counter+')'; document.all.crown.style.opacity=counter*0.01; } if(picflag==-1) { picflag=1; clearInterval(timer); document.all.waitdiv.style.visibility="hidden"; showbutton(); } } function confirmpicload() // уведомление о загрузке файла { picflag=1; document.all.waitdiv.style.visibility="hidden"; } function disposepicload() { picflag=-1; return true; } function picload() // Постановка файла на загрузку { document.all.crown.style.visibility="visible"; document.all.crown.style.filter='Alpha(Opacity="0")'; document.all.crown.style.opacity=0; document.all.crowndiv.style.visibility="visible"; document.all.waitdiv.style.visibility="visible"; picflag=0; document.all.crown.src="preview/"+picname+".jpg"; }