var timer;

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0;
var tempY = 0;

// Main function to retrieve mouse x-y pos.s
function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0;}
  if (tempY < 0){tempY = 0;}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  return true;
}

function remLunchHost(group,user)
{
   temp = confirm("Are you sure you wish to remove this group from the lunch host? This action cannot be undone without reassociating them with an event.");     
   if(temp)
   {
      window.location='franchisee.php?act=removeGroup&group=' + group + '&user=' + user;
   }
}

function set_focus(){
	if (document.forms.length > 0){
		if (document.forms['content'].elements.length > 0)
		{
   		for(i = 0; i < document.forms['content'].elements.length; i++)
   		{
   			if (document.forms['content'].elements[i].type != "select-one" && document.forms['content'].elements[i].type != "hidden" && document.forms['content'].elements[i].type != "button" && document.forms['content'].elements[i].type != "submit"){
   				document.forms['content'].elements[i].focus();
   				i = 100000;
   		   }
   		}
   	}
	}
}

function set_focus_email_body(){
	iframe.ad_hoc_email_htmlbody___Frame.document.eSourceField.focus();
}

function get_menus()
{
   var menu1;
   menu1 = new Array(8);
   menu1[0] = 'admin';  
   menu1[1] = 'community';
   menu1[2] = 'events';
   menu1[3] = 'finance';
   menu1[4] = 'synergy';
   menu1[5] = 'tasks';
   menu1[6] = 'pains';
   menu1[7] = 'info';
   return menu1;
}

function show_div_focused(elem)
{
	
   clearTimeout(timer);
	if(document.all) 
   {  
      document.all[elem].style.visibility='visible';
   }
   else
   {
      document.getElementById(elem).style.visibility='visible';
   }
		
}


function get_report(report)
{
   id = document.forms['content'].event.value;
   if(id == 0)
   {
      alert("you have not chosen an event. please choose an event from the drop down list.");
   }
   else
   {
      if(report == '3')
      {
         act = 'dietary'
      }
      else
      {
         act = 'Go';   
      }
      window.open('report_event_menu.php?sort=' + report + '&act=' + act + '&id=' + id);
   }
}


function show_div(elem)
{
	var i;
	var menus;
	menus = get_menus();
	
	for(i=0; i< menus.length; i++)
	{
	   if(menus[i] != elem)
	   {
   	   if(document.all) 
   	   {  
   	      document.all[menus[i]].style.visibility='hidden';
   	   }
   	   else
   	   {
   	      document.getElementById(menus[i]).style.visibility='hidden';
   	   }   
   	}
   	
	}
	
	
	
	if(document.all) 
	{
	  tempX = event.clientX + document.body.scrollLeft
	  tempY = event.clientY + document.body.scrollTop
	  document.all[elem].style.visibility='visible';
     document.all[elem].style.height='114px';
     document.all[elem].style.width='207px';
     
     document.all[elem].style.top = tempY - 10;
     document.all[elem].style.left = 108;
   } 
   else if(document.getElementById) 
   {
     document.getElementById(elem).style.visibility='visible';
     document.getElementById(elem).style.height='114px';
     document.getElementById(elem).style.width='207px';
     
     document.getElementById(elem).style.top = tempY - 10;
     document.getElementById(elem).style.left = 108;
     
   }
}

function hide_div(elem)
{
	if(document.all) 
	{
     timer = setTimeout("document.all['" + elem + "'].style.visibility='hidden'",5000);
   }
   else if(document.getElementById) 
   {
     timer = setTimeout("document.getElementById('" + elem + "').style.visibility='hidden'",5000);
   }
}

function monthly_management_report(elem)
{
	if(document.forms['content'].month.value == 0 || document.forms['content'].month.value == '')
	{
	   alert("You have not selected a month. Select a month and year from the drop down list at the top of the screen");
	}
	else if(document.forms['content'].year.value == 0 || document.forms['content'].year.value == '')
	{
	   alert("You have not selected a year. Select a month and year from the drop down list at the top of the screen");
	}
	else
	{
	   window.location='monthly_management.php?act=report&id=' + elem + '&year=' + document.forms['content'].year.value + '&month=' + document.forms['content'].month.value;
	}
	
}

function monthly_commission_report(elem,elem2)
{
	if(document.forms['content'].month.value == 0 || document.forms['content'].month.value == '')
	{
	   alert("You have not selected a month. Select a month and year from the drop down list at the top of the screen");
	}
	else if(document.forms['content'].year.value == 0 || document.forms['content'].year.value == '')
	{
	   alert("You have not selected a year. Select a month and year from the drop down list at the top of the screen");
	}
	else
	{
	   window.location='monthly_commission.php?act=report&personal_id=' + elem2 + '&id=' + elem + '&year=' + document.forms['content'].year.value + '&month=' + document.forms['content'].month.value;
	}
	
}

function hide_div_focused(elem)
{
	if(document.all) 
	{
     timer = setTimeout("document.all['" + elem + "'].style.visibility='hidden'",1000);
   }
   else if(document.getElementById) 
   {
     timer = setTimeout("document.getElementById('" + elem + "').style.visibility='hidden'",1000);
   }
	
}

function choose_location(value,text)
{
   document.forms['content'].chosen.value = document.forms['content'].chosen.value + " at the " + text;
   document.forms['content'].location.value = value;
   document.forms['content'].location_text.value = value;
   //Window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
   //window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
}

function choose_picture(value,text)
{
   document.forms['content'].chosen.value = document.forms['content'].chosen.value + " " + text;
   document.forms['content'].picture.value = value;
   document.forms['content'].picture_text.value = value;
   //Window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
   //window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
}

function fetch_images(value)
{
   selcolor = document.forms['content'].color.value;
   //Window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
   window.location.href="new_log_on.php?pictures=" + value + "&color=" + selcolor;
   
}

function change_opaque()
{
   document.getElementById(5).style = 'images/seating_req_fade.jpg';
}

function set_focus_name(){
	if (document.forms.length > 0){
		document.forms['content'].participant.focus();
			
	}
}

function insert_today(part_date)
{
	document.forms['content'].query_date.value = part_date;
}

function insert_todays_date(part_date)
{
	document.forms['content'].transaction_date.value = part_date;
}

function change_image(change)
{
   if(change == 'decline')
   {
      document.getElementById("decline").src = 'images/decline_fade.gif';
   }
   
   if(change == 'confirm')
   {
      document.getElementById("confirm").src = 'images/confirm_fade.gif';
   }
   
   if(change == 'seating_plan')
   {
      document.getElementById("seating_plan").src = 'images/seating_plan_fade.gif';
      //document.forms['content'].decline.src = 'images/decline.jpg';
   }
   
   if(change == 'seating_req')
   {
      document.getElementById("seating_req").src = 'images/seating_req_fade.gif';
      //document.forms['content'].decline.src = 'images/decline.jpg';
   }
   
}

function restore_image(change)
{
   
   if(change == 'decline')
   {
      document.getElementById("decline").src = 'images/decline.gif';
      //document.forms['content'].decline.src = 'images/decline.jpg';
   }
   
   if(change == 'confirm')
   {
      document.getElementById("confirm").src = 'images/confirm.gif';
      //document.forms['content'].confirm.src = 'images/decline.jpg';
   }
   
   if(change == 'seating_plan')
   {
      document.getElementById("seating_plan").src = 'images/seating_plan.gif';
      //document.forms['content'].decline.src = 'images/decline.jpg';
   }
   
   if(change == 'seating_req')
   {
      document.getElementById("seating_req").src = 'images/seating_req.gif';
      //document.forms['content'].decline.src = 'images/decline.jpg';
   }
   
   
}


function change_attendee(event_group)
{
   //deputy = document.forms['content'].deputy.value;
   deputy1 = "deputy" + event_group;
   //deputy = document.forms['content'].deputy1.value;
   deputy = document.getElementById(deputy1).value;
   // reload document
	//window.location.href="booked_events.php?act=change_attendee&event_group_id=" + event_group + "&deputy=" + deputy;
	window.location.href="my_membership.php?act=change_sub&event_group_id=" + event_group + "&deputy=" + deputy;
}


function add_email_element(element)
{
   email = document.forms['content'].email_body.value + ' ' + element;
   document.forms['content'].email_body.value = email;   
   document.forms['content'].email_body.focus();
}

function check_monthly_submit()
{
   temp = confirm("Are you sure you would like to finalise this month? No further alterations will be possible.");     
   if(temp)
   {
      document.forms['content'].submit();
   }
   
}

function export_form_validate(value)
{
   if(value == 0)
   {
      alert("Please Choose an Export Format");   
      return false;
   }
   else
   {
      document.forms['content'].submit();
   }
   
}

function check_synergy_input()
{
   if(document.forms['content'].forename.value == "")
   {
      alert("Please enter your First Name");
   }
   else if(document.forms['content'].surname.value == "")
   {
      alert("Please enter your Last Name");
   }
   else if(document.forms['content'].email.value == "")
   {
      alert("Please enter your E-Mail Address");
   }
   else
   {
    document.forms['content'].submit();
   }
   
}

function ibs_search_validate(value1,value2)
{
   if(value1 == "" && value2 == "")
   {
      alert("Please Enter Some Search Criteria for A User");   
      return false;
   }
   else
   {
      document.forms['content'].submit();
   }
   
}

function ibs_select_validate(value1,value2)
{
   if(value1 == "")
   {
      alert("Please Select a User");   
      return false;
   }
   else
   {
      document.forms['content'].event.value = value2;
      document.forms['content'].submit();
   }
}

function check_guests(id)
{
   temp = confirm("Are you sure you would like to book these guests? Your card will be charged at this stage");     
   document.forms['content'].event.value = id;
   if(temp)
   {
      document.forms['content'].submit();
   }
}

function check_guests_invoice(id)
{
   temp = confirm("Are you sure you would like to book these guests? You will be invoiced for this amount");  
   document.forms['content'].event.value = id;
   if(temp)
   {
      document.forms['content'].submit();
   }
}

function complete_event_validate()
{
      temp = confirm("Are you sure you would like to finalise the seating for this event? Pressing 'ok' means that no further seating alterations are possible and automated emails are sent");  
      if(temp)
      {
         document.forms['content'].submit();
      }
   
}


function seating_plan_final(run,eid,mod_num)
{
   if(mod_num != 1)
   {
      alert("You have not selected any moderators. Please select moderator(s) before completing the event");   
   }
   else
   {
      temp = confirm("Are you sure you would like to make this seating plan final? Have you allocated Moderators to every table? If so venue/moderator/seating plans emails will be sent");  
      if(temp)
      {
         window.location='seating_plan.php?run=' + run + '&act=Choose&id=' + eid;
      }
   }
}


function clear_but_month()
{
   document.forms['content'].period.selectedIndex = "0";
   document.forms['content'].fday.value = "";
   document.forms['content'].fmonth.value = "";
   document.forms['content'].fyear.value = "";
   document.forms['content'].sday.value = "";
   document.forms['content'].smonth.value = "";
   document.forms['content'].syear.value = "";
}
function clear_but_period()
{
   document.forms['content'].month.selectedIndex = "0";
   document.forms['content'].fday.value = "";
   document.forms['content'].fmonth.value = "";
   document.forms['content'].fyear.value = "";
   document.forms['content'].sday.value = "";
   document.forms['content'].smonth.value = "";
   document.forms['content'].syear.value = "";
}
function clear_but_dates()
{
  document.forms['content'].period.selectedIndex = "0";
  document.forms['content'].month.selectedIndex = "0";
}

function add_participant(part)
{
	if(document.forms['content'].bids.length >= 12)
	{
		document.forms['content'].message.value = "Maximum of 12 Bids Reached";
	}
	else
	{
		ind = document.forms['content'].participants.selectedIndex;
		document.forms['content'].participants.options[ind] = null;
		
		for (x = 0; x < arr_participants.length; x++)
		{
			if (arr_participants[x][0] == part){
				document.forms['content'].bids.options[document.forms['content'].bids.length] = new Option((document.forms['content'].bids.length + 1) + '. ' + arr_participants[x][1], arr_participants[x][0], false, false);
				bids_add("selected");			
			}
		}
	}
}

function bids_add(target)
{
	for (i = 0; i < document.forms['content'].elements.length; i++)
	{
  	if (document.forms['content'].elements[i].name == target)
  	{
			document.forms['content'].elements[i].value = '';
			for(n = 0; n < document.forms['content'].bids.length; n++)
			{
				document.forms['content'].elements[i].value = document.forms['content'].elements[i].value + '|' + document.forms['content'].bids[n].value;
			}
  	}
 	}
} 

function up_bid(part)
{
	ind = document.forms['content'].bids.selectedIndex;
	if(ind > 0)
	{
		val = document.forms['content'].bids.options[ind - 1].value;
				
		for (i = 0; i < arr_participants.length; i++)
		{
			if (arr_participants[i][0] == val){
				document.forms['content'].bids.options[ind] = new Option((ind + 1) + '. ' + arr_participants[i][1], arr_participants[i][0], false, false);
			}
		}
		
		for (i = 0; i < arr_participants.length; i++)
		{
			if (arr_participants[i][0] == part){
				document.forms['content'].bids.options[ind - 1] = Option((ind)+ '. ' + arr_participants[i][1], arr_participants[i][0], false, false);
			}
		}
				
	}
	bids_add("selected");			
	document.forms['content'].bids.selectedIndex = ind - 1;
}

function down_bid(part)
{
	ind = document.forms['content'].bids.selectedIndex;
	if(ind < 12)
	{
		val = document.forms['content'].bids.options[ind + 1].value;
		for (i = 0; i < arr_participants.length; i++)
		{
			if (arr_participants[i][0] == val){
				document.forms['content'].bids.options[ind] = new Option((ind + 1) + '. ' + arr_participants[i][1], arr_participants[i][0], false, false);
			}
		}
		
		for (i = 0; i < arr_participants.length; i++)
		{
			if (arr_participants[i][0] == part){
				document.forms['content'].bids.options[ind + 1] = Option((ind + 2)+ '. ' + arr_participants[i][1], arr_participants[i][0], false, false);
			}
		}
		document.forms['content'].bids.selectedIndex = ind + 1;		
	}
	bids_add("selected");			
	
}

function remove_participant(part)
{
	ind = document.forms['content'].bids.selectedIndex;
	document.forms['content'].bids.options[ind] = null;
	document.forms['content'].message.value = "";
	for (i = 0; i < arr_participants.length; i++)
	{
		if (arr_participants[i][0] == part){
			document.forms['content'].participants.options[document.forms['content'].participants.length] = new Option(arr_participants[i][1], arr_participants[i][0], false, false);
		}
	}
	bids_add("selected");			
}

function remove_all_participants(part)
{
	document.forms['content'].message.value = "";
	for (n = document.forms['content'].bids.length; n >= 0; n--)
	{
		document.forms['content'].bids.options[n] = null;
	}
	for (n = document.forms['content'].participants.length; n >= 0; n--)
	{
		document.forms['content'].participants.options[n] = null;
	}
	
	for (i = 0; i < arr_participants.length; i++)
	{
		document.forms['content'].participants.options[document.forms['content'].participants.length] = new Option(arr_participants[i][1], arr_participants[i][0], false, false);
	}
	bids_add("selected");			
}

function fetch_rooms(venue)
{
	// clear any existing values from cbo_sites
	for (n = document.forms['content'].event_room.length; n >= 0; n--){
		document.forms['content'].event_room.options[n] = null;
	}
	// add blank entry
	document.forms['content'].event_room.options[document.forms['content'].event_room.length] = new Option("", 0, false, true);
	
	for (i = 0; i < arr_rooms.length; i++)
	{
		if (arr_rooms[i][1] == venue){
			document.forms['content'].event_room.options[document.forms['content'].event_room.length] = new Option(arr_rooms[i][2], arr_rooms[i][0], false, false);
		}
	}
}

function fetch_franchisee_details(value)
{
	for (i = 0; i < arr_francs.length; i++)
	{
		
		if (arr_francs[i][0] == value)
		{
			document.forms['content'].personal_worktel.value = arr_francs[i][1];
			document.forms['content'].personal_mobtel.value = arr_francs[i][2];
			if(arr_francs[i][3] == -1)
			{
				document.forms['content'].personal_vat.value = "Yes";
			}
			else
			{
				document.forms['content'].personal_vat.value = "No";
			}
			document.forms['content'].personal_merchant.value = arr_francs[i][4];
		}
	}
}

function fetch_gm_details(value)
{
	for (i = 0; i < arr_gms.length; i++)
	{
		
		if (arr_gms[i][0] == value)
		{
			document.forms['content'].gm_personal_worktel.value = arr_gms[i][1];
			document.forms['content'].gm_personal_mobtel.value = arr_gms[i][2];
			if(arr_gms[i][3] == -1)
			{
				document.forms['content'].gm_personal_vat.value = "Yes";
			}
			else
			{
				document.forms['content'].gm_personal_vat.value = "No";
			}
			document.forms['content'].gm_personal_merchant.value = arr_gms[i][4];
		}
	}
}

function get_profile(value)
{
	for (i = 0; i < arr_partdet.length; i++)
	{
		
		if (arr_partdet[i][0] == value)
		{
			document.forms['content'].sector.value = arr_partdet[i][1];
			document.forms['content'].Description.value = arr_partdet[i][2];
			document.forms['content'].contact.value = arr_partdet[i][3];
		}
	}
}

function get_participant_profile(value)
{
	window.open('member.php?act=edit&id=' + value + '&viewevent=0&source=bidding');
}

function display_prices(type, hub)
{
	if(hub != 0 && type != 0)
	{
		if(type == 2)
		{
			document.forms['content'].price_display.value = "";
		}
		else
		{
			for (i = 0; i < arr_prices.length; i++)
			{
	  		if (arr_prices[i][0] == hub){
				document.forms['content'].price_display.value = "Education Prepayment: " + String.fromCharCode(163) + arr_prices[i][2] + "(exc VAT)         Monthly Fee: " + String.fromCharCode(163) + arr_prices[i][1] + "(exc VAT)";
				}
			}
		}
	}
}


function calculate_upgrade_price(value)
{
	
	if(value == 'annually')
	{
		document.forms['content'].total_price.value = arr_prices[1] + arr_prices[0];
		document.forms['content'].total_price_inc.value = (arr_prices[1] + arr_prices[0]) * 1.175;
	}
	else
	{
	   document.forms['content'].total_price.value = arr_prices[2] + arr_prices[0];
	   document.forms['content'].total_price_inc.value = (arr_prices[2] + arr_prices[0]) * 1.175;
   }
	
}

function calculate_renewal_price(value)
{
	
	if(value == 'annually')
	{
		document.forms['content'].total_price.value = arr_prices[1];
	}
	else
	{
	   document.forms['content'].total_price.value = arr_prices[2];
   }
	
}
	
function fetch_sub_sectors_ad_hoc(value)
{
	// clear any existing values from cbo_sites
	for (n = document.forms['content'].app_company_sub.length; n >= 0; n--){
		document.forms['content'].app_company_sub.options[n] = null;
		document.forms['content'].app_company_sub_2.options[n] = null;
		document.forms['content'].app_company_sub_3.options[n] = null;
		document.forms['content'].app_company_sub_4.options[n] = null;
	}
	// add blank entry
	document.forms['content'].app_company_sub.options[document.forms['content'].app_company_sub.length] = new Option("", 0, false, true);
	document.forms['content'].app_company_sub_2.options[document.forms['content'].app_company_sub_2.length] = new Option("", 0, false, true);
	document.forms['content'].app_company_sub_3.options[document.forms['content'].app_company_sub_3.length] = new Option("", 0, false, true);
	document.forms['content'].app_company_sub_4.options[document.forms['content'].app_company_sub_4.length] = new Option("", 0, false, true);
	
	for (i = 0; i < arr_subs.length; i++)
	{
		if (arr_subs[i][1] == value){
			document.forms['content'].app_company_sub.options[document.forms['content'].app_company_sub.length] = new Option(arr_subs[i][2], arr_subs[i][0], false, false);
			document.forms['content'].app_company_sub_2.options[document.forms['content'].app_company_sub_2.length] = new Option(arr_subs[i][2], arr_subs[i][0], false, false);
			document.forms['content'].app_company_sub_3.options[document.forms['content'].app_company_sub_3.length] = new Option(arr_subs[i][2], arr_subs[i][0], false, false);
			document.forms['content'].app_company_sub_4.options[document.forms['content'].app_company_sub_4.length] = new Option(arr_subs[i][2], arr_subs[i][0], false, false);
		}
	}
}

function fetch_sub_sectors(value)
{
	// clear any existing values from cbo_sites
	for (n = document.forms['content'].app_company_sub.length; n >= 0; n--){
		document.forms['content'].app_company_sub.options[n] = null;
	}
	// add blank entry
	document.forms['content'].app_company_sub.options[document.forms['content'].app_company_sub.length] = new Option("", 0, false, true);
	
	for (i = 0; i < arr_subs.length; i++)
	{
		if (arr_subs[i][1] == value){
			document.forms['content'].app_company_sub.options[document.forms['content'].app_company_sub.length] = new Option(arr_subs[i][2], arr_subs[i][0], false, false);
		}	
	}
}


function fetch_sub_referrers(value)
{
	// clear any existing values from cbo_sites
	for (n = document.forms['content'].app_company_subref.length; n >= 0; n--){
		document.forms['content'].app_company_subref.options[n] = null;
	}
	// add blank entry
	if(value != 6 && value != 7)
	{
	   document.forms['content'].app_company_subref.options[document.forms['content'].app_company_subref.length] = new Option("", 0, false, true);
	}
	
	
	inserted = 0;
	for (i = 0; i < arr_refs.length; i++)
	{
		if (arr_refs[i][1] == value){
			document.forms['content'].app_company_subref.options[document.forms['content'].app_company_subref.length] = new Option(arr_refs[i][2], arr_refs[i][0], false, false);
		   inserted = 1;
		}
		
	}
	if(inserted < 1)
	{
	   document.forms['content'].app_company_subref.options[document.forms['content'].app_company_subref.length] = new Option("N/A", 0, false, true);
	}
	
}
	
function recalculate_buckets(value,buckm,buckv)
{
	members = Math.ceil((value / 100) * buckm);
	visits = Math.ceil((value / 100) * buckv);
	guests = (value - members) - visits;
	document.forms['content'].event_bucket_member.value = members;
	document.forms['content'].event_bucket_guest.value = guests;
	document.forms['content'].event_bucket_visit.value = visits;
}	

function calc_tables(size,capacity)
{
	tables = Math.ceil(capacity / size);
	document.forms['content'].table_amount.value = tables;
}	

function check_password(value)
{
	if(value == -1)
	{
		content.user_pwd.visible = false;
	}
}

function disable_enter(field, event) {
	
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13) {
		field.focus();
		return false;	
	}
	
	return true;
}

var requester;
function set_sector(sect,name)
{
   sectName = 'sector' + sect;
   document.forms['content'].app_company_sub.value = sect;
   document.forms['content'].sub_sector.value = name;
   document.getElementById('sector').innerHTML = '<table><tr><th align="left">Business Sector:</th><td>' + name + '</td></tr><tr><td colspan="2"><i>Use the search box above to choose new business category</i></td></tr></table>';
}


function get_sectors(search_string) {
	if(!requester)
		requester = new Requester();
	
	if(document.getElementById('sub_sector').style.display = 'none')
		document.getElementById('sub_sector').style.display = '';
		
	requester.setAction(set_sectors);
	requester.loadURL('ajax.sub_sectors.php','search_string='+search_string);
	document.forms['content'].sub_sector.focus();
}

function set_sectors() {
	document.getElementById('sector').innerHTML = requester.getText();
}
