function get( name, defaultValue )
{
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	
	if( results == null )
		return defaultValue;
	else
	{
		return results[1].replace("%20", " ");;
	}
}

function styleTag( tag, color, font, fontSize, bgcolor )
{
	t = document.getElementsByTagName(tag);	
	for(i=0; i<t.length; i++)
	{
		if(color)		t[i].style.color = "#" + color;
		if(font)		t[i].style.fontFamily = font;
		if(fontSize)	t[i].style.fontSize = fontSize + "px";
		if(bgcolor)		t[i].style.backgroundColor = bgcolor;
	}
}

function style()
{			
	styleTag('body', get('color2','000000'), get('fontface','Verdana'), get('fontsize','10'), get('bgcolor','FFFFFF'));
	styleTag('td', null, null, get('fontsize','10'), get('bgcolor2','F4F4F4'));
	styleTag('th', get('color','000000'), null, get('fontsize','10'), get('bgcolor3','CDCDCD'));
	styleTag('a', get('link','0909A6'));
}

window.onload = function() { style(); }