//***** test
function innerComm(windowName, formElement, value)
{
	alert(windowName + ' + ' + formElement + ' + ' + value);
}

function fnAlert(msg)
{
	alert(msg);
}

//***** Pops a new window that is a child of the frameset so we can talk back if necessary
function newWin(type, params)
{
	switch (type)
	{
		case "FolderSelect":
			
			var goTo = "folderSelect.asp";
			var wndWidth = 300;
			var wndHeight = 300;
			var wndLeft = Math.round ((screen.availWidth - wndWidth) / 2);
			var wndTop = Math.round ((screen.availHeight - wndHeight) / 2);

			goTo = goTo + "?profileName=" + params;
			
			window.open(goTo, "SelectFolder", "width=" + wndWidth + ",height=" + wndHeight + ",left=" + wndLeft + ",top=" + wndTop + ",location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");			
			
			break

		case "SelectWelcomeImage":
			
			var goTo = "../dynamicResources/selectWelcomeImage.asp";
			var wndWidth = 600;
			var wndHeight = 400;
			var wndLeft = Math.round ((screen.availWidth - wndWidth) / 2);
			var wndTop = Math.round ((screen.availHeight - wndHeight) / 2);

			goTo = goTo + "?apptID=" + params;
			
			window.open(goTo, "SelectWelcomeImage", "width=" + wndWidth + ",height=" + wndHeight + ",left=" + wndLeft + ",top=" + wndTop + ",location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");

			break

		case "BuildConnectLinx":
			
			var goTo = "buildConnectlinx.asp";
			var wndWidth = 650;
			var wndHeight = 400;
			var wndLeft = Math.round ((screen.availWidth - wndWidth) / 2);
			var wndTop = Math.round ((screen.availHeight - wndHeight) / 2);

			goTo = goTo + "?apptID=" + params;
			
			window.open(goTo, "buildConnectLinx", "width=" + wndWidth + ",height=" + wndHeight + ",left=" + wndLeft + ",top=" + wndTop + ",location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");

			break

		case "RoomSelect":
			
			var goTo = "../admin/groupAndRoomSelect.asp?rooms=on";
			var wndWidth = 550;
			var wndHeight = 750;
			var wndLeft = Math.round ((screen.availWidth - wndWidth) / 2);
			var wndTop = Math.round ((screen.availHeight - wndHeight) / 2);

			window.open(goTo, "RoomSelect", "width=" + wndWidth + ",height=" + wndHeight + ",left=" + wndLeft + ",top=" + wndTop + ",location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0");

			break

		case "LaunchExternalWebMail":

			var goTo = params;
			var wndWidth = 650;
			var wndHeight = 600;
			var wndLeft = Math.round ((screen.availWidth - wndWidth) / 2);
			var wndTop = Math.round ((screen.availHeight - wndHeight) / 2);

			window.open(goTo, "ExternalWebMail", "width=" + wndWidth + ",height=" + wndHeight + ",left=" + wndLeft + ",top=" + wndTop + ",location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1");

			break
	}
}

function fnReturnFolderSelected(params)
{
	alert(params)
}

function fnPreviewImage(imagePath)
{
	var strPath = imagePath
	if (strPath.length > 0)
	{
		alert(imagePath);
	}
	parent.mainFrame.location.href="demo_js_frame_b.htm"
}

function fnRefreshForNewRoomID(goTo, nRoomID)
{
	mainFrame.location.replace('../user/' + goTo + '?roomID=' + nRoomID);
	navFrame.location.replace('../user/navigation.asp');
}

function fnAddAppt(nRoomID,querystring)
{
	mainFrame.location.replace('../user/appointment-Add.asp?idRoomID=' + nRoomID + '&' + querystring);
	navFrame.location.replace('../user/navigation.asp?roomID=' + nRoomID);
}