function Question (qname,
type,
qstring,
response,
comment,
corrects,
explan,
score,
ifcorrect,ifwrong,ifnull,
img)
{this.qname=qname;
this.type=type;
this.qstring=qstring;
this.response=response;
this.comment=comment;
this.corrects=corrects;
this.explan=explan;
this.score=score;
this.ifcorrect=ifcorrect;
this.ifwrong=ifwrong;
this.ifnull=ifnull;
this.img=img;
}

var zin=1,top=0, mycount=0, waitTime=0, qright=0, mycomment;
var global=new Array(3);
var recent, recent2, recdone=false, opera7, opera=CheckOpera56();
function cachewrite(s,idx){global[idx]+=s;}
function CheckOpera56()
{
var version;
if (navigator.userAgent.toLowerCase().indexOf('opera') == -1) return false;
version=parseInt(navigator.appVersion.toLowerCase());
if (version>6) {opera7=true; return false;}
if (version<5) return false;
return true;
}
resp=new Array("decreasing liver metabolism of infectious byproducts.","impairing phagocytosis.","inhibiting the growth of microorganisms.","suppressing the stimulation of the immune response.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest001 = new Question(
"Question 1",
0,
"Hyperglycemia interferes with the resolution of infections by:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("direct the parent to encourage the child to complete the tasks independently.","instruct the child to keep a blood glucose log to identify patterns.","prepare the child to give one injection per day with the parent's supervision.","teach the child to adjust insulin doses without assistance.")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest002 = new Question(
"Question 2",
0,
"A seven-year-old child with type 1 diabetes, who is being treated with insulin injections, returns with a parent for a followup evaluation. The parent reports that the child does not assist with any treatment tasks. The advanced diabetes clinician's next action is to:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("72-hour fecal fat collection.","colonoscopy.","stool sample.","transglutaminase autoantibody test.")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest003 = new Question(
"Question 3",
0,
"A healthy adolescent with a two-year history of type 1 diabetes returns for a quarterly appointment. For the past month, the patient has experienced abdominal pain and diarrhea after some high carbohydrate meals. An advanced diabetes clinician's first intervention is to order a:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Ankle-brachial index","Electromyography of the lower extremities","Lumbosacral spine x-ray","Venous dopplers of the lower extremities")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest004 = new Question(
"Question 4",
0,
"After implementing a walking program, a male patient with type 2 diabetes comes to the clinic to review blood glucose readings. The patient reports a cramping pain while he walks, which limits his ability to increase the walking distance. The patient denies swelling or warmth in either calf. What diagnostic test does the advanced diabetes clinician recommend?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("A 19-year-old African-American patient with normal body weight","A 24-year-old Caucasian patient with normal body weight","A 26-year-old Pacific Islander patient who is obese and has no family history of diabetes","A 35-year-old Hispanic patient who had a previous negative screening at 15 weeks")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest005 = new Question(
"Question 5",
0,
"According to the American Diabetes Association's recommendations for screening for gestational diabetes, which female patient can forgo the 50-g glucose screening test procedure for women who are 24 - to 28-weeks' pregnant?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("compensatory responses to respiratory acidosis.","increased glomerular filtration rate and function.","increased osmolality related to hyperglycemia and hypernatremia.","osmotic conservation leading to cellular fluid overload.")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest006 = new Question(
"Question 6",
0,
"A 75-year-old patient with type 2 diabetes is admitted to the hospital with an acute myocardial infarction. In addition to elevated cardiac enzyme studies, the patient's blood glucose level is 750 mg/dL; the sodium level is 148 mEq/L; and the serum HCO3 level is 9 mEq/L with normal plasma ketones. The patient's level of consciousness is deteriorating, and the physical examination reveals that the patient has decreased skin turgor and dry mucus membranes. This clinical picture results from:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Headaches upon awakening","Increased mid-morning hunger","Nocturnal polyuria","Unplanned weight loss")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest007 = new Question(
"Question 7",
0,
"A 34-year-old male patient with a body mass index of 36 has been treated for type 2 diabetes for two years. His wife reports that he snores while sleeping. Which symptom supports the presence of obstructive sleep apnea?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Atorvastatin (Lipitor)","Ezetimibe (Zetia)","Gemfibrozil (Lopid)","Metformin (Glucophage)")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest008 = new Question(
"Question 8",
0,
"The laboratory values for a 55-year-old male patient with new onset type 2 diabetes are an A1C level of 7.3%; a fasting blood glucose of 157 mg/dL; a high-density lipoprotein of 37 mg/dL; a low-density lipoprotein of 112 mg/dL; and triglycerides of 246 mg/dL. Which medication provides the greatest metabolic benefits?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("clamp the tubing.","disconnect the infusion set.","press the &quot;stop&quot; button.","program the basal rate to zero.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest009 = new Question(
"Question 9",
0,
"An advanced diabetes clinician plans to train a school nurse to manage a child's insulin pump therapy. To stop the insulin infusion during an emergency, the clinician recommends that the school nurse:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("adding 2 units of Humalog before breakfast.","adding 4 units of Humalog before dinner.","adding 2 units of Humalog before lunch.","decreasing the evening NPH insulin by 2 units.")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest010 = new Question(
"Question 10",
0,
"A 40-year-old female patient has a 10-year history of diabetes. The patient injects 16 units of NPH insulin and 8 units of insulin lispro (Humalog) before breakfast, and 8 units of NPH, and 4 units of insulin lispro (Humalog) before dinner. The patient's glucose pattern is: fasting blood glucose is 100 mg/dL; pre-lunch is 240 mg/dL; pre-dinner is 210 mg/dL; and bedtime is 150 mg/dL. The advanced diabetes clinician recommends:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Duloxetine (Cymbalta)","Paroxetine (Paxil)","Phenytoin (Dilantin)","Venlafaxine (Effexor)")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest011 = new Question(
"Question 11",
0,
"Which medication has been approved by the Food and Drug Administration for managing neuropathic pain in patients with diabetes?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("ingest calcium 1000 mg daily without vitamin D.","ingest calcium-fortified food products.","decrease the patient's use of sunscreen.","take vitamin D 400 IU daily.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest012 = new Question(
"Question 12",
0,
"A 15-year-old female patient with type 1 diabetes rarely consumes milk products. The patient's mother wants the patient to begin calcium supplementation. The advanced diabetes clinician's recommendation is to:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("25%","30% to 40%","50% to 75%","80%")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest013 = new Question(
"Question 13",
0,
"To achieve moderate exercise intensity for a person with hypertension and diabetes, the level of exercise is targeted at 60% to 80% of maximum heart rate. This level corresponds to what percent of maximum oxygen consumption?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("a growth spurt.","hormonal variability.","insulin manipulation.","sports training.")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest014 = new Question(
"Question 14",
0,
"In adolescent female patient with type 1 diabetes arrives at the clinic with her mother. The patient has lost 20 lb (9.09 kg) in the last month, despite reported normal blood glucose values. The advanced diabetes clinician suspects:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Changing to insulin injections the day before the procedure","Disconnecting the pump immediately prior to the procedure","Infusing the pump at its normal basal rates during the procedure","Requesting that the dental staff check the blood glucose levels every 10 minutes during the procedure")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest015 = new Question(
"Question 15",
0,
"A 22-year-old patient, who has type 1 diabetes and is on an insulin pump, is scheduled for an outpatient wisdom tooth extraction in three days. Which is the most appropriate plan?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("administering pre- and posttests.","creating an environment in which the learner is an active participant.","delivering content using a standardized slide presentation.","insisting upon full participation.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest016 = new Question(
"Question 16",
0,
"An advanced diabetes clinician best facilitates the learning process for adults by:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("add glyburide (Micronase).","add metformin (Glucophage).","increase the Januvia dose.","reduce the Januvia dose.")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest017 = new Question(
"Question 17",
0,
"An 84-year-old patient with class 2 New York heart failure was diagnosed with type 2 diabetes and started sitagliptin (Januvia) 50 mg daily one month ago. The patient's current A1C level is 7.1% and creatinine clearance is 28 mL/min. The advanced diabetes clinician's recommendation is to:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("A1C value and urine protein.","serum calcium and vitamin D.","serum creatinine and potassium levels.","serum uric acid and total cholesterol.")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest018 = new Question(
"Question 18",
0,
"A patient with type 2 diabetes recently began taking an angiotensin-converting enzyme inhibitor. Routine monitoring for this medication includes checking the patient's:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("increasing the Micronase dose to 20 mg.","initiating basal-bolus insulin therapy.","monitoring the results of daily fetal movement.","rechecking the A1C level in eight to 10 weeks.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest019 = new Question(
"Question 19",
0,
"A female patient in her 20th week of pregnancy is taking glyburide (Micronase) 10 mg daily. Her preconception A1C level was 6.8% and her current A1C level is 7.4%. For the past two weeks, the patient's blood glucose readings have been between 120 mg/dL and 140 mg/dL fasting and 120 mg/dL and 150 mg/dL one hour postprandial. The advanced diabetes clinician recommends:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("discontinuing the prednisone.","increasing the Amaryl dose.","initiating insulin therapy.","rechecking the A1C level at the next visit.")
corr=new Array("0","0","1","0")
comm=""
valu=""
quest020 = new Question(
"Question 20",
0,
"A 54-year-old male patient with type 2 diabetes and asthma is obese. He has been taking glimepiride (Amaryl) 6 mg daily for a year and prednisone 15 mg daily for two weeks. The patient's fasting and postprandial blood glucose levels have increased by 70 mg/dL to 100 mg/dL since initiating prednisone. The advanced diabetes clinician's most appropriate action is to recommend:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("individuals with a high-density lipoprotein level of 52 mg/dL.","individuals with a history of Addison disease.","offspring of a parent with type 1 diabetes.","women with polycystic ovarian syndrome.")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest021 = new Question(
"Question 21",
0,
"Current recommendations for screening for diabetes and pre-diabetes in asymptomatic young adults include:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("&quot;A diet containing 500 mg of daily calcium does not decrease the incidence of postmenopausal osteoporosis.&quot;","&quot;Can oral contraceptives enhance human sexuality?&quot;","&quot;Increasing exercise by 30 minutes a day will result in a 20% decline in the use of artificial sweeteners.&quot;","&quot;Which method of delivery of diabetes education is more effective, online or classroom-based?&quot;")
corr=new Array("1","0","0","0")
comm=""
valu=""
quest022 = new Question(
"Question 22",
0,
"Which research problem is phrased as a null hypothesis that leads to the most accurate study results?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("The confounding variable is the educational interaction.","The dependent variable is patient anxiety score.","The discrete variable is hospitalization status.","The independent variable is the patient anxiety score.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest023 = new Question(
"Question 23",
0,
"An advanced diabetes clinician designs a study to examine how a structured diabetes educational interaction affects hospitalized patients' scores on a validated anxiety scale. What statement about the variables in this study is accurate?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("instructing a group of patients in the use of new blood glucose meters.","participating in a partnership project with the state diabetes control program.","performing foot screenings using monofilaments.","providing discharge teaching to a family.")
corr=new Array("0","1","0","0")
comm=""
valu=""
quest024 = new Question(
"Question 24",
0,
"An advanced diabetes clinician best fulfills the advanced practice role by:",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

resp=new Array("Part A","Part B","Part C","Part D")
corr=new Array("0","0","0","1")
comm=""
valu=""
quest025 = new Question(
"Question 25",
0,
"A 65-year-old patient, whose employer-funded insurance was recently discontinued, is prescribed several medications. What Medicare resource can assist this patient with prescription medication coverage?",
resp,
comm,
corr,
"",
valu,
1,
0,
0,
"");

questions = new Array (
quest001,quest002,quest003,quest004,quest005,quest006,quest007,quest008,quest009,quest010,quest011,quest012,quest013,quest014,quest015,quest016,quest017,quest018,quest019,quest020,quest021,quest022,quest023,quest024,quest025)

function doQuestion(quest)
{
var numdo;
var numord=eval(quest+1);
var i=-1, ii, type, myname, gadget;
type=questions[quest].type;
numdo=type>=3?1:questions[quest].response.length;


document.writeln ("<a name=\""+questions[quest].qname+"\"></a>")
document.write("\n")
document.write("       ")
if (questions[quest].img!="") {
document.write("\n")
document.write("          <p><img border=\"0\" src=\"")
document.write(questions[quest].img)
document.write("\"></p>\n")
document.write("       ")
}
document.write("\n")
document.write("       <p><small><font face=\"Verdana,Arial\">")
document.write(numord)
document.write(". ")
document.writeln(questions[quest].qstring)
document.write("</font></small></p>\n")
document.write("       ")
for (i=0; i<numdo; i++) {
myname=questions[quest].qname;
gadget="radio";
if (type>=3) gadget="text";
else if (type==1) {
myname+="_"+(i<9?"0":"")+(i+1);
gadget="checkbox";}
document.write("\n")
document.write("          ")
document.write(type==7?"<textarea name=\""+myname+"\" rows=5 cols=30 class=\"input\">":" <input type="+gadget+" name=\""+myname);
if (type<3) document.write("\" value=\""+i+"\">\n")
else document.write(type==7?"</textarea>":"\" class=\"input\" value=\"\">\n")
document.write(" <small><font face=\"Verdana,Arial\">")
if (type<3) document.write(questions[quest].response[i]);
document.write("</font></small><br>\n")
document.write("       ")
}
document.write("\n")
document.write("    ")
}
function doTest() {
var count, i;

count=questions.length;
for (i=0; i<count; i++) doQuestion(i);
}
function fill(s,l){
s=s+""
for (y=1;y<=l;y++)
if (s.length>=l) break; else s="0"+s;
return s
}
function CheckQName(wapf,ii,i,multi,selection){
var len;
if (!multi) return(wapf.elements[ii].name==questions[i].qname);
len=questions[i].qname.length;
if (wapf.elements[ii].name.substring(0,len)!=questions[i].qname) return false;
if (wapf.elements[ii].name.substring(len,len+1)!="_") return false;
if (eval(wapf.elements[ii].name.substring(len+1,len+3))==(selection+1)) return true;
return false;
}
function errore(uno,due,tre)
{
if (!errori) global[1]="<H3>You have made the following errors</H3>";
++errori;
cachewrite("<p><b>"+uno+"</b><br>"+due+"<br>"+mycomment+tre+"</p>",2);
mycomment="";
}
function testIE5plus(){
var pos=navigator.appVersion.lastIndexOf('MSIE ');
if (pos != -1) {
pos+=5;
if (eval(navigator.appVersion.charAt(pos))>4)
return true;}
return false;}
function correct(wapf)
{
var i, ii, t, re, tmp, selection, multi, multipage=0, type, isnull, iswrong, iscorrect, evaluation=0, total=0, udat;
errori=waitTime=0;
udat=new Array();
for (i=0, ii=0; i<wapf.elements.length; i++)
{tmp=wapf.elements[i];
if (tmp.name.substring(0,13)=="Quiz.UserData"){
t=tmp.name.substring(14,tmp.name.length);
re=new RegExp("_", "g");
t=t.replace(re," ");
udat[ii++]=t+": <i>"+tmp.value+"</i><br>";
if (opera) tmp.value="";}}
global[0]=global[2]="";
global[1]="<h3>Congratulations, you haven't made any errors</h3>";
cachewrite("<html><head><title>Results</title><BASE target='_blank'></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
now= new Date()
cachewrite("<small><p>"+fill((now.getMonth()+1),2)+"/"+fill(now.getDate(),2)+"/"+now.getYear()+"&nbsp;&nbsp;"+fill(now.getHours(),2)+":"+fill(now.getMinutes(),2)+"</p>",0)
cachewrite("<b>Advanced Diabetes Management</b><br><br>\n",0);
if (udat.length>0) {
cachewrite("<b>Information</b><br>\n",0);
for (i=0; i<udat.length; i++) cachewrite(udat[i],0);}
if (opera7 && multipage) {
for (i=0; i<questions.length; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.display=id2.style.display="block";}}

for (i=0; i<questions.length; i++) {
if (opera && multipage) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
id.style.visibility=id2.style.visibility="visible";}
type=questions[i].type;
if (type==1) multi=1;
else multi=0;
isnull=true;
iscorrect=false;iswrong=false;
selection=0;
evaluation=0;
mycomment="";
for (ii=0; ii<wapf.elements.length; ii++) {
if (CheckQName(wapf,ii,i,multi,selection)) {
if (type>=3 && wapf.elements[ii].value!="") {
isnull=false;
if (wapf.elements[ii].value.toLowerCase()==questions[i].corrects.toLowerCase()) iscorrect=true;
else iswrong=true;
++selection;}
else if (wapf.elements[ii].checked) {
if (questions[i].score!="") evaluation+=questions[i].score[selection];
if (isnull) isnull=false;
if (questions[i].corrects[selection]=="1") iscorrect=(iswrong==false)?true:false;
else {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  shouldn't have been selected.",questions[i].explan)
}
if (questions[i].comment!="" && questions[i].comment[selection]!="")
mycomment+=((iscorrect || questions[i].corrects=='')?"<b>"+questions[i].qname+"</b><br>":"")+"<small>"+questions[i].comment[selection]+"</small><br>";
} else {
if (questions[i].corrects[selection]=="1") {
iswrong=true;
if (multi && questions[i].corrects!='') errore(questions[i].qname,"The checkbox  <i>"+questions[i].response[selection]+"</i>  should have been selected.",questions[i].explan);
}}
++selection;
}}
if (multi==false && (isnull || iswrong)) {
var okresp="", z;
if (type>=3) okresp=questions[i].corrects;
else {
for (z=0; z<questions[i].corrects.length; z++) {
if (questions[i].corrects[z]==1) {
okresp=questions[i].response[z];
break;
}}}
if (okresp!="") errore(questions[i].qname,"The right answer was <i>"+okresp+".</i>",questions[i].explan);
}
if (mycomment!="") cachewrite(mycomment,2);
if (questions[i].corrects!="") ++qright;
if (isnull) evaluation+=questions[i].ifnull;
else if (iswrong) evaluation+=questions[i].ifwrong;
else if (iscorrect) evaluation+=questions[i].ifcorrect;
total+=evaluation;}
if (qright==0) global[1]="<br>";
if (errori) cachewrite("<br><b>You have made "+errori+" "+(errori==1?"error":"errors")+".</b>",2);
cachewrite("<br><b>Total score: "+total+".</b><br>",2);

cachewrite("</small><hr noshade><center><form>",2)
printest=(((navigator.appName=="Netscape") && (navigator.appVersion.charAt(0)>="4")) || (testIE5plus() == true))? "print()": "alert('This button can be used with Netscape Navigator 4 or Microsoft Internet Explorer 5 only. If you want to print with other browsers, please select the Print command in the File menu.')"
cachewrite("<input type='button' value='Print...' onClick='"+printest+"'>&nbsp;&nbsp;&nbsp;&nbsp;",2)
cachewrite("<input type='button' value='Close' onClick='window.close()'></form></center>",2)
cachewrite(aknw,2)
winr=window.open('','wapres', 'titlebar=1,location=0,directories=0,menubar=1,toolbar=0,scrollbars=1,resizable=1,status=1')
for (i=0; i<3; i++) winr.document.write(global[i]);winr.document.close()
if ((opera || opera7) && multipage) {
document.forms[0].elements[0].value='Print...';
document.forms[0].elements[1].value='Close';
for (i=0; i<questions.length-1; i++) {
id=document.getElementById("q"+(i+1));
id2=document.getElementById("q"+(i+1)+"a");
opera?id.style.visibility=id2.style.visibility="hidden":id.style.display=id2.style.display="none";}}
}
aknw="<br><p align='center'><small><small>Created and managed with <a title='Click here to visit WebQuiz site' href='http://www.smartlite.it/go.asp?OLDLP' target = '_blank'>SmartLite WebQuiz</a></small></small></p>"
