﻿<!--
/*
	If you are using multiple RadWindowManagers on a single page, 
	the default radopen, radconfirm, etc. functions may not work as 
	expected.  Telerik's GetRadWindowManager() JS function only returns 
	the first manager rendered.  
	
	One alternative for opening a window is to $find() the window you 
	want by ID and show() it.
	
	If you want to use radprompt, for instance, we need to override how it finds 
	the window manager.  Below are modified scripts for the functions we are using so 
	far; note any of the others mentioned above may behave incorrectly.
	
	How were these created?  
	1) copied the source from the Telerik scripts.
	2) change the first line of each, where it used to use GetRadWindowManager(), to 
		now look for a given client ID (using $find)
	3) renamed the function to avoid conflicts	
	4) the rest of the script was left untouched
*/

/*
	One other thing we need; the control scripts need to know what the 
	window manager ClientID is, so they can grab it.  This value needs to be 
	overridden in your page, telling us which window manager to grab
*/
window.strManagerClientID_2008 = 'RadWindowManager2008';

window.radalert_2008 = function(_1,_2,_3,_4)
{
	var _5=$find(strManagerClientID_2008);
	var _6=_5._getStandardPopup("alert",_1);
	if(typeof (_4)!="undefined"){
		_6.set_title(_4);
	}
	_6.setSize(_2?_2:280,_3?_3:200);
	_6.show();
	_6.center();
	return _6;
};
window.radconfirm_2008 = function(_7, _8, _9, _a, _b, _c)
{
	var _d = $find(strManagerClientID_2008);
	var _e = _d._getStandardPopup("confirm", _7);
	if (typeof (_c) != "undefined")
	{
		_e.set_title(_c);
	}
	_e.setSize(_9 ? _9 : 280, _a ? _a : 200);
	_e.set_clientCallBackFunction(function(_f, _10)
	{
		if (_8)
		{
			_8(_10);
		}
	});
	_e.show();
	_e.center();
	return _e;
};
window.radprompt_2008 = function(_11, _12, _13, _14, _15, _16, _17)
{
	var _18 = $find(strManagerClientID_2008);
	var _19 = _18._getStandardPopup("prompt", _11, _17);
	if (typeof (_16) != "undefined")
	{
		_19.set_title(_16);
	}
	_19.setSize(_13 ? _13 : 280, _14 ? _14 : 200);
	_19.set_clientCallBackFunction(function(_1a, _1b)
	{
		if (_12)
		{
			_12(_1b);
		}
	});
	_19.show();
	_19.center();
	if (_17 && $telerik.isIE)
	{
		var _1c = _19.get_popupElement().getElementsByTagName("INPUT")[0];
		if (_1c)
		{
			_1c.value = _17;
		}
	}
	return _19;
};
window.radopen_2008=function(url,_1e){
var _1f= $find(strManagerClientID_2008);
return _1f.open(url,_1e);
};
//-->