﻿// Function to style the RadEditor Lite component based
// on our custom arcwebonline css.
//
// See http://svengillis.blogspot.com/2009/03/how-to-change-styles-within-radeditor.html
function OnClientLoad(editor)
{
	// Create CSS link.
	var ss = document.createElement("link");
	ss.type = "text/css";
	ss.rel = "stylesheet";
	ss.href = "/Style Library/css/white_red/styles.css";
	
	var ss1 = document.createElement("link");
	ss1.type = "text/css";
	ss1.rel = "stylesheet";
	ss1.href = "/Style Library/css/typography.css";

	
	var iframe;
	if (document.frames)
		iframe = document.frames["RadEContentIframe" + editor.Id];
	else
		iframe = window.frames["RadEContentIframe" + editor.Id];
	if (document.all) 
	{
		iframe.document.createStyleSheet(ss.href);
		iframe.document.createStyleSheet(ss1.href);
	}
	else
	{
		iframe.document.getElementsByTagName("head")[0].appendChild(ss);
		iframe.document.getElementsByTagName("head")[0].appendChild(ss1);
	}
}
