function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
	if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
	// Place ErrorMessage in the center
	if (szDivID == 'vcoDiv'){
		placeOffer(szDivID);
	}
	else {
		placeErrorMessage(szDivID);
	}
} // END: toggleBox

 function placeOffer(plDivID) {
	if (document.getElementById && !document.all) {
		document.getElementById(plDivID).style.top = window.pageYOffset + 30 + "px";
	}
	if (document.all) {
	  document.all[plDivID].style.top = truebody().scrollTop + 30 + "px";
	}
	window.setTimeout("placeOffer('"+ plDivID + "')", 10);
}
 
 function placeErrorMessage(plDivID) {
	if (document.getElementById && !document.all) {
		document.getElementById(plDivID).style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight/2)) + "px";
	}
	if (document.all) {
		document.all[plDivID].style.top = truebody().scrollTop + (truebody().clientHeight - (truebody().clientHeight/2)) + "px";
	}
	window.setTimeout("placeErrorMessage('"+ plDivID + "')", 10);
}

 // END: Place Error message function
 
function showInfoMsg() {
 	$('infoText').innerHTML = 'To place an AutoBid simply enter your <strong>maximum</strong> bid in the <i>Bid Box</i> and click on the <i>Bid Now</i> button. The system will automatically bid on your behalf up to the value of your maximum bid amount.';
	$('infoHeader').innerHTML = 'AutoBid';
	toggleBox('infoDiv', 1);
}
 
function showAutobidNews() {
 	$('infoText').innerHTML = 'Placing an AutoBid at Bidz.com has never been easier. Simply enter your <strong>maximum</strong> bid in the <i>Bid Box</i>. The system will automatically bid on your behalf up to the value of your maximum bid amount.';
	$('infoHeader').innerHTML = 'New and Improved AutoBid Feature';
	toggleBox('infoDiv', 1);
}
 
function showLayawayMsg() {
 	//$('infoText').innerHTML = 'We are sorry that BillMeLater&#174; could not extend credit to you.<br/><br/>Bidz would like to offer you our <a href="http://www.bidz.com/bzJApp/ViewContent.action?sid=100&tid=100&pageName=layaway" target="_blank">Lay-Away program</a>.<br/><br/>Please call<br/><strong style="font-size: 1.3em; margin: 0.3em; display: block;">1-877-ALL-VIPZ (8479)</strong>now to take advantage of this offer.<br/><strong style="font-size: 1em; margin: 0.3em; display: block; color: #0c3;">Everyone is approved!</strong>';
	$('infoText').innerHTML = 'Bidz would like to offer you our <a href="http://www.bidz.com/bzJApp/ViewContent.action?sid=100&tid=100&pageName=layaway" target="_blank">Lay-Away program</a>.<br/><br/>Please call<br/><strong style="font-size: 1.3em; margin: 0.3em; display: block;">1-877-ALL-VIPZ (8479)</strong>now to take advantage of this offer.<br/><strong style="font-size: 1em; margin: 0.3em; display: block; color: #0c3;">Everyone is approved!</strong>';
	$('infoHeader').innerHTML = 'Bidz Layaway Program';
	toggleBox('infoDiv', 1);
}

function showLayawayInvitation() {
 	$('infoText').innerHTML = 'Bidz would like to offer you our <a href="http://www.bidz.com/bzJApp/ViewContent.action?sid=100&tid=100&pageName=layaway" target="_blank">Lay-Away program</a>.<br/><br/>Please call<br/><strong style="font-size: 1.3em; margin: 0.3em; display: block;">1-877-ALL-VIPZ (8479)</strong>now to take advantage of this offer.<br/><strong style="font-size: 1em; margin: 0.3em; display: block; color: #0c3;">Everyone is approved!</strong>';
	$('infoHeader').innerHTML = 'Bidz Layaway Program';
	toggleBox('infoDiv', 1);
}