/*SET THE PARAMETERS FOR THE SLIDE*/
var totalbut = parseInt("8");
var slidespeed = 3;
var slideframerate = 7;
var slidestop = 70;
var tightenup	= 6;	//tightenup must be greater than 5 - numbers less than 5 cause button not to tightenup properly - 12/23/04 MSR

/*OPEN THE MENU*/
function openmenu(passitA){
hidenavlinks()
resetmenu()
slidelength = slidestop;
passcountA = totalbut-passitA
tightenupA = 0
tightenupB = 0
 	for (counterA = 1; counterA <= parseInt(passitA) && counterA > 0; counterA++){
	document.getElementById("navbut0" + counterA).style.top=parseInt(document.getElementById("navbut0" + counterA).offsetTop)-tightenupA;
	tightenupA = tightenupA+tightenup
 	}
initslide(totalbut,passcountA);
}

/*INITIATE SLIDE REPEAT FUNCTION*/
function initslide(passitB,passcountB) {
	passitC = passitB;
	passcountC = passcountB;
	if (passcountB > 0) {
		slidelimit = 0
		slidetimer = setInterval("slideme(passitC,passcountC)",slidespeed);
	}
	else {
		if (document.getElementById("navlink0" + passitC)) {
		document.getElementById("navlink0" + passitC).style.visibility = "visible";
		}
	}
}


/*SLIDE FUNCTION*/
function slideme(passitD,passcountD) {
	if (slidelimit >= slidelength) {
		clearInterval(slidetimer);
		passitD = passitD-1
		passcountD = passcountD-1
		slidelength = slidelength+tightenup
		initslide(passitD,passcountD)	
	}
	else {
	document.getElementById("navbut0" + passitD).style.top=parseInt(document.getElementById("navbut0" + passitD).offsetTop)+slideframerate;
	slidelimit = slidelimit+slideframerate;
	}
}

/*RESET THE MENU TO THE ORIGINAL LOCATION*/
function resetmenu(){
hidenavlinks()
document.getElementById("navbut01").style.top=125;
document.getElementById("navbut02").style.top=166;
document.getElementById("navbut03").style.top=207;
document.getElementById("navbut04").style.top=248;
document.getElementById("navbut05").style.top=289;
document.getElementById("navbut06").style.top=330;
document.getElementById("navbut07").style.top=371;
document.getElementById("navbut08").style.top=412;
}

/*HIDE ALL NAVLINKS*/
function hidenavlinks() {
document.getElementById("navlink01").style.visibility = "hidden";
document.getElementById("navlink02").style.visibility = "hidden";
document.getElementById("navlink06").style.visibility = "hidden";
}
/*TICKER*/

var max=0;

function textlist() {
max=textlist.arguments.length;
for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}

tl = new textlist( 
"ON SALE NOW - Dave Kurtz's latest album TIMELESS REFLECTIONS - use the 'Shop @ Lifeline' button to enter the Lifeline Store",
"Don't Hesitate to drop us a line - We love hearing from you, click CONTACT US to find out how!",
"Visit our NEWS section to keep up to date with all the things going on @ Lifeline Studios this year!"
);

var x = 0; pos = 0;
var l = tl[0].length;
function textticker() {
document.tickform.tickfield.value = tl[x].substring(0, pos) + "_";
if(pos++ == l) {
pos = 0; 
setTimeout("textticker()", 3000); 
if(++x == max) x = 0; 
l = tl[x].length;
} else {
setTimeout("textticker()", 70);
}
}


