//Globals
var counter = 1;

//Set Focus
function setfocus()
{
	document.searchform.q.focus()
}

//Bookmark
function bookmarkpage(url, title)
{	
	var browser=navigator.userAgent.toLowerCase();
	var platform=navigator.platform.toLowerCase();
	var manBook='Sorry, your browser does not support this function! \nPlease add your bookmark manually.'; 
	
	//Netscape
	if (browser.indexOf("netscape") != -1)
	{
		if(platform.indexOf("win") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Ctrl' and press 'd'"); 
		}
		else if(platform.indexOf("mac") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Cmd' and press 'd'"); 
		}
		else
		{
			window.alert(manBook);
		}
	}
	
	//Firefox
	else if ( window.sidebar && window.sidebar.addPanel )
	{
		if(platform.indexOf("win") != -1)
		{
			window.sidebar.addPanel( title, url, '' );
		}
		else if(platform.indexOf("mac") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Cmd' and press 'd'"); 
		}
		else
		{
			window.alert(manBook);
		}	
	}
	
	//Internet Explorer
	else if( window.external)
	{
		if(platform.indexOf("win") != -1)
		{
			window.external.AddFavorite( url, title );
		}
		else if(platform.indexOf("mac") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Cmd' and press 'd'"); 
		}
		else
		{
			window.alert(manBook);
		}
	}
	
	//Opera
	else if( window.opera && window.print )
	{
		if(platform.indexOf("win") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Ctrl' and press 't'");
		}
		else if(platform.indexOf("mac") != -1)
		{
			window.alert("Sorry, your browser does not support this function! \nTo bookmark this page click OK then hold 'Cmd' and press 't'"); 
		}
		else
		{
			window.alert(manBook);
		}
	}
	
	//Other browsers
	else
	{
		window.alert(manBook); 
	}
}

//Status Text
function updatestatus(img)
{
	document.getElementById(img).style.zIndex = counter;
	counter++
}

//Status Text
function updatestatusb(statustext)
{
		window.status = statustext;
}

//Status Text
function updatestatusc()
{
	window.status = '';
}

//Product Links
function changecell(action, id, url)
{
	if (action == 'change')
	{
		document.getElementById('pnav'+id).className = 'comparenavMO'; 
		document.getElementById('plink'+id).className = 'productnavlink';
		window.status = url;
	}
	else
	{
		document.getElementById('pnav'+id).className = 'comparenav'; 
		document.getElementById('plink'+id).className = 'navlink';
		window.status = '';
	}
}