var current = 0
var x = 0
var speed = 100
var back = 20
var speed2 = 2000
var back2 = 1500

function initArray(n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '
  }
}

typ = new initArray(3)
typ[0]="::  Painting From Within  ::"
typ[1]="::  A Process of Intuitive Creative Painting and Inner Healing  ::"
typ[2]="::  Be sure to Bookmark us for course updates!  ~ Press Ctrl+D ~  ::"


function typewrite() {
var m = typ[current]

window.status = m.substring(0, x++)

if (x == m.length + 1) {
setTimeout("erase()", back2)
}

else {
setTimeout("typewrite()", speed)
}
}

function erase() {
var m = typ[current]

window.status = m.substring(0, x--)

if (x < 0) {
current++
setTimeout("typewrite()", speed2)

if (current > typ.length - 1) {
current = 0
}
}

else {
setTimeout("erase()", back)
}
}
typewrite()

