function PopupNewBrowser(vsURL) {
	var ow = window.open(vsURL);
	ow.opener = window;
	ow.focus();
	}

function PopupEvent(vsIDCtrlObject, vsCtrlObject, vsMessage, vsInterviewEventsOnly) {
	var sFeatures = "top=" + ((screen.height / 2) - 275) + ",left=" + ((screen.width / 2) - 390) + ",height=550,width=780,status=no,toolbar=no,location=no,resizable=yes,directories=no";

	if (vsCtrlObject != '')
	  window.document.forms[0].elements["EventControlName"].value = vsCtrlObject;
	  
	window.document.forms[0].elements["EventIDControlName"].value = vsIDCtrlObject;
	var ow = window.open("../../BasePortal/Pages/ppgEvent.aspx?Message="+vsMessage+"&InterviewEventsOnly="+vsInterviewEventsOnly, "Event", sFeatures);
	ow.opener = window;
	ow.focus();
	}

function PopupPerson(IDCtrlObject, CtrlObject, vsMessage, vsState, vsRegion, vsOther) {
	//This function opens the popup selection window...
	//The function will return the Person ID to a regular HTML input field that must be on the form called txtPersonID
	//This function will also return the Person Name and SchoolDistrict by Passing in the Control where you want this to appear
	//Also, if you have a state and region filter, you can pass in those values to the Person Selection filter
	var sFeatures = "top=" + ((screen.height / 2) - 275) + ",left=" + ((screen.width / 2) - 370) + ",height=550,width=740,status=no,toolbar=no,location=no,resizable=yes,directories=no";

	window.document.forms[0].elements["ControlName"].value = CtrlObject;
	window.document.forms[0].elements["IDControlName"].value = IDCtrlObject;

   if (vsOther == null) vsOther = '';
   if (vsOther != '') vsOther = "&" + vsOther;

	var ow = window.open("../../BasePortal/Pages/ppgPerson.aspx?Message="+vsMessage+"&State="+vsState+"&Region="+vsRegion+vsOther, "Person", sFeatures);
	ow.opener = window;
	ow.focus();
	}

function OrganizationSelected() {
  //document.forms[0].submit;
  try {
		__doPostBack('x','');
	}
	catch (e){
		try {
			IGPostBack('x','');			
		}
		catch (e2) {}
	}
}			
	
function ToggleVisibility(sID) {
  var oField = document.getElementById(sID);
  if (oField.style.display != 'inline') {
    //oField.style.visibility = 'visible';
    oField.style.display = 'inline';
  } else {
    //oField.style.visibility = 'hidden';
    oField.style.display = 'none';
  }
}
