/*
This script confirms the delete operation whenever delete button is clicked.
*/
function confirmDelete(strFrmName) 
{

	blnConfirm=confirm('Are you sure, you want to delete this '+strFrmName+'?');
	
	if(blnConfirm)
	{
		strFrmFld=eval("document."+strFrmName+".formaction.value='delete'");
	}
	
	return blnConfirm;
	
}

/*
This function opens a new window with the given link, width and height
*/
function openWindow(hylink, intWidth, intHeight)
{	
	var windowX = (screen.width/2)-(intWidth/2);
	var windowY = (screen.height/2)-(intHeight/2);		
	var myWindow=window;	
	myWindow=window.open(hylink,'newWin'+intWidth,'screenX='+windowX+',left='+windowX+',screenY='+windowY+',top='+windowY+',location=no,resizable=yes,menubar=no,maximize=no, scrollbars=yes,toolbar=no,width='+intWidth+',height='+intHeight);		
	myWindow.focus()
	var autoclose = true;
	if (autoclose) 
	{
		window.onunload = function(){myWindow.close();}
	}
}

