
function addTxtField(form,strName,contentId,iSize,bBR) {
  	var content = document.getElementById(contentId);
    var obj = document.createElement("INPUT");
    obj.size = iSize;
    obj.name = strName;
    
    if(bBR){
		var oBR = document.createElement("br");
		content.appendChild(oBR);    	  
	}
	content.appendChild(obj);
}

function disEnabObject(obj){
	obj.disabled = !(obj.disabled);
	var z = (obj.disabled) ? 'disabled' : 'enabled';
}


function setTableCellValue(strID,infoID){
	var x = document.getElementById(strID).rows;
	var y = x[0].cells;
	
	y[0].innerHTML = getInfoText(infoID);		

	return true;  
}

//-1 ja 0 indeksi ovat perustekstejä mitkä näytetään kun siirrytään pois linkin päältä
function showMsg(id,strObj){  		
		var element = document.getElementById(strObj);
		if(id==-1){
			strMsg = "You will get the description about the options to answer by moving the cursor on to the option.<br><br>";
		}else if(id==0){
		  	strMsg = "You will get the description about the options to answer by moving the cursor on to the option.<br><br>";	
		}else if(id==1){
			strMsg = "It is also possible to use call center in order to answer to those queries.<br><br>";		  	
		}else if(id==2){
			strMsg = "The patient can also answer to those queries by sending text message.<br><br>";		  
		}else if(id==3){
			strMsg = "The patient will receive an email from the unit that has treated him/her. The patient can answer to those questions by email.<br><br>";		  
		}else if(id==4){
			strMsg = "The patient will receive a letter and he/she can answer to those questions by paper. The patient will answer to those questions and will send that to the company. Company will feed those results to the database.<br><br>";			
		}else if(id==5){
			strMsg = "Patients can also use client terminal. The client terminal is in the healthcare unit and the patient can answer to those questions before/after he/she has been treated.<br><br>";
		}else if(id==6){
			strMsg = "The patient is prompted by email to fill in the questionnaire on internet, to which there is a link. The promptings take place before treatment and at a suitable point of time after treatment.<br><br>";
		}else if(id==7){
			strMsg = "The patient can fill in a paper questionnaire delivered by regular mail. The questionnaire and prepaid envelope will be mailed to the patient before treatment and at a suitable point of time after treatment.<br><br>";			
		}
		element.innerHTML = strMsg;
		
		return true;
}


function getInfoText(id){
	var infoTxt = new Array(20);
	
	if(id > -1){

		infoTxt[0] = "<b>Service Assistant</b> provides an easy way to collect information about how well the various personnel managed to serve customers/patients. Simple and effective tool to get feedback!";
		infoTxt[1] = "<b>Care Assistant</b> is fully automated system that gives information about the quality and effectiveness of treatment. Improves the doctor-patient relationship!";
		infoTxt[2] = "<b>Compliance Assistant</b> gives diversified information about different factors that predict the patient’s commitment to treatment. Facilitates the development of cost-efficient treatment methods! ";
		infoTxt[3] = "<b>15D</b> is a scientifically validated tool, which has been developed by Professor Harri Sintonen. The tool can be used for measuring the effect of the treatment on the patient's health-related quality of life (HRQoL).";
		
		infoTxt[4] = "The Service Assistant automatically sends questionare to the patient at agreed intervalls, either by text message or e-mail. The patient will receive a link and by clicking that link, he/she can answer to those questions, which hospital’s personnel have decided.";
		infoTxt[5] = "Traffic lights shows, which part of the services the unit should concentrate on. Nurses can see easily and in a real-time, which part of the whole process has gone well and what part should be re-organised.";
		infoTxt[6] = "Doctors will receive an email once a month. They can compare excellent and good answers to poor and insufficient answers and see, how those answers are interacting with each other. They can also see the limits for the traffic lights.";
		infoTxt[7] = "Management will receive an email once a month. They can compare excellent and good answers to poor and insufficient answers and see, how those answers are interacting with each other. They can also see the limits for the traffic lights.";
		
		infoTxt[8] = "The Care Assistant automatically sends questionare to the patient at agreed intervalls, either by text message or e-mail. The patient will receive a link and by clicking that link, he/she can answer to those questions, which hospital’s personnel have decided.";	
		infoTxt[9] = "Nurses will receive an email once a month. They can compare own team’s results to the whole unit’s results.";
		infoTxt[10] = "The healthcare unit can decide themselves, which questions will cause an alarm to nurses.";
		infoTxt[11] = "Doctors will receive an email once a month. They can compare own patient’s results to the own speciality’s results to the whole unit’s results.";
		infoTxt[12] = "Hospital's personnel can look at the patients results e.g. before the patient will have an appointment.";

		infoTxt[13] = "The Compliance Assistant automatically sends questionare to the patient at agreed intervalls, either by e-mail or letter.";
		infoTxt[14] = "Hospital's personnel can look at the patients results e.g. before the patient will have an appointment.";
		
		infoTxt[15] = "The system automatically sends to the patients at agreed intervals by email (or regular mail) a prompt to fill in the questionnaire on internet or a paper questionnaire to be filled in.";
		infoTxt[16] = "Nurses and doctors can look at the results of the quality of life. They can choose, whether they want to look at the groups results or some patient’s individual result.";


	  
/*	  
	  
		infoTxt[0] = "<b>Asiakastyytyväisyysseurannan</b> avulla on helppoa kerätä tietoa siitä, kuinka tyytyväisiä potilaat ovat saamaansa palveluun.  Tämä on kustannustehokas tapa tarkastella, mitä prosesseja pitäisi parantaa tai ottaa käyttöön, jotta palvelun laatu säilyy tai paranee.<br><br>Tyytyväiset asiakkaat tekevät työskentely-ympäristöstä paremman..";
		infoTxt[1] = "<b>Täysin automatisoidulla  järjestelmällä</b> saadaan tietoa hoidon laadusta ja tehokkuudesta. Potilasta ei jätetä kotiuttamisen jälkeen yksin vaan toipumista seurataan. Näin saadaan vertailukelpoista tietoa esimerkiksi sairaslomien tarpeesta, hoitoa seuraavista lääkärikäynneistä ja mahdollisista infektioista.<br><br>Huolenpito lisää turvallisuutta.";
		infoTxt[2] = "<b>Komplianssimittarin avulla</b> voidaan arvioida ja tukea potilaan hoitoon sitoutumista. Työkalun avulla voidaan kehittää kustannustehokkaita hoitotapoja. Tieteellisesti validin tuotteen on kehittänyt terveydenhuollon tohtori, professori Helvi Kyngäs.<br><br>Hoitoon sitoutuminen merkitsee parempaa hyvinvointia.";
		infoTxt[3] = "<b>15D</b> on tieteellisesti validoitu mittari, jonka on kehittänyt professori Harri Sintonen. Se antaa mahdollisuuden tarkastella hoidon vaikutusta potilaan terveyteen liittyvään elämänlaatuun..";
		//CUF
		infoTxt[4] = "Järjestelmä lähettää potilaalle automaattisesti kyselyn sen jälkeen, kun hän on käynyt hoitoyksikkössä.";
		infoTxt[5] = "Hoitajat voivat käyttää ns. liikennevalokäyttöliittymää, josta he näkevät reaaliaikaisesti, mikä palvelun laatuun vaikuttava osa-alue sujuu hyvin ja mikä huonosti. Liikennevalokäyttöliittymä päivitetään kerran vuorokaudessa.";
		infoTxt[6] = "Lääkärit saavat kuukausittain sähköpostin, jossa on liitteenä lääkäreiden raportti. Raportista nähdään, miten erittäin hyvien ja hyvien vastausten prosentuaalinen osuus vaihtelee kuukausittain verrattuna huonoihin ja erittäin huonoihin vastauksiin.";
		infoTxt[7] = "Johdon raporttien avulla voidaan tarkastella asiakastyytyväisyyden kehitystä erikoisaloittain. Lisäksi voidaan tarkastella vastausprosentteja.";
		//CPF
		infoTxt[8] = "Potilaat saavat kyselyn tietyin aikavälein hoitotoimenpiteen jälkeen. Terveydenhuollon yksikkö voi itse päättää kysymykset, joita potilailta kysytään.";	
		infoTxt[9] = "Hoitajat saavat kuukausittain sähköpostin, jossa on liitteenä hoidonseurannan raportti, jossa verrataan  oman tiimin potilaita koko yksikköön.";
		infoTxt[10] = "Hälytyskäyttöliittymä: Hoitoyksikkö voi itse päättää, mitkä hoidonseurannan kysymykset ovat ns. hälytyskysymyksiä ja mikä vastausvaihtoehto aiheuttaa hälytyksen. Hälytys menee hoitajan sähköpostiin ja lisäksi se näkyy myös hoidonseurannan hälytyskäyttöliittymässä.";
		infoTxt[11] = "Lääkäreille lähetetään kuukausittain sähköpostiin raportti, jossa verrataan omia tuloksia oman erikoisalan ja koko yksikön tuloksiin. Lisäksi voidaan hakea yksittäisen potilaan vastauksia potilaan henkilötunnuksen avulla.";
		infoTxt[12] = "Johdon raporttien avulla voidaan tarkastella asiakastyytyväisyyden kehitystä erikoisaloittain. Lisäksi voidaan tarkastella vastausprosentteja.";
		//CCF
		infoTxt[13] = "Potilaat saavat kyselyn tietyin aikavälein hoitotoimenpiteen jälkeen. Terveydenhuollon yksikkö voi itse päättää kysymykset, joita potilailta kysytään.";
		infoTxt[14] = "Hoitajat saavat kuukausittain sähköpostin, jossa on liitteenä hoidonseurannan raportti, jossa verrataan  oman tiimin potilaita koko yksikköön.";
		//15D
		infoTxt[15] = "Potilaalle lähetään kyselylomake sähköpostilla tai kirjeitse. Hoitoyksikkö voi itse päättää, milloin kysely lähetetään..";
		infoTxt[16] = "Hoitajat saavat kuukausittain sähköpostin, jossa on liitteenä hoidonseurannan raportti, jossa verrataan  oman tiimin potilaita koko yksikköön.";
		infoTxt[17] = "";
		infoTxt[18] = "";
*/	
		return infoTxt[id];
	}
	else{
		return "";	
	}
}




function goToUrl(url) {
	location.href = url;
}
/*
function selectDeselect(formIndex) {
	formi = document.forms[formIndex];
	for(i=0;i<formi.elements.length;i++) {
		elementti = formi.elements[i];
		if(elementti.type=='checkbox')
		elementti.checked = (elementti.checked) ? false : true;
	}
}
*/

function selectDeselect(strObj) {
	var elements = document.getElementsByName(strObj);   
	
	for(i=0;i<elements.length;i++) {
		elementti = elements[i];
		if(elementti.type=='checkbox')
			elementti.checked = (elementti.checked) ? false : true;
	}
}