// JavaScript Document

var xx = "no";
var Q1_rdBtn = "";
var Q2_rdBtn = "";
var Q3_rdBtn = "";
var Q4_rdBtn = "";
var Q6_chkbox = "";
var Q7_chkbox = "";
/*
var Q8_txtBx1 = "";
var Q8_txtBx2 = "";
var Q8_1_rdBtn = "";
var Q8_2_rdBtn = "";
*/

function display_answers(){
var temp = "";
if (xx == "no"){
	document.getElementById('content_text').innerHTML = "<p>These steps may help your doctor better understand what you're feeling and the kind of pain you are having.</p><p>Use This Questionnaire to Make the Most Out of Your Next Visit.</p><p><a href='javascript:send_to_printer()'>Print out your results</a>. (Print-Friendly Version)</p><p><a href='main_single_sign_up.aspx'>Click here</a> to request your FREE Information Kit. A copy of this helpful pain discussion guide is included!</p> <p><a href='fibromyalgia_about_lyrica.aspx'>Next: About LYRICA</a> </p>";

	document.getElementById('Q1_options').style.display = "none";
	document.getElementById('Q1_rdBtn').innerHTML = Q1_rdBtn;
	document.getElementById('Q1_rdBtn').style.display = "block";
	
	document.getElementById('Q2_options').style.display = "none";
	document.getElementById('Q2_rdBtn').innerHTML = Q2_rdBtn;
	document.getElementById('Q2_rdBtn').style.display = "block";
	
	document.getElementById('Q3_options').style.display = "none";
	document.getElementById('Q3_rdBtn').innerHTML = Q3_rdBtn;
	document.getElementById('Q3_rdBtn').style.display = "block";
	
	document.getElementById('Q4_options').style.display = "none";
	document.getElementById('Q4_rdBtn').innerHTML = Q4_rdBtn;
	document.getElementById('Q4_rdBtn').style.display = "block";
	
	document.getElementById('Q6_options').style.display = "none";
	var	temp1 = "";
	for (var i=0; i<6; i++) { 
		if (document.getElementById("Q6_" + i).checked == true)
		{
			temp1 = temp1 + document.getElementById("Q6_" + i).value + "<br/>";
		}
	}
	document.getElementById('Q6_chkbox').innerHTML = temp1;
	document.getElementById('Q6_chkbox').style.display = "block";
	
	document.getElementById('Q7_options').style.display = "none";
	var	temp2 = "";
	for (var j=0; j<3; j++) { 
		if (document.getElementById("Q7_" + j).checked == true)
		{
			temp2 = temp2 + document.getElementById("Q7_" + j).value + "<br/>";
		}
	}
	
	document.getElementById('Q7_chkbox').innerHTML = temp2;
	document.getElementById('Q7_chkbox').style.display = "block";
		/*
	document.getElementById('Q8_options_1').style.display = "none";
	document.getElementById('Q8_divBx1').innerHTML = document.sform.Q8_txtBx1.value;
	document.getElementById('Q8_divBx1').style.display = "block";
	
	document.getElementById('Q8_options_2').style.display = "none";
	document.getElementById('Q8_1_rdBtn').innerHTML = Q8_1_rdBtn;
	document.getElementById('Q8_1_rdBtn').style.display = "block";
   
	document.getElementById('Q8_options_3').style.display = "none";
	document.getElementById('Q8_divBx2').innerHTML = document.sform.Q8_txtBx2.value;
	document.getElementById('Q8_divBx2').style.display = "block";

	document.getElementById('Q8_options_4').style.display = "none";
	document.getElementById('Q8_2_rdBtn').innerHTML = Q8_2_rdBtn;
	document.getElementById('Q8_2_rdBtn').style.display = "block";
	*/
	document.getElementById('pre_print_btn').style.display = "none";
	

	xx = "yes";
}
	

	flush_vars ();
}

function send_to_printer(){
	
	//document.getElementById('colNav').style.display = "none";
	//document.getElementById('colShade').style.display = "none";
	//document.getElementById('leftNarCol').style.display = "none";
	//document.getElementById('rightNarCol').style.display = "none";
	//document.getElementById('search').style.display = "none";	
	//_hbPageView ('Pain Results Printed', '/lyrica/MyFibroRelief/');
	window.print();
}

function back_to_normal(){
	document.getElementById('print_area').style.display = "none";
	document.getElementById('sub_page_shell').style.display = "block";
	document.getElementById('pre_print_btn').style.display = "block";
	//document.getElementById('tell_a_friend_link').style.display = "block";
	document.getElementById('print_btn').style.display = "none";
	document.location = "#top";
}

function flush_vars (){
	Q1_rdBtn = "";
	Q2_rdBtn = "";
	Q3_rdBtn = "";
	Q4_rdBtn = "";
	Q6_chkbox = "";
	Q7_chkbox = "";
	/*
	Q8_txtBx1 = "";
	Q8_txtBx2 = "";
	Q8_1_rdBtn = "";
	Q8_2_rdBtn = "";
	*/
}

document.write("<form name='sform'>");
document.write("<div id='print_btn' style='display:none;height:20px'>");
	document.write("<div style='float:left'><p><a href='javascript:send_to_printer()'>Print</a></p></div>");
	document.write("<div style='float:right'><p><a href='javascript:back_to_normal()'>Back</a></p></div>");
document.write("</div>");
document.write("<ol>");

document.write("<li style='font-weight:bold'>");
document.write("Have you been suffering from your pain for 3 months or more?<br/>");
	document.write("<div id='Q1_options' style='display:block'>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q1' value='Yes' onclick=\"window.Q1_rdBtn='Yes'\" />&nbsp;&nbsp;Yes <br/></div>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q1' value='No' onclick=\"window.Q1_rdBtn='No'\" />&nbsp;&nbsp;No <br/></div>");
	document.write("</div>");
	document.write("<div id='Q1_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold'>");
	document.write("Do you feel pain on both sides of the body?<br/>");
	document.write("<div id='Q2_options' style='display:block'>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q2' value='Yes' onclick=\"window.Q2_rdBtn='Yes'\" />&nbsp;&nbsp;Yes <br/></div>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q2' value='No' onclick=\"window.Q2_rdBtn='No'\" />&nbsp;&nbsp;No <br/></div>");
	document.write("</div>");
	document.write("<div id='Q2_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold'>");
	document.write("Do you feel pain both above and below the waist?<br/>");
	document.write("<div id='Q3_options' style='display:block'>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q3' value='Yes' onclick=\"window.Q3_rdBtn='Yes'\" />&nbsp;&nbsp;Yes <br/></div>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q3' value='No' onclick=\"window.Q3_rdBtn='No'\" />&nbsp;&nbsp;No <br/></div>");
	document.write("</div>");
	document.write("<div id='Q3_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold'>");
	document.write("In the last week, how many days have pain and fatigue interfered with your daily living?<br/>");
	document.write("<div id='Q4_options' style='display:block'>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;1 <br/><input type='radio' name='Q4' value='1' onclick=\"window.Q4_rdBtn='1'\" /></div>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;2 <br/><input type='radio' name='Q4' value='2' onclick=\"window.Q4_rdBtn='2'\" /></div>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;3 <br/><input type='radio' name='Q4' value='3' onclick=\"window.Q4_rdBtn='3'\" /></div>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;4 <br/><input type='radio' name='Q4' value='4' onclick=\"window.Q4_rdBtn='4'\" /></div>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;5 <br/><input type='radio' name='Q4' value='5' onclick=\"window.Q4_rdBtn='5'\" /></div>");
		document.write("<div style='float:left;font-weight:normal'>&nbsp;&nbsp;6 <br/><input type='radio' name='Q4' value='6' onclick=\"window.Q4_rdBtn='6'\" /></div>");
		document.write("<div style='font-weight:normal'>&nbsp;&nbsp;7 <br/><input type='radio' name='Q4' value='7' onclick=\"window.Q4_rdBtn='7'\" /><br/></div>");
	document.write("</div>");
	document.write("<div id='Q4_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold;'>");
	document.write("Circle the areas of your body where you feel pain. (You can draw the circles after you have printed out your completed questionnaire.)<br/>");
	document.write("<img src='images/human_figure_points.gif' border='0' align='center'/>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold'>");
	document.write("In the last 4 weeks, has your pain interfered with the ability to do any of the following things? (Check all that apply.)<br/>");
	document.write("<div id='Q6_options' style='display:block'>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_0' name='Q6' value='Sleep' onclick=\"window.Q6_chkbox='Sleep'\" />&nbsp;&nbsp;Sleep <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_1' name='Q6' value='Concentrate' onclick=\"window.Q6_chkbox='Concentrate'\" />&nbsp;&nbsp;Concentrate <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_2' name='Q6' value='Work' onclick=\"window.Q6_chkbox='3'\" />&nbsp;&nbsp;Work <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_3' name='Q6' value='Take care of my family' onclick=\"window.Q6_chkbox='Work'\" />&nbsp;&nbsp;Take care of my family <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_4' name='Q6' value='See friends' onclick=\"window.Q6_chkbox='See friends'\" />&nbsp;&nbsp;See friends <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q6_5' name='Q6' value='Finish household chores' onclick=\"window.Q6_chkbox='Finish household chores'\" />&nbsp;&nbsp;Finish household chores <br/></div>");

	document.write("</div>");
	document.write("<div id='Q6_chkbox' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");

document.write("<li style='font-weight:bold'>");
	document.write("Is your pain accompanied by any of the following? (Check all that apply)<br/>");
		document.write("<div id='Q7_options' style='display:block'>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q7_0' name='Q7' value='Muscle tenderness' onclick=\"window.Q7_chkbox='Muscle tenderness'\" />&nbsp;&nbsp;Muscle tenderness <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q7_1' name='Q7' value='Flu-like aching' onclick=\"window.Q7_chkbox='Flu-like aching'\" />&nbsp;&nbsp;Flu-like aching <br/></div>");
		document.write("<div style='font-weight:normal'><input type='checkbox' id='Q7_2' name='Q7' value='Dull pain in tendons and ligaments' onclick=\"window.Q7_chkbox='Dull pain in tendons and ligaments'\" />&nbsp;&nbsp;Dull pain in tendons and ligaments <br/></div>");
	document.write("</div>");
	document.write("<div id='Q7_chkbox' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");
/*
document.write("<li style='font-weight:bold'>");
	document.write("What prescription medicines have you tried? (Please write in medicine names below. And rate relief for each one.) <br/>");
	
	document.write("<div style='font-weight:normal'> 0 = no relief&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 = some relief<br/></div>");
	document.write("<div style='font-weight:normal'> 1 = little relief&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 = good relief<br/><br/></div>");
	
	document.write("<div style='font-weight:normal'>Prescription</div>");
	document.write("<div id='Q8_options_1' style='display:block'>");	
		document.write("<div style='font-weight:normal'><input type='text' maxlength='40' size='40' name='Q8_txtBx1' value=''></div>");
	document.write("</div>");	
	document.write("<div id='Q8_divBx1' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
 	
	document.write("<div style='font-weight:normal'>Rate relief (0 to 3)<br/><br/></div>");
	document.write("<div id='Q8_options_2' style='display:block'>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_1' value='0' onclick=\"window.Q8_1_rdBtn='0'\" />&nbsp;&nbsp;0 <br/></div>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_1' value='1' onclick=\"window.Q8_1_rdBtn='1'\" />&nbsp;&nbsp;1 <br/></div>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_1' value='2' onclick=\"window.Q8_1_rdBtn='2'\" />&nbsp;&nbsp;2 <br/></div>");
		document.write("<div style='font-weight:normal'><input type='radio' name='Q8_1' value='3' onclick=\"window.Q8_1_rdBtn='3'\" />&nbsp;&nbsp;3 <br/><br/></div>");
	document.write("</div>");	
	document.write("<div id='Q8_1_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
	
	document.write("<div style='font-weight:normal'>Prescription</div>");
	document.write("<div id='Q8_options_3' style='display:block'>");	
		document.write("<div style='font-weight:normal'><input type='text' maxlength='40' size='40' name='Q8_txtBx2' value=''></div>");
	document.write("</div>");	
	document.write("<div id='Q8_divBx2' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");

	document.write("<div style='font-weight:normal'>Rate relief (0 to 3)<br/><br/></div>");
	document.write("<div id='Q8_options_4' style='display:block'>");	
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_2' value='0' onclick=\"window.Q8_2_rdBtn='0'\" />&nbsp;&nbsp;0 </div>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_2' value='1' onclick=\"window.Q8_2_rdBtn='1'\" />&nbsp;&nbsp;1 </div>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_2' value='2' onclick=\"window.Q8_2_rdBtn='2'\" />&nbsp;&nbsp;2 </div>");
		document.write("<div style='float: left;font-weight:normal'><input type='radio' name='Q8_2' value='3' onclick=\"window.Q8_2_rdBtn='3'\" />&nbsp;&nbsp;3 </div>");
	document.write("</div>");			
	document.write("<div id='Q8_2_rdBtn' style='display:none'></div>");
	document.write("<div class='xclear'>&nbsp;</div>");
document.write("</li>");
*/
document.write("</ol>");

document.write("<div id='pre_print_btn' style='display:block;width:430px;height:30px;'>");
	document.write("<div style='float:left'><input type='button' name='Submit' value='Submit' onclick=\"display_answers()\" /></div>");
	document.write("<div style='float:right'><input type='button' name='reset' value='Cancel' onclick=\"document.location='fibromyalgia_questionnaire.aspx'\" /></div>");
document.write("</div>");
document.write("</form>");