function GetRadWindow()
    {
	    var oWindow = null;
	    if (window.radWindow) oWindow = window.radWindow;
	    else if (window.frameElement && window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
	    return oWindow;
    }        
function CloseRadWindow()
    {
    var rWindow = GetRadWindow();
    if (rWindow != null)
	    rWindow.Close();
    }

function OpenURL(url)
    {
    document.location = url;
    }
function onPrint()
{
window.print();
}
function onClose()
{
if (!typeof(window.opener.OnRefresh) != "undefined")
    window.opener.OnRefresh();
window.close();
}
function OpenWindow(url,features1)
{
  var winName = "";
  var features = "";
  if (!features)
    features = "scrollbars=yes,resizable=yes,location=yes";
  else
    features = features1;    
  window.open(url,winName,features);
}
function OpenRadWindow(url,title,w,h)
	{
	var oWindow = window.radopen("", "DialogWindow");    
	//oWindow.SetTitle(title);
    oWindow.SetSize(w,h);	    
	oWindow.SetUrl(url);
    oWindow.Center();	
	}
function checkMaxLength(obj,len) 
    {
	var currentLength = obj.value.length;
	if (currentLength > len)
	    {
	    obj.value = obj.value.substr(0,len);	    
	    }		
    }
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
	}
 function Refresh()
    {
    window.location = window.location;	    
    }
    
function GetMetaContent(metaName)
    {
    var metas = document.getElementsByTagName('META');
    for (var i = 0; i < metas.length; i++)
        if (metas[i].getAttribute('NAME') == metaName)
            return metas[i].getAttribute('CONTENT');
      return "";
    }

