﻿function newWin(url, name, w, h) 
            {
                l = (screen.availWidth-10 - w) / 2;
                t = (screen.availHeight-20 - h) / 2;

                features = "width="+w+",height="+h+",left="+l+",top="+t;
                features += ",screenX="+l+",screenY="+t;
                features += ",scrollbars=0,resizable=0,location=0";
                features += ",menubar=0,toolbar=0,status=0";

                if (!window.open(url, name, features)){
	                alert("To Use This Portion of the Site, You must DISABLE your Popup Blocker \n\n OR \n\n Try Pressing the CTRL key when clicking the link/button.");
                }
            }
function IMG1_onclick() {

}

function CheckForHTML(oSrc, args){
  
                //get the text from the textbox
		        var sText = args.Value; 
		    
		        var sRegex = /<[^>]+>/g;
        
                //test the string. if no match exists, the validator is set to valid. otherwise, the opposite.
		        if (sRegex.test(sText)) {
                    args.IsValid = false;
                 }
                 else
                 {
                   args.IsValid = true;
                 }
  }

function CloseAndNavigate(arg)
		{
			GetRadWindow().BrowserWindow.location = arg;
			GetRadWindow().Close();
		}
		
		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 CloseAndRebind(arg)
		{
			GetRadWindow().BrowserWindow.refreshGrid(arg);
			GetRadWindow().Close();
		}
		
		function CancelView()
		{
		    GetRadWindow().Close();		
		}
