/*-------------------------------------------------------------
 *
 *
 *		G E N E R A L  P A G E  F U N C T I O N S
 *		
 *
 * ------------------------------------------------------------*/

function SearchPageTitle(string) //If there is a title in the document it will return a result of > -1 if a match is found.
{
	try
	{
		var pageTitle = document.title;
		
		var result = pageTitle.search(string);
		
		return result;
	}
	catch(ex)
	{
		return "No title specified in the header of the document";
	}
	alert("title search complete");
}

/*-------------------------------------------------------------
 *
 *
 *		C H E C K O U T  P R O C E S S  F U N C T I O N S
 *		
 *
 * ------------------------------------------------------------*/
 
 //Payment Information Page
function RemoveGiftCertificateField()
{
	if(SearchPageTitle("Payment Information") > -1)
	{

		document.getElementById("paymethhider").getElementsByTagName("table")[0].rows[14].style.visibility="hidden";
		document.getElementById("paymethhider").getElementsByTagName("table")[0].rows[15].style.visibility="hidden";

	}
}

function AddDisclaimerOnPaymentPage()
{
	if(SearchPageTitle("Payment Information") > -1)
	{

		var x = document.getElementById("submitter").parentNode.innerHTML;
		
		document.getElementById("submitter").parentNode.innerHTML = x + "<span style=\"font-size:11px;\"> Enter Promotion Code on Proceeding Page</span>";

	}
}