var wgtBtn;
var arr = new Array("videostrip_widget_overlay","videostrip_widget_banner","videostrip_widget_preroll","videostrip_widget_featured");
var inFocus = 0;
function widgetSwitch(action, nr)
{	
	if (action=="click")
	{
		for (i=0;i<arr.length;i++)
		{
			if (i==nr && nr!=inFocus)
			{
				document.getElementById(arr[i]).style.display = 'block';
				inFocus = i;
				wgtBtn = "wgt" + i;
				document.getElementById(wgtBtn).className = 'wgtSwFocus';
			} else
			{
				document.getElementById(arr[i]).style.display = 'none';
				wgtBtn = "wgt" + i;
				document.getElementById(wgtBtn).className = 'wgtSwOut';
			} 
		}
	}
	if (action=="out")
	{
		for (i=0;i<arr.length;i++)
		{
			if(i!=inFocus)
			{
				wgtBtn = "wgt" + i;
				document.getElementById(wgtBtn).className = 'wgtSwOut';
			}
		}
	}
	if (action=="over")
	{
		if (nr!=inFocus)
		{
			wgtBtn = "wgt" + nr;
			document.getElementById(wgtBtn).className = 'wgtSwOver';
		}
	}	
}