function rollEm(x,y) {
document.images[x].src=y
}
var checkWin;
function goPrint() {
checkWin=window.open('checklist.htm','','width=600,height=600,left=0,top=0,menubar=no,toolbar=no');
checkWin.print();
}

function myWin() {
window.open('map.htm','','width=450,height=400,left=0,top=0,menubar=no,toolbar=no');
}

function calWin() {
window.open('/cgi-bin/cal.pl','','width=750,height=580,left=0,top=0,menubar=no,toolbar=no');
}

function helpWin(id) {
window.open('http://www.mrpayday.ca/help/client.php?cuid='+id+'','','width=500,height=300,left=0,top=0,menubar=no,toolbar=no');
}

function operWin() {
window.open('http://www.mrpayday.ca/help/oper.php','','width=500,height=300,left=0,top=0,menubar=no,toolbar=no');
}

function refreshWin() {
top.frames['main'].location.reload();
}



var speed = 70 // decrease value to increase speed (must be positive)
var pause = 3000 // increase value to increase pause
var timerID = null
var bannerRunning = false
var ar = new Array()
ar[0] = "Thank you for visiting Mr.Payday!"
ar[1] = "He provides fast and easy cash advances."
ar[2] = "Don't hesitate to call at (604) 435-CASH (2274)."
ar[3] = "Applying is simple, approval is quick!"
var currentMessage = 0
var offset = 0
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
bannerRunning = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[currentMessage]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++                        
var partialMessage = text.substring(0, offset + 1) 
window.status = partialMessage
offset++ 
timerID = setTimeout("showBanner()", speed)
bannerRunning = true
}
else {
offset = 0
currentMessage++
if (currentMessage == ar.length)
currentMessage = 0
timerID = setTimeout("showBanner()", pause)
bannerRunning = true
}}
startBanner()



function testWin() {
if (win && !win.closed) {
	win.close();
	}
setTimeout("mytestWin()",50);
}
var win;
function mytestWin(loc) {
win = window.open('test.html','','menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,width=820,height=480')
}


function MySwin() {
if (Swin && !Swin.closed) {
	Swin.close();
	}
setTimeout("admSwin()",50);
}
var Swin;
function admSwin() {
Swin = window.open('http://www.mrpayday.ca/help/staff.php','','width=240,height=315,left=0,top=0,menubar=no,toolbar=no')
}

