	var maxquestions = 32;	var currentscore;	var answered = 1;	function info(question,optiona,optionb,optionc,optiond,vala,valb,valc,vald)	{		this.question	= question;		this.optiona	= optiona;		this.optionb	= optionb;		this.optionc	= optionc;        	this.optiond    = optiond;		this.vala	= vala;		this.valb	= valb;		this.valc	= valc;        	this.vald       = vald;	}		var answer	= new Array(3);	var header	= new Array(3);	var question = new Array(maxquestions);	question[0] = new info ("I look for opportunities to create a good work-life balance."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[1] = new info ("I monitor my attitude , keep an open mind and think positively"							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[2] = new info ("I use helpful self-talk to achieve the goals that I set for myself."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[3] = new info ("I review the choices and decisions that will affect my work-life balance"							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[4] = new info ("I utilize my emotional intelligence to help me make changes."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[5] = new info ("I am flexible and can adapt to changes quickly."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[6] = new info ("I prioritize my loving relationships and put them at the centre of my life."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[7] = new info ("I spend rewarding quality time with my family and children."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[8] = new info ("I schedule a healthy amount of leisure time each week."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[9] = new info ("I clearly identify my key objectives before I take action."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[10] = new info ("I use a structured action plan to achieve my objectives."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[11] = new info ("I invest time and energy in communicating effectively with others."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[12] = new info ("I seek to understand other people's points  of view."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[13] = new info ("I try and find solutions that are best for everyone involved."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[14] = new info ("I have meetings with my team to generate new and creative solutions."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[15] = new info ("I am proactive about making changes for the better."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[16] = new info ("I identify the best working options that match my objectives"							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[17] = new info ("I avoid starting early, finishing late on the majority of work days."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[18] = new info ("I do not make a habit of taking work home to finish at night."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[19] = new info ("I rarely go into the office to work at weekends"							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[20] = new info ("I use my time away from work effectively and make themost of my leisure."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[21] = new info ("I take responsibility for my choices and actions."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[22] = new info ("I recognise that I am constantly learning and developing my skills."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[23] = new info ("I make time for the most important people in my life."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[24] = new info ("I know what I want to say yes to in my work and in my life."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[25] = new info ("I believe in my ability to achieve my goals and objectives."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[26] = new info ("I recognise my value to my organisation and my family."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[27] = new info ("I use stress as a trigger to make changes for the better."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[28] = new info ("I eat a healthy, well-balanced diet that consists mainly of fresh food."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[29] = new info ("I take exercise that refreshes and energises me."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[30] = new info ("I schedule plenty of time to relax and enjoy myself."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	question[31] = new info ("I celebrate the journey of my life and enjoy all my success."							,"never"							,"occasionally"							,"frequently"                                                        ,"always"							,1							,2							,3                                                        ,4);	answer[0] = "You are working too hard and need to examine your priorities. Implement the strategies in this book to try something new and improve your work-life balance.";	answer[1] = "To make changes for the better you need to know how, and you must want to. You are doing well, but allow yourself the chance to enjoy more balance still.";	answer[2] = "You are focused, well-motivated and have a clear direction. Remember:work-life balance is an ongoing process, so keep refining your skills";	header[0] = "Working too hard";	header[1] = "You are doing well";	header[2] = "YOu are well focused";	function WriteQuestion(questionnumber)	{		document.write(question[questionnumber].question);	}	function WriteOptionA(questionnumber)	{		document.write(question[questionnumber].optiona);	}	function WriteOptionB(questionnumber)	{		document.write(question[questionnumber].optionb);	}	function WriteOptionC(questionnumber)	{		document.write(question[questionnumber].optionc);	}        function WriteOptionD(questionnumber)	{		document.write(question[questionnumber].optiond);	}	function WriteQuestionNumber(questionnumber)	{		document.write(questionnumber + 1);	}	function CloseWindow()	{		window.close();	}	function MarkAsDone(currentquestion)	{		var progressarraystring = getCookie("progress");		var progressarray = progressarraystring.split(":");		progressarray[currentquestion] = 1;		progressarraystring = progressarray.join(":");		setCookie("progress",progressarraystring);	}	function InitialiseProgress()	{				var progressarray = new Array(maxquestions);		var i;		for ( i = 0; i < maxquestions; i++)		{			progressarray[i]  = 0;		}		var progressarraystring = progressarray.join(":");		setCookie("progress",progressarraystring);	}	function NextQuestion(currentquestion)	{		//alert("Question=" + currentquestion);		if ( currentquestion == 0 )		{			setCookie("c_score","0");		}		// first calculate score..		var score;		var button;			//score for multiple questions per page		button = eval("document.ANSWER.radiobutton" + currentquestion + "[0]");        	if ( button.checked == true )		{			//alert("radiobutton1.checked!");			answered = 1;			score = question[currentquestion].vala;		}		else   //option b		{			button = eval("document.ANSWER.radiobutton" + currentquestion + "[1]");        		if ( button.checked == true )			{				answered = 1;				score = question[currentquestion].valb;			}			else   //option c			{				button = eval("document.ANSWER.radiobutton" + currentquestion + "[2]");        			if ( button.checked == true )				{				answered = 1;				score = question[currentquestion].valc;				}				else   //option d				{					button = eval("document.ANSWER.radiobutton" + currentquestion + "[3]");        				if ( button.checked == true )					{					answered = 1;					score = question[currentquestion].vald;					}					else					{						answered = 0;					//	return	false;					}								} //end else d			} //end else c		}//end else b					/*		//old way of scoring for 1 questionper page		if ( document.ANSWER.elements[0].checked == true )		{			answered = 1;			score = question[currentquestion].vala;		}		else if ( document.ANSWER.elements[1].checked == true )		{			answered = 1;			score = question[currentquestion].valb;		}		else if ( document.ANSWER.elements[2].checked == true )		{			answered = 1;			score = question[currentquestion].valc;		}        		else if ( document.ANSWER.elements[3].checked == true )		{			answered = 1;			score = question[currentquestion].vald;		}		else		{			answered = 0;//			return	false;		}		*/				if ( answered == 1)		{		// get previous score from cookie called score...		var previous_score = parseInt(getCookie("c_score"));		//alert("previous score = " + previous_score);		// see if it has already been done.....		var progressarraystring = getCookie("progress");		var progressarray = progressarraystring.split(":");				//alert(progressarraystring);		score = parseInt(previous_score + score);		//alert("total score = " + score);		if ( progressarray[currentquestion] != 1)			setCookie("c_score",score);		MarkAsDone(currentquestion);		if (currentquestion ==  maxquestions - 1)			parent.location.href = "response.html";		else			{			if (currentquestion ==  7) {parent.location.href = "quiz_p2.html";}			if (currentquestion ==  15) {parent.location.href = "quiz_p3.html";}			if (currentquestion ==  23) {parent.location.href = "quiz_p4.html";}			}		}	}