// JavaScript Document

<!-- Original:  Nebojsa Pajkic -->
<!-- Web Site:  http://justfreestuff.homepage.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var data = "01101001";
var done = 1;
function statusIn(text) {
decrypt(text, 2, 1);
}

function statusOut() {
self.status = '';
done = 1;
}

function decrypt(text, max, delay) {
if (done) {
done = 0;
decrypt_helper(text, max, delay,  0, max);
   }
}
function decrypt_helper(text, runs_left, delay, charvar, max) {
if (!done) {
runs_left = runs_left - 1;
var status = text.substring(0, charvar);
for (var current_char = charvar; current_char < text.length; current_char++) {
status += data.charAt(Math.round(Math.random()*data.length));
}
window.status = status;
var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + "," + max + ");"
var new_char = charvar + 1;
var next_char = "decrypt_helper('" + text + "'," + max + "," + delay + "," + new_char + "," + max + ");"
if(runs_left > 0) {
setTimeout(rerun, delay);
}
else {
if (charvar < text.length) {
setTimeout(next_char, Math.round(delay*(charvar+3)/(charvar+1)));
}
else {
done = 1;
         }
      }
   }
}

// Data de hoje
var now = new Date();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var dayNr = now.getDate();
var yearNr=now.getYear();
if(dName==1) Day = "Domingo";
if(dName==2) Day = "Segunda";
if(dName==3) Day = "Ter&ccedil;a-feira";
if(dName==4) Day = "Quarta-feira";
if(dName==5) Day = "Quinta-feira";
if(dName==6) Day = "Sexta-feira";
if(dName==7) Day = "S&aacute;bado";
if(yearNr < 2000) Year = 1900 + yearNr;
else Year = yearNr;
// String to display current date.
var todaysDate =(" " + Day + ", " + dayNr + "/" + mName + "/" + Year);


// CREDITS:
// Simple DHTML-ticker with last-letter-animation by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 7/31/2000

// IMPORTANT: 
// If you add this script to a script-library or a script-archive 
// you have to insert a link to http://www.24fun.com right into the webpage where the script
// will be displayed.

// CONFIGURATION:
// Go to http://www.24fun.com, open category 'text' and download the ZIP-file of this script 
// containing the the script-file with step-by-step instructions for easy configuration.


// 	Configure your messages. You may add as many messages as you like.
var message=new Array()
message[0]="DOCTOR BIKE  » Seja bem-vindo ao nosso novo site, aproveite para conhecer nossos produtos."
message[1]="DOCTOR BIKE  » Venha também conhecer nossa loja, que fica em São Paulo."
message[2]="DOCTOR BIKE  » Estamos próximo ao metrô Santana."



// set a link for each meassage
var messagelink=new Array()
messagelink[0]="#"
messagelink[1]="#"
messagelink[2]="#"

// set a target for each messagelink. Accepted values: '_blank', '_top',
// '_parent', '_self' or the name of your frameset
var linktarget=new Array()
linktarget[0]="#"
linktarget[1]="#"
linktarget[2]="#"

// horizontal position of the ticker
// (distance to the left margin of the browser-window, pixels)
var leftposition=0

// vertical position of position of the ticker 
// (distance to the top margin of the browser-window, pixels)
var topposition=0

// width of the ticker
var tickerwidth=265

// height of the ticker
var tickerheight=0

// distance from the messagetext to the tickermarrgin (pixels)
var tickerpadding=0

// borderwidth of the ticker (pixels)
var borderwidth=0

// font-family
var fnt="Verdana"

// font-size of the text
var fntsize=7

// font-size of the last letter of the ticker
var fntsizelastletter=9

// font-color of the text
var fntcolor="000000"

// font-color of the last letter of the ticker
var fntcolorlastletter="red"

// font-weight. Set a value between 1 to 9 to adjust the boldness
var fntweight=4

// backgroundcolor
var backgroundcolor="E0E0DF"

// standstill between the messages (microseconds)
var standstill=4000

// speed (a higher value will slow down the ticker)
var speed=40

// Do not edit the variables below
var i_substring=0
var i_presubstring=0
var i_message=0
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function initiateticker() {
	if (document.all) {	
		document.all.ticker.style.posLeft=leftposition
		document.all.ticker.style.posTop=topposition
		showticker()
	}
	if (document.layers) {
		document.ticker.left=leftposition
		document.ticker.top=topposition
		showticker()
	}
}

function getmessagecontent() {
		messagepresubstring=message[i_message].substring(0,i_presubstring)
		messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)+'_'
		messagecontent="<table border=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"	
//		messagecontent+="<a href='"+messagelink[i_message]+"' target='"+linktarget[i_message]+"'>"
		messagecontent+="<font color='"+fntcolor+"'>"
		messagecontent+=messagepresubstring
		messagecontent+="</font>"
//		messagecontent+="</a>"
		messagecontent+="</span>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"	
//		messagecontent+="<a href='"+messagelink[i_message]+"' target='"+linktarget[i_message]+"'>"
		messagecontent+="<font color='"+fntcolor+"'>"
		messagecontent+=messageaftersubstring
		messagecontent+="</font>"
//		messagecontent+="</a>"
		messagecontent+="</span>"
		messagecontent+="</td></tr></table>"
}

function showticker() {
	if (i_substring<=message[i_message].length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring00}
			getmessagecontent()
		if (document.all) {
			ticker.innerHTML=messagecontent
			var timer=setTimeout("showticker()", speed)
		}
		if (document.layers) {
			document.ticker.document.write(messagecontent)
			document.ticker.document.close()
			var timer=setTimeout("showticker()", speed)
		}
	}
	else {
		clearTimeout(timer)
		var timer=setTimeout("changemessage()", standstill)
	}
}

function changemessage() {
	i_substring=0
	i_presubstring=0
	i_message++
	if (i_message>message.length-1) {
		i_message=0
	}
	showticker()
}