اینو گذاشتم واستون چون که زنده موندیم و دنیا تمام نشد و ما به ادامه کارهامون میتونیم ادامه بدیم
کد :
head :
کد:
<link href="http://iransms.rozup.ir/demo/h/style.css" type="text/css" rev="stylesheet" rel="stylesheet"><script>/////////////////////////////////////////////////// Www.ShahinSHAHR.ROZBLOG.CoM/////////////////////////////////////////////////var bigimg= [{src : "http://iransms.rozup.ir/demo/h/300x180bluefish.jpg",message : "بهترین وبلاگ تفریحی ایرانیان",url : "http://www.shahinshahr.rozblog.com"},{src : "http://iransms.rozup.ir/demo/h/300x180castle.jpg",message : "سایت تفریحی ایران اس ام اس",url : "http://www.iransms.rozblog.com"},{src : "http://iransms.rozup.ir/demo/h/300x180butterfly.jpg",message : "بهترین وبلاگ تفریحی ایرانیان",url : "http://www.shahinshahr.rozblog.com"},{src : "http://iransms.rozup.ir/demo/h/300x180bonbons.jpg",message : "بهترین وبلاگ تفریحی ایرانیان",url : "http://www.shahinshahr.rozblog.com"}]// Set the width of the big images (pixels). All images should have the same widthvar bigimgwidth=300// Set th height of the big images (pixels). All images should have the same heightvar bigimgheight=180// Set the shrink-factor of thumbnails// In this sample the thumbnails are 6 times smaller than the big imagevar shrinkfactor=6/////////////////////////////////////////////////// Www.ShahinSHAHR.ROZBLOG.CoM/////////////////////////////////////////////////document.write("<div id='bigpic' style='position:relative;width:"+bigimgwidth+"px;filter:alpha(opacity=100);' class='boxstyle'><img src='"+bigimg[0].src+"' border='0'><br><a href='"+bigimg[0].url+"' class='textstyle'>"+bigimg[0].message+"</a></div>")</script>body :
کد:
<script>/////////////////////////////////////////////////// Www.ShahinSHAHR.ROZBLOG.CoM/////////////////////////////////////////////////var ns4=document.layers?1:0var ns6=document.getElementById&&!document.all?1:0 var ie=document.all?1:0var floatingspeed=5var tempo=20var numberofimages=bigimg.length-1var stepx=new Array()var stepy=new Array()for (i=0;i<=numberofimages;i++) { stepx=randommaker(floatingspeed) stepy=randommaker(floatingspeed)}var imgwidth=new Array()var imgheight=new Array()for (i=0;i<=numberofimages;i++) { imgwidth=100 imgheight=100}var x,yvar marginbottomvar marginleft=0var margintop=0var marginrightvar timervar blockmouseover=falsevar fadetimervar fadestrength=100var i_fadestrength=new Array()var i_fadestep=new Array()var i_fadenow=new Array()var i_fadenowmax=new Array()var spancontent=new Array()var imgpreload=new Array()var imgpreload=new Array()for (iii=0;iii<=bigimg.length-1;iii++) { imgpreload[iii]=new Image() imgpreload[iii].src=bigimg[iii].src}for (i=0;i<=numberofimages;i++) { spancontent="<a href='#' onMouseOver='showpic("+i+")'><img src='"+bigimg.src+"' border='0' width='"+parseInt(bigimgwidth/shrinkfactor)+"' height='"+parseInt(bigimgheight/shrinkfactor)+"'></a>"}function setValues() { marginbottom=window.innerHeight-11 marginright=window.innerWidth-11 if (ie) { marginbottom=document.body.clientHeight-5 marginright=document.body.clientWidth-5 } for (i=0;i<=numberofimages;i++) { var thisspan=document.getElementById('span'+i) thisspan.innerHTML=spancontent var thisspan=document.getElementById('span'+i) imgwidth=parseInt(bigimgwidth/shrinkfactor) imgheight=parseInt(bigimgheight/shrinkfactor) var maxleftstart=marginright-imgwidth var maxtopstart=marginbottom-imgheight var thisspan=document.getElementById('span'+i).style thisspan.left=parseInt(thisspan.left)+randommaker(maxleftstart)+"px" thisspan.top=parseInt(thisspan.top)+randommaker(maxtopstart)+"px" thisspan.visibility="visible" } checkmovement()}function randommaker(range) { rand=Math.floor(range*Math.random()) if (rand==0) {rand=Math.ceil(range/2)} return rand}function checkmovement() { checkposition() movepictures() timer=setTimeout("checkmovement()",tempo)}function movepictures() { for (i=0;i<=numberofimages;i++) { var thisspan=document.getElementById('span'+i).style thisspan.left=parseInt(thisspan.left)+stepx+"px" thisspan.top=parseInt(thisspan.top)+stepy+"px" }}function checkposition() { for (i=0;i<=numberofimages;i++) { imgwidth=2*parseInt(document.getElementById('span'+i).offsetWidth) imgheight=2*parseInt(document.getElementById('span'+i).offsetHeight) var thisspan=document.getElementById('span'+i).style var leftx=parseInt(thisspan.left) var topy=parseInt(thisspan.top) if (leftx>marginright-imgwidth-floatingspeed) { thisspan.left=leftx-Math.abs(stepx+1)+"px" stepx=randommaker(floatingspeed)*-1 } if (leftx<marginleft) { thisspan.left=leftx+Math.abs(stepx)+"px" stepx=randommaker(floatingspeed) } if (topy>marginbottom-imgheight-floatingspeed) { thisspan.top=topy-Math.abs(stepy)+"px" stepy=randommaker(floatingspeed)*-1 } if (topy<margintop) { thisspan.top=topy+Math.abs(stepy)+"px" stepy=randommaker(floatingspeed) } }}function showpic(picid) { if (blockmouseover==false) { document.getElementById('bigpic').innerHTML="<img src='"+bigimg[picid].src+"'><br><a href='"+bigimg[picid].url+"' class='textstyle'>"+bigimg[picid].message+"</a>" fadestrength=0 fadein() }}function fadein() { if (fadestrength<100) { blockmouseover=true fadestrength+=10 if (ns6) { document.getElementById('bigpic').style.opacity=(fadestrength/100) } if (ie) { var thisfilter=eval('bigpic') thisfilter.filters.alpha.opacity=Math.round(fadestrength) } fadetimer=setTimeout("fadein()",40) } else { clearTimeout(fadetimer) blockmouseover=false }}if (ie || ns6) { for (i=0;i<=numberofimages;i++) { document.write("<span id='span"+i+"' style='position:absolute;top:0px;left:0px;visibility:hidden' class='thumbnailstyle'></span>") } window.onload=setValues}</script>
