var popWin='';
//		<SCRIPT language="JavaScript" src="~/class/JScript1.js"></SCRIPT>;
function ConfirmationWindow()
{
var alertWin=null;
alertWin = confirm("Are you sure"); 
if(alertWin){ alert('You selected YES');}
else{alert('You selected NO');}
}

function openModalWindow(jURL,xmlFile,ret1,ret2,pBack,iText)
{
if(pBack==null){pBack=false;}
if(iText==null){iText=true;}
var iURL=jURL+"?pStr="+xmlFile+"&retVal="+ret1+"&retVal2="+ret2+"&pBack="+pBack+"&iTxt="+iText;
if (popWin && popWin.open && !popWin.closed) {popWin.focus();return;} 
if(window.showModalDialog){
popWin=window.showModalDialog(iURL, self, "status:no;dialogWidth:550px;dialogHeight:720px;dialogHide:true;help:no;scroll:yes");
}else {	popWin = window.open(iURL,"","width=550, height=720, top=300, left=500, toolbar=0, menubar=0, location=0, resizable=1,scrollbars=yes");}
if((popWin != null) && (popWin.opener==null)){popWin.opener = self;	popWin.focus;}
//    if (strReturn != null) document.getElementById(cName).value=strReturn;
}

function sendVal(valStr,ctlName)
		{
			//Script passing data to main page
			var Script = "";
			if(window.opener && !window.opener.closed) {window.opener.document.getElementById('"+ctlName+"').value = '"+valStr+"'; }
			//	Script += " else {alert('cannot find object: "+ctlName+"'); }\n";
			//			Script += "window.opener.addOption('" + data + "');";
			self.close();			
		}

		function sendVal4Modal(valStr,ctlName)
		{
			//Script passing data to main page
			var opener = window.dialogArguments;
			if(window.opener && !window.opener.closed) {window.opener.document.getElementById('"+ctlName+"').value = '"+valStr+"'; }
			//	Script += " else {alert('cannot find object: "+ctlName+"'); }\n";
			//			Script += "window.opener.addOption('" + data + "');";
			self.close();		
			//Check wether it is already registerd.
		}
function setfocus ()
{
setInterval('window.focus()',2000);
}
