Снимка, която се увеличава и намаля в четери полета
Скриптът Ви позволява да показвате снимка, която се увеличава и намаля в четери полета на браузъра.
CODE
CODE
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | <html> <head> <TITLE>MURDA6T BACKGROUND</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var imgsrc="bgpic.jpg" var pause=100 var imgpreload=new Image() imgpreload.src=imgsrc var screenwidth=0 var screenheight=0 var imgwidthA var imgheightA var imgwidthB var imgheightB var imgwidthC var imgheightC var imgwidthD var imgheightD var max_step=20 var x_step=0 var y_step=0 function initiate() { x_step=0 y_step=0 if (document.layers) { screenwidth=window.innerWidth screenheight=window.innerHeight imgwidthA=screenwidth/2 imgheightA=screenheight/2 document.bgimageA.document.write("<img src="+imgsrc+" width="+screenwidth/2+">") document.bgimageA.document.close() document.bgimageB.document.write("<img src="+imgsrc+" width="+screenwidth/2+">") document.bgimageB.document.close() document.bgimageC.document.write("<img src="+imgsrc+" width="+screenwidth/2+">") document.bgimageC.document.close() document.bgimageD.document.write("<img src="+imgsrc+" width="+screenwidth/2+">") document.bgimageD.document.close() document.bgimageA.left=0 document.bgimageA.top=0 document.bgimageB.left=screenwidth/2 document.bgimageB.top=0 document.bgimageC.left=0 document.bgimageC.top=screenheight/2 document.bgimageD.left=screenwidth/2 document.bgimageD.top=screenheight/2 setnewsize() } if (document.all) { screenwidth=document.body.clientWidth screenheight=document.body.clientHeight imgwidthA=screenwidth/2 imgheightA=screenheight/2 max_loop=Math.floor(imgwidthA/max_step) bgimageA.innerHTML="<img src="+imgsrc+" width="+screenwidth/2+">" bgimageB.innerHTML="<img src="+imgsrc+" width="+screenwidth/2+">" bgimageC.innerHTML="<img src="+imgsrc+" width="+screenwidth/2+">" bgimageD.innerHTML="<img src="+imgsrc+" width="+screenwidth/2+">" document.all.bgimageA.style.posLeft=0 document.all.bgimageA.style.posTop=0 document.all.bgimageB.style.posLeft=screenwidth/2 document.all.bgimageB.style.posTop=0 document.all.bgimageC.style.posLeft=0 document.all.bgimageC.style.posTop=screenheight/2 document.all.bgimageD.style.posLeft=screenwidth/2 document.all.bgimageD.style.posTop=screenheight/2 setnewsize() } } function stretchimg() { imgwidthA+=x_step imgheightA+=y_step imgwidthB=screenwidth-imgwidthA imgheightB=imgheightA imgwidthC=imgwidthA imgheightC=screenheight-imgheightA imgwidthD=screenwidth-imgwidthA imgheightD=screenheight-imgheightA if (document.all && imgwidthA<=screenwidth && imgheightA<=screenheight) { document.all.bgimageA.style.posLeft=0 document.all.bgimageA.style.posTop=0 document.all.bgimageB.style.posLeft=imgwidthA document.all.bgimageB.style.posTop=0 document.all.bgimageC.style.posLeft=0 document.all.bgimageC.style.posTop=imgheightA document.all.bgimageD.style.posLeft=imgwidthA document.all.bgimageD.style.posTop=imgheightA bgimageA.innerHTML="<img src="+imgsrc+" width="+imgwidthA+" height="+imgheightA+">" bgimageB.innerHTML="<img src="+imgsrc+" width="+imgwidthB+" height="+imgheightB+">" bgimageC.innerHTML="<img src="+imgsrc+" width="+imgwidthC+" height="+imgheightC+">" bgimageD.innerHTML="<img src="+imgsrc+" width="+imgwidthD+" height="+imgheightD+">" i_loop++ var timer=setTimeout("stretchimg()",pause) } else if (document.layers && imgwidthA<=screenwidth && imgheightA<=screenheight) { document.bgimageA.left=0 document.bgimageA.top=0 document.bgimageB.left=imgwidthA document.bgimageB.top=0 document.bgimageC.left=0 document.bgimageC.top=imgheightA document.bgimageD.left=imgwidthA document.bgimageD.top=imgheightA document.bgimageA.document.write("<img src="+imgsrc+" width="+imgwidthA+" height="+imgheightA+">") document.bgimageA.document.close() document.bgimageB.document.write("<img src="+imgsrc+" width="+imgwidthB+" height="+imgheightB+">") document.bgimageB.document.close() document.bgimageC.document.write("<img src="+imgsrc+" width="+imgwidthC+" height="+imgheightC+">") document.bgimageC.document.close() document.bgimageD.document.write("<img src="+imgsrc+" width="+imgwidthD+" height="+imgheightD+">") document.bgimageD.document.close() i_loop++ var timer=setTimeout("stretchimg()",3*pause) } else { clearTimeout(timer) shrinkimg() } } function shrinkimg() { imgwidthA-=x_step imgheightA-=y_step imgwidthB=screenwidth-imgwidthA imgheightB=imgheightA imgwidthC=imgwidthA imgheightC=screenheight-imgheightA imgwidthD=screenwidth-imgwidthA imgheightD=screenheight-imgheightA if (document.all && imgwidthA>=2 && imgheightA>=2) { document.all.bgimageA.style.posLeft=0 document.all.bgimageA.style.posTop=0 document.all.bgimageB.style.posLeft=imgwidthA document.all.bgimageB.style.posTop=0 document.all.bgimageC.style.posLeft=0 document.all.bgimageC.style.posTop=imgheightA document.all.bgimageD.style.posLeft=imgwidthA document.all.bgimageD.style.posTop=imgheightA bgimageA.innerHTML="<img src="+imgsrc+" width="+imgwidthA+" height="+imgheightA+">" bgimageB.innerHTML="<img src="+imgsrc+" width="+imgwidthB+" height="+imgheightB+">" bgimageC.innerHTML="<img src="+imgsrc+" width="+imgwidthC+" height="+imgheightC+">" bgimageD.innerHTML="<img src="+imgsrc+" width="+imgwidthD+" height="+imgheightD+">" i_loop-- var timer=setTimeout("shrinkimg()",pause) } else if (document.layers && imgwidthA>=2 && imgheightA>=2) { document.bgimageA.left=0 document.bgimageA.top=0 document.bgimageB.left=imgwidthA document.bgimageB.top=0 document.bgimageC.left=0 document.bgimageC.top=imgheightA document.bgimageD.left=imgwidthA document.bgimageD.top=imgheightA document.bgimageA.document.write("<img src="+imgsrc+" width="+imgwidthA+" height="+imgheightA+">") document.bgimageA.document.close() document.bgimageB.document.write("<img src="+imgsrc+" width="+imgwidthB+" height="+imgheightB+">") document.bgimageB.document.close() document.bgimageC.document.write("<img src="+imgsrc+" width="+imgwidthC+" height="+imgheightC+">") document.bgimageC.document.close() document.bgimageD.document.write("<img src="+imgsrc+" width="+imgwidthD+" height="+imgheightD+">") document.bgimageD.document.close() i_loop-- var timer=setTimeout("shrinkimg()",3*pause) } else { clearTimeout(timer) var timer=setTimeout("setnewsize()",2000) } } function setnewsize() { x_step=Math.floor(max_step*Math.random()) y_step=Math.floor(max_step*Math.random()) i_loop=0 stretchimg() } window.onresize=initiate //--> </SCRIPT> </HEAD> <BODY bgcolor=#FFFFFF onLoad="initiate()" style="width:100%;overflow-x:hidden;overflow-y:hidden"> <DIV ID="bgimageA" style="position:absolute;top:-8000px;"></DIV> <DIV ID="bgimageB" style="position:absolute;top:-8000px;"></DIV> <DIV ID="bgimageC" style="position:absolute;top:-8000px;"></DIV> <DIV ID="bgimageD" style="position:absolute;top:-8000px;"></DIV> <DIV id="delethethistext" style="position:absolute;top:20px;left:20px;"> <font size=2 face=Verdana> </DIV> </BODY> </HTML> |





