// <script type="text/javascript">
<!--  to hide script contents from old browsers

window.onload = init;

function init()
{
	//display_urhere();
	setup_email();
}

/**************************************************************************************************
This function sets up a links associated with class names to send email. Email address cannot 
be read by spambots.
email_array is a multidimensional array. Each array corresponds to 1 email addrss and has 
the following format:

0: class name associated with email (this goes in html code)
1: 1st part of email (before @ symbol)
2: 2nd part of email (between @ and .)
3. Last part of email (com, net, etc.)
4. Full email address
**************************************************************************************************/

function setup_email()
{
	var email_array = new Array
	(	
		new Array('emailBuyblock', 'info', 'buyblock', 'com')
	);
	
	for (i = 0; i < email_array.length; i++)
	{
		email_array[i][4] = email_array[i][1] + "@" + email_array[i][2] + "." + email_array[i][3];
	}

	var anchors = document.getElementsByTagName("a");
	if (anchors == null)
		return;

	for (var i = 0; i < anchors.length; i++)
	{
		for (j = 0; j < email_array.length ; j++)
		{
			if (anchors[i].className == email_array[j][0])
			{
				anchors[i].onclick = function()
				{
					document.location.href = "mail" + "to:" + email_array[j][4];
					return(false);
				}
				anchors[i].onmouseover = function()
				{
					this.firstChild.nodeValue = email_array[j][4];
				}
			}

			break;
		}
	}
}

/**************************************************************************************************
The following functions and arrays display product information and image when the user performs a
mouseOver on a link to the particular product.
**************************************************************************************************/

var text_purchases = new Array(1);
text_purchases[0] = 'BuyBlock is designed to detect when a website asks for information typically associated with online purchases. Our software will disable the Submit button preventing unauthorized individuals from making such purchases.';

var text_sites = new Array(1);
text_sites[0] = 'Some websites ask for personal information. BuyBlock will block these pages from being submitted. This is especially important when there are young children using a computer.';

var text_customize = new Array(1);
text_customize[0] = 'By logging into your account, you can add sites you want to allow data submission to. This valuable feature gives you control and flexibility.';

var text_stays = new Array(1);
text_stays[0] = 'The internet is forever evolving. We are committed to supporting you with the latest tools to keep your family protected. Our software enables you to stay on top of what information leaves your PC.';

var text_setup = new Array(1);
text_setup[0] = 'BuyBlock is easy to setup and maintain.';


function display_product_info(product_id)
{	
	var newText;
	
/***
	if (product_id == 'purchases')
	{	newText = document.createTextNode(text_purchases);
	}
	else if (product_id == 'sites')
	{	newText = document.createTextNode(text_sites);
	}
	else if (product_id == 'customize')
	{	newText = document.createTextNode(text_customize);
	}
	else if (product_id == 'stays')
	{	newText = document.createTextNode(text_stays);
	}
	else if (product_id == 'setup')
	{	newText = document.createTextNode(text_setup);
	}

	var newElem = document.createElement("p");
	var oldChild = document.getElementById("productDescription").childNodes[0];
	document.getElementById('productDescription').replaceChild(newText, oldChild);
***/	
	
	if (product_id == 'purchases')
	{	newText = text_purchases;
	}
	else if (product_id == 'sites')
	{	newText = text_sites;
	}
	else if (product_id == 'customize')
	{	newText = text_customize;
	}
	else if (product_id == 'stays')
	{	newText = text_stays;
	}
	else if (product_id == 'setup')
	{	newText = text_setup;
	}

	var id = document.getElementById('productDescription');
	id.innerHTML = newText;
}


// end hiding contents from old browsers  -->
// </script>




