
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
n6 = (document.getElementById) ? 1:0

function init() {
	pulloutActive = 0
	if (n) {
		pullout1 = document.pulloutInterface.document.pulloutContent.document.pulloutContent1
		pullout2 = document.pulloutInterface.document.pulloutContent.document.pulloutContent2
		pullout3 = document.pulloutInterface.document.pulloutContent.document.pulloutContent3
		pullout4 = document.pulloutInterface.document.pulloutContent.document.pulloutContent4
	}
	if (ie) {
		pullout1 = pulloutContent1.style
		pullout2 = pulloutContent2.style
		pullout3 = pulloutContent3.style
		pullout4 = pulloutContent4.style
	}
	
	if (n6) {
		pullout1 = document.getElementById("pulloutContent1").style
		pullout2 = document.getElementById("pulloutContent2").style
		pullout3 = document.getElementById("pulloutContent3").style
		pullout4 = document.getElementById("pulloutContent4").style
	}
	
	pulloutShown = pullout1		// the layer that is currently shown
	pulloutShown.xpos = 0
	pulloutNew = "none"			// the layer that we will be shown next
	pulloutNew.xpos = -285
}

// Pullout Function, starts the sequence
function pullout(which) {
	if (!pulloutActive && pulloutShown != which) {
		pulloutActive = 1  // this makes it so you can't start it again until it's finished
		pulloutNew = which
		pulloutNew.xpos = -285
		pulloutLeft()
	}
}

// Slide the old layer out of view
function pulloutLeft() {
	if (pulloutShown.xpos > -285) {
		pulloutShown.xpos -= 15
		pulloutShown.left = pulloutShown.xpos
		setTimeout("pulloutLeft()",30)
	}
	else {
		hide(pulloutShown)
		show(pulloutNew)
		setTimeout("pulloutRight()",50)
	}
}

// Slide the new layer into view
function pulloutRight() {
	if (pulloutNew.xpos < 0) {
		pulloutNew.xpos += 15
		pulloutNew.left = pulloutNew.xpos
		setTimeout("pulloutRight()",30)
	}
	else {
		pulloutShown = pulloutNew
		pulloutActive = 0  // stops the sequence
	}
}

// Show/Hide Functions
function show(showobj) {
	if (n) showobj.visibility = "show"
	if (ie) showobj.visibility = "visible"
	if (n6) showobj.visibility = "visible"
}
function hide(hideobj) {
	if (n) hideobj.visibility = "hide"
	if (ie) hideobj.visibility = "hidden"
	if (n6) hideobj.visibility = "hidden"
}