// JavaScript Document

	/*****************************************************
	Function: instText
	Purpose: Writes the content of the document in newWindow() below;
	Called: By newWindow()
	Source: J Glew 31 July 2007
	******************************************************/
		
		function instText(activity) {
			if (activity == "newsfeed") {
			//fills the new window with a document written on the fly
			instructWindow.document.write("<html><head><title>What is a newsfeed<\/title><\/head><body><h1>What is a News Feed?<\/h1>");
			instructWindow.document.write("<p>A News Feed (also known as RSS - Really Simple Syndication and Rich Site Summary) automatically sends email alerts of new website content such as news, blog posts and podcasts, to people who have subscribed to receive it. Choose the newsfeed you want to get headlines and summaries of major news stories, direct to your PDU computers.<\/p>");
			//click to close window
			instructWindow.document.write("<p style='text-align:center'>");
			instructWindow.document.write("<a href='javascript:self.close();'>Close window<\/a><\/p");
			instructWindow.document.write("<\/body><\/html>");
			}
			if (activity == "test") {
			//fills the new window with a document written on the fly
			instructWindow.document.write("<html><head><title>Test your colleagues<\/title><\/head><body>");
			instructWindow.document.write("<h1>Test your colleagues<\/h1>");
			instructWindow.document.write("<p>The Clinical Microsystem Action Guide is a collection of helpful tools, information, and ideas ");
			instructWindow.document.write("designed to assist clinical microsystems to increase self-awareness and engage in continuous improvement in health care delivery.  ");
			instructWindow.document.write("Crucially this involves working with partners in the team but also with other clinical   ");
			instructWindow.document.write("or organisational groups which affect your ability to deliver the service.<\/p>");
			instructWindow.document.write("<p>Some of the tools in the guide will be very familiar to you, some will not. And you may not have used them before to help further develop your practice. ");
			instructWindow.document.write("So why not ask your team to test their own ideas about development?<\/p>");
			instructWindow.document.write("<p>You can try out the following with a small team to help them reflect on team effectiveness and the challenges they face:<\/p>");
			instructWindow.document.write("<ul><li>Clinical Microsystems CARE Vital Sign Sheet<\/li><li>Relational Health Audit<\/li><\/ul>");
			instructWindow.document.write("<p>If you would like to try out this pair of complementary diagnostic tests on a pilot basis, please email <a href='mailto:david@pdunetwork.org'>david@pdunetwork.org</a> for an information pack.<\/p>");
			//click to close window
			instructWindow.document.write("<p style='text-align:center'>");
			instructWindow.document.write("<a href='javascript:self.close();'>Close window<\/a><\/p");
			instructWindow.document.write("<\/body><\/html>");
			}
			if (activity == "pdunumber") {
			//fills the new window with a document written on the fly
			instructWindow.document.write("<html><head><title>Your PDU number<\/title><\/head><body><h1>What is your PDU number?<\/h1>");
			instructWindow.document.write("<p>Your Unit has a unique PDU number. If you are not sure what this is, please contact the PDU Network Manager at <a href='mailto:networkmanager@pdunetwork.org?subject=What is my PDU number?' title='Send email to the PDU Network Manager - opens your email software in a new window'> networkmanager@pdunetwork.org<\/a><\/p>");
			//click to close window
			instructWindow.document.write("<p style='text-align:center'>");
			instructWindow.document.write("<a href='javascript:self.close();'>Close window<\/a><\/p");
			instructWindow.document.write("<\/body><\/html>");
			}
		}

	

	
	/*****************************************************
	Function: newWindow
	Purpose: Opens a new window of an appropriate size to display larger image;
			 includes a facility to close the window again 
	Called: By a link in the body of the product page
	Source: Negrino and Smith, pp 112-113
	******************************************************/

		function newWindow(activity) {
		//opens a new window with the name 'instructWin',
		//this initially has no content,
		//it is set at a size big enough to accommodate the text and 'close window' facility,
		//it is resizeable 
		instructWindow = window.open("", "instructWin", "resizable=yes,width=650,height=500,scrollbars=yes");
		//call instText() to add document content
		instText(activity)
		//click to close window
		//instructWindow.document.write("<p style='text-align:center'>");
		//instructWindow.document.write("<a href='javascript:self.close();'>Close window<\/a><\/p");
		//instructWindow.document.write("<\/body><\/html>");
		//ends the creation of the document
		instructWindow.document.close();
		//brings the new window to the front
		instructWindow.focus();
		}

