// JavaScript Document
//$(document).ready(function() {
//	$("#commentForm").validate();
//});

//Função para alternar o texto no topo do site
function AraVob() {
}
var ScreenLine = new AraVob();
ScreenLine[1]  = "Webcreate - Soluções Digitais";
//ScreenLine[]  = " "; caso queira adicionar espaço
ScreenLine[2]  = "Criação de sites";
ScreenLine[3]  = "Manutenção de sites";
ScreenLine[4]  = "Sistemas Web";
ScreenLine[5] = "Manutenção de computadores";
ScreenLine[6] = "Manutenção de Notebooks";
ScreenLine[7] = "Assistência técnica";
ScreenLine[8] = "Venda de equipamentos";
//ScreenLine[9] = "Telefone (53) 3303-0508";
ScreenLine[9] = "Celular (53) 8408-8783";

var msgNum = 1;          
var msgCnt = 9;         
var typeSpeed = 9;    
var lineDelay = 5000;     
var pagLen = 1;          
var delay = typeSpeed;     
var timerPS = null;
var linPntr = 0;
var tally = 1;
var msg = " ";
var outMsg = "";
var i = 0;
var typingon = false;


for (x = msgCnt; 1 <= x; x--) {
  ScreenLine[x+pagLen] = ScreenLine[x] + "\r\n";
}
for (x = 1; x <= (pagLen); x++) {
  ScreenLine[x] =  " \r\n";
}
 msgCnt +=  pagLen;
 msg = ScreenLine[1];


function SwitchIt() {
 typingon = !typingon;
}

function DisplayScroll() {
 if (msgNum < pagLen) {
  delay = typeSpeed;
 }
 else {
  delay = lineDelay;
 }
 ChangeMsg();
 outMsg += msg;
 self.document.msgform.msgarea.value = outMsg;
 if (typingon == true) {
  timerPS = setTimeout("DisplayMsg()",delay);
 }
 else {
  clearTimeout(timerPS);
  timerPS = setTimeout("DisplayScroll()",delay);
 }
}
function DisplayMsg() {
 if (msg.length <= i) {
  i = 0;
  ChangeMsg();
 }
 outMsg += msg.charAt(i);
 i++; 
 if (msg.charAt(i) != "\n" || msg == " \r\n") {
  delay = typeSpeed;
 }
 else {
  delay = lineDelay;
 }
 self.document.msgform.msgarea.value = outMsg;
 if (typingon == false) {
  timerPS = setTimeout("DisplayScroll()",delay);
 }
 else {
  clearTimeout(timerPS);
   timerPS = setTimeout("DisplayMsg()",delay);
 }
}

function ChangeMsg() {
 msgNum++;
 if (msgCnt < msgNum) {
   msgNum = 1;
 }
 if (pagLen <= tally) {
   chgPage();
 }
 tally++;
 msg = ScreenLine[msgNum];
}

function chgPage() {
 if (msgNum < pagLen) {
   linPntr = msgCnt - pagLen + msgNum + 1;
 }
 else {
   linPntr = msgNum - (pagLen - 1);
 }

 outMsg =   ScreenLine[linPntr];
 for (p = 1; p < (pagLen - 1); p++) {
   linPntr++;
   if (msgCnt < linPntr) {
     linPntr = 1;
   }
   outMsg += ScreenLine[linPntr];
 }
  
}

function quitDisplay() {
  self.document.msgform.msgarea.value = "Type a Page for yourself today!";
}





