function GetParentIframeInfo()
{
	try
	{
		var parentIframe = document.parentWindow.parent.document.getElementById(document.parentWindow.name);
		
		var parentParentIframeName = document.parentWindow.parent.document.parentWindow.name;
		if(parentParentIframeName != null && parentParentIframeName != "" && parentParentIframeName.indexOf('wysiwyg') != -1)
		{
			var parentParentDocument = document.parentWindow.parent.document.parentWindow.parent.document;
			document.onmousedown = function(){parentParentDocument.parentWindow.setSelectedAlternate = true; parentParentDocument.parentWindow.firstMove = true; parentParentDocument.frames["wysiwyg" + parentParentIframeName.replace("wysiwyg","")].isFocused = true;};
			document.onmousemove = function(){parentParentDocument.parentWindow.SetSelectedObjectDiv(parentParentIframeName.replace("wysiwyg",""),true);};
			document.onmouseup = function(){parentParentDocument.parentWindow.setSelectedAlternate = true; parentParentDocument.parentWindow.SetSelectedObjectDiv(parentParentIframeName.replace("wysiwyg",""));};
		}
		
		var got = false;
		
		if(parentIframe.background != null)
		{
			var splitted = parentIframe.background.split('/');
			if(splitted[splitted.length - 1].replace(")","") != "")
			{
				document.body.background = parentIframe.background;
				got = true;
			}
		}
		if(!got)
		{
			document.body.background = '';
		}
		got = false;
		
		if(parentIframe.style.backgroundImage != null)
		{
			var splitted = parentIframe.style.backgroundImage.split('/');
			if(splitted[splitted.length - 1].replace(")","") != "")
			{
				document.body.style.backgroundImage = parentIframe.style.backgroundImage;
				got = true;
			}
		}
		if(!got)
		{
			document.body.style.backgroundImage = '';
		}
		got = false;
		
		if(parentIframe.bgColor != null)
		{
			if(document.body.bgColor != "")
			{
				document.body.bgColor = parentIframe.bgColor;
				got = true;
			}
		}
		if(!got)
		{
			document.body.bgColor = null;
		}
		got = false;
		
		if(parentIframe.style.backgroundColor != null)
		{
			if(parentIframe.style.backgroundColor != "")
			{
				document.body.style.backgroundColor = parentIframe.style.backgroundColor;
				got = true;
			}
		}
		if(!got)
		{
			document.body.style.backgroundColor = '';
		}
		got = false;
		
		if(parentIframe.style.color != null)
		{
			if(parentIframe.style.color != "")
			{
				document.body.style.color = parentIframe.style.color;
				got = true;
			}
		}
		if(!got)
		{
			document.body.style.color = '';
		}
	}
	catch(e)
	{
	}
}

function ParentIsWysiwyg()
{
	var parentParentIframeName = document.parentWindow.parent.document.parentWindow.name;
	return parentParentIframeName.indexOf('wysiwyg') != -1;
}

function ParentIsWysiwyg2()
{
	var parentParentIframeName = document.defaultView.parent.document.defaultView.name;
	return parentParentIframeName.indexOf('wysiwyg') != -1;
}

function GetParent()
{
	return document.parentWindow.parent.document.parentWindow;
}

function GetParent2()
{
	return document.defaultView.parent.document.defaultView;
}

function GetParentDocument(doc)
{
	if(navigator.appName == 'Microsoft Internet Explorer')
	{
		return doc.parentWindow.parent.document;
	}
	else
	{
		return doc.defaultView.parent.document;
	}
}

function GoToLink(hyperLink)
{
	if(navigator.appName == 'Microsoft Internet Explorer')
	{
		if(!ParentIsWysiwyg())
		{
			GetParent().location.assign(hyperLink);
		}
	}
	else
	{
		if(!ParentIsWysiwyg2())
		{
			GetParent2().location.assign(hyperLink);
		}
	}
}

function RefreshParent(doc)
{
	if(navigator.appName == 'Microsoft Internet Explorer')
	{
		if(!ParentIsWysiwyg())
		{
			try
			{
				GetParentDocument(doc).parentWindow.RefreshMyself();
			}
			catch(e)
			{
				RefreshParent(GetParentDocument(doc));
			}
		}
	}
	else
	{
		if(!ParentIsWysiwyg2())
		{
			try
			{
				GetParentDocument(doc).defaultView.RefreshMyself();
			}
			catch(e)
			{
				RefreshParent(GetParentDocument(doc));
			}
		}
	}
}

function CanLink()
{
	return true;
}