

//<![CDATA[

<!--


function Client(){
//if not a DOM browser, hopeless
	this.min = false; if (document.getElementById){this.min = true;};

	this.ua = navigator.userAgent;
	this.name = navigator.appName;
	this.ver = navigator.appVersion;  

//Get data about the browser
	this.mac = (this.ver.indexOf('Mac') != -1);
	this.win = (this.ver.indexOf('Windows') != -1);

//Look for Gecko
	this.gecko = (this.ua.indexOf('Gecko') > 1);
	if (this.gecko){
		this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length));
		if (this.geckoVer < 20020000){this.min = false;}
	}
	
//Look for Firebird
	this.firebird = (this.ua.indexOf('Firebird') > 1);
	
//Look for Safari
	this.safari = (this.ua.indexOf('Safari') > 1);
	if (this.safari){
		this.gecko = false;
	}
	
//Look for IE
	this.ie = (this.ua.indexOf('MSIE') > 0);
	if (this.ie){
		this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, this.ua.length));
		if (this.ieVer < 5.5){this.min = false;}
	}
	
//Look for Opera
	this.opera = (this.ua.indexOf('Opera') > 0);
	if (this.opera){
		this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf('Opera')+6, this.ua.length));
		if (this.operaVer < 7.04){this.min = false;}
	}
	if (this.min == false){
		alert('Your browser may not be able to handle this page.');
	}
	
//Special case for the horrible ie5mac
	this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6));
}

var C = new Client();

//for (prop in C){
//	alert(prop + ': ' + C[prop]);
//}



//CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS

//[strNavBarJS]
function NavBtnOver(Btn){
	if (Btn.className != 'NavButtonDown'){Btn.className = 'NavButtonUp';}
}

function NavBtnOut(Btn){
	Btn.className = 'NavButton';
}

function NavBtnDown(Btn){
	Btn.className = 'NavButtonDown';
}
//[/strNavBarJS]

function FuncBtnOver(Btn){
	if (Btn.className != 'FuncButtonDown'){Btn.className = 'FuncButtonUp';}
}

function FuncBtnOut(Btn){
	Btn.className = 'FuncButton';
}

function FuncBtnDown(Btn){
	Btn.className = 'FuncButtonDown';
}

function FocusAButton(){
	if (document.getElementById('CheckButton1') != null){
		document.getElementById('CheckButton1').focus();
	}
	else{
		if (document.getElementById('CheckButton2') != null){
			document.getElementById('CheckButton2').focus();
		}
		else{
			document.getElementsByTagName('button')[0].focus();
		}
	}
}




//CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX

var topZ = 1000;

function ShowMessage(Feedback){
	var Output = Feedback + '<br /><br />';
	document.getElementById('FeedbackContent').innerHTML = Output;
	var FDiv = document.getElementById('FeedbackDiv');
	topZ++;
	FDiv.style.zIndex = topZ;
	FDiv.style.top = TopSettingWithScrollOffset(30) + 'px';

	FDiv.style.display = 'block';

	ShowElements(false, 'input');
	ShowElements(false, 'select');
	ShowElements(false, 'object');

//Focus the OK button
	setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);
	
//
}

function ShowElements(Show, TagName){
//Special for IE bug -- hide all the form elements that will show through the popup
	if (C.ie){
		var Els = document.getElementsByTagName(TagName);
		for (var i=0; i<Els.length; i++){
			if (Show == true){
				Els[i].style.display = 'inline';
			}
			else{
				Els[i].style.display = 'none';
			}
		}
	} 
}

function HideFeedback(){
	document.getElementById('FeedbackDiv').style.display = 'none';
	ShowElements(true, 'input');
	ShowElements(true, 'select');
	ShowElements(true, 'object');
	if (Finished == true){
		Finish();
	}
}


//GENERAL UTILITY FUNCTIONS AND VARIABLES

//PAGE DIMENSION FUNCTIONS
function PageDim(){
//Get the page width and height
	this.W = 600;
	this.H = 400;
	this.W = document.getElementsByTagName('body')[0].clientWidth;
	this.H = document.getElementsByTagName('body')[0].clientHeight;
}

var pg = null;

function GetPageXY(El) {
	var XY = {x: 0, y: 0};
	while(El){
		XY.x += El.offsetLeft;
		XY.y += El.offsetTop;
		El = El.offsetParent;
	}
	return XY;
}

function GetScrollTop(){
	if (document.documentElement && document.documentElement.scrollTop){
		return document.documentElement.scrollTop;
	}
	else{
		if (document.body){
 			return document.body.scrollTop;
		}
		else{
			return window.pageYOffset;
		}
	}
}

function GetViewportHeight(){
	if (window.innerHeight){
		return window.innerHeight;
	}
	else{
		return document.getElementsByTagName('body')[0].clientHeight;
	}
}

function TopSettingWithScrollOffset(TopPercent){
	var T = Math.floor(GetViewportHeight() * (TopPercent/100));
	return GetScrollTop() + T; 
}

//CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back()
var InTextBox = false;

function SuppressBackspace(e){ 
	if (InTextBox == true){return;}
	if (C.ie) {
		thisKey = window.event.keyCode;
	}
	else {
		thisKey = e.keyCode;
	}

	var Suppress = false;

	if (thisKey == 8) {
		Suppress = true;
	}

	if (Suppress == true){
		if (C.ie){
			window.event.returnValue = false;	
			window.event.cancelBubble = true;
		}
		else{
			e.preventDefault();
		}
	}
}

if (C.ie){
	document.attachEvent('onkeydown',SuppressBackspace);
	window.attachEvent('onkeydown',SuppressBackspace);
}
else{
	if (window.addEventListener){
		window.addEventListener('keypress',SuppressBackspace,false);
	}
}

function ReduceItems(InArray, ReduceToSize){
	var ItemToDump=0;
	var j=0;
	while (InArray.length > ReduceToSize){
		ItemToDump = Math.floor(InArray.length*Math.random());
		InArray.splice(ItemToDump, 1);
	}
}

function Shuffle(InArray){
	var Num;
	var Temp = new Array();
	var Len = InArray.length;

	var j = Len;

	for (var i=0; i<Len; i++){
		Temp[i] = InArray[i];
	}

	for (i=0; i<Len; i++){
		Num = Math.floor(j  *  Math.random());
		InArray[i] = Temp[Num];

		for (var k=Num; k < (j-1); k++) {
			Temp[k] = Temp[k+1];
		}
		j--;
	}
	return InArray;
}

function WriteToInstructions(Feedback) {
	document.getElementById('InstructionsDiv').innerHTML = Feedback;

}




function EscapeDoubleQuotes(InString){
	return InString.replace(/"/g, '&quot;')
}

function TrimString(InString){
        var x = 0;

        if (InString.length != 0) {
                while ((InString.charAt(InString.length - 1) == '\u0020') || (InString.charAt(InString.length - 1) == '\u000A') || (InString.charAt(InString.length - 1) == '\u000D')){
                        InString = InString.substring(0, InString.length - 1)
                }

                while ((InString.charAt(0) == '\u0020') || (InString.charAt(0) == '\u000A') || (InString.charAt(0) == '\u000D')){
                        InString = InString.substring(1, InString.length)
                }

                while (InString.indexOf('  ') != -1) {
                        x = InString.indexOf('  ')
                        InString = InString.substring(0, x) + InString.substring(x+1, InString.length)
                 }

                return InString;
        }

        else {
                return '';
        }
}

function FindLongest(InArray){
	if (InArray.length < 1){return -1;}

	var Longest = 0;
	for (var i=1; i<InArray.length; i++){
		if (InArray[i].length > InArray[Longest].length){
			Longest = i;
		}
	}
	return Longest;
}

//UNICODE CHARACTER FUNCTIONS
function IsCombiningDiacritic(CharNum){
	var Result = (((CharNum >= 0x0300)&&(CharNum <= 0x370))||((CharNum >= 0x20d0)&&(CharNum <= 0x20ff)));
	Result = Result || (((CharNum >= 0x3099)&&(CharNum <= 0x309a))||((CharNum >= 0xfe20)&&(CharNum <= 0xfe23)));
	return Result;
}

function IsCJK(CharNum){
	return ((CharNum >= 0x3000)&&(CharNum < 0xd800));
}

//SETUP FUNCTIONS
//BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED
function ClearTextBoxes(){
	var NList = document.getElementsByTagName('input');
	for (var i=0; i<NList.length; i++){
		if ((NList[i].id.indexOf('Guess') > -1)||(NList[i].id.indexOf('Gap') > -1)){
			NList[i].value = '';
		}
		if (NList[i].id.indexOf('Chk') > -1){
			NList[i].checked = '';
		}
	}
}

//EXTENSION TO ARRAY OBJECT
function Array_IndexOf(Input){
	var Result = -1;
	for (var i=0; i<this.length; i++){
		if (this[i] == Input){
			Result = i;
		}
	}
	return Result;
}
Array.prototype.indexOf = Array_IndexOf;

//IE HAS RENDERING BUG WITH BOTTOM NAVBAR
function RemoveBottomNavBarForIE(){
	if ((C.ie)&&(document.getElementById('Reading') != null)){
		if (document.getElementById('BottomNavBar') != null){
			document.getElementById('TheBody').removeChild(document.getElementById('BottomNavBar'));
		}
	}
}




//HOTPOTNET-RELATED CODE

var HPNStartTime = (new Date()).getTime();
var SubmissionTimeout = 30000;
var Detail = ''; //Global that is used to submit tracking data

function Finish(){
//If there's a form, fill it out and submit it
	if (document.store != null){
		Frm = document.store;
		Frm.starttime.value = HPNStartTime;
		Frm.endtime.value = (new Date()).getTime();
		Frm.mark.value = Score;
		Frm.detail.value = Detail;
		Frm.submit();
	}
}



//JQUIZ CORE JAVASCRIPT CODE

var CurrQNum = 0;
var CorrectIndicator = ':-)';
var IncorrectIndicator = 'X';
var YourScoreIs = 'Your score is ';
var ContinuousScoring = true;
var CorrectFirstTime = 'Questions answered correctly first time: ';
var ShowCorrectFirstTime = true;
var ShuffleQs = false;
var ShuffleAs = false;
var DefaultRight = '*********';
var DefaultWrong = 'Sorry! Try again.';
var QsToShow = 49;
var Score = 0;
var Finished = false;
var Qs = null;
var QArray = new Array();
var ShowingAllQuestions = false;
var ShowAllQuestionsCaption = 'Show all questions';
var ShowOneByOneCaption = 'Show questions one by one';
var State = new Array();
var Feedback = '';
var TimeOver = false;
var strInstructions = '';

//The following variable can be used to add a message explaining that
//the question is finished, so no further marking will take place.
var strQuestionFinished = '';

function CompleteEmptyFeedback(){
	var QNum, ANum;
	for (QNum=0; QNum<I.length; QNum++){
//Only do this if not multi-select
		if (I[QNum][2] != '3'){
  		for (ANum = 0; ANum<I[QNum][3].length; ANum++){
  			if (I[QNum][3][ANum][1].length < 1){
  				if (I[QNum][3][ANum][2] > 0){
  					I[QNum][3][ANum][1] = DefaultRight;
  				}
  				else{
  					I[QNum][3][ANum][1] = DefaultWrong;
  				}
  			}
  		}
		}
	}
}

function SetUpQuestions(){
	var AList = new Array(); 
	var QList = new Array();
	var i, j;
	Qs = document.getElementById('Questions');
	while (Qs.getElementsByTagName('li').length > 0){
		QList.push(Qs.removeChild(Qs.getElementsByTagName('li')[0]));
	}
	var DumpItem = 0;
	if (QsToShow > QList.length){
		QsToShow = QList.length;
	}
	while (QsToShow < QList.length){
		DumpItem = Math.floor(QList.length*Math.random());
		for (j=DumpItem; j<(QList.length-1); j++){
			QList[j] = QList[j+1];
		}
		QList.length = QList.length-1;
	}
	if (ShuffleQs == true){
		QList = Shuffle(QList);
	}
	if (ShuffleAs == true){
		var As;
		for (var i=0; i<QList.length; i++){
			As = QList[i].getElementsByTagName('ol')[0];
			if (As != null){
  			AList.length = 0;
				while (As.getElementsByTagName('li').length > 0){
					AList.push(As.removeChild(As.getElementsByTagName('li')[0]));
				}
				AList = Shuffle(AList);
				for (j=0; j<AList.length; j++){
					As.appendChild(AList[j]);
				}
			}
		}
	}
	
	for (i=0; i<QList.length; i++){
		Qs.appendChild(QList[i]);
		QArray[QArray.length] = QList[i];
	}

//Show the first item
	QArray[0].style.display = '';
	
//Now hide all except the first item
	for (i=1; i<QArray.length; i++){
		QArray[i].style.display = 'none';
	}		
	SetQNumReadout();
	
	SetFocusToTextbox();
}

function SetFocusToTextbox(){
//if there's a textbox, set the focus in it
	if (QArray[CurrQNum].getElementsByTagName('input')[0] != null){
		QArray[CurrQNum].getElementsByTagName('input')[0].focus();
//and show a keypad if there is one
		if (document.getElementById('CharacterKeypad') != null){
			document.getElementById('CharacterKeypad').style.display = 'block';
		}
	}
	else{
  	if (QArray[CurrQNum].getElementsByTagName('textarea')[0] != null){
  		QArray[CurrQNum].getElementsByTagName('textarea')[0].focus();	
//and show a keypad if there is one
			if (document.getElementById('CharacterKeypad') != null){
				document.getElementById('CharacterKeypad').style.display = 'block';
			}
		}
//This added for 6.0.4.11: hide accented character buttons if no textbox
		else{
			if (document.getElementById('CharacterKeypad') != null){
				document.getElementById('CharacterKeypad').style.display = 'none';
			}
		}
	}
}

function ChangeQ(ChangeBy){
//The following line prevents moving to another question until the current
//question is answered correctly. Uncomment it to enable this behaviour. 
//	if (State[CurrQNum][0] == -1){return;}
	if (((CurrQNum + ChangeBy) < 0)||((CurrQNum + ChangeBy) >= QArray.length)){return;}
	QArray[CurrQNum].style.display = 'none';
	CurrQNum += ChangeBy;
	QArray[CurrQNum].style.display = '';
//Undocumented function added 10/12/2004
	ShowSpecialReadingForQuestion();
	SetQNumReadout();
	SetFocusToTextbox();
}

var HiddenReadingShown = false;
function ShowSpecialReadingForQuestion(){
//Undocumented function for showing specific reading text elements which change with each question
//Added on 10/12/2004
	if (document.getElementById('ReadingDiv') != null){
		if (HiddenReadingShown == true){
			document.getElementById('ReadingDiv').innerHTML = '';
		}
		if (QArray[CurrQNum] != null){
			var Children = QArray[CurrQNum].childNodes;
			for (var i=0; i<Children.length; i++){
			if (Children[i].className=="HiddenReading"){
					document.getElementById('ReadingDiv').innerHTML = Children[i].innerHTML;
					HiddenReadingShown = true;
//Hide the ShowAllQuestions button to avoid confusion
					if (document.getElementById('ShowMethodButton') != null){
						document.getElementById('ShowMethodButton').style.display = 'none';
					}
				}
			}	
		}
	}
}

function SetQNumReadout(){
	document.getElementById('QNumReadout').innerHTML = (CurrQNum+1) + ' / ' + QArray.length;
	if ((CurrQNum+1) >= QArray.length){
		if (document.getElementById('NextQButton') != null){
			document.getElementById('NextQButton').style.visibility = 'hidden';
		}
	}
	else{
		if (document.getElementById('NextQButton') != null){
			document.getElementById('NextQButton').style.visibility = 'visible';
		}
	}
	if (CurrQNum <= 0){
		if (document.getElementById('PrevQButton') != null){
			document.getElementById('PrevQButton').style.visibility = 'hidden';
		}
	}
	else{
		if (document.getElementById('PrevQButton') != null){
			document.getElementById('PrevQButton').style.visibility = 'visible';
		}
	}
}

I=new Array();
I[0]=new Array();I[0][0]=100;
I[0][1]='';
I[0][2]='0';
I[0][3]=new Array();
I[0][3][0]=new Array('the release of many hormones is pulsatile , so a random blood sample is usually useless','',1,0,1);
I[0][3][1]=new Array('many endocrine glands have what is called incidentalomas','',1,0,1);
I[0][3][2]=new Array('many endocrine tumors are difficult to classify as malignant or benign during histopathological examination','',1,0,1);
I[0][3][3]=new Array('if you suspect a hormonal excess then choose a suppression test','',1,0,1);
I[0][3][4]=new Array('endocrinal abnormalities are rarely characterized by loss of normal regulation of hormonal secretion','Correct Answer:- 1-and hence a sequential or a dynamic test should be used  2-and hence, a biochemical diagnosis should be done before imaging  3-true, like adrenal adenomas versus carcinomas  4-and if you suspect a hormonal deficiency then choose a stimulation test  5-False, the usually story',1,100,1);
I[1]=new Array();I[1][0]=100;
I[1][1]='';
I[1][2]='0';
I[1][3]=new Array();
I[1][3][0]=new Array('rarely is a cause of hydrocephalus','',1,0,1);
I[1][3][1]=new Array('may an incidental finding on MRI done for another reason','',1,0,1);
I[1][3][2]=new Array('rarely there is a downward extension and hence may be seen as a nasal polyp','',1,0,1);
I[1][3][3]=new Array('may produce a hypothalamic syndrome by an upward extension','',1,0,1);
I[1][3][4]=new Array('pituitary apoplexy is usually asymptomatic','Correct Answer:- As the name implies, it is an apoplexy , so the presentation is a catastrophic one.  Lateral extension may involve the 3rd, 4th and  6th  cranial nerves  Remember , a TSHoma is responsible for 1 % of functioning pituitary tumors',1,100,1);
I[2]=new Array();I[2][0]=100;
I[2][1]='';
I[2][2]='0';
I[2][3]=new Array();
I[2][3][0]=new Array('non functioning pituitary macroadenoma','',1,0,1);
I[2][3][1]=new Array('craniopharyngioma','',1,0,1);
I[2][3][2]=new Array('Cushing disease','',1,0,1);
I[2][3][3]=new Array('prolactinoma','Correct Answer:- 1-and radiotherapy is a second line treatment  2-and radiotherapy is a second line treatment 3-radiotherapy is more effective in children and also used to irradiate the pituitary to prevent Nelson\'s syndrome  4-dopamine agonists are the first line treatment even in macroadenomas unless it is cystic and large  5-unfortunately octreotide does not cause tumor shrinkage',1,100,1);
I[2][3][4]=new Array('acromegally','',1,0,1);
I[3]=new Array();I[3][0]=100;
I[3][1]='';
I[3][2]='0';
I[3][3]=new Array();
I[3][3][0]=new Array('stress','',1,0,1);
I[3][3][1]=new Array('primary hypothyroidism','',1,0,1);
I[3][3][2]=new Array('chronic renal failure','',1,0,1);
I[3][3][3]=new Array('chronic chest well stimulation','',1,0,1);
I[3][3][4]=new Array('treatment with pergolide','Correct Answer :- Pergolide is a dopamine agonist used in the treatment of hyperprolactenimia',1,100,1);
I[4]=new Array();I[4][0]=100;
I[4][1]='';
I[4][2]='0';
I[4][3]=new Array();
I[4][3][0]=new Array('-treatment with dopamine agonists, is almost always effective in normalizing prolactine level and restoration of gonadal function','',1,0,1);
I[4][3][1]=new Array('after menopause, treatment of microprolactnimoas is only indicated if there was a trouble some galactorrhea, otherwise can be left untreated','',1,0,1);
I[4][3][2]=new Array('trans-sphnenoidal surgery has a success rate approaching 80%','',1,0,1);
I[4][3][3]=new Array('macroprolactnimas may enlarge rapidly during pregnancy and hence bromocyptin should be continued despite pregnancy with close follow up during the whole pregnancy','',1,0,1);
I[4][3][4]=new Array('external irradiation is a useful first line treatment in the majority of patients','Correct Answer:-- External irradiation is used for some macroadenomas to prevent re-growth if dopamine agonists are stopped',1,100,1);
I[5]=new Array();I[5][0]=100;
I[5][1]='';
I[5][2]='0';
I[5][3]=new Array();
I[5][3][0]=new Array('although glucose intolerance is seen in 25% of cases yet overt diabetes mellitus is seen only in 10% of cases','',1,0,1);
I[5][3][1]=new Array('there is a 2-3 folds increase in the relative risk of colonic cancer and coronary artery disease','',1,0,1);
I[5][3][2]=new Array('trans-sphenoidal surgery has a high success rate','',1,0,1);
I[5][3][3]=new Array('a dopamine agonist may be used in those with co-existent hyperprolactinemia because it is generally less effective than octreotide','',1,0,1);
I[5][3][4]=new Array('external irradiation has a good rapid action against the tumor','Correct Answer:- External irradiation although causes shrinkage of the tumor, yet the GH level takes long to return to normal and there is a high risk of panhypoituitarism',1,100,1);
I[6]=new Array();I[6][0]=100;
I[6][1]='';
I[6][2]='0';
I[6][3]=new Array();
I[6][3][0]=new Array('Sampling before exercise.','Correct Answer:- Sampling should be done post exercise not pre exercise',1,100,1);
I[6][3][1]=new Array('frequent sampling during sleep','',1,0,1);
I[6][3][2]=new Array('sampling 1 hour after going asleep','',1,0,1);
I[6][3][3]=new Array('sampling during an insulin induced hypoglycemia','',1,0,1);
I[6][3][4]=new Array('stimulation with arginine','',1,0,1);
I[7]=new Array();I[7][0]=100;
I[7][1]='';
I[7][2]='0';
I[7][3]=new Array();
I[7][3][0]=new Array('used in the diagnosis of primary and secondary adrenal insufficiency','',1,0,1);
I[7][3][1]=new Array('the 250 microgram tetracosactrin injection should be given in the early morning','Correct Answer:- The 250 microgram tetracosactrin injection can be given at ANY time during the day  Because it relies on ACTH dependent adrenal atrophy in secondary adrenal failure so it may not diagnose acute adrenal failure secondary to acute ACTH deficiency',1,100,1);
I[7][3][2]=new Array('relies on ACTH dependent adrenal atrophy in secondary adrenal failure','',1,0,1);
I[7][3][3]=new Array('normally after 30 minutes the blood cortisol should be above 550 nmol/ L','',1,0,1);
I[7][3][4]=new Array('useually useless in adrenal failure secondary to acute ACTH deficiency','',1,0,1);
I[8]=new Array();I[8][0]=100;
I[8][1]='';
I[8][2]='0';
I[8][3]=new Array();
I[8][3][0]=new Array('there is a striking pallor','',1,0,1);
I[8][3][1]=new Array('GH is usually the earliest hormone to be lost','',1,0,1);
I[8][3][2]=new Array('Coma is multi-factorial and may be due to water intoxication , hypoglycemia or hypothermia','',1,0,1);
I[8][3][3]=new Array('The skin is smooth  with a baby like texture','',1,0,1);
I[8][3][4]=new Array('Serum TSH should be measured to assess the optimal T4 replacement dose','Correct Answer:- Unlike primary hypothyroidism, measuring TSH is not helpful because the pituitary may secrete glycoproteins which are usually detected by TSH assay but they are NOT BIOACTIVE. So the aim is to KEEP the T4 in the upper part of reference range.',1,100,1);
I[9]=new Array();I[9][0]=100;
I[9][1]='';
I[9][2]='0';
I[9][3]=new Array();
I[9][3][0]=new Array('used in the assessment of hypothalamic pituitary adrenal axis','',1,0,1);
I[9][3][1]=new Array('contraindicated in ischemic heart disease and epilepsy','',1,0,1);
I[9][3][2]=new Array('the aim of the test is to produce signs of hypoglycemia with a glucose level below 2.2 mmol/ L','',1,0,1);
I[9][3][3]=new Array('we should take serial blood samples of glucose, GH and cortisol','',1,0,1);
I[9][3][4]=new Array('the usual dose used in the test is NPH insulin 0.15 u/kg given subcutaneously','Correct Answer:- 1-and in the assessment of GH deficiency  2-and in SEVERE hypopituitarism  3-with signs of neuroglycopenia  4-true at time 0, 30, 45 , 60 , 90 ,120 minutes  5-FALSE it is soluble insulin 0.15 u/kg given intravenously  Remember: at the end of the test, GH shloud be > 20 mu/ L and cortisol >550 nmol/ L',1,100,1);
I[10]=new Array();I[10][0]=100;
I[10][1]='';
I[10][2]='0';
I[10][3]=new Array();
I[10][3][0]=new Array('it is used in the diagnosis of diabetes insipidus ( DI )and to differentiate between cranial and nephrogenic DI.','',1,0,1);
I[10][3][1]=new Array('there is should be no coffee, tea or smoking on the test day','',1,0,1);
I[10][3][2]=new Array('The test should be stopped if the patient loses 3% of his body weight','',1,0,1);
I[10][3][3]=new Array('when trying to differentiate DI from compulsive water drinking, DDAVP is useful','Correct Answer:- DDAVP should not be given if you suspect a compulsive water drinking as this will prevent water excretion and risks severe water intoxication if the patient continues to drink water.',1,100,1);
I[10][3][4]=new Array('if the initial urinary osmilality is 700 mosl/ kg the nthe test should be stopped and DI is excluded','',1,0,1);
I[11]=new Array();I[11][0]=100;
I[11][1]='';
I[11][2]='0';
I[11][3]=new Array();
I[11][3][0]=new Array('the commonest cause is Grave\'s disease','',1,0,1);
I[11][3][1]=new Array('if there is prominent anorexia then a malignant cause should be suspected','',1,0,1);
I[11][3][2]=new Array('vitilligo and lymphadenopathy goes more with Grave\'s disease than other etiologies','',1,0,1);
I[11][3][3]=new Array('apathy and osteoporosis are mainly seen in elderly patients','',1,0,1);
I[11][3][4]=new Array('pruritis, palmar erythema and spider nevi are more suggestive of an associated chronic active hepatitis','Correct Answer:- pruritis ( with increased sweating ) , palmar erythema and spider nevi , skin pigmentation ( but vitilligo is much more common ) and  clubbing all are seen in thyrotoxicosis per se',1,100,1);
I[12]=new Array();I[12][0]=100;
I[12][1]='';
I[12][2]='0';
I[12][3]=new Array();
I[12][3][0]=new Array('raised alkaline phosphatase','',1,0,1);
I[12][3][1]=new Array('raised ALT and AST','',1,0,1);
I[12][3][2]=new Array('hypercalcemia is usually seen in 50 % of cases','Correct Answer:- 1-and slightly raised S. bilirubin  2-true  3-FALSE, up to 5 % only and almost always mild  4-due to associated diabetes mellitus and lag storage  5-true',1,100,1);
I[12][3][3]=new Array('glycosuria','',1,0,1);
I[12][3][4]=new Array('raised gamma GT in the absence of enzyme-inducing drugs or alcoholism','',1,0,1);
I[13]=new Array();I[13][0]=100;
I[13][1]='';
I[13][2]='0';
I[13][3]=new Array();
I[13][3][0]=new Array('following successful treatment with carbimazole, up 50% will relapse following drug stoppage','',1,0,1);
I[13][3][1]=new Array('subtotal thyroidectomy is contraindicated in those with previous thyroid surgery','',1,0,1);
I[13][3][2]=new Array('radi-iodine is contraindicated in pregnancy','',1,0,1);
I[13][3][3]=new Array('following subtotal thyroidectomy , up to 10% will develop permanent hypocalcaemia','Correct Answer:- 1-0.2% will develop severe reversible agranulocytosis during carbimazole  2-and in those dependent on voice e.g. opera singers  3-and planned pregnancy with in 6 months  4-FALSE 10% will develop TRANSIENT hypocalcaemia following surgery and 1% only develops long term permanent hypocalcaemia  5-true  Remember: the clinical improvement in a patient on carbimazole is seen after 2 weeks but the biochemical abnormalities will normalize after 4 weeks.',1,100,1);
I[13][3][4]=new Array('following treatment with radio-iodine, up to 80% will develop permanent hypothyroidism after 15 years','',1,0,1);
I[14]=new Array();I[14][0]=100;
I[14][1]='';
I[14][2]='0';
I[14][3]=new Array();
I[14][3][0]=new Array('usually virally induced','',1,0,1);
I[14][3][1]=new Array('there is anterior neck pain worsened by coughing, swallowing and movement of the neck','',0,0,1);
I[14][3][2]=new Array('ESR is usually normal','Correct Answer:- 1-like coxsackie , mumps and adeno virus  2-and may radiate to the jaw and ears  3-FALSE, ESR is usually raised and a low titer of thyroid antibodies is non specifically detected transiently  4-True    5-true, no need for anti-thyroid drugs',1,100,1);
I[14][3][3]=new Array('usually responds well to treatment with non steroidal anti inflammatory drugs but steroids are occasionally used for severe cases','',1,0,1);
I[14][3][4]=new Array('the hyperthyroidism per se is usually mild and no treatment is needed for it apart from oral propranolol or certain cases','',1,0,1);
I[15]=new Array();I[15][0]=100;
I[15][1]='';
I[15][2]='0';
I[15][3]=new Array();
I[15][3][0]=new Array('it is an uncommon condition due to self administration of T4 the','',1,0,1);
I[15][3][1]=new Array('the radio-iodine uptake scan is suppressed','',1,0,1);
I[15][3][2]=new Array('undetectable serum thyroglobulin','',1,0,1);
I[15][3][3]=new Array('high T3:T4 ratio','Correct Answer:- The combination of: Suppressed TSH, negligible radio-iodine uptake, low serum thryroglubulin and greatly raised T4:T3 ratio (usually around 70:1) are diagnostic',1,100,1);
I[15][3][4]=new Array('the TSH is suppressed','',1,0,1);
I[16]=new Array();I[16][0]=100;
I[16][1]='';
I[16][2]='0';
I[16][3]=new Array();
I[16][3][0]=new Array('occurs in 5-10% of women in the first 6 months following delivery','',1,0,1);
I[16][3][1]=new Array('thyroid biopsy shows lymphocytic thyroiditis','',1,0,1);
I[16][3][2]=new Array('it tends to recur after subsequent pregnancies','',1,0,1);
I[16][3][3]=new Array('there is an association between post partum depression and post partum thyoriditis','Correct Answer There is NO an association between post partum depression and post partum thyoriditis',1,100,1);
I[16][3][4]=new Array('there is a negligible radio-iodine thyroid scan','',1,0,1);
I[17]=new Array();I[17][0]=100;
I[17][1]='';
I[17][2]='0';
I[17][3]=new Array();
I[17][3][0]=new Array('the commonest precipitation factor is infection in a previously undiagnosed or improperly treated hyperthyroidism patient','',1,0,1);
I[17][3][1]=new Array('although being a life threatening increase in the activity of the thyoird gland, fortunately in clinical practice it is rare','',1,0,1);
I[17][3][2]=new Array('rehydration and broad spectrum antibiotics are important in the management','',1,0,1);
I[17][3][3]=new Array('if the patient can not swallow carbimazole then it should be given intravenously','Correct Answer:- 1-also by surgery and radio-iodine treatment in a previously inappropriately treated patient  2-this is true  3-antithyroid measures are: oral or IV propranolol, oral sodium iopodate (a radiocontrast medium will restore serum T2 levels to normal with in 2-3 days), oral potassium iodate or Lugol\'s solution, oral or per rectal carbimazole  4-there is NO parenteral preparation for carbimazole , if can not be given orally , then give it rectally  5-true',1,100,1);
I[17][3][4]=new Array('after 10-14 days of treatments with various antithyroid measures, sodium iopodate and propraanolol can be stopped and the patient will continue ni carbimazole','',1,0,1);
I[18]=new Array();I[18][0]=100;
I[18][1]='';
I[18][2]='0';
I[18][3]=new Array();
I[18][3][0]=new Array('Hashimoto thyroiditis','',1,0,1);
I[18][3][1]=new Array('Dyshormonogenesis','',1,0,1);
I[18][3][2]=new Array('drug induced','',1,0,1);
I[18][3][3]=new Array('ioidine deficiency','',1,0,1);
I[18][3][4]=new Array('post-ablative','Correct Answer:- Post ablative and primary atrophic hypothyroidism are both not goitrous',1,100,1);
I[19]=new Array();I[19][0]=100;
I[19][1]='';
I[19][2]='0';
I[19][3]=new Array();
I[19][3][0]=new Array('frank psychosis','',1,0,1);
I[19][3][1]=new Array('myotonia','',1,0,1);
I[19][3][2]=new Array('ascites','',1,0,1);
I[19][3][3]=new Array('ileus','',1,0,1);
I[19][3][4]=new Array('iron deficiency anemia','Correct Answer:- Iron deficiency anemia is a common finding in premenaolausal females due to heavy menses. There 8 RARE but well recognized features although SEEN in many textbooks and QUESTIONS and BOFs \u2026\u2026yet in clinical practice if you are in an endocrinology clinic, you will see that they are rare: 1-Myotonia 2-creberallar ataxia  3-frank psychosis  4-pleural and pericardial effusions and heart failure 5-ileus 6-impotence (while in thyrotoxicosis it is common!!)    7-galactorrhea  8-ascites  So you should know that \u2026\u2026\u2026"the common is common!!! And always take the norm rather than the exception!!! \u2026..',1,100,1);
I[20]=new Array();I[20][0]=100;
I[20][1]='';
I[20][2]='0';
I[20][3]=new Array();
I[20][3][0]=new Array('high serum LDH and CPK','',1,0,1);
I[20][3][1]=new Array('high cholesterol and triglycerides','',1,0,1);
I[20][3][2]=new Array('macrocytic anemia','',1,0,1);
I[20][3][3]=new Array('high serum T3 level','Correct Answer:- READ the question well "Biochemical findings that are useful in the assessment of hypothyroidism"  T3 is not a reliable test to differentiate between euthyroid and hypothyroid patient. Also we may see: normochromic anemia. Low voltage ECG, bradycardia and non specific ST-T changes indicate PROLOBGED SEVERE hypothyroidism.',1,100,1);
I[20][3][4]=new Array('rasied TSH','',1,0,1);
I[21]=new Array();I[21][0]=100;
I[21][1]='';
I[21][2]='0';
I[21][3]=new Array();
I[21][3][0]=new Array('oral T4 is the cornerstone of treatment','',1,0,1);
I[21][3][1]=new Array('the correct dose of thyroxin is that which restores the serum TSH to normal','',1,0,1);
I[21][3][2]=new Array('the patient usually feels better after 2-3 weeks','',1,0,1);
I[21][3][3]=new Array('restoration of skin and hair texture is usually seen after 3 weeks','Correct Answer:- Remember: Subjective improvement is seen after 2-3 weeks, and the reduction in body weight and periorbital puffiness occurs relatively rapidly, BUT restoration of skin and hair texture and resolution of any effusion may take 3-6 MONTHS.',1,100,1);
I[21][3][4]=new Array('elderly patients should be started on a low dose thyroxin with gradual escalation','',1,0,1);
I[22]=new Array();I[22][0]=100;
I[22][1]='';
I[22][2]='0';
I[22][3]=new Array();
I[22][3][0]=new Array('unfortunately the mortality rate is 50% but fortunately the condition is rare.','',1,0,1);
I[22][3][1]=new Array('convulsions are not uncommon and opening CSF pressure may be raised','',1,0,1);
I[22][3][2]=new Array('it is a medical emergency and treatment must be started before the biochemical confirmation','',1,0,1);
I[22][3][3]=new Array('unless there is an evidence of primary hypothyroidism like thyroid scar , it should be considered to be secondary to pituitary or hypothalamic dysfunction .','',1,0,1);
I[22][3][4]=new Array('thyroxin should be given intravenously','Correct Answer:- 1-true, a rare presentation rather than to be complication of an already diagnosed patient  2-as well as raised CSF protein, so you it may be missed as a PRIMARY CNS DISEASE  3-true \u2026\u2026it is not a "cold case" 4-true and start treatment with intravenous hydrocortisone before the biochemical diagnosis 5- There is NO parenteral preparation of T4, BUT there is a parenteral form of T3 and so T3 can be given intravenously.',1,100,1);
I[23]=new Array();I[23][0]=100;
I[23][1]='';
I[23][2]='0';
I[23][3]=new Array();
I[23][3][0]=new Array('it is important to ensure compliance and the drug should be taken infinitely.','',1,0,1);
I[23][3][1]=new Array('once the dose of thyroxin is stabilized based on serum TSH, the TSH and T4 should be measure every 1-2 years','',1,0,1);
I[23][3][2]=new Array('during a visit the combination of raised serum T4 and high TSH indicates a strict compliance','Correct Answer:- This is the classical finding in those who are non compliant and take large doses before the follow up visit to fool the doctor!!! \u2026\u2026.so don\u2019t be fooled!!!!!!!',1,100,1);
I[23][3][3]=new Array('some patients may take thyroxin erratically when they know that the half life is long','',1,0,1);
I[23][3][4]=new Array('excessive sweating, tachycardia and anxiety may indicate over treatment','',1,0,1);
I[24]=new Array();I[24][0]=100;
I[24][1]='';
I[24][2]='0';
I[24][3]=new Array();
I[24][3][0]=new Array('amiodarone may cause hypo or hyperthyroidism','',1,0,1);
I[24][3][1]=new Array('lithium may cause hypothyroidism','',1,0,1);
I[24][3][2]=new Array('potassium iodide may cause hypothyrodism','',1,0,1);
I[24][3][3]=new Array('phenytoin may decrease the needed dose of thyroxin','Correct Answer:- Phneytoin is an enzyme inducer, so the dose of thyroxin may need to be increased in hypothyroidism and concomitant use of phenytoin',1,100,1);
I[24][3][4]=new Array('oral contraceptive pills may increase the total but not the free thyroxin','',1,0,1);
I[25]=new Array();I[25][0]=100;
I[25][1]='';
I[25][2]='0';
I[25][3]=new Array();
I[25][3][0]=new Array('Cushing disease','',1,0,1);
I[25][3][1]=new Array('Kallaman syndrome','',1,0,1);
I[25][3][2]=new Array('Prader Willi syndrome','',1,0,1);
I[25][3][3]=new Array('hypothalamic tumors','',1,0,1);
I[25][3][4]=new Array('gastric tumors','Correct Answer',1,100,1);
I[26]=new Array();I[26][0]=100;
I[26][1]='';
I[26][2]='0';
I[26][3]=new Array();
I[26][3][0]=new Array('each type usually has a certain age group to affect','',1,0,1);
I[26][3][1]=new Array('pappilary carcinoma is the commonest type','',1,0,1);
I[26][3][2]=new Array('some tumors are TSH dependent','',1,0,1);
I[26][3][3]=new Array('follicular carcinoma can be diagnosed by FNA cytology','Correct Answer Follicular carcinoma and adenoma are very similar on FNA cytology, so thyroid biopsy is needed to demonstrate vascular invasion in cases of carcinomas',1,100,1);
I[26][3][4]=new Array('very rarely thyrotoxicosis is seen','',1,0,1);
I[27]=new Array();I[27][0]=100;
I[27][1]='';
I[27][2]='0';
I[27][3]=new Array();
I[27][3][0]=new Array('pappilary carcinomas usually seen between 20-40 years of age','',1,0,1);
I[27][3][1]=new Array('medullary thyroid carcinoma in a 20 year old man may indicate MEN type II','',1,0,1);
I[27][3][2]=new Array('anaplastic carcinomas usually seen in elderly people','',1,0,1);
I[27][3][3]=new Array('thyroid lymphomas may arise from a preexistent Hashimoto\'s thyroiditis','',1,0,1);
I[27][3][4]=new Array('secondary tumors are very commonly seen','Correct Answer:- Secondary tumors are rarely seen.',1,100,1);
I[28]=new Array();I[28][0]=100;
I[28][1]='';
I[28][2]='0';
I[28][3]=new Array();
I[28][3][0]=new Array('The prognosis is generally poor when compared with differentiated carcinomas','',1,0,1);
I[28][3][1]=new Array('When seen in a young person, it may be part of MEN type 1','Correct Answer:- 1-true 2-false, type II  3-true, as there is no other curative treatment  4-this is true, clinically speaking it is only a tumor MARKER!!!!  5-because the Para-follicular cells don\u2019t trap iodine and hence it has no role in the treatment',1,100,1);
I[28][3][2]=new Array('as a treatment option, total thyroidectomy is preferred','',1,0,1);
I[28][3][3]=new Array('high level of calcitonin rarely if ever causes hypocalcemia','',1,0,1);
I[28][3][4]=new Array('the tumor secreting cells do not respond to radio-iodine treatment','',1,0,1);
I[29]=new Array();I[29][0]=100;
I[29][1]='';
I[29][2]='0';
I[29][3]=new Array();
I[29][3][0]=new Array('the commonest cause is a single parathyroid adenoma','',1,0,1);
I[29][3][1]=new Array('the commonest cause of out patient hypercalcemia','',1,0,1);
I[29][3][2]=new Array('together with malignancy, they both account for up to 90% of cases of hypercalcemia','',1,0,1);
I[29][3][3]=new Array('lithium induced hyperparathyroidism may present exactly like primary hyperparathyroidism','',1,0,1);
I[29][3][4]=new Array('the parathyroids are usually palpable in the neck','Correct Answer:- Even when caused by an adenoma, the tumor is rarely felt in the neck (usually located at surgical exploration)',1,100,1);
I[30]=new Array();I[30][0]=100;
I[30][1]='';
I[30][2]='0';
I[30][3]=new Array();
I[30][3][0]=new Array('primary hyperparathyroidism','',1,0,1);
I[30][3][1]=new Array('tertiary hyperparathyroidism','',1,0,1);
I[30][3][2]=new Array('lithum-induced hyperparathyroidism','',1,0,1);
I[30][3][3]=new Array('familial hypocalciuric hypercalcemia','',1,0,1);
I[30][3][4]=new Array('malignancy','Correct Answer:- Malignancy is a cause of hypercalcemia with undetectable parathyroid hormone level (also vitamin intoxication, milk alkai syndrome, sarcoidosis , Adeson\'s disease )',1,100,1);
I[31]=new Array();I[31][0]=100;
I[31][1]='';
I[31][2]='0';
I[31][3]=new Array();
I[31][3][0]=new Array('iv fluids are very important','',1,0,1);
I[31][3][1]=new Array('un very high calicium levels, iv pamidronate is given initially with excellent results','',1,0,1);
I[31][3][2]=new Array('forced diuresis may be used','',1,0,1);
I[31][3][3]=new Array('like primary hyperparathyroidism, glucocorticoides are in effective','Correct Answer:- High dose Glucocorticoides are effective in the treatment of very ill patients .',1,100,1);
I[31][3][4]=new Array('there is a place for hemodialysis','',1,0,1);
I[32]=new Array();I[32][0]=100;
I[32][1]='';
I[32][2]='0';
I[32][3]=new Array();
I[32][3][0]=new Array('may be seen in peudopseudohypoparathyroidism','Correct Answer:- It may caused by hypoparathyroidism and pseudohypoparathyroidism . Also may cause seizures, parkinsonian like picture. Pseudopseudohypoparathryoidism resembles   pseudohypoparathryoidism phonotypically but it has normal biochemical profile',1,100,1);
I[32][3][1]=new Array('may be a cause of cateract','',1,0,1);
I[32][3][2]=new Array('basal ganglia calcification is seen','',1,0,1);
I[32][3][3]=new Array('pappilodema has been documented','',1,0,1);
I[32][3][4]=new Array('mucocutaneous candidiasis is an association','',1,0,1);
I[33]=new Array();I[33][0]=100;
I[33][1]='';
I[33][2]='0';
I[33][3]=new Array();
I[33][3][0]=new Array('chronic renal failure','',1,0,1);
I[33][3][1]=new Array('hypoparathyroidism','',1,0,1);
I[33][3][2]=new Array('pseudohypoparathyroidism','',1,0,1);
I[33][3][3]=new Array('hypomagnesemia','',1,0,1);
I[33][3][4]=new Array('pseudopseudohypoparathryoidism','Correct Answer:- Pseudopseudohypoparathryoidism resembles   pseudohypoparathryoidism phonotypically but it has normal biochemical profile',1,100,1);
I[34]=new Array();I[34][0]=100;
I[34][1]='';
I[34][2]='0';
I[34][3]=new Array();
I[34][3][0]=new Array('carpo-pedal spasm is more common in children than adults','',1,0,1);
I[34][3][1]=new Array('in adults, stridor is uncommon','',1,0,1);
I[34][3][2]=new Array('siezures are usually resistant to antiepileptic therapy','',1,0,1);
I[34][3][3]=new Array('the cornerstone in the treatment of pseudohypoparathyroidism is calcium supplement','Correct Answer:- pseudohypoparathyroidism is treated by vitamine D metabolites like alpha calcidol tablets and follow up the patient with serum PTH and serum calcium.',1,100,1);
I[34][3][4]=new Array('regualr follow up is need with measurement of serum calcium','',1,0,1);
I[35]=new Array();I[35][0]=100;
I[35][1]='';
I[35][2]='0';
I[35][3]=new Array();
I[35][3][0]=new Array('obesity is the commonest sign','',1,0,1);
I[35][3][1]=new Array('hypertension is absent in 25% of cases','',1,0,1);
I[35][3][2]=new Array('prominent hyper-pigmentation is in favor of an ectopic ACTH secreting source','',1,0,1);
I[35][3][3]=new Array('depression is the commonest psychiatric manifestation','',1,0,1);
I[35][3][4]=new Array('mucsle biopsy will show type I fiber atrophy','Correct Answer:- 1-and weight gain is the commonest symptom  2-so it is seen in 75% of cases  3-as well as prominent hypokalemic alkalosis 4-psychosis is uncommon  5-type II fiber atrophy  Remember:  Striae are seen in 50%  Proximal myopathy 50% Bruising 50%  Obesity as a sign is seen in 97% of cases, so 3 % are not obese.',1,100,1);
I[36]=new Array();I[36][0]=100;
I[36][1]='';
I[36][2]='0';
I[36][3]=new Array();
I[36][3][0]=new Array('In the diagnosis of Cushing syndrome, all are true except:','',1,0,1);
I[36][3][1]=new Array('24 hours urinary free cortisol or overnight low dose dexamethasone suppression test are the preferred initial screening tests','',1,0,1);
I[36][3][2]=new Array('unfortunately dexamethason cross reacts with cortisol immunoassay','Correct Answer:- 1-true as the stress of hospitalization may interfere with many tests and some normal persons will even FAIL to suppress on overnight dexamehtason suppression test (i.e. behaves like Cushing\'s) because the hypothalamic- pituitary-adrenal axis will ESCAPE such suppression due to powerful endogenous stress mechanisms     2-true. 3-False, it does not cross react and that\'s why it is used in the suppression test 4-hence called pseudo Cushing\'s  5-and very high levels indicate an ectopic source',1,100,1);
I[36][3][3]=new Array('chronic alcoholism sometimes exactly resembles Cushing\'s syndrome clinically and biochemically','',1,0,1);
I[36][3][4]=new Array('supprssed ACTH levels indicate an adrenal tumor','',1,0,1);
I[36][3][5]=new Array('','',1,0,1);
I[37]=new Array();I[37][0]=100;
I[37][1]='';
I[37][2]='0';
I[37][3]=new Array();
I[37][3][0]=new Array('in pituitary dependent disease, trans-sphenoidal surgery is the preferred option','',1,0,1);
I[37][3][1]=new Array('if treated by bilateral adrenalectomy, the pituitary should be irradiated to prevent the development of Nelson\'s syndrome','',1,0,1);
I[37][3][2]=new Array('medical treatment is usually given in the way to prepare the patient for surgery','',1,0,1);
I[37][3][3]=new Array('adrenal carcinoma should be removed surgically and the tumor bed is irradiated and then the patient is given the drug o\'p\'DDD','',1,0,1);
I[37][3][4]=new Array('without treatment, the 5 year survival rate is 75%','Correct Answer:- Without treatment, the 5 year survival rate is 50%',1,100,1);
I[38]=new Array();I[38][0]=100;
I[38][1]='';
I[38][2]='0';
I[38][3]=new Array();
I[38][3][0]=new Array('treamtent with carbenoxolone','',1,0,1);
I[38][3][1]=new Array('11 deoxycorticosterone secreting tumors','',1,0,1);
I[38][3][2]=new Array('Liddle\'s syndrome','',1,0,1);
I[38][3][3]=new Array('ectopic ACTH syndrome','',1,0,1);
I[38][3][4]=new Array('glucocorticoides suppressible hyperaldosterosnism','Correct Answer:- 1-and liquorice abuse 2-and congenital adrenal hyperplasia due to 11 beta hydroxylase and 17 alpha hydroxylase deficiency. 3-causing hypokalemia, hypertension and low aldosterone 4-and 11 beta HSD deficiency  5- glucocorticoids suppressible hyperaldosterosnism and Conn\'s adenoma and idiopathic bilateral adrenal hyperplasia , all are the cause of PRIMARY aldosteronism',1,100,1);
I[39]=new Array();I[39][0]=100;
I[39][1]='';
I[39][2]='0';
I[39][3]=new Array();
I[39][3][0]=new Array('hypertension is almost always present and is the commonest presenting feature','',1,0,1);
I[39][3][1]=new Array('serum potassium is normal up to 70% of cases at the time of diagnosis','',1,0,1);
I[39][3][2]=new Array('of all causes, only Conn\'s adenoma can be treated by surgery','',1,0,1);
I[39][3][3]=new Array('spironolactone is very effective in normalizing the blood pressure and biochemical abnormalities in the majority of cases','',1,0,1);
I[39][3][4]=new Array('leg edema is very common','Correct Answer:- Although there is an avid sodium retention, leg edema is uncommon and suggests secondary aldosteronism  Remember: serum potassium is normal up to 70% at the time of diagnosis because many patients are already treated by salt restriction making less sodium available to be exchanged for potassium at the distal tubule.',1,100,1);
I[40]=new Array();I[40][0]=100;
I[40][1]='';
I[40][2]='0';
I[40][3]=new Array();
I[40][3][0]=new Array('may be part of specific syndromes','',1,0,1);
I[40][3][1]=new Array('predominantly elevated noradrenalin suggests either a large adrenal tumor or an extra adrenal tumor','',1,0,1);
I[40][3][2]=new Array('weight loss indicates associated diabetes mellitus','Correct Answer:- 1-like MEN type II, neurofibromatosis, Von Hipple Lindau 2-and predominantly elevated adrenalin indicates an adrenal tumor that is not large enough to outgrow its blood supply  3-false, it commonly occurs in the absence of diabetes  4-indicating a high level of dopamine  5-in urinary bladder tumors  Remember: although pallor is commonly seen during the attack, occasionally FLUSHING is seen.',1,100,1);
I[40][3][3]=new Array('postural hypotension may be seen','',1,0,1);
I[40][3][4]=new Array('the rise in blood pressure may occur during urination','',1,0,1);
I[40][3][5]=new Array('','',1,0,1);
I[41]=new Array();I[41][0]=100;
I[41][1]='';
I[41][2]='0';
I[41][3]=new Array();
I[41][3][0]=new Array('the commonest cause is autoimmune adrenalitis','',1,0,1);
I[41][3][1]=new Array('vitilligo is seen in 20% of cases','',1,0,1);
I[41][3][2]=new Array('hyperglycemia indicates associated type I diabetes','',1,0,1);
I[41][3][3]=new Array('postural hypotension is indicates glucocorticoids rather than mineralocorticoids deficiency','',1,0,1);
I[41][3][4]=new Array('it is a common condition with an incidence of 80 new case/ million of population','Correct Answer:- 1-TB is the next , hence CXR should be done in all cases. 2-when present with hyperpigmentation both are highly suggestive  3-Addison\'s disease per se causes fasting hypoglycemia  4-true  5-false, it is a rare disease with an incidence of 8 new case/ million of population. Male to female ratio is 1:2',1,100,1);
I[42]=new Array();I[42][0]=100;
I[42][1]='';
I[42][2]='0';
I[42][3]=new Array();
I[42][3][0]=new Array('the commonest cause is 21 alpha hydroxylase deficiency','',1,0,1);
I[42][3][1]=new Array('all cases are autosomal recessive','',1,0,1);
I[42][3][2]=new Array('causes ambiguous genitalia in females and precocious pseudopuberty in males','',1,0,1);
I[42][3][3]=new Array('11 beta and 17 alpha hydroxylases are associated with hypotension','Correct Answer:- 1-up to 90% of cases, and a late onset form with hirsutism is a recognized presentation  2-true, many enzymatic deficiencies are documented  3-and salt losing nephropathy and crises in neonates, usually in males  4-false, associated with hypertension due to increased 11 deoxycorticosterone, a powerful mineralocorticoid  5-true, and plastic surgery has a place for the ambiguous genitalia in females',1,100,1);
I[42][3][4]=new Array('the condition can be prevented by appropriate prenatal diagnosis and giving dexamethason to the pregnant mother','',1,0,1);
I[43]=new Array();I[43][0]=100;
I[43][1]='';
I[43][2]='0';
I[43][3]=new Array();
I[43][3][0]=new Array('digoxin','',1,0,1);
I[43][3][1]=new Array('cimetidin','',1,0,1);
I[43][3][2]=new Array('stilboestrol','',1,0,1);
I[43][3][3]=new Array('spironolactone','',1,0,1);
I[43][3][4]=new Array('ameloride','Correct Answer:- Other drugs :estrogens , GnRH analogues given for prostatic carcinomas',1,100,1);
I[44]=new Array();I[44][0]=100;
I[44][1]='';
I[44][2]='0';
I[44][3]=new Array();
I[44][3][0]=new Array('insuline resistance is though to be the central key in the pathogenesis','',1,0,1);
I[44][3][1]=new Array('mild elevation in serum prolactin','',1,0,1);
I[44][3][2]=new Array('mild elevation of serum androgens','',1,0,1);
I[44][3][3]=new Array('elevated blood estron level','',1,0,1);
I[44][3][4]=new Array('FSH:LH ratio more than 2.5:1','Correct Answer:- LH:FSH ratio more than 2.5:1 Also :hypertension, hyperglycemia, hyperlipidemia , hisutism , oligomenorrhea or secondary amenorrhea , infertility . Remember : PCOS is treated according to the PRERSENTING feature .ie treat the complaint eg complaining of infertility so treat infertility, complaining of hirsutism so treat the hirsutism . DON\u2019T TRY TO TREAT EVERYTHING!!!! However, weight reduction in obese is important in the overall management.',1,100,1);
I[45]=new Array();I[45][0]=100;
I[45][1]='';
I[45][2]='0';
I[45][3]=new Array();
I[45][3][0]=new Array('as idiopathic hirsutism is the commonest cause so being an Asian or Mediterranean is important clue to it','',1,0,1);
I[45][3][1]=new Array('high levels of androgens that don\u2019t suppress with steroids or estrogens is a very important clue to ovarian or adrenal tumors','',1,0,1);
I[45][3][2]=new Array('being a highly trained athletic female may suggest an exogenic androgen intake','',1,0,1);
I[45][3][3]=new Array('mooning of the face with obesity and striae may be a clue to Cushing\'s syndrome','',1,0,1);
I[45][3][4]=new Array('family history of hirsutism is not that important','Correct Answer:- In idiopathic hisutism , female family history is very important especially seen in Asians or Mediterraneans',1,100,1);
I[46]=new Array();I[46][0]=100;
I[46][1]='';
I[46][2]='0';
I[46][3]=new Array();
I[46][3][0]=new Array('due to mutation in MENIN gene on chromosome 11 in type','',1,0,1);
I[46][3][1]=new Array('hypercalcemia is the commonest presenting feature in type II','Correct Answer:- 1-and mutation in RET proto-oncogen on chromosome 10 in type II	 2-hypercalcemia is the commonest presenting feature in type I while in type it is uncommon and in type IIa it is absent 3-true, hence family history is very important  4-unlike the sporadic ones other syndromes. 5-also Cushing syndrome is uncommon in type I',1,100,1);
I[46][3][2]=new Array('family history of one relevant endocrine tumor may be present','',1,0,1);
I[46][3][3]=new Array('pheochromocytomas in type II are bilateral in 70% of cases','',1,0,1);
I[46][3][4]=new Array('carcinoid syndrome is uncommon in type I','',1,0,1);
I[47]=new Array();I[47][0]=100;
I[47][1]='';
I[47][2]='0';
I[47][3]=new Array();
I[47][3][0]=new Array('the commonest site is the ileum for carcinoid tumors','',1,0,1);
I[47][3][1]=new Array('may present as appendicitis','',1,0,1);
I[47][3][2]=new Array('the long term prognosis is excellent in the majority','',1,0,1);
I[47][3][3]=new Array('carcinoid syndrome may present as right sided heart failure','',1,0,1);
I[47][3][4]=new Array('cramping abdominal pain and diarrhea with flushing and wheeze is the commonest presenting feature of carcinoid tumors','Correct Answer:- 1-true, next is the cecum and appendix  2-due to obstruction of the mouth of the appendix  3-because they have a low malignant potential 4-pulmonic stenosis, tricuspid regurgitation and right sided endocardial fibrosis  5- cramping  abdominal pain and diarrhea with flushing and wheeze is the commonest presenting feature of carcinoid SYNROMS not tumors',1,100,1);
I[48]=new Array();I[48][0]=100;
I[48][1]='';
I[48][2]='0';
I[48][3]=new Array();
I[48][3][0]=new Array('somatostatinomas may presents with gall stones and diabetes','',1,0,1);
I[48][3][1]=new Array('glucagonomas may present with anemia and weight loss','',1,0,1);
I[48][3][2]=new Array('gastrinomas may present with steatorrhea','',1,0,1);
I[48][3][3]=new Array('VIPOmas may present with watery diarrhea and hyperkalemia','Correct Answer:- 1-and steatorrhea and achlorhydria  2-and skin rash and diabetes  3-or watery diarrhea and multiple severe peptic ulceration  4-false , with HYPOKALEMIA , hence called pancreatic cholera  5-due to hypoglycemia',1,100,1);
I[48][3][4]=new Array('insulinoams may present with dizzy spells','',1,0,1);


function StartUp(){
	RemoveBottomNavBarForIE();

//If there's only one question, no need for question navigation controls
	if (QsToShow < 2){
		document.getElementById('QNav').style.display = 'none';
	}
	
//Stash the instructions so they can be redisplayed
	strInstructions = document.getElementById('InstructionsDiv').innerHTML;
	

	

	
	CompleteEmptyFeedback();

	SetUpQuestions();
	ClearTextBoxes();
	CreateStatusArray();
	

	setTimeout('StartTimer()', 50);

	
//Check search string for q parameter
	if (document.location.search.length > 0){
		if (ShuffleQs == false){
			var JumpTo = parseInt(document.location.search.substring(1,document.location.search.length))-1;
			if (JumpTo <= QsToShow){
				ChangeQ(JumpTo);
			}
		}
	}
//Undocumented function added 10/12/2004
	ShowSpecialReadingForQuestion();
}

function ShowHideQuestions(){
	FuncBtnOut(document.getElementById('ShowMethodButton'));
	document.getElementById('ShowMethodButton').style.display = 'none';
	if (ShowingAllQuestions == false){
		for (var i=0; i<QArray.length; i++){
				QArray[i].style.display = '';
			}
		document.getElementById('Questions').style.listStyleType = 'decimal';
		document.getElementById('OneByOneReadout').style.display = 'none';
		document.getElementById('ShowMethodButton').innerHTML = ShowOneByOneCaption;
		ShowingAllQuestions = true;
	}
	else{
		for (var i=0; i<QArray.length; i++){
				if (i != CurrQNum){
					QArray[i].style.display = 'none';
				}
			}
		document.getElementById('Questions').style.listStyleType = 'none';
		document.getElementById('OneByOneReadout').style.display = '';
		document.getElementById('ShowMethodButton').innerHTML = ShowAllQuestionsCaption;
		ShowingAllQuestions = false;	
	}
	document.getElementById('ShowMethodButton').style.display = 'inline';
}

function CreateStatusArray(){
	var QNum, ANum;
//For each item in the item array
	for (QNum=0; QNum<I.length; QNum++){
//Check if the question still exists (hasn't been nuked by showing a random selection)
		if (document.getElementById('Q_' + QNum) != null){
			State[QNum] = new Array();
			State[QNum][0] = -1; //Score for this q; -1 shows question not done yet
			State[QNum][1] = new Array(); //answers
			for (ANum = 0; ANum<I[QNum][3].length; ANum++){
				State[QNum][1][ANum] = 0; //answer not chosen yet; when chosen, will store its position in the series of choices
			}
			State[QNum][2] = 0; //tries at this q so far
			State[QNum][3] = 0; //incrementing percent-correct values of selected answers
			State[QNum][4] = 0; //penalties incurred for hints
			State[QNum][5] = ''; //Sequence of answers chosen by number
		}
		else{
			State[QNum] = null;
		}
	}
}



function CheckMCAnswer(QNum, ANum, Btn){
//if question doesn't exist, bail
	if (State[QNum].length < 1){return;}
	
//Get the feedback
	Feedback = I[QNum][3][ANum][1];
	
//Now show feedback and bail if question already complete
	if (State[QNum][0] > -1){
//Add an extra message explaining that the question
// is finished if defined by the user
		if (strQuestionFinished.length > 0){Feedback += '<br />' + strQuestionFinished;}
//Show the feedback
		ShowMessage(Feedback);
		return;
	}
	
//Hide the button while processing
	Btn.style.display = 'none';

//Increment the number of tries
	State[QNum][2]++;
	
//Add the percent-correct value of this answer
	State[QNum][3] += I[QNum][3][ANum][3];
	
//Store the try number in the answer part of the State array, for tracking purposes
	State[QNum][1][ANum] = State[QNum][2];
	State[QNum][5] += String.fromCharCode(65+ANum) + ',';
	
//Should this answer be accepted as correct?
	if (I[QNum][3][ANum][2] < 1){
//It's wrong

//Mark the answer
		Btn.innerHTML = IncorrectIndicator;
		
//Remove any previous score unless exercise is finished (6.0.3.8+)
		if (Finished == false){
			WriteToInstructions(strInstructions);
		}	
		
//Check whether this leaves just one MC answer unselected, in which case the Q is terminated
		var RemainingAnswer = FinalAnswer(QNum);
		if (RemainingAnswer > -1){
//Behave as if the last answer had been selected, but give no credit for it
//Increment the number of tries
			State[QNum][2]++;		
		
//Calculate the score for this question
			CalculateMCQuestionScore(QNum);

//Get the overall score and add it to the feedback
			CalculateOverallScore();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.';
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.');
			}
		}
	}
	else{
//It's right
//Mark the answer
		Btn.innerHTML = CorrectIndicator;
				
//Calculate the score for this question
		CalculateMCQuestionScore(QNum);

//Get the overall score and add it to the feedback
		if (ContinuousScoring == true){
			CalculateOverallScore();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.';
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.');
			}
		}
	}
	
//Show the button again
	Btn.style.display = 'inline';
	
//Finally, show the feedback	
	ShowMessage(Feedback);
	
//Check whether all questions are now done
	CheckFinished();
}

function CalculateMCQuestionScore(QNum){
	var Tries = State[QNum][2] + State[QNum][4]; //include tries and hint penalties
	var PercentCorrect = State[QNum][3];
	var TotAns = GetTotalMCAnswers(QNum);
	var HintPenalties = State[QNum][4];
	
//Make sure it's not already complete

	if (State[QNum][0] < 0){
//Allow for Hybrids
		if (HintPenalties >= 1){
			State[QNum][0] = 0;
		}
		else{
//This line calculates the score for this question
			if (TotAns == 1){
				State[QNum][0] = 1;
			}
			else{
				State[QNum][0] = ((TotAns-((Tries*100)/State[QNum][3]))/(TotAns-1));
			}
		}
//Fix for Safari bug added for version 6.0.3.42 (negative infinity problem)
		if ((State[QNum][0] < 0)||(State[QNum][0] == Number.NEGATIVE_INFINITY)){
			State[QNum][0] = 0;
		}
	}
}

function GetTotalMCAnswers(QNum){
	var Result = 0;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			Result++;
		}
	}
	return Result;
}

function FinalAnswer(QNum){
	var UnchosenAnswers = 0;
	var FinalAnswer = -1;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			if (State[QNum][1][ANum] < 1){ //This answer hasn't been chosen yet
				UnchosenAnswers++;
				FinalAnswer = ANum;
			}
		}
	}
	if (UnchosenAnswers == 1){
		return FinalAnswer;
	}
	else{
		return -1;
	}
}





function CalculateOverallScore(){
	var TotalWeighting = 0;
	var TotalScore = 0;
	
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] > -1){
				TotalWeighting += I[QNum][0];
				TotalScore += (I[QNum][0] * State[QNum][0]);
			}
		}
	}
	if (TotalWeighting > 0){
		Score = Math.floor((TotalScore/TotalWeighting)*100);
	}
	else{
//if TotalWeighting is 0, no questions so far have any value, so 
//no penalty should be shown.
		Score = 100; 
	}
}

function CheckFinished(){
	var FB = '';
	var AllDone = true;
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] < 0){
				AllDone = false;
			}
		}
	}
	if (AllDone == true){
	
//Report final score and submit if necessary
		CalculateOverallScore();
		FB = YourScoreIs + ' ' + Score + '%.';
		if (ShowCorrectFirstTime == true){
			var CFT = 0;
			for (QNum=0; QNum<State.length; QNum++){
				if (State[QNum] != null){
					if (State[QNum][0] >= 1){
						CFT++;
					}
				}
			}
			FB += '<br />' + CorrectFirstTime + ' ' + CFT + '/' + QsToShow;
		}
		WriteToInstructions(FB);
		
		Finished == true;

		window.clearInterval(Interval);

		TimeOver = true;
		Locked = true;
		


		Finished = true;
		Detail = '<?xml version="1.0"?><hpnetresult><fields>';
		for (QNum=0; QNum<State.length; QNum++){
			if (State[QNum] != null){
				if (State[QNum][5].length > 0){
					Detail += '<field><fieldname>Question #' + (QNum+1) + '</fieldname><fieldtype>question-tracking</fieldtype><fieldlabel>Q ' + (QNum+1) + '</fieldlabel><fieldlabelid>QuestionTrackingField</fieldlabelid><fielddata>' + State[QNum][5] + '</fielddata></field>';
				}
			}
		}
		Detail += '</fields></hpnetresult>';
		setTimeout('Finish()', SubmissionTimeout);
	}
}


function TimesUp(){
	document.getElementById('Timer').innerHTML = 'Your time is over!';

	TimeOver = true;
	Finished = true;
	ShowMessage('Your time is over!');
	
//Set all remaining scores to 0
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] < 0){
				State[QNum][0] = 0;
			}
		}
	}
	CheckFinished();
}








//CODE FOR HANDLING TIMER
//Timer code
var Seconds = 3600;
var Interval = null;

function StartTimer(){
	Interval = window.setInterval('DownTime()',1000);
	document.getElementById('TimerText').style.display = 'inline';
}

function DownTime(){
	var ss = Seconds % 60;
	if (ss<10){
		ss='0' + ss + '';
	}

	var mm = Math.floor(Seconds / 60);

	if (document.getElementById('Timer') == null){
		return;
	}

	document.getElementById('TimerText').innerHTML = mm + ':' + ss;
	if (Seconds < 1){
		window.clearInterval(Interval);
		TimeOver = true;
		TimesUp();
	}
	Seconds--;
}






//-->

//]]>


