Test

From OfWindsor

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
<body>
<body>
-
<!---------------------------------------------->
+
<!-- S-T-A-R-T  O-F  C-O-D-E  F-O-R  M-E-S-S-A-G-E  C-A-R-O-U-S-E-L -->
-
<!-- START OF CODE FOR IMAGE RING SCRIPT -->
+
 
-
<!---------------------------------------------->
+
<!-- START OF STYLE-CONFIGURATION ZONE  -->
 +
<!-- CONFIGURE  a.textstyle AND a.textstyle:hover AND a.textstyle:hover -->
 +
<!-- DO NOT CHANGE .boxstyle -->
 +
 
 +
<style>
 +
 
 +
a.textstyle {
 +
font-family:Arial;
 +
font-size:10pt;
 +
font-weight:normal;
 +
font-style:normal;
 +
color:blue;
 +
text-decoration:none;
 +
background-color:white;
 +
padding:4px;
 +
}
 +
 
 +
a.textstyle:visited {
 +
color:blue;
 +
}
 +
 
 +
a.textstyle:hover {
 +
color:red;
 +
text-decoration:none;
 +
background-color:black;
 +
color:white;
 +
}
 +
 
 +
.boxstyle {
 +
position:absolute;
 +
visibility:visible;
 +
}
 +
</style>
 +
<!-- END OF STYLE-CONFIGURATION ZONE  -->
 +
 
<script>
<script>
// CREDITS:
// CREDITS:
-
// JavaScript carousel slideshow
+
// Magic Carousel Ticker
 +
// By Peter Gehrig
// Copyright (c) 2010 Peter Gehrig. All rights reserved.
// Copyright (c) 2010 Peter Gehrig. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Permission given to use the script provided that this notice remains as is.
-
// Additional scripts can be found at http://www.fabulant.com.
+
// Additional scripts can be found at http://www.fabulant.com
-
// MOVEMENT CREDITS:
+
// IMPORTANT:
-
// The Movements of this script are based upon a Multi-Fx1 Script
+
// If you add this script to a script-library or script-archive
-
// by kurt.grigg@virgin.net
+
// you have to add a highly visible link to
 +
// http://www.fabulant.com on the webpage
 +
// where this script will be featured
-
// IMPORTANT:
+
var rotatingtext=new Array()
-
// If you add this script to a script-library or script-archive
+
var rotatinglink=new Array()
-
// you have to add a link to http://www.fabulant.com on the webpage
+
-
// Set the URLS of your images. Add as many images as you like
+
///////////////////////////////////////////////////////////////////////////////////////
-
var myimage=new Array("flower.png","flowergreen.png","flowerorange.png","flower.png","flowergreen.png","flowerorange.png","flower.png","flowergreen.png","flowerorange.png")
+
// START OF SCRIPT-CONFIGURATION ZONE
 +
//////////////////////////////////////////////////////////////////////////////////////
-
// Set the width of your images. All images will be set to this width
+
// Your messages. Add as many as you like
-
var imgwidth=40
+
rotatingtext[0]="imagine"
 +
rotatingtext[1]="there's no heaven"
 +
rotatingtext[2]="it's easy"
 +
rotatingtext[3]="if you try"
 +
rotatingtext[4]="no hell below us"
 +
rotatingtext[5]="above us only sky"
 +
rotatingtext[6]="imagine"
 +
rotatingtext[7]="all the people"
 +
rotatingtext[8]="living for today"
 +
rotatingtext[9]="imagine"
 +
rotatingtext[10]="there's"
 +
rotatingtext[11]="no countries"
 +
rotatingtext[12]="It isn't hard"
 +
rotatingtext[13]="to do"
 +
rotatingtext[14]="nothing to kill"
 +
rotatingtext[15]="or die for"
 +
rotatingtext[16]="and"
 +
rotatingtext[17]="no religion too"
 +
rotatingtext[18]="imagine"
 +
rotatingtext[19]="all the people"
 +
rotatingtext[20]="living life"
 +
rotatingtext[21]="in peace"
-
// Set the maximal size of carousel (px)
+
// The links corresponding to the messages above.
-
var maxcarouselsize=240
+
// Each message has a link of its own
 +
// If no link is reqired add "#" instead of a URL (see smaple below)
-
// Set the minimal size of carousel (px)
+
rotatinglink[0]="http://www.hotscripts.com"
-
var mincarouselsize=1
+
rotatinglink[1]="http://www.scripts.com"
 +
rotatinglink[2]="http://www.google.com"
 +
rotatinglink[3]="http://www.fabulant.com"
 +
rotatinglink[4]="http://www.dynamicdrive.com"
 +
rotatinglink[5]="http://www.hotscripts.com"
 +
rotatinglink[6]="http://www.hotscripts.com"
 +
rotatinglink[7]="http://www.hotscripts.com"
 +
rotatinglink[8]="#"
 +
rotatinglink[9]="#"
 +
rotatinglink[10]="#"
 +
rotatinglink[11]="http://www.hotscripts.com"
 +
rotatinglink[12]="http://www.hotscripts.com"
 +
rotatinglink[13]="http://www.hotscripts.com"
 +
rotatinglink[14]="http://www.hotscripts.com"
 +
rotatinglink[15]="http://www.hotscripts.com"
 +
rotatinglink[16]="http://www.hotscripts.com"
 +
rotatinglink[17]="http://www.hotscripts.com"
 +
rotatinglink[18]="http://www.hotscripts.com"
 +
rotatinglink[19]="http://www.hotscripts.com"
 +
rotatinglink[20]="http://www.hotscripts.com"
 +
rotatinglink[21]="ihttp://www.hotscripts.com"
-
//Set the opacity od the images. values my range from 0 to 100
+
// Set the width of the inner-circle (pixels)
-
var imgopacity=70
+
var textwidth=330
-
// Do not edit below this line
+
// Set the height of the inner-circle (pixels)
-
var divider=(36/(myimage.length+1))
+
var textheight=120
-
var step=0.1;
+
-
var a_StEp=0.05;
+
-
var RunTime=10;
+
-
var currStep = 0;
+
-
var x_coordinate = 0;
+
-
var y_coordinate = 0;
+
-
var cntr=2;
+
-
var screenheight=document.body.clientHeight
+
-
var screenwidth=document.body.clientWidth
+
-
function fly(){
+
// Set the number of words that will be displayed at once
-
y_coordinate=document.body.scrollTop+document.body.offsetHeight/2 + document.body.offsetHeight/2.8*Math.cos((RunTime)/3)*Math.cos(RunTime/10);
+
var displaymax=9
-
x_coordinate=document.body.scrollLeft+document.body.offsetWidth/2 + document.body.offsetWidth/2.4*Math.sin((RunTime)/5)*Math.sin(RunTime/10);
+
-
RunTime+=a_StEp;
+
// Set the speed! Tha values may range from 0.1 to 1.0
-
Tma=setTimeout("fly()", 15);
+
var step = 0.02;
 +
 
 +
/////////////////////////////////////////////////////////////////////////////////////
 +
// END OF SCRIPT-CONFIGURATION ZONE
 +
// Do not edit below
 +
////////////////////////////////////////////////////////////////////////////////////
 +
 
 +
var maxopacity=new Array()
 +
var i_wordcounter=0
 +
var segment=360/(displaymax);
 +
var tmr
 +
var decrement=0;
 +
textwidth=textwidth/2
 +
textheight=textheight/2
 +
var opacitystep=Math.round(100/textheight)
 +
var spc="\&"+"nbsp;"
 +
 
 +
var ns4=document.layers?1:0
 +
var ns6=document.getElementById&&!document.all?1:0
 +
var ie=document.all?1:0
 +
 
 +
for (i=0;i<rotatingtext.length;i++) {
 +
rotatingtext[i]=rotatingtext[i].replace(/[" "]/g,spc)
}
}
-
function cycle(){
+
for (i=0;i<displaymax;i++) {
-
for (i=0;i<myimage.length;i++) {
+
maxopacity[i]=1
-
document.getElementById(i).style.top=y_coordinate+cntr*Math.cos(((currStep+1)+i*divider)/5)*Math.cos(currStep/6)+"px"
+
-
document.getElementById(i).style.left=x_coordinate+cntr*Math.sin(((currStep+1)+i*divider)/5)+"px";
+
-
if (parseInt(document.getElementById(i).style.left) > (document.body.scrollLeft+document.body.offsetWidth-(1.7*imgwidth)) || parseInt(document.getElementById(i).style.top) > (document.body.scrollTop+document.body.offsetHeight-(1.5*imgwidth))) {
+
-
document.getElementById(i).style.left=-2000+"px"
+
-
document.getElementById(i).style.top=-2000+"px"
+
-
}
+
-
}
+
-
currStep+=step;
+
-
setTimeout("cycle()",5);
+
}
}
-
function minimize() {
+
function getpagesize() {
-
cntr-=0.5;
+
windowwidth=parseInt(document.body.clientWidth)
-
goshrink=setTimeout('minimize()',10);
+
windowheight=parseInt(document.body.clientHeight)
-
if (cntr <=mincarouselsize) {
+
twidth=Math.floor(textwidth)
-
clearTimeout(goshrink);
+
theight=Math.floor(textheight)
-
swell()
+
rotatetext()
-
}
+
}
}
-
function swell() {
+
function rotatetext() {
-
cntr+=0.5;
+
for (i=0; i<displaymax; i++) {
-
GoSwell=setTimeout('swell()',10);
+
var thisspan=eval("document.getElementById('span"+i+"').style")
-
if (cntr >=maxcarouselsize) {
+
thisspan.left=twidth*Math.sin(decrement+i*segment*Math.PI/180)+textwidth;
-
clearTimeout(GoSwell);
+
thisspan.top=theight*Math.cos(decrement+i*segment*Math.PI/180)+textheight;
-
minimize()
+
thisspan.zIndex=parseInt(thisspan.top)
 +
 +
var op=parseInt(100/textheight*(parseInt(thisspan.top)*0.5))
 +
 +
if (op<5 && maxopacity[i]==1) {
 +
if (i_wordcounter>=rotatingtext.length) {
 +
i_wordcounter=0
 +
}
 +
document.getElementById('span'+i).innerHTML="<a href='"+rotatinglink[i_wordcounter]+"' class='textstyle' onMouseover='stoprotating(this)' onMouseout='restartrotating()'>"+rotatingtext[i_wordcounter]+"</a>"
 +
maxopacity[i]=-1
 +
i_wordcounter++
 +
}
 +
if (op>90) {
 +
maxopacity[i]=1
 +
}
 +
var thisfilter=eval("span"+i)
 +
 +
if (ie) {
 +
thisfilter.filters.alpha.opacity=op
 +
}
 +
else {
 +
thisspan.opacity=op/100
 +
}
}
}
 +
decrement-=step;
 +
tmr=setTimeout('rotatetext()', 20);
}
}
-
function init(){
+
function stoprotating(thisobj) {
-
fly();
+
clearTimeout(tmr)
-
cycle();
+
zoomobj=thisobj
-
minimize();
+
}
}
 +
function restartrotating() {
 +
rotatetext()
 +
}
-
for (i=0;i<=myimage.length-1;i++) {
 
-
document.write('<div id="'+i+'" style="position:absolute;top:-5000px;left:0px;filter:alpha(opacity='+imgopacity+');opacity:'+(imgopacity/100)+';"><img src="'+myimage[i]+'" width='+imgwidth+'></div>')
 
-
}
 
-
window.onload=init;
 
 +
document.write('<div id="roof" style="position:relative;width:'+(2*textwidth)+'px;height:'+(2*textheight)+'px;">');
 +
for (i=0;i<displaymax;i++) {
 +
document.write('<div id="span'+i+'" class="boxstyle" style="filter:alpha(opacity=100);opacity:1"></div>');
 +
}
 +
document.write('</div>');
 +
window.onload=getpagesize;
</script>
</script>
 +
<!-- E-N-D  O-F  C-O-D-E  F-O-R  M-E-S-S-A-G-E  C-A-R-O-U-S-E-L -->
-
<!---------------------------------------------->
 
-
<!-- END OF CODE FOR IMAGE RING SCRIPT -->
 
-
<!---------------------------------------------->
 
</body>
</body>
</html>
</html>

Revision as of 04:01, 2 February 2013

Personal tools
Project URLs