/*
<a id="link_01" href="#">1</a> | 
<a id="link_02" href="#">2</a><br />
<a id="link_all" href="#">View All</a></p>

#product_title p a#link_01 {
    font-weight: bold;
    text-decoration: none;
}

There are 4 product sections. The first 2 are enclosed in
<div id="page_01" style="display:block;">
The second 2 are enclosed in
<div id="page_02" style="display:block;">

*/

var myLinkIDs = ['link_01', 'link_02', 'link_all'];
for (var i=0; i<myLinkIDs.length; i++) {
	document.getElementById(myLinkIDs[i]).onclick = function() {doLinkAction(this);}
}
//doLinkAction(document.getElementById('link_01'));

function doLinkAction(thisLink) {
	for (var i=0; i<myLinkIDs.length; i++) {
		document.getElementById(myLinkIDs[i]).style.fontWeight = 'normal';
		document.getElementById(myLinkIDs[i]).style.textDecoration = 'underline';
	}
	thisLink.style.fontWeight = 'bold';
	thisLink.style.textDecoration = 'none';
	
	if (thisLink.id == 'link_01') {
		document.getElementById('page_01').style.display='block';
		document.getElementById('page_02').style.display='none';
	}
	else if (thisLink.id == 'link_02') {
		document.getElementById('page_01').style.display='none';
		document.getElementById('page_02').style.display='block';
	}
	else if (thisLink.id == 'link_all') {
		document.getElementById('page_01').style.display='block';
		document.getElementById('page_02').style.display='block';
	}
	else {alert("Error in javascript link action.");}
}