












































//cgi ldsjfjlk lkdf3989 0980f0s9 poj098098 08 0980980909 098090909sd8pfkeo09 0980980990809 0
































































































//cgi update 7/12/00 David F. McAuley
//You have reached a copyrighted area. You must obtain
//permission from GlobalRPH.com for personal/commercial use.

//Copyright 1999,2000, 2001
















































function warf(form){

//***validation statements below
// var wtmag=form.wtmag.value;
// if((wtmag==null)||(wtmag=="")||(isNaN(wtmag))){
// alert('Please enter a value for \"Weight\" or use numbers only');
// form.wtmag.focus();
// form.wtmag.select();
//return false
//}

//*****end of validation********



var inr=eval(form.inr.value);
if((form.agegroup.selectedIndex==0)&&(form.dayther.selectedIndex==0)){
var level="Give 10 mg tonight x 1";
}

if((form.dayther.selectedIndex==0)&&(inr>1.5)){
alert('Is this the first day of therapy?');
}

if((form.dayther.selectedIndex!=0)&&(inr<1)){
alert('You must enter the current INR....');
}



if((form.agegroup.selectedIndex==1)&&(form.dayther.selectedIndex==0)){
var level="Give 5 mg tonight x 1. Lower initial doses are indicated in the elderly because of the increased likelihood of bleeding (as age increases, the sensitivity to warfarin also increases.) Lower initial doses (5 mg) are also indicated in CHF, impaired hepatic function, or hypermetabolic states which usually produces lower levels of coagulation factors and therefore increased sensitivity to warfarin.";
}

if((form.dayther.selectedIndex==1)&&(inr<1.8)){
var level="Give 10 mg tonight x 1";
}

if((form.dayther.selectedIndex==1)&&(inr<1.8)&&(form.agegroup.selectedIndex==1)){
var level="Give 5 mg tonight x 1";
}



if((form.dayther.selectedIndex==1)&&(inr==1.8)){
var level="Give 1 mg tonight x 1";
}

if((form.dayther.selectedIndex==1)&&(inr>1.8)){
var level="Give 0.5 mg tonight x 1";
}


if((form.dayther.selectedIndex==2)&&(inr<2)){
var level="Give 10 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2)){
var level="Give 5 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2.1)){
var level="Give 5 mg tonight";
}






if((form.dayther.selectedIndex==2)&&(inr==2.2)){
var level="Give 4.5 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2.3)){
var level="Give 4.5 mg tonight";
}



if((form.dayther.selectedIndex==2)&&(inr==2.5)){
var level="Give 4 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2.4)){
var level="Give 4 mg tonight";
}


if((form.dayther.selectedIndex==2)&&(inr==2.6)){
var level="Give 3.5 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2.7)){
var level="Give 3.5 mg tonight";
}



if((form.dayther.selectedIndex==2)&&(inr==2.8)){
var level="Give 3 mg tonight";
}

if((form.dayther.selectedIndex==2)&&(inr==2.9)){
var level="Give 3 mg tonight";
}




if((form.dayther.selectedIndex==2)&&(inr>=3)){
var level="Omit tonight's dose. Obtain INR in 24 hours. After 24 hours enter the INR and select day#4 from the drop down list.";
}


if((form.dayther.selectedIndex==3)&&(inr<1.4)){
var level="Give 8-10 mg tonight";
}
if((form.dayther.selectedIndex==3)&&(inr==1.4)){
var level="Give 8 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==1.5)){
var level="Give 7.5 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==1.6)){
var level="Give 7 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==1.7)){
var level="Give 7 mg tonight";
}




if((form.dayther.selectedIndex==3)&&(inr==1.8)){
var level="Give 6.5 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==1.9)){
var level="Give 6 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==2)){
var level="Give 5.5 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==2.1)){
var level="Give 5.5 mg tonight";
}




if((form.dayther.selectedIndex==3)&&(inr==2.2)){
var level="Give 5 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==2.3)){
var level="Give 5 mg tonight";
}




if((form.dayther.selectedIndex==3)&&(inr==2.4)){
var level="Give 4.5 mg tonight";
}
if((form.dayther.selectedIndex==3)&&(inr==2.5)){
var level="Give 4.5 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr==2.6)){
var level="Give 4.5 mg tonight";
}




if((form.dayther.selectedIndex==3)&&(inr>=2.7)&&(inr<=3.0)){
var level="Give 4 mg tonight";
}

if((form.dayther.selectedIndex==3)&&(inr>=3.1)&&(inr<=3.5)){
var level="Omit tonights dose, and give 3.5 mg tomorrow.";
}

if((form.dayther.selectedIndex==3)&&(inr>=3.6)&&(inr<=4)){
var level="Omit tonights dose, and give 3 mg tomorrow.";
}

if((form.dayther.selectedIndex==3)&&(inr>=4.1)&&(inr<=4.5)){
var level="Omit tonights dose, and give 2 mg tomorrow.";
}

if((form.dayther.selectedIndex==3)&&(inr>4.5)){
var level="Omit the 2 day's doses, then give 1 mg";
}



form.comment.value=level;


//end of function
}




function warfcom(form){

if(form.warinfo.selectedIndex==0){
var warfinfo="Select a topic from the drop down menu.";
}

if(form.warinfo.selectedIndex==1){
var warfinfo="Warfarin inhibits the vitamin K dependent clotting factors (2,7,9,10) and the anticoagulant proteins C&S. Induces a state of functional Vit K deficiency. Warfarin has no effect on the activity of the fully carboxylated (active) clotting factors in the circulation. ";
}

if(form.warinfo.selectedIndex==2){
var warfinfo="Hereditary resistance: the defect is probably in the microsomal vit K reductase.  This defect also causes an increase in the daily requirement of vit K, possibly because alternative reductases that are not inhibited by warfarin are less efficient at recycling vit K. Acquired causes:Diet changes, nutritional supplements high in vitamin K, intralipid administration, and short bowel sydrome. Some patients may require daily doses > 30 mg/day";
}


if(form.warinfo.selectedIndex==3){
var warfinfo="Obtain INR daily in the morning (around 0600). Warfarin is usually administered in the evening which permits monitoring of the peak effect in the morning.the onset of anticoagulation occurs within 36 to 72 h,with a maximum effect at 5 to 7 days; upon discontinuation, the duration of anticoagulation depends on the resynthesis of the vitamin K-dependent clotting factors, which is approximately 4 to 5 days. Usual target INR: 2-3 for most indications.";
}


if(form.warinfo.selectedIndex==4){
var warfinfo="Onset (oral): detectable in plasma within 1 hour; Peak: 2-8 hrs; half-life: 20-60 hrs (average 40 hrs). Duration of action: 2-5 days.  99% bound to albumin.";
}



if(form.warinfo.selectedIndex==5){
var warfinfo="Descarboxy-prothrombin \+ CO2 + [conversion of vit K (hydroquinone or reduced form -OH) + vitamin K epoxidase leads to Vit K=O epoxide or oxidized form]. This results in carboxylation (activation) of the Vit K dependent clotting factor. Vit K is then reactivated by reduction \( =O --> -OH\) by a Vit K reductase. This reactivation of Vit K is blocked by warfarin, therefore, less active Vit K is available.";
}

if(form.warinfo.selectedIndex==6){
var warfinfo="INR< 5 (no bleeding): Decrease dose or omit next dose and resume warfarin at lower dosage when INR approaches desired range. INR >5 but <9 (No bleeding): If no additional risk factors for bleeding: Omit next one or two doses of warfarin and resume warfarin at lower dosage when INR approaches desired range. Or If increased risk of bleeding: Omit next dose of warfarin and give Vit K 1-2.5 mg po. INR > 9 (no bleeding): Hold warfarin and give Vit K 3-5 mg po, may rpt Vit K if INR still elevated at 24-48hr. Serious bleeding or INR > 20: Hold warfarin and Vit K 10 mg by slow IV infusion (10-20min) and supplement c fresh plasma or prothrombin complex concentrate. May rpt Vit K q12h. Life-threatening bleeding: Hold warfarin and replace with prothrombin complex concentrate supplemented with Vit K 10 mg IV. May rpt Vit K depending on INR. Rapid reversal required for urgent surgery or dental extraction: Hold warfarin and give Vit K 2-4 mg po. May rpt Vit K 1-2 mg po if INR remains high at 24hr. [Chest 1998 (suppl), 114: S445-S469]";

}

if(form.warinfo.selectedIndex==7){
var warfinfo="Skin necrosis: Rare complication. Skin lesions appear 3-10 days after tx. Usually occur on extremities—widespread thrombosis of the microvasculature—can spread rapidly.  May be due to Protein C deficiency which has a shorter half-life than do other Vit k-dependent clotting factors. Its activity falls more rapidly in response to the initial dose of warfarin. It has been proposed that the skin necrosis is a manifestation of a temporal imbalance between the anticoagulant protein C and one or more of the procoagulant factors and is exaggerated in pts who are partially deficient in protein C. [Decrease endogenous anticoagulant proteins------increased coagulation--increased thrombosis]. Note: patients with  normal protein C levels may also be affected.  Starting with lower doses may significantly reduce the risk of necrosis.";

}

if(form.warinfo.selectedIndex==8){
var warfinfo="Loading doses are no longer recommended or justified. Initial loading doses > 10 mg do little to shorten the time req'd for an anticoagulant effect, but may significantly increase the risk of toxicity. Remember that protein C (the body's endogenous anticoagulant) has a very short half-life (8 hrs) compared to the other clotting factors and falls more rapidly in response to an initial dose of warfarin. Larger doses may therefore produce increased coagulation initially. Continued administration will obviously have the opposite effect (risk of bleeding) as all of the vit K dependent clotting factors start to decline."; 
}





form.comments.value=warfinfo;

}





function clearwarf(form){
form.comment.value='';
form.comments.value='';
form.agegroup.focus();

}







function tempconvcf(form){
var cel=eval(form.cel.value);
var far=cel*9/5+32;
far=Math.round(far*Math.pow(10, 1))/Math.pow(10, 1);
form.far.value=far;
}
function tempconvfc(form){
var farr=eval(form.farr.value);
var cell=5*(farr-32)/9;
cell=Math.round(cell*Math.pow(10, 1))/Math.pow(10, 1);
form.cell.value=cell;
}
















function mess(dd) {
document.test.demo.value=dd;
}



var dav = 0;var s = 0;

function eagle(deterval, golf)
{
//if a symbol is entered still add to existing value
if (deterval == 1) dav = 1

//Do not add to value if empty or zero
if (document.test.display.value == null) dav = 0
else if (document.test.display.value == "0") dav = 0
if (dav == 0) document.test.display.value = golf

else document.test.display.value += golf
dav = 1
}











function m(bird, dec){
//if calling this function (bird sent a #), then assign current display to variable 'c'
if (bird >=1) c = document.test.display.value;

//Must set dav=0 in order to prevent function to be added to display
	dav=0
//Have davester evaluate whatever is currently in display
	var davester = eval(c);
//If a function is selected than manipulate davester which is the current 'eval' of what was in the display
	
	if (bird == 2) davester = Math.pow(Math.E, davester);
	else if (bird == 3) davester = Math.sqrt(davester);
	else if (bird == 4) davester = -davester;
	else if (bird == 5) davester = Math.log(davester);
	else if (bird == 6) davester = Math.pow(davester, 2);
	else if (bird == 7) davester = 1/davester;
	else if (bird == 8) davester = Math.log(davester)/Math.LN10;
	else if (bird == 9) davester = Math.pow(10, davester);
	else if (bird == 10) s = davester;
	else if (bird == 11) s += davester;
	else if (bird == 12) s -= davester;
	else if (bird == 14) davester = Math.tan(davester);
	else if (bird == 15) davester = Math.cos(davester);
	else if (bird == 16) davester = Math.sin(davester);
	else if (bird == 17) davester = davester/100;
	else if (bird == 18) {
		var joe=prompt("Raise to what power?", "");
		davester = Math.pow(davester, joe);}
//if no decimal rounding selected from drop down then do not round
if (dec == -1)
document.test.display.value = davester;
//if decimal value selected then round
else 
document.test.display.value =Math.round(davester*Math.pow(10, dec))/Math.pow(10, dec);
//Statement must appear after evaluation by 'if' statements. If a math function is chosen
//  then have display equal that result or display unmodified davester.
c=davester;

}










function tpninfo(form){
if(form.tpndrop.selectedIndex==1){
form.tpn.value='Patients who cannot eat: comatose, ventilator, etc.;   Patients who should not eat: need bowel rest e.g. acute pancreatitis.;   Patients who will not eat: bolemic, depression \(elderly\);  Patients who cannot eat or will not eat enough: cancer patients, hyperthyroid, burn patient, bowel obstruction, fistula, inflammatory bowel disease etc.;  Other: intractable vomiting, massive bowel resection. \r\n A clear goal for TPN must be identified and the benefits of TPN must exceed the risks of complications such as infections \(especially at the catheter site\), electrolyte disorders,phlebitis, incompatibilities.';
}

if(form.tpndrop.selectedIndex==2){
form.tpn.value='Goals: To provide sufficient nutrients to meet energy requirements and to promote tissue anabolism.   Fundamental components of nutrition: water, carbohydrate, protein, fat, minerals, vitamins';
}

if(form.tpndrop.selectedIndex==3){
form.tpn.value='Basal energy expenditure: the amount of energy required to maintain the bodys normal metabolic activity, i.e. respiration, maintenance of body temperature etc.  BEE \(male\): 66.67 + 13.75W + 5H - 6.76A      Female: BEE= 665.1 + 9.56W +1.85H -4.68A.  H= height in centimeters, W= weight in kg, A= age in years.';
}

if(form.tpndrop.selectedIndex==4){
form.tpn.value='Resting energy expenditure: the amount of energy required to meet the metabolic demands of various degrees of stress in excess of the BEE.  REE = BEE x stress factor';
}

if(form.tpndrop.selectedIndex==5){
form.tpn.value='Serum albumin \(g/dl\) Normal: > 3.5.  Moderate malnutrition: 2.1 to 3.0   Severe Malnutrition:  <2.1    //  Half-life=21 days.  Used along with transferrin as an estimate of viseral protein stores. Because it has a long half life, it is not a good indicator of short term improvement in nutritional status.  Factors which may affect albumin levels include: hydration status, blood loss, albumin infusions, renal/hepatic disease, wound drainage, burns, drainage tubes, fistulas, trauma, surgery, and steroid administration.';
}

if(form.tpndrop.selectedIndex==6){
form.tpn.value='Transferrin: \(mg/dl\): normal: 180-260    Moderate malnutrition: 100-150   Severe malnutrition: < 100.  Half-life= 8 days.   Better indicator of short term improvement in nutritional status because of the shorter half life. Used along with albumin as an indicator of viseral (organ) protein stores. Indicators for somatic protein(skeletal muscle) include: anthropometrics: triceps skin fold, mid-arm circumference and Creatinine Height Index.  Factors which can effect transferrin levels include: sepsis, anemia, liver disease. Transferrin is used to bind iron and is increased in anemia, and decreased in liver disease.';
}

if(form.tpndrop.selectedIndex==7){
form.tpn.value='Fluid requirements: 1500 ml + 20 ml(weight- 20 kg)\r\n May also use this equation: 20-35 ml/kg/day.';
}

if(form.tpndrop.selectedIndex==8){
form.tpn.value='Indirect calorimetry: calculation of energy expenditure by the measurement of respiratory gas exchange. Based on the fact that O2 consumption and CO2 production represent intracellular metabolism.  Requires indirect calorimetry cart or metabolic cart to measure VO2 and VCO2. These values are used to calculate the respiratory quotient \(RQ\)= VCO2/VO2. Normal= 0.85  Protein oxidation: RQ=0.8;  Fat oxidation: RQ= 0.7; Carbohydrate oxidation: RQ= 1;    overfeeding \(lipogenesis\): RQ > 1.';
}

if(form.tpndrop.selectedIndex==9){
form.tpn.value='Stress factors:  Used along with the BEE to determine the total caloric needs of the patient. \(See REE\). \r\n1.  Starvation: 0.75 to 1.0  \r\n2. Normal, non-stressed, confined to bed: 1.0 to 1.2   \r\n3. Post-elective surgery with no complications(out of bed): 1.2 to 1.35      \r\n4. Moderate stress from chronic illness:  1.35 to 1.5   \r\n5.  Severe stress from acute illness, severe infection, trauma or ventilation: 1.5 to 1.8   \r\n6.  > 20\% BSA burn: 1.5 to 2.0 ';
}

if(form.tpndrop.selectedIndex==10){
form.tpn.value='Protein requirements:\r\n \(4 kcal/gram.  6.25 g protein/g of nitrogen\)\r\n 1. Starvation/acute renal failure/liver disease: 0.5-1.0 g/kg/day\r\n 2. Normal status, no stress: 1.0 to 1.1 g/kg/day\r\n 3. Post elective surgery with no complications: 1.1 to 1.3 g/kg/day\r\n 4. Moderate stress from chronic illness: 1.2 to 1.5 g/kg/day\r\n 5. Severe stress from acute illness, severe infection, trauma or ventilation: 1.5 to 2.0 g/kg/day.\r\n 6. >20\% bsa burn: 2.0 to 2.5 g/kg/day.\r\n\r\nAnother source recommends the following:\r\nNo Stress: 0.8 g/kg\r\nMild stress: 0.8 to 1 g/kg/day\r\nModerate stress: 1.0-1.2 g/kg/day\r\nSevere stress: 1.2-2.0 g/kg/day\r\nAcute renal failure: 1.0-1.5 g/kg/day\r\nHemodialysis: 1.1-1.5 g/kg/day \(0.5-0.6 if not on dialysis and has end stage renal disease\)\r\nLiver failure: 0.5 g/kg/day with encephalopathy. May increase if patient tolerates.';
}


if(form.tpndrop.selectedIndex==11){
form.tpn.value='Non-protein calories to nitrogen ratio:\r\n 1. Normal: 150-250:1\r\n 2. Moderate stress: 125-150:1\r\n 3. Severe stress: 90-125:1\r\n Remember, to determine the number of grams of nitrogen, divide the total grams of protein by 6.25 \r\n ';
}


if(form.tpndrop.selectedIndex==12){
form.tpn.value='Nitrogen balance: \(Used to measure degree of catabolism\)\r\nMeasurement of the urinary urea nitrogen loss can be used to estimate protein requirements. Balance= intake-output.\r\n   Protein intake/6.25 -\(urine urea nitrogen + 4\) = balance.  Requires 24 hour urine collection. Goal is positive 3-4 grams for growth and repair.';
}


if(form.tpndrop.selectedIndex==13){
form.tpn.value='Typical electrolytes (daily requirements):\r\n\ 1. Sodium: 60-150\r\n 2. Potassium: 60-240\r\n 3. Chloride: 60-150\r\n 4. Phosphate: 15-50 or some sources recommend: 7-10 mmol/liter\r\n 5. Acetate: 80-120\r\n 6. Magnesium: 8-24\r\n 7. Calcium: 10-15\r\n\r\nExceptions: increased requirements due to excessive losses: severe diarrhea, nasogastric losses, fistula output etc. Decreased requirements: CHF, renal failure etc. Acid base status will help to determine the amount of chloride and acetate.';
}


if(form.tpndrop.selectedIndex==14){
form.tpn.value='Monitoring of labs\r\n Daily: serum electrolytes, glucose, body weight, BUN.\r\n Twice weekly: LFT\'s, creatinine\r\n Weekly/biweekly: transferrin, albumin, CBC, PT, PTT, Platelets, ABG\'s, trace minerals.  Note: elevation of LFT\'s may signal fatty liver infiltration. May need to decrease the amount of dextrose and increase the amount of lipid. Approximately 80% of adults will exhibit some rise in LFT\'s within 2 weeks of starting TPN.';
}


if(form.tpndrop.selectedIndex==15){
form.tpn.value='Nutritional risk factors: 10\% below IBW, recent weight loss, frequent hospitalizations, alcoholism, chronic disease, chemotherapy, increased metabolic needs, extended hospitalization, impaired GI tract.';
}

if(form.tpndrop.selectedIndex==16){
form.tpn.value='Dextrose: 3.4 kcal/gram. Used as the primary fuel source. Average calories needed: 25-35 kcal/kg IBW.  Final concentrations used in TPN range from 10 to 47%.';
}


if(form.tpndrop.selectedIndex==17){
form.tpn.value='Fat: 9 kcal/gram.  Total fat should not exceed 2.5 g/kg/day. Minimum requirements: approximately 4\% of total nonprotein calories or 500 ml of 10\% fat emulsion 2-3 times/week or 500 ml 20\% once weekly. This minimum requirement is necessary to prevent essential fatty acid deficiency. Symptoms may include: hair loss, thrombocytopenia, poor wound healing, and dermatitis. The amount of calories supplied as fat varies between 0-60\%.  Potential problems with glucose as the sole source of non-protein calories include the development of fatty liver, and elevated RQ \(>1\)--lipogenesis. Normal RQ is 0.8.\r\n\r\n500 ml 10% lipid provides 550 kcal \(1.1 kcal/ml\)\r\n 500 ML 20\% lipid provides 1000 kcal \(2 kcal/ml\)   In certain patients the \% of nonprotein calories supplied as fat may be increased: \r\n 1. patients with RQ > 1\r\n 2. Cardiac patient--fluid restricted\r\n 3. Glucose intolerant patient\r\n 4. TPN given peripherally.\r\n Overfeeding of lipids is associated with immune impairment and hypertriglyceridemia. In critically ill patients it is recommended that the lipid not exceed 1.0 to 1.5 g/kg. \r\nContraindications: Patients with hypertriglyceridemia \(TG>400\), or allergic reactions \(rare\).';
}


if(form.tpndrop.selectedIndex==18){
form.tpn.value='Peripheral TPN. Used for short term use only \(less than 10 days\). Maximum of 3 days at one site.  Limited to a maximum of 10% dextrose. The total osmolarity may approach 900 mosm for a peripheral site if a parenteral steroid is added such as methylprednisolone.';
}



if(form.tpndrop.selectedIndex==19){
form.tpn.value='Amino acids: 8 essential and 10 non-essential.  2 types: aromatic amino acids: e.g. phenylalanine\(essential\), tyrosine \(non-essential\)   Branched chain amino acids: isoleucine, leucine, valine..   In renal impairment may recommend either reduced daily requirements or essential amino acid solution \(isoleucine, leucine, lysine, methionine, phenylalanine, threonine, tryptophan, valine\).  In hepatic failure, greater concentrations of branched amino acids are recommended, and less aromatic. In hepatic failure there is a greater accumulation of aromatic amino acids compared to the branched. The aromatic amino acids enter into the brain and may induce a coma.';
}

if(form.tpndrop.selectedIndex==20){
form.tpn.value='Chart review: assessing nutritional status.\r\n\  1. Look for risk factors: recent weight loss- >10\%;  20% below IBW; history of poor nutrition; excessive alcohol intake; disease state that impairs adequate nutrient intake: short gut, draining abscesses, fistulas, dialysis.;  serum albumin < 3.5;  Increased metabolic demand: burns, trauma, surgery, sepsis, infections.\r\n  2. History: Medical: disease states, and surgical.  Diet history: N/V, weight loss, intake etc.\r\n  3. General appearance: kwashiorkor: edematous, protein malnutrition.  Marasmus: cachectic/ protein and calorie malnutrition.\r\n  4. Somatic protein: anthropometrics: triceps skin fold, mid arm circumference\r\n  5. Visceral protein: albumin, transferrin, and total lymphocyte count.\r\n  6. Starvation: early glycogen loss--within 24 hours. Increased gluconeogenesis--amino acids etc. Down regulation occurs--decrease in resting energy metabolism--preservation of lean body mass.  Hypermetabolic states: increasing insulin/glucagon ratio. Resting metabolic rate may double. Rapid and severe wasting of lean body mass.\r\n  7. Respiratory quotient: Normal= 0.85.  Overfeeding: > 1\r\n  ';
}

if(form.tpndrop.selectedIndex==21){
form.tpn.value='Cyclic TPN: If the patient is stable on TPN and not insulin dependent, the TPN can be cycled in such a way that the patient has a glucose free period for 10-12 hours/ day.  This technique, known as cyclic hyperalimentation, decreases the duration of hyperinsulinemia and hepatic lipogenesis and improves hepatic function.  It allows the patient to be more mobile--good for home TPN therapy.';
}


if(form.tpndrop.selectedIndex==22){
form.tpn.value='Refeeding syndrome: defined as a sudden cardiac and pulmonary failure in malnourished patients being refed concentrated glucose solutions.\r\n a. Usually occurs 24-48 hours after initiation of nutrition support.\r\n b. It is caused by the metabolic shifting and sequestering of electrolytes intracellularly, leaving inadequate amounts in serum.\r\n c. Electrolyte and fluid abnormalities include: hyperglycemia, hypokalemia, hypomagnesemia, hypophosphatemia, fluid overload and thiamine deficiency.\r\n d. If left untreated, can be fatal.\r\n\r\n Methods to prevent:\r\n a. Be aware of patients at risk of refeeding sydrome: anorexia nervosa; classic malnutrition states--unfed for 7-10 days, with evidence of stress and depletion; chronic alcoholism; prolonged fasting; morbid obesity with rapid weight loss; prolonged IV hydration.\r\n b. Begin nutrition support in these cases at 50-75\% of estimated needs.\r\n c. Obtain baseline labs prior to starting any nutrition support regimen, and correct any out of range values, even if serum electrolytes are near normal limits--intracellularly the patient may be depleted.\r\n d. Add an adequate amount of phosphorus to the TPN.';
}

if(form.tpndrop.selectedIndex==23){
form.tpn.value='Estimation of energy needs: Quick method.\r\nNo Stress; non-ambulatory: 25 kcal/kg\r\nNo Stress; ambulatory: 25-30 kcal/kg\r\nRefeeding sydrome risk: 15-20 kcal/kg\r\nMild Stress: 25-30 kcal/kg\r\nModerate Stress: 27-32 kcal/kg\r\nSevere Stress: 30-35 kcal/kg\r\nPre-end stage renal disease: 35-40 kcal/kg\r\nHemodialysis: 25-35 kcal/kg\r\nAcute renal failure: 30-40 kcal/kg';
}

if(form.tpndrop.selectedIndex==24){
form.tpn.value='Indications for hepatamine and renamine:\r\nHepatamine: a. patient is in stage 2 to 4 hepatic encephalopathy\r\nb. A trial of lower dose of standard amino acid solution \(0.5 g/kg\) has failed to reverse encephalopathy.\r\nc. Protein status is compromised by prolonged suboptimal intakes of protein \(< 40-50g/day\).\r\n\r\nRenamine: Patient has renal failure and is not on dialysis.';
}

if(form.tpndrop.selectedIndex==25){
form.tpn.value='Diprivan:\r\nFirst calculate the total calories from diprivan: example: patient is receiving 50 ml/hr x 24 hours= 1200 ml x 1.1 kcal/ml = 1320 kcal.  \r\nNext, subtract the diprivan calories from the total caloric needs of the patient and then supply any additional calories needed with dextrose.';
}

if(form.tpndrop.selectedIndex==26){
form.tpn.value='Albumin replacement: The therapeutic use of albumin, particularly in nutrition support, remains highly controversial:\r\na. Limited supply\r\nb. Lack of clinical trials in the medical literature demonstrating improved outcome of patients who have received albumin in conjunction with nutrition support.\r\nc. Potential adverse reactions.\r\nd. Cost.\r\n\r\nIf it is decided that albumin replacement will benefit a patient, the following equation should be used to determine the amount to be given: \[ Albumin goal - observed albumin x 10\] x weight\(kg\) x 0.3\r\nExample: 70kg patient with albumin of 2.0:  \[3.5 g/dl - 2.0 g/dl x 10\] x 70 x 0.3= 315 g of albumin to be replaced.  The calculated dose can then be divided up into 25-50 gram doses/day.\r\nNote: 0.3 is the estimated Vd.';
}

}





function futurevalue(form)  {

var investmentamt=form.investmentamt.value;
if((investmentamt==null)||(investmentamt=="")||(isNaN(investmentamt))){
alert('Please enter a value for investment amount');
form.investmentamt.focus();
form.investmentamt.select();
return false
}


var interest=form.interest.value;
if((interest==null)||(interest=="")||(isNaN(interest))){
alert('Please enter a value for interest rate');
form.interest.focus();
form.interest.select();
return false
}

var numberofyears=form.numberofyears.value;
if((numberofyears==null)||(numberofyears=="")||(isNaN(numberofyears))){
alert('Please enter a value for number of years');
form.numberofyears.focus();
form.numberofyears.select();
return false
}



var interest=eval(form.interest.value);
 
var numberofyears=eval(form.numberofyears.value); 
var investmentamt=eval(form.investmentamt.value); 
     
if (interest > 1.0) {interest=interest/100;}

if (form.initialvalue.value==""){form.initialvalue.value=0;}
var principal=eval(form.initialvalue.value);
var Totalnumofinvestments = 0;
if(form.interval.selectedIndex == 0) {
Totalnumofinvestments=numberofyears*12;
interest=interest/12;
}
if(form.interval.selectedIndex == 1) {
Totalnumofinvestments=numberofyears*52;
interest=interest/52;
}
if(form.interval.selectedIndex == 2) {
Totalnumofinvestments=numberofyears*4;
interest=interest/4;
}
if(form.interval.selectedIndex == 3) {
Totalnumofinvestments=numberofyears;
}


var count = 0;
while(count < Totalnumofinvestments) {
principal=(principal*interest) + (principal+investmentamt);
count = count + 1;
}
principal=Math.round(principal*Math.pow(10,2))/Math.pow(10,2)
form.mycash.value = principal;
var totalinvestment = eval(count * investmentamt) + eval(form.initialvalue.value);
var totalinterest = eval(principal - totalinvestment);
totalinterest=Math.round(totalinterest*Math.pow(10,2))/Math.pow(10,2)
form.totalinterest.value = "$" + totalinterest;
}

function clearthisform(form){
form.numberofyears.value = "";
form.interest.value = "";
form.initialvalue.value = "";
form.investmentamt.value = "";
}

function getCalendarForMonth(month, year){
  var dayOfWeekArray = new Array("Sun", "Mon", "Tue", "Wed",
                        "Thu", "Fri", "Sat")
  var monthArray = new Array("January", "February", 
                   "March", "April", "May", "June", 
                   "July", "August", "September", 
                   "October", "November", "December")
  var noDaysArray = new Array(31, 28, 31, 30, 31, 30, 
                    31, 31, 30, 31, 30, 31)
  var firstOfMonth = new Date(month + "/1/" + year )
  var day = - firstOfMonth.getDay()

  // determine number of days in month
  var noDays = noDaysArray[month-1]
  if (month == 2){
    if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0){
      noDays = 29
      }
    }

  //fabricate string for tables
  var strMonth = "<center><TABLE border=0 cellpadding=0 cellspacing=0>"
  strMonth += "<TR><TD align='center'>"
  strMonth += "<FONT color=blue face='Arial' size=4>"  
  strMonth +=  monthArray[month-1] + " " + year 
  strMonth += "</FONT></TD><TR><TD>"
  strMonth += "<TABLE border=10  cellpadding=18 cellspacing=2>"
  strMonth += "</TR><TR bgcolor='#000000' align='top'>"
  for(var i = 0; i<=6; i++){
    strMonth += "<TD width=15><FONT color=white  face='arial' size=2>"
    strMonth += dayOfWeekArray[i] + "</FONT></TD>"
    }
  strMonth += "</TR><TR align='right'>"

  //fabricate first week of month
  for (i = 0; i <= 6; i++){
    strMonth += "<TD width=15 valign=top><FONT   face='arial' size=1>"
    day++
    if(day > 0){
      strMonth += day
      }
    else{
      strMonth += " "
      }
    strMonth += "</FONT></TD>"
    }

  //fabricate remaining weeks
  for(var j=1; j < 6; j++){
    strMonth += "</TR><TR align='top'>"
    for (i = 0; i <= 6; i++){
      strMonth += "<TD><FONT face='arial' size=1>"
      day++
      if(day <= noDays){
        strMonth += day
        }
      else{
        strMonth += " "
        }
      strMonth += "</FONT></TD>"
      }
    if (day >= noDays){
      break;
      }
    }
  strMonth += "</TR></TABLE>"
  strMonth += "</TD></TR></TABLE></center>"

  return strMonth
  }

//Original mortgage program by Hugh Chan.

function mortgagecalc()
{
  var mi = document.needname.rate.value / 1200;
  var base = 1;
  var mbase = 1 + mi;
  for (i=0; i<document.needname.years.value * 12; i++)
  {
    base = base * mbase
  }
  document.needname.PI.value = floor(document.needname.test.value * mi / ( 1 - (1/base)))
  document.needname.MT.value = floor(document.needname.taxes.value / 12)
  document.needname.MI.value = floor(document.needname.insurance.value / 12)
  var dasum = document.needname.test.value * mi / ( 1 - (1/base)) +
	document.needname.taxes.value / 12 + 
	document.needname.insurance.value / 12;
  document.needname.MP.value = floor(dasum);
}
function floor(curtail)
{
  return Math.floor(curtail*Math.pow(10,2))/Math.pow(10,2);
}

function findthisnow(form){
davesearchlist=document.searchlist.daveslist.options[document.searchlist.daveslist.selectedIndex].value;
searchentry = document.searchlist.searchentry.value;
window.open(davesearchlist+searchentry,"","width=400,height=400,menubar,left=0,top=0,status,scrollbars,resizable,toolbar,location");
}
function clearsearchtext(form){
document.searchlist.searchentry.value="";
document.searchlist.searchentry.focus();
}

