var RedirectPage;
			
function CloseIFrameWindow()
{
	try
	{
		document.getElementById('iframeMsg').style.visibility='hidden';
		// Redirecting Page
		//-----------------
		if ( RedirectPage != "" )
		{
			window.location = RedirectPage ;
		}
			return false;
	}
	catch (err)
	{
		if ( RedirectPage != "" )
		{
			window.location = RedirectPage ;
		}
	}
}
			
function ShowJobsF1Message(NextPage,IsRoot,DispMessage)
{
	try
	{
		RedirectPage = NextPage ;
					
		// To check whether the Opener window is in Root
		//----------------------------------------------
		if (IsRoot == 'YES') 
		{
			var URLAddress = "JobsF1Message.aspx";
		}
		else if (IsRoot == 'NO')
		{
			var URLAddress = "../JobsF1Message.aspx";
		}
								
		var BrowserWidth = document.body.clientWidth;
		var BrowserHeight = document.body.clientHeight;
		var LeftPosition = (BrowserWidth - 500) / 2 // 520 - width of the Msgbox
		var TopPosition = (BrowserHeight - 120) / 2 // 120 - Height of the Msgbox
					
		var IFraScript = "<IFRAME id='iframeMsg' frameborder='1' name='iframeMsg' src='" + URLAddress + "' scrolling='no' style='z-index:7000 ; POSITION:absolute; LEFT:" + LeftPosition + "px; TOP:" + TopPosition + "px; WIDTH:500px; HEIGHT:120px;'></IFRAME>"
					
		var curRange = document.selection.createRange();
		curRange.pasteHTML(IFraScript); 					
					
		return true;
	
	}
	catch (err)
	{
		DispMessage = DispMessage.replace('<BR>',' - ');
		DispMessage = DispMessage.replace('<Br>',' - ');
		DispMessage = DispMessage.replace('</BR>','');
		DispMessage = DispMessage.replace('</Br>','');
		DispMessage = DispMessage.replace('<B>','')
		DispMessage = DispMessage.replace('</B>','')
		alert(DispMessage);
		CloseIFrameWindow();
	}
	}

function AppDataBank(NextPage,IsRoot,DispMessage)
{
	try
	{
	
		// To check whether the Opener window is in Root
		//----------------------------------------------
		if (IsRoot == 'YES') 
		{
			var URLAddress = "ApplicantDataBank.aspx";
		}
		else if (IsRoot == 'NO')
		{
			var URLAddress = "../Recruiters/ApplicantDataBank.aspx";
		}
		
		var BrowserWidth = document.body.clientWidth;
		var BrowserHeight = document.body.clientHeight;
		var LeftPosition = (BrowserWidth - 500) / 2 // 520 - width of the Msgbox
		var TopPosition = (BrowserHeight - 120) / 2 // 120 - Height of the Msgbox
					
		var IFraScript = "<IFRAME id='iframeMsg' frameborder='1' name='iframeMsg' src='" + URLAddress + "' scrolling='no' style='z-index:7000 ; POSITION:absolute; LEFT:" + LeftPosition + "px; TOP:" + TopPosition + "px; WIDTH:500px; HEIGHT:120px;'></IFRAME>"
					
		var curRange = document.selection.createRange();
		curRange.pasteHTML(IFraScript); 					
					
		return true;
				
	}
	catch (err)
	{
				DispMessage = DispMessage.replace('<BR>',' - ');
		DispMessage = DispMessage.replace('<Br>',' - ');
		DispMessage = DispMessage.replace('</BR>','');
		DispMessage = DispMessage.replace('</Br>','');
		DispMessage = DispMessage.replace('<B>','')
		DispMessage = DispMessage.replace('</B>','')
		alert(DispMessage);
		CloseIFrameWindow();
	} 
}


function MsgWindowReply()
{
/*window.location=
var TxtMessScript = "<DIV id='DivMessContent' style='DISPLAY: inline; POSITION: absolute; Z-INDEX: 991; FONT-SIZE: 10pt; FONT-FAMILY: Verdana; LINE-HEIGHT: 13pt; LEFT: 10px; WIDTH: 500px; TOP: 8px; HEIGHT: 72px'>" + DispMessage + "</DIV>"
					
					var OkBtnScript = "<INPUT style='Z-INDEX: 992; LEFT: 446px; WIDTH: 58px; POSITION: absolute; TOP: 80px; HEIGHT: 24px' onclick='CloseWin();' type='button' value='   Ok   '>"
					var DivScript = "<DIV id='DivMsgbox' style='BORDER-RIGHT: black 4px double; BORDER-TOP: black 4px double; BORDER-LEFT: black 4px double; BORDER-BOTTOM: black 4px double; POSITION: absolute; Z-INDEX: 7000; LEFT:" + LeftPosition + "px; WIDTH: 520px; TOP:" + TopPosition + "px; HEIGHT: 120px; BACKGROUND-COLOR: #e1d6bf'>" + TxtMessScript + OkBtnScript + "</DIV>"
					
					var curRange = document.selection.createRange();
					curRange.pasteHTML(DivScript); */
}
