Automatikus képcserélés
by ®nono® 2007.11.30. 15:38
<SCRIPT language="JavaScript"> document.writeln(''); var jsiomenu = new Array(); var jsiourls = new Array(); document.write(''); document.writeln(''); jsiomenu[jsiomenu.length]="http://tbn0.google.com/images?q=tbn:0gRjXMmso-faEM:http://www.cartoondollemporium.com/images/zac%2520efron/zac_australia.jpg"; jsiourls[jsiourls.length]="http://tbn0.google.com/images?q=tbn:JHrncxg1_xwlIM:http://hotandnerdy.files.wordpress.com/2007/08/vhtc.jpg"; document.write(''); document.writeln(''); jsiomenu[jsiomenu.length]="http://tbn0.google.com/images?q=tbn:SpNVqXaW5EaM6M:http://zefron.blogs.allocine.fr/blogsdatas/mdata/8/4/6/Z20060410135739813573648/img/normal_oct-06_zac-poster.jpg"; jsiourls[jsiourls.length]="http://tbn0.google.com/images?q=tbn:uBxpiJokxq2MHM:http://www.aolcdn.com/red_galleries/zac-efron-vanessa-hudgens-400a070907.jpg";
function jsiom() { var ref, x, y, sy; ref = jsiogetref('ref'); x = getX(ref); y = getY(ref); ref = jsiogetref('outer'); ref.style.left = x; ref.style.top = y; if ((sx==iw>>1)||(sx==0)) { if (ps>0) document['bim'].src = jsiomenu[ptr]; else document['ioi'].src = jsiomenu[ptr]; } sx+=ps; if ((sx>iw>>1)||(sx<0)) { if (ps>0) { sx=0; document['ioi'].src = jsiomenu[ptr]; ptr++; if (ptr>=jsiomenu.length) ptr=0; } else { sx=iw>>1; document['bim'].src = jsiomenu[ptr]; ptr++; if (ptr>=jsiomenu.length) ptr=0; } } sy = sx*(ih>>1)/(iw>>1); ref = jsiogetref('icut'); ref.style.left = sx; ref.style.top = sy; ref.style.width = iw-(sx<<1); ref.style.height = ih-(sy<<1); ref = jsiogetref('ipos'); ref.style.left = -(sx<<1); ref.style.top = -(sy<<1); document['ioi'].width = iw+(sx<<1); document['ioi'].height = ih+(sy<<1); setTimeout("jsiom()",90,"JavaScript"); }
function jsioclick() { window.open(jsiourls[ptr], "_blank"); }
function jsiogetref(etcn) { if (document.all) return document.all[etcn]; else return document.getElementById(etcn); }
function getX(ref) { if (document.layers) return ref.pageX; var x = 0; if (document.all) while (ref.offsetParent!=null) { x+=ref.offsetLeft; ref=ref.offsetParent; } ref.offsetLeft; return x; }
function getY(ref) { if (document.layers) return ref.pageY; var y = 0; if (document.all) while (ref.offsetParent!=null) { y+=ref.offsetTop; ref=ref.offsetParent; } y+=ref.offsetTop; return y; }
var iw = 150, ih = 100; var ps=-2; var ptr = 0; if (ps<0) sx=0; else (sx=iw>>1);
document.writeln('<div id="ref" style="position:relative; width:'+iw+'; height:'+ih+';"></div>'); document.writeln('<div id="outer" style="position:absolute; width:'+iw+'; height:'+ih+';">'); document.writeln('<div id="icut" style="position:absolute; left:0px; top:0px; width:'+iw+'; height:'+ih+'; overflow:hidden;">'); document.writeln('<div id="ipos" style="position:absolute; left:0px; top:0px; width:'+iw+'; height:'+ih+';">'); document.writeln('<a href=# onclick="jsioclick()"><img src='+jsiomenu[ptr]+' name="ioi" border=0 width='+iw+' height='+ih+'></a>'); document.writeln('</div></div>'); document.writeln('<a href=# onclick="jsioclick()"><img src='+jsiomenu[ptr]+' name="bim" border=0 width='+iw+' height='+ih+'></a>'); document.writeln('</div>');
var jsiopre = new Array(); for (var i=0; i<jsiomenu.length; i++) { jsiopre[i] = new Image; jsiopre[i].src = jsiomenu[i]; }
jsiom(); </SCRIPT>
|