/**
* gets page settings from the cookie
* @param cookieName	name of the setting cookie
* @return 				stored value for type or false
*/
function getSearchType( cookieName )
{
	var temp = getCookie(cookieName);
	if (temp) return temp;
	return false;
}

//Setup search field options
var type = 'Artists';
test = getSearchType( 'searchtype' );
if (test) type = test;		
if (document.getElementById('keywords'))
{		
	document.getElementById('keywords').value = 'Search ' + type;
}
if (document.getElementById('navsearchtype'))
{
	document.getElementById('navsearchtype').value = type;
}
if (document.getElementById('navkeywords'))
{	
	document.getElementById('navkeywords').value = 'Search ' + type;
}
if (document.getElementById(type))
{	
	document.getElementById( type ).checked = "checked";				
}

/* helper class to update css definitions for a DOM selector */
function addCSSRule(selector, attributes){
	var ss = document.styleSheets[document.styleSheets.length-1];
	if(ss.insertRule) ss.insertRule(selector + '{' + attributes + '}', ss.cssRules.length);
	else if(ss.addRule) ss.addRule(selector, attributes);
}
