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);
 }