<!--
var myDeleteflag = "";
var mywindow;

function deleteImage(attachmentKey, attachmentName, attachmenttype){
	myDeleteflag = "delete";
	if (confirm("Are you sure you want to delete attachment : "+attachmentName + " ?")){
		l = (screen.availWidth-10 - 200) / 2;
		t = (screen.availHeight-20 - 170) / 2;
		var properties = "left=" + l;
    	properties += ",top=" + t;
		properties += ", screenX="+l+",screenY="+t;
		properties += ",titlebar=0,resizable=no,width=200,height=170";
		if (!mywindow || mywindow.closed)  {
			mywindow=open("hrdeleteattachment.jsp","HR",properties);
		}
		mywindow.location.href = "hrdeleteattachment.jsp?attachmentkey="+attachmentKey+"&deleteflag="+myDeleteflag+"&called_from="+attachmenttype;
		if (mywindow.opener == null) mywindow.opener = self;
		mywindow.focus();
	}
}

function showAttachment(fileext, attachmentKey, attachmenttype){
	l = (screen.availWidth-10 - 700) / 2;
	t = (screen.availHeight-20 - 500) / 2;
	features = "width=700,height=500,left="+l+",top="+t+",screenX="+l+",screenY="+t+",scrollbars=1, resizable=1,location=0,toolbar=1";
	
	if(attachmentKey>0){
		if(fileext == "pdf")
			popup=window.open("HRReadAttachmentImage.pdf?called_from="+ attachmenttype + "&attachmentkey="+attachmentKey + "", "ShowAttachment", features);
		else if(fileext == "doc")
			popup=window.open("HRReadAttachmentImage.doc?called_from="+ attachmenttype + "&attachmentkey="+attachmentKey + "", "ShowAttachment", features);
		else if(fileext == "xls")
			popup=window.open("HRReadAttachmentImage.xls?called_from="+ attachmenttype + "&attachmentkey="+attachmentKey + "", "ShowAttachment", features);
		else 
			popup=window.open("HRReadAttachmentImage?called_from="+ attachmenttype + "&attachmentkey="+attachmentKey + "", "ShowAttachment", features);
	}
}

function refreshSourcePage(){
	obj.performAction( "Refresh" ) ;
}

function refreshOpenerPage(){
	document.refreshForm.submit();
}
-->