2008-08-09 08:45:36

mabuhay
» FTalkManiac
FTalk Level: zero
849
0
1969-12-31

Re: [size=4][align=center][b][color=gray]"Happy 32nd Monthsary Ftalk University :)!" [/b][/align][/size][/color] [align=center][b](former FriendsterTalk University)[/b][/align] [align=center][i]July 17 20

[quote]// ARTMANN MABUHAY // CREDITS: // Floating and fadeing message boxes // By Urs Dudli and Peter Gehrig // Copyright (c) 2003 Peter Gehrig and Urs Dudli. All rights reserved. // Permission given to use the script provided that this notice remains as is. var text=new Array() var textlink=new Array() var texttarget=new Array() var textsplashcolors=new Array() ///////////////////////////////////////////////////////////////////// // EDIT VALUES BELOW THIS LINE // Add or delete as many floating message boxes as you like. // Just proceed as shown below (this sample creates three message boxes) // Set the text, link and the target for your first floating message box text[0]="Welcome to My" textlink[0]="http://www.friendster.com/comments.php?uid=11496451" texttarget[0]="_blank" // Set the text, link and the target for the second floating message box text[1]="Humble Profile" textlink[1]="http://www.friendster.com/sendmessage.php?uid=11496451" texttarget[1]="_blank" // Set the text, link and the target for the third floating message box text[2]="<font color='blue'> "+pageViewerFName+" </font> " textlink[2]="http://www.friendster.com/referafriend.php?refer=11496451" texttarget[2]="_blank" // Set the font var textfont="Comic Sans MS" // Set the font-weight to "bold" or "normal" var textweight="bold" // Set the rollover-color var textfontcolorrollover="#ff0000" // Set the font-size var textfontsize=14 // Set the font-color var textfontcolor="#ff0033" // Set the background-color var textbgcolor="#dddddd" // Set the border-color var textbordercolor="#33cc00" // Set the border-width var textborder=4 // DO NOT EDIT VALUES BELOW THIS LINE ///////////////////////////////////////////////////////////////////// var textdecoration="none" var textfontsizeHTML=3 var textweightA="<b>" var textweightB="</b>" var textitalic="normal" var textitalicA="" var textitalicB="" var textredirurl="http://" var textalign="center" var textvalign="middle" var ns4=document.layers?1:0 var ns6=document.getElementById&&!document.all?1:0 var ie=document.all?1:0 var floatingspeed=20 var tempo=20 var numberofmessages=text.length-1 var stepx=new Array() var stepy=new Array() var spancontent=new Array() for (i=0;i<=numberofmessages;i++) { stepx[i]=randommaker(floatingspeed) stepy[i]=randommaker(floatingspeed) } var boxwidth=new Array() var boxheight=new Array() for (i=0;i<=numberofmessages;i++) { boxwidth[i]=20 boxheight[i]=20 } var x,y var marginbottom var marginleft=0 var margintop=0 var marginright var timer var i_fadestrength=new Array() var i_fadestep=new Array() var i_fadenow=new Array() var i_fadenowmax=new Array() for (i=0;i<=text.length;i++) { i_fadenowmax[i]=randommaker(10)+2 i_fadestrength[i]=randommaker(99) i_fadestep[i]=1 i_fadenow[i]=0 } getcontent() function getcontent() { for (i=0;i<=numberofmessages;i++) { var content="" if (ie || ns6) { content="<table cellpadding="+textborder+" cellspacing=0 border=0><tr valign="+textvalign+"><td align="+textalign+">" content+="<a href=\""+textlink[i]+"\" target=\""+texttarget[i]+"\" style=\"position:relative;font-family:\'"+textfont+"\';font-size:"+textfontsize+"pt;font-weight:"+textweight+";text-decoration:"+textdecoration+";color:"+textfontcolor+";font-style:"+textitalic+";\" onMouseOver=\"this.style.color=\'"+textfontcolorrollover+"\'\" onMouseOut=\"this.style.color=\'"+textfontcolor+"\'\">" content+=text[i] content+="</a></td></tr></table>" } else { content="<table cellpadding="+textborder+" cellspacing=0 bgcolor="+textbgcolor+" border="+textborder+"><tr valign="+textvalign+"><td align="+textalign+">" content+="<a href=\""+textlink[i]+"\" target=\""+texttarget[i]+"\">" content+=textweightA content+=textitalicA content+="<font face=\""+textfont+"\" size="+textfontsizeHTML+" color=\""+textfontcolor+"\">" content+=text[i] content+="</font>" content+=textitalicB content+=textweightB content+="</a></td></tr></table>" } spancontent[i]=content } } function setValues() { if (ie) { marginbottom=document.body.clientHeight-5 marginright=document.body.clientWidth-5 for (i=0;i<=numberofmessages;i++) { var thisspan = eval("document.all.span"+i) thisspan.innerHTML=spancontent[i] var thisspan = eval("document.all.span"+i) boxwidth[i]=thisspan.offsetWidth boxheight[i]=thisspan.offsetHeight var maxleftstart=marginright-boxwidth[i] var maxtopstart=marginbottom-boxheight[i] var thisspan = eval("document.all.span"+(i)+".style") thisspan.posLeft=randommaker(maxleftstart) thisspan.posTop=randommaker(maxtopstart) } checkmovement() } if (ns4) { marginbottom=window.innerHeight-5 marginright=window.innerWidth-5 for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.span"+i+".document") thisspan.write(spancontent[i]) thisspan.close() var thisspan=eval("document.span"+i+".document") boxwidth[i]=thisspan.width boxheight[i]=thisspan.height var maxleftstart=marginright-boxwidth[i] var maxtopstart=marginbottom-boxheight[i] var thisspan=eval("document.span"+i) thisspan.left=randommaker(maxleftstart) thisspan.top=randommaker(maxtopstart) } checkmovement() } if (ns6) { marginbottom=window.innerHeight-11 marginright=window.innerWidth-11 for (i=0;i<=numberofmessages;i++) { var thisspan=document.getElementById('span'+i) thisspan.innerHTML=spancontent[i] var thisspan=document.getElementById('span'+i) boxwidth[i]=parseInt(thisspan.offsetWidth) boxheight[i]=parseInt(thisspan.offsetHeight) var maxleftstart=marginright-boxwidth[i] var maxtopstart=marginbottom-boxheight[i] var thisspan=document.getElementById('span'+i).style thisspan.left=parseInt(thisspan.left)+randommaker(maxleftstart) thisspan.top=parseInt(thisspan.top)+randommaker(maxtopstart) } 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() { if (ie) { for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.all.span"+(i)+".style") thisspan.posLeft+=stepx[i] thisspan.posTop+=stepy[i] var thisfilter=eval("span"+i) i_fadenow[i]++ if (i_fadenow[i]>=i_fadenowmax[i]) { i_fadenow[i]=0 if (i_fadestrength[i]>=100) {i_fadestep[i]=i_fadestep[i]*-1} else if (i_fadestrength[i]<=-20) {i_fadestep[i]=i_fadestep[i]*-1} } i_fadestrength[i]+=i_fadestep[i] thisfilter.filters.alpha.opacity=Math.round(i_fadestrength[i]) } } if (ns6) { for (i=0;i<=numberofmessages;i++) { var thisspan=document.getElementById('span'+i).style thisspan.left=parseInt(thisspan.left)+stepx[i] thisspan.top=parseInt(thisspan.top)+stepy[i] i_fadenow[i]++ if (i_fadenow[i]>=i_fadenowmax[i]) { i_fadenow[i]=0 if (i_fadestrength[i]>=100) {i_fadestep[i]=i_fadestep[i]*-1} else if (i_fadestrength[i]<=-20) {i_fadestep[i]=i_fadestep[i]*-1} } i_fadestrength[i]+=i_fadestep[i] document.getElementById('span'+i).style.MozOpacity=Math.round(i_fadestrength[i])/100 } } if (ns4) { for (i=0;i<=numberofmessages;i++) { var thisspan = eval("document.span"+i) thisspan.left+=stepx[i] thisspan.top+=stepy[i] } } } function checkposition() { if (ie) { for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.all.span"+i+".style") if (thisspan.posLeft>marginright-boxwidth[i]-floatingspeed) { thisspan.posLeft-=Math.abs(stepx[i]+1) stepx[i]=randommaker(floatingspeed)*-1 } if (thisspan.posLeft<marginleft) { thisspan.posLeft+=Math.abs(stepx[i]) stepx[i]=randommaker(floatingspeed) } if (thisspan.posTop>marginbottom-boxheight[i]-floatingspeed) { thisspan.posTop-=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed)*-1 } if (thisspan.posTop<margintop) { thisspan.posTop+=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed) } } } if (ns4) { for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.span"+i) if (thisspan.left>marginright-boxwidth[i]-floatingspeed) { thisspan.left-=Math.abs(stepx[i]+1) stepx[i]=randommaker(floatingspeed)*-1 } if (thisspan.left<marginleft) { thisspan.left+=Math.abs(stepx[i]) stepx[i]=randommaker(floatingspeed) } if (thisspan.top>marginbottom-boxheight[i]-floatingspeed) { thisspan.top-=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed)*-1 } if (thisspan.top<margintop) { thisspan.top+=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed) } } } if (ns6) { for (i=0;i<=numberofmessages;i++) { var thisspan=document.getElementById('span'+i).style var leftx=parseInt(thisspan.left) var topy=parseInt(thisspan.top) if (leftx>marginright-boxwidth[i]-floatingspeed) { thisspan.left=leftx-Math.abs(stepx[i]+1) stepx[i]=randommaker(floatingspeed)*-1 } if (leftx<marginleft) { thisspan.left=leftx+Math.abs(stepx[i]) stepx[i]=randommaker(floatingspeed) } if (topy>marginbottom-boxheight[i]-floatingspeed) { thisspan.top=topy-Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed)*-1 } if (topy<margintop) { thisspan.top=topy+Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed) } } } } if (ie || ns6) { for (i=0;i<=numberofmessages;i++) { document.write("<span id='span"+i+"' style='position:absolute;top:0px;left:0px;filter:alpha(opacity=0);-moz-opacity:0;border-style:solid;border-color:"+textbordercolor+";border-width:"+textborder+"px;background-color:"+textbgcolor+";'></span>") document.close() } } if (ns4) { for (i=0;i<=numberofmessages;i++) { document.write("<layer name='span"+i+"' left=0 top=0>"+spancontent[i]+"</layer>") document.close() } } window.onload=setValues[/quote]

Board footer

© 2024 F Talk

Current time is 12:45

[ 12 queries - 0.351 second ]
Privacy Policy