﻿/********************************************************************************
Functions related to rad windows
*********************************************************************************/
//From inside the page, which is displayed in a radwindow, get the radwindow instance.
//You can for instance call GetRadWindow.close(); to close a RAD WIndows from within itself
function GetRadWindow()
{
	var res = null;
	if (window.radWindow) res = window.radWindow;
	else if (window.frameElement.radWindow) res = window.frameElement.radWindow;
	return res;
}

//Stops the play of an embedded youtube film with the given ID
function StopVideo(videoplayerId)
{
	var videoPlayer = document.getElementById(videoplayerId);
	if (videoPlayer != null)
		videoPlayer.stopVideo();

}

function resetRadWindow(radWindow) {
	radWindow.SetUrl('about:blank');
}
