			
   // Start Rad Window   

			//This code is used to provide a reference to the radwindow "wrapper"
		function GetRadWindow()
		{
			var oWindow = null;
			if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
			else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)
			return oWindow;
		}


		function CloseOnReload()
		{
			GetRadWindow().Close();
		}


		function RefreshParentPage()
		{
			GetRadWindow().BrowserWindow.location.reload();
		}
		

			function OpenRw(varPage, varID) {
			
			var oManager = GetRadWindowManager();
			var oWnd = oManager.GetWindowByName("pgRadWindow"); 
			if (!oWnd) return;

			if (varPage == "1"){
				var newUrl = "Slideshows.aspx?id="+varID ;
				oWnd.SetSize(565,545);
				}
				
			if (varPage == "2"){
				var newUrl = "Videos.aspx?id="+varID ;
				oWnd.SetSize(389,358);
				}
				
			if (varPage == "3"){
				var newUrl = "Slideshows.aspx?id="+varID ;
				oWnd.SetSize(354,390);
				}
				
			if (varPage == "4"){
				var newUrl = "Editor.aspx?id="+varID ;
				oWnd.SetSize(800,400);
				
				}
				
			if (varPage == "5"){
				var newUrl = "360promo.html" ;
				oWnd.SetSize(875,585);
				}
				
			if (varPage == "6"){
				var newUrl = "PageBrowser.aspx?id="+varID ;
				oWnd.SetSize(650,400);
				}
					
				oWnd.ReloadOnShow
				oWnd.SetUrl(newUrl);
				oWnd.Show();
				//oWnd.MoveTo(40,60)
			}
			
		function OpenRwEditor(varPage, varMode) {
			
			// Get window size
			var myWidth = 0, myHeight = 0;
			if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				myWidth = window.innerWidth;
				myHeight = window.innerHeight;
			} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
			
			
			var oManager = GetRadWindowManager();
			var oWnd = oManager.GetWindowByName("pgRadWindow"); 
			if (!oWnd) return;
			
			var newUrl = "Editor.aspx?id="+varPage+"&mode="+varMode ;
				oWnd.SetSize(800,490);
				oWnd.ReloadOnShow
				oWnd.SetUrl(newUrl);
				oWnd.Show();
				oWnd.MoveTo((myWidth-800)/2,10)


				
			//	var oWin = window.open("Editor.aspx", "Editor", "width=600px,height=400px,resizable=1,status=1");
			}
		
		function OpenRwMap(windowName,pageurl) {
			
			// Get window size
			var myWidth = 0, myHeight = 0;
			if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				myWidth = window.innerWidth;
				myHeight = window.innerHeight;
			} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
			//	window.alert( 'Width = ' + myWidth );
			//	window.alert( 'Height = ' + myHeight );
				
			if((myWidth > 860) && (myHeight > 580))
			{
			var oManager = GetRadWindowManager();
			var oWnd = oManager.GetWindowByName(windowName); 
			if (!oWnd) return;

			//Set Window Properties
			
			//if (navOn == "1"){
				var newUrl = pageurl+"?nav=1";
				//var setTitle = "Map of the British Virgin Islands Map";
				//}
				//else{
				//var newUrl = pageurl;
				//}
			var wnStatus = "set str";
			oWnd.ReloadOnShow	
		//	oWnd.SetTitle(title);
			oWnd.Url = newUrl;
			oWnd.SetStatus(wnStatus);
			oWnd.Show();
			}else {
				window.location = pageurl;
			}
			
		}
	
	
	function OpenRwVideo(windowName, windowName1) {
			
			var oManager = GetRadWindowManager();
			var oWnd = oManager.GetWindowByName("RwEscapeBvi"); 
			if (!oWnd) return;

			//Set Window Properties
			oWnd.ReloadOnShow	
		//	oWnd.Url = newUrl;
			oWnd.Show();

			
		}
		
		
function get_RadWindow() {    
  var oWindow = null;    
  if (window.radWindow) {    
    oWindow = window.radWindow;    
  }    
  else if (window.frameElement.radWindow) {   
    oWindow = window.frameElement.radWindow;    
  }   
  return oWindow;   
}
			
function nudgeWindow(x,y) {    
  var oWnd = get_RadWindow();    
  var bounds = oWnd.getWindowBounds();    
  var t = bounds.y;    
  var l = bounds.x;    
  oWnd.MoveTo(l + x, t + y);   
}  
		
	// End Rad Window
	
	
		function GoToBookmark(bkmk)
		{
//			if (bkmk <> ""){
			self.location.hash=bkmk; 
//			}
		}