// JScript source code

var Row1Section = 'down';
var Row2Section = 'up';
var Row3Section = 'up';
var Row4Section = 'up';

function pageInit() {
	MM_preloadImages('images/btn_home_o.gif','images/btn_info_o.gif','images/btn_contact_o.gif','images/btn_company_o.gif','images/btn_support_o.gif');
	ToggleSection('Row1');
	ToggleSection('Row2');
	ToggleSection('Row3');
	ToggleSection('Row4');
}

function ToggleSection(SecID) {
	var newImage;
	var imgID;
	var showXhideB;
	
	switch(SecID)
	{
		case 'Row1':
		{
			if (Row1Section == 'up') {
				newImage = 'images/btn_arrowdwn_ylw.gif';
				Row1Section = 'down';
				showXhideB = false;
			} else {
				newImage = 'images/btn_arrowup_ylw.gif';
				Row1Section = 'up';
				showXhideB = true;
			}
			break;
		}
		case 'Row2':
		{
			if (Row2Section == 'up') {
				newImage = 'images/btn_arrowdwn_ylw.gif';
				Row2Section = 'down';
				showXhideB = false;
			} else {
				newImage = 'images/btn_arrowup_ylw.gif';
				Row2Section = 'up';
				showXhideB = true;
			}
			break;
		}
		case 'Row3':
		{
			if (Row3Section == 'up') {
				newImage = 'images/btn_arrowdwn_ylw.gif';
				Row3Section = 'down';
				showXhideB = false;
			} else {
				newImage = 'images/btn_arrowup_ylw.gif';
				Row3Section = 'up';
				showXhideB = true;
			}
			break;
		}
		case 'Row4':
		{
			if (Row4Section == 'up') {
				newImage = 'images/btn_arrowdwn_ylw.gif';
				Row4Section = 'down';
				showXhideB = false;
			} else {
				newImage = 'images/btn_arrowup_ylw.gif';
				Row4Section = 'up';
				showXhideB = true;
			}
			break;
		}
		default :
		{
			//alert('huh');
			showXhideB = false;
			showXhideB = true;
			break;
		}
	}
	imgID = 'img' + SecID;
	document.getElementById(imgID).src = newImage;
	rowShowHide('row' + SecID, showXhideB);
}

function rowShowHide(rowID, showXhideB)
{
	if (document.getElementById) {
		var tr=document.getElementById(rowID);
		if (tr) {
			if (showXhideB == true) { // Show
				// we set style to block for IE
				// but for firefox we use table-row
				try {
					tr.style.display='table-row';
				} catch(e) {
					tr.style.display = 'block';
				}
			} else { // Hide
				tr.style.display = 'none';
			}
		}
	}
}
