//popup functionality - taken directly from the SCJ utility.js
window.onerror=null;
var win = null;
function PopWindow(mypage,myname) {
	//closePopWin();
	winprops = 'height=500,width=820,top=30,left=0,scrollbars=1,resizable=1,status=1';
	win = window.open(mypage, myname, winprops);
	}
function SizedPopWindow(mypage,myname,w,h) {
	//closePopWin();
	winprops = 'height='+h+',width='+w+',top=30,left=0,scrollbars=1,resizable=1,status=1';
	win = window.open(mypage, myname, winprops);
	}
function closePopWin() {
	if(win != null) { 
		if(!win.closed) { 
			win.close();
			win = null;
			} else {
			win = null;
			}
		}	
	}
	
// function: show/hide

function hs(id) {
    if (document.getElementById('trigger')) document.getElementById('trigger').src = 'i/product_pages/nav_trigger_off.gif';
    if (document.getElementById('ultra')) document.getElementById('ultra').src = 'i/product_pages/nav_ultra_off.gif';
    if (document.getElementById('adgel')) document.getElementById('adgel').src = 'i/product_pages/nav_advancedgel_off.gif';
    if (document.getElementById('citrus_action')) document.getElementById('citrus_action').src = 'i/product_pages/nav_citrus_action_off.gif';
    if (document.getElementById('stainliftingfoam')) document.getElementById('stainliftingfoam').src = 'i/product_pages/nav_stainliftingfoam_off.gif';
	if (id == null || id == 'undefined') id = 'trigger';
	if (document.getElementById(id)) document.getElementById(id).src = 'i/product_pages/nav_' + id + '_on.gif';
}

// function: faq / ideas

function switchy(item) {
	
	for (i = 1; i <= 17; i++)
	{
	document.getElementById('c'+i).src='i/faq_brightideas/topGray.gif';
	}

	for (i = 1; i <= 17; i++)
	{
	document.getElementById('c'+i+'a').className='arrowOff';
	}

	for (i = 1; i <= 17; i++)
	{
	document.getElementById('c'+i+'b').src='i/faq_brightideas/bottomGray.gif';
	}

	document.getElementById(item).src='i/faq_brightideas/topGreen.gif';
	document.getElementById(item+'b').src='i/faq_brightideas/bottomGreen.gif';
	document.getElementById(item+'a').className='arrowDown';

}

function switchyAlt(item) {
	
	for (i = 1; i <= 9; i++)
	{
	document.getElementById('c'+i).src='i/faq_brightideas/topGray.gif';
	}

	for (i = 1; i <= 9; i++)
	{
	document.getElementById('c'+i+'a').className='arrowOff';
	}

	for (i = 1; i <= 9; i++)
	{
	document.getElementById('c'+i+'b').src='i/faq_brightideas/bottomGray.gif';
	}

	document.getElementById(item).src='i/faq_brightideas/topGreen.gif';
	document.getElementById(item+'b').src='i/faq_brightideas/bottomGreen.gif';
	document.getElementById(item+'a').className='arrowDown';

}

// function: show / hide menu
function showMenu(menuId) {
	if (navigator.userAgent.indexOf('Mac') != -1 && navigator.userAgent.indexOf('Firefox/2.0.0') != -1)
	{
		document.getElementById(menuId).style.display="none";
	}
	else
	{
		document.getElementById(menuId).style.display="block";
	}
}

function hideMenu(menuId) {
	document.getElementById(menuId).style.display="none";
}
   
document.observe('dom:loaded', function () { hideMenu('topDrop'); hideMenu('topDrop2'); });