var attachWindow;function displayHistory(){	if (document.all.dhistory != null){		if (document.all.dhistory.style.display=="none"){			document.all.dhistory.style.display="inline";			document.all.history.innerText='hide history';		} else {			document.all.dhistory.style.display="none";			document.all.history.innerText='show history';		}	}}function printHistory(){	form = window.document.forms[0];	var dbName = form.currentDb.value;	var AttachURL = dbName + "/HP/" + form.UNID.value + "?OpenDocument&login";	displayAttachment(AttachURL);	return;}function displayAttachment(AttachURL){	if (attachWindow && attachWindow.closed) {		//attachWindow exists but was closed		//attachWindow = window.open(AttachURL,"Attachment","width=780,height=440, toolbar=1, location=0, scrollbars=1, resizable=1 menubar=1", false);	} else if (attachWindow) {		//alert ("attachWindow exists\nLocation is:" + attachWindow.location + ":");		attachWindow.location = AttachURL;		attachWindow.focus();	} else {		//attachWindow DOES NOT exist		//attachWindow = window.open(AttachURL,"Attachment","width=780,height=440, toolbar=1, location=0, scrollbars=1, resizable=1 menubar=1", false);	}		window.open(AttachURL,"Attachment","width=780,height=440, toolbar=1, location=0, scrollbars=1, resizable=1, menubar=1, fullscreen=0", false);	//window.open( AttachURL,"","width=" + screen.width + ", height=" + screen.height + " , left=0, toolbar=1, location=0, scrollbars=1, resizable=1, menubar=1", false);	//window.open( AttachURL, null,"top=0,left=0,height=" + string(window.screen.availHeight) + ", width=" + string(window.screen.availWidth) + ", toolbar=1, location=0, scrollbars=1, resizable=1, menubar=1", false);}function removeAttachment(unid){	form = window.document.forms[0];//	if (form.Status.value > 30) {//		if (confirm("You are changing data during an opened workflow. The workflow will restart from the beginning. Are you sure you want to continue?")) {//		} else {//			return;//		}//	}	if (confirm("Si conferma di voler eliminare questo allegato ?")) {		var dbName = form.currentDb.value;		var winloc = dbName + "/RemoveAttachment?OpenAgent&attunid=" + unid ;		window.location = winloc;	}}