//global 'ttmx' object to store settings w/o creating tons of global variables
var ttmx = new Object();
ttmx.WIN_WIDTH = 970;//old=790;
ttmx.WIN_HEIGHT = 700;
ttmx.WIN_WIDTH_HOME = 930;
ttmx.WIN_HEIGHT_HOME = 700;
ttmx.WIN_NAME = "ttmx";
ttmx.ALERTID = "ttmx_alert_text";
ttmx.winSettings = "width=" + ttmx.WIN_WIDTH + ",height=" + ttmx.WIN_HEIGHT + ",top=10,left=10,location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes";
ttmx.winSettingsHome = "width=" + ttmx.WIN_WIDTH_HOME + ",height=" + ttmx.WIN_HEIGHT_HOME + ",top=10,left=10,location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes";
ttmx.FEEDBACK_REPORTWIN_DETAILS = "top=0,left=50,width=800,scrollbars=yes,toolbar=yes,menubar=no";

function launchTTMXwin(changeCurrent) {
	//designed to be called in the onSubmit event of a form element.
	//e.g.      <form action="LoginServlet" target="ttmx" onsubmit="launchTTMXwin()">
	if(window.name != ttmx.WIN_NAME) {  //if we're already in the popup, don't open another window
	  if(changeCurrent)
	    window.location = "./"; //change the current screen to a new URL
	  var newWin = window.open('',ttmx.WIN_NAME,ttmx.winSettings);
	  newWin.focus();
	 //now as long as the the form's target == ttmx.WIN_NAME, submitting the form will make it open in the new smaller window.
	}
}

function submitParentForm(ele) {
	var f = null;
	if(ele && ele.id) {//try to find element's parent form
	 for(var i=0;i < document.forms.length; i++)
	  if(document.forms[i][ele.id] == ele) {
	   f = document.forms[i];
	   break;
	  }
	}
	if(f == null) //we didn't find the parent, just use the first form
	  f = document.forms[0];
	f.submit();
}



var reDo=false;
function firstSubmit() {
	if(!reDo) {reDo = true; return true;}
	return false;
}

function RefreshSubmit(){
      if(firstSubmit()) {
        document.forms[0].command.value='refresh';
	document.forms[0].target='_top';
        document.forms[0].submit();
      }
    }

function winopen(url,stuff,morestuff) {
  window.open(url,stuff,morestuff).focus();
}

    function ReportSubmit(){
      if(firstSubmit()) {
        document.forms[0].target.value='report';
        document.forms[0].submit();
        setTimeout("window.close()", 3000);
      }
   }

//***********
//functions for centralizing popups-

var winwidth = 790; //default size for program windows
var winheight = 580;

var Popup=null;
var Popup2=null;
function openPopup(destination,specialsettings)
{
	//programmer can over-ride window features with optional 'specialsettings' parameter
	var settings = "";
	var winname = "ttmx";
	if(specialsettings == null || specialsettings == "")
	{

	 TopPosition=(screen.availHeight)?(screen.availHeight-winheight)/2:50;
	 settings='width='+winwidth+',height='+winheight+',top='+TopPosition+',left='+(window.screenX+25)+',location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes';
	}
	else
	 settings = specialsettings;

	Popup = window.open(destination,winname,settings);
	Popup.focus();
	return false;
}

function openPopup2(destination,specialsettings)
{
	//programmer can over-ride window features with optional 'specialsettings' parameter
	var settings = "";
	var winname = "homepage_popup";
	if(specialsettings == null || specialsettings == "")
	{
	 winwidth = 350;
	 winheight = 200;
	 TopPosition=(screen.availHeight)?(screen.availHeight-winheight)/2:50;
	 settings='width='+winwidth+',height='+winheight+',top='+TopPosition+',left='+(window.screenX+25)+',location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes';
	}
	else
	 settings = specialsettings;

	Popup2 = window.open(destination,winname,settings);
	Popup2.focus();
	return false;
}

function popHelp(destination) {

	winwidth = 400;
	winheight = 200;
	TopPosition=(screen.availHeight)?(screen.availHeight-winheight)/2:50;
	settings='width='+winwidth+',height='+winheight+',top='+TopPosition+',left='+(window.screenX+25)+',location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes';

	var helpwin = window.open(destination,'helpwin',settings);
	helpwin.focus();
	return false;
}

function childClose()
{
//called from pop-ups-- tries to bring focus to parent, then closes itself
try{
  window.opener.focus();
}
catch(e){}

try{
  window.close();
  }
catch(e){
  }
}



function linkFromEndScreenTo(newPlace) {
  f = document.forms[0];
  var parts = newPlace.split(":");
  if(parts.length == 2 && parts[0].toLowerCase() == "report") {
  	var currentBehavior = parts[1];
  	if(currentBehavior == "")
  	  currentBehavior = "hri";
  	f.action = "HomepageServlet?homeCommand=report&behavior=" + currentBehavior + "&timepoint=0";
      	f.target = "report";
      	window.open('', 'report', ttmx.FEEDBACK_REPORTWIN_DETAILS).focus();
  }

  else if(newPlace == "portal") {
      f.action = "ActivityServlet?command=login";
      f.target="_self";
  }

  else if(newPlace == "homepage") {
      window.location = "HomepageServlet?homeCommand=refresh";
      return false;
  }

  else  { //start a behavior
    f.action = "LoginServlet?action=login&behavior=" + newPlace + "&autoLogin=yes";
    f.target="_self";
  }

  f.submit();
  return false;
}

function promptClose(promptmsg)
{
//called from workbook flow pages-- asks user to confirm and then calls childClose to try to bring focus to parent
//promptmsg parameter optional
var msg = "Close this window and return to the home page?";
if(promptmsg != null && promptmsg != "")
  msg = promptmsg;
if(confirm(msg))
  childClose();
}

function addTestControls(x,y,info) {
 var screenInfo = "Screen " + x + " of " + y + ": " + info;
 var proj = info.split("\\")[0];
 if(proj.length == info.length)
  proj = info.split("/")[0];
 document.title=info;
 document.write('</form><form method="post" style="position:fixed; top:0; left:0;z-index:999;" action="BuildScreenServlet?projectAbbrev=' + proj + '&collectScreenSpecs=yes"><input type="submit" name="command" value="prevScreen"');
 if(x==1)
  document.write(' DISABLED');
 document.write('> ' + x + ' of ' + y + ' <input type="submit" name="command" value="nextScreen"');
 if(x==y)
  document.write(' DISABLED');
 document.write('>');

}

function getQueryStringValue(n) {
var qs = window.location.search.substring(1);
var allpairs = qs.split("&");
var val;
for (var i=0;i<allpairs.length;i++) {
 pair = allpairs[i].split("=");
 if (pair[0] == n) {
  return pair[1];
 }
}
//if still here, didn't find it
return "";
}


function getWindowDimensions() {
	var w = new Object();
	w.currWidth = 0;
	w.currHeight = 0;
	w.chromeWidth = 29;  //guess for IE
	w.chromeHeight = 83; //guess for IE

	if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    w.currWidth = window.innerWidth;
	    w.currHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    w.currWidth = document.documentElement.clientWidth;
	    w.currHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    w.currWidth = document.body.clientWidth;
	    w.currHeight = document.body.clientHeight;
	  }

	  //now try to set the actual browser chrome dimensions
	  //only FF and Safari will cooperate here-- we'll just guess IE's dimensions (above)
	  if( typeof( window.outerWidth ) == 'number' ) {
	   w.chromeWidth = window.outerWidth - w.currWidth;
	   if(typeof( window.outerHeight ) == 'number' )
	    w.chromeHeight = window.outerHeight - w.currHeight;
	  }

	return w;
}

function resizeToPortal() {

  var pWidth = 945;
  var pHeight = 825;

  resizeToInner(pWidth,pHeight);
}

function resizeToHomepage2010() {

  var pWidth = ttmx.WIN_WIDTH_HOME;//buffer for chrome 945;
  var pHeight = ttmx.WIN_HEIGHT_HOME;//600;

  resizeToInner(pWidth,pHeight);
}

function resizeToExpertSystem() {

  var esWidth = ttmx.WIN_WIDTH;
  var esHeight = ttmx.WIN_HEIGHT;

  resizeToInner(esWidth,esHeight);

}

function resizeToInner(w,h) {
  var win = getWindowDimensions();

  outerW = w + win.chromeWidth;
  outerH = h + win.chromeHeight;

  //definitely want to resize if we're too small, and we will resize if we're way too big
  if(win.currWidth < w || win.currHeight < h || (win.currWidth-w > 10) ) //don't resize if we're close
    window.resizeTo(outerW,outerH);

  //now get dimensions again-- we may have to resize again since we don't know IE's outer dimensions
  win = getWindowDimensions();
  if(win.currWidth < w || win.currHeight < h) {
      win.chromeHeight = outerH - win.currHeight; //now we know exactly the chrome dimensions
      win.chromeWidth = outerW - win.currWidth;
      window.resizeTo(w + win.chromeWidth , h + win.chromeHeight);
  }

}

function writeTodaysDate() {
  //used on aggregate reports
  var d=new Date();
  var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
  var dateString = weekday[d.getDay()] + ", " + monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
  document.write(dateString);
}

function getTodaysDate(dFormat) {
  var d=new Date();

  if(dFormat === "short")
   return (d.getMonth() + 1 + "/" + d.getDate() + "/" + d.getFullYear());

  //long format (default)
  var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
  var dateString = weekday[d.getDay()] + ", " + monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();

  return dateString;
}

function setUpDrawers() {
/*Note- this is different from portal drawers-- we do not save state*/
/*to use, copy this into your content file:
	<h4><a class="drawer_link" id="sugar">Limiting Added Sugars</a></h4>
	<div class="drawer" id="sugar_content">
	  <p>Here's the scoop on sugar. When sugar...</p>
	</div>


	<script type="text/javascript">
	$(document).ready(function (){
	    setUpDrawers();
	});
	</script>
*/

    var drawer_links = $("a.drawer_link");
    drawer_links.click(function() {
	    var f = this.id;
	    var f_content = $("#"+f+"_content");
	    f_content.toggle();
	    });

    drawer_links.attr("title","Click to show/hide");

} // end setUpDrawers

function disableBackButton(forceDisable) {
if(!forceDisable) forceDisable = false;
var ele = $("#nav_back");
if(!ele)
 return false;

if(forceDisable)
 ele.addClass("off");

if(ele.hasClass("off")) {
 ele.attr("disabled","disabled");
 ele.attr( "title", "Back option is not available for this screen.")
 }

}

 function checkAllAnswered() {
 //on screens with error text, add code to each field's onChange so we can hide the alert when they answer everything
 var alertArea = $("#" + ttmx.ALERTID);
 if(alertArea.length < 1 || alertArea.html().length < 1)
  return;
 var moreQuestions = true;
 var allAnswered = true;
 var i = 0;
 while(moreQuestions && allAnswered) {
  i++;
  var fVal = null;
  var fName = "response" + i;
  var f = $("input[name='" + fName + "'], select[name='" + fName + "']");
  if(f.length === 1) { //text box or select
   fVal = f.val();
   }
  else if(f.length > 1) { //radios or checkboxes
   fVal = f.filter(":checked").val();
   }
  else {
   moreQuestions = false;
   }
  if(moreQuestions && (fVal == null || fVal === "") )
   allAnswered = false;

  }//end while

 if(allAnswered) {
  alertArea.html("");
  $("em.QuesInvalid").addClass("fixed");
  checkAlertText();
  }
 }

function checkAlertText(addFieldCheck) {
var err = $("#" + ttmx.ALERTID);
if(err.length === 1) {
 if(err.html() != "") {
   err.show();
   if(addFieldCheck === true) //only want this next part on ES screens, not program screens or reports
     $("input:visible,select").click(function() { checkAllAnswered();  });
   else
     err.click(function(){$(this).hide('fast');});
  }
 else
   err.hide('fast');
 }
}

ttmx.qhs_copyrights = {

	 "06":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"07":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"18":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"30":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"69":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"109":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"113":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"120":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"201":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"202":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"203":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"601":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"602":"&copy;2010 Quality Health Solutions, All Rights Reserved"

	//shared questions, but only QHS projects get copyright on these
	,"24":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"37":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"40":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"64":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"65":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"66":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"96":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"97":"&copy;2010 Quality Health Solutions, All Rights Reserved"
	,"98":"&copy;2010 Quality Health Solutions, All Rights Reserved"


	//Quality-of-Life aka QOL
	,"10":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"11":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"12":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"13":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"14":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"15":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"16":"&copy;Trustees of Dartmouth College/COOP Project 1995"
	,"17":"&copy;Trustees of Dartmouth College/COOP Project 1995"

	//WLQ


	,"99":  "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"100": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"101": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"102": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"103": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"104": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"105": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"106": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"107": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"108": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"132": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"133": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"134": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"135": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	,"136": "WLQ &copy;1998 The Health Institute: Debra Lerner, Ph.D.; Benjamin Amick III, Ph.D.; and GlaxoWellcome, Inc. All Rights Reserved"
	}

ttmx.all_copyrights = {
	//Depression/Pfizer
	 "152":"&copy;1999 Pfizer Inc. All Rights Reserved. Reproduced with permission"
	,"153":"&copy;1999 Pfizer Inc. All Rights Reserved. Reproduced with permission"
	};

function checkCustomCopyright() {
var qName = $("input[name='assessmentScreenName']").val();
var projectAbbrev = $("input[name='projectAbbrev']").val();
if(!qName || !projectAbbrev) //not an assessment screen
 return;

if(qName.substr(0,projectAbbrev.length) != projectAbbrev && qName.substr(0,7) != "project")
 return; //if the first part of assessmentScreenName doesn't match the project, we stop. Only HRI screens have the special copyrights

var qIndex = qName.substr(qName.lastIndexOf('-')+1); //if val='project-02' , we want '02'
var isQol = $("#footer").hasClass('qol_yes');
var screenCopyright = null;

if(isQol)
 screenCopyright = ttmx.qhs_copyrights[qIndex];
if(!screenCopyright)
 screenCopyright = ttmx.all_copyrights[qIndex];

if(screenCopyright)
 $("#copyright").html(screenCopyright).show();

}

function setUpESPage() {
  //if we have alert text, show it
  checkAlertText(true);

  //if heading2 blank, recapture space
  var e = $("#ttmx_heading2");
  if(e.html() === "")
   e.remove();

  checkCustomCopyright();

  //see if we should disable back button
  disableBackButton(false);
  //add title text to progress bar
  e = $("#ttmx-progress");
  e.attr("title", e.attr("alt"));
}

ttmx.sQuestions = {
	 "":"-choose question-"
	,"s1":"Your mother's maiden name"
	,"s2":"School where you attended 6th grade"
	,"s3":"City where you were born"
	,"s4":"Name of favorite childhood pet"
	,"s5":"City where you were married"
	,"s6":"Where did you go on your honeymoon?"
	,"s7":"Your oldest sibling's middle name?"
	,"s8":"Your oldest child's middle name?"
	,"s9":"What was the name of a college/school you applied to but didn't attend?"
};

function filterSecurityQuestion2(ele) {
	//disable some of the options in other questions, so they can't choose the same question for multiple items
	var nonSelected = ttmx.sQuestionFields.children(':not(:selected)');
	var usedVals = [ttmx.sQuestionFields.eq(0).val(), ttmx.sQuestionFields.eq(1).val(), ttmx.sQuestionFields.eq(2).val()];
	nonSelected.each(function(i){
		var t = $(this);
		if(t.val() === usedVals[0] || t.val() === usedVals[1] || t.val() === usedVals[2]) {
		 if($.browser.msie && $.browser.version == "7.0") alert("IE DEBUG: about to disable: " + t.val());
		 t.attr("disabled","disabled");
		 if($.browser.msie && $.browser.version == "7.0") t.remove(); //old IE can't disable <options>
		 }
		else {
		 t.attr("disabled","");
		 t.css("display", "");
		 }
		});
	}


function filterSecurityQuestions() {
    //disable some of the options in other questions, so they can't choose the same question for multiple items

    //grab current values of the <select>s
    var a0 = ttmx.sQuestionFields.eq(0).val();
    var a1 = ttmx.sQuestionFields.eq(1).val();
    var a2 = ttmx.sQuestionFields.eq(2).val();

    if((""+a0+a1+a2) === "") return; //initial case, none answered

    //reset the options to the default list
    ttmx.sQuestionFields.html(ttmx.sDefaultOptions.clone());

    //now remove the already used items
    if(a0 != "") {
      ttmx.sQuestionFields.eq(1).find("option[value='" + a0 + "']").remove();
      ttmx.sQuestionFields.eq(2).find("option[value='" + a0 + "']").remove();
      }
    if(a1 != "") {
      ttmx.sQuestionFields.eq(0).find("option[value='" + a1 + "']").remove();
      ttmx.sQuestionFields.eq(2).find("option[value='" + a1 + "']").remove();
      }
    if(a2 != "") {
      ttmx.sQuestionFields.eq(0).find("option[value='" + a2 + "']").remove();
      ttmx.sQuestionFields.eq(1).find("option[value='" + a2 + "']").remove();
      }

    //now reset the selects to their original values
    ttmx.sQuestionFields.eq(0).val(a0);
    ttmx.sQuestionFields.eq(1).val(a1);
    ttmx.sQuestionFields.eq(2).val(a2);

}



function setUpSecurityQuestions(sQuestionData) {

    	ttmx.sQuestionFields = 	$("#challengeQ1 , #challengeQ2 , #challengeQ3");
	ttmx.sAnswerFields = $("#challengeA , #challengeB , #challengeC");

	ttmx.sQuestionFields.change( function() { filterSecurityQuestions(); } );

	//add our options to the drop-down questions
	for (var key in ttmx.sQuestions) {
	  if (ttmx.sQuestions.hasOwnProperty(key)) {
	    var theOption = $('<option></option>').val(ttmx.sQuestions[key]).html(ttmx.sQuestions[key]).val(key);
	    ttmx.sQuestionFields.append(theOption);
	  }
	}
	ttmx.sDefaultOptions = ttmx.sQuestionFields.eq(0).children(); //stash the default option list

    if(sQuestionData) { //if we were passed question data, set the drop-downs to how user previously answered them
	//if($.browser.msie && $.browser.version=="6.0") alert("Im the annoying IE6:" + sQuestionData);
	var parts = sQuestionData.split("&");
	for(var j = 0; j<parts.length; j++) {
	  var thisQ = parts[j].split("=");

		//IE6 requires tiny delay for EACH of these lines, what a pain...
		try {
		    ttmx.sQuestionFields.eq(j).children().each(function(index) {if(this.value == thisQ[0]) this.selected = "selected";});
		   }
		catch(ex) {
		    setTimeout(function(){
		     ttmx.sQuestionFields.eq(j).children().each(function(index) {if(this.value == thisQ[0]) this.selected = "selected";});
		     }, 100);
		     }

	        try {
		    ttmx.sAnswerFields.eq(j).val(thisQ[1]);
		   }
		catch(ex) {
		    setTimeout(function(){
		     ttmx.sAnswerFields.eq(j).val(thisQ[1]);
		    }, 100);
		    }

	} //end for
	filterSecurityQuestions();
	}

}
