function Chk_PersInfo()
{
	var statpersinfo = document.getElementById("statpersinfo");
	var perstitle = document.getElementById("perstitle");
  if(perstitle.value == '' || perstitle.value.match(/^\s+$/))
  {
  	perstitle.style.backgroundColor = "#FF0000";
     statpersinfo.style.color = "#FF0000";
  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Τίτλος";
  	return false;
  }
  perstitle.style.backgroundColor = "#FFFFFF";

	var firstname = document.getElementById("first-name");
  if(firstname.value == '' || firstname.value.match(/^\s+$/))
  {
  	firstname.style.backgroundColor = "#FF0000";
     statpersinfo.style.color = "#FF0000";
  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Όνομα";
  	return false;
  }
  firstname.style.backgroundColor = "#FFFFFF";

	var lastname = document.getElementById("last-name");
  if(lastname.value == '' || lastname.value.match(/^\s+$/))
  {
  	lastname.style.backgroundColor = "#FF0000";
     statpersinfo.style.color = "#FF0000";
  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Επώνυμο";
  	return false;
  }
  lastname.style.backgroundColor = "#FFFFFF";

//	var address = document.getElementById("address");
//  if(address.value == '' || address.value.match(/^\s+$/))
//  {
//  	address.style.backgroundColor = "#FF0000";
//     statpersinfo.style.color = "#FF0000";
//  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο διεύθυνση";
//  	return false;
// }
//  address.style.backgroundColor = "#FFFFFF";

//	var city = document.getElementById("city");
// if(city.value == '' || city.value.match(/^\s+$/))
//  {
//  	city.style.backgroundColor = "#FF0000";
//     statpersinfo.style.color = "#FF0000";
//  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Πόλη";
//  	return false;
//  }
//  city.style.backgroundColor = "#FFFFFF";

//	var zipcode = document.getElementById("zip-code");
//  if(zipcode.value == '')// || !zipcode.value.match(/^\d+$/)
//  {
//  	zipcode.style.backgroundColor = "#FF0000";
//     statpersinfo.style.color = "#FF0000";
//  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Τ.Κ.";
//  	return false;
//  }
//  zipcode.style.backgroundColor = "#FFFFFF";

//  var state = document.getElementById("state");
	var country = document.getElementById("country");
  if(country.options[country.selectedIndex].text == '' || country.options[country.selectedIndex].text.match(/^\s+$/))
  {
  	country.style.backgroundColor = "#FF0000";
     statpersinfo.style.color = "#FF0000";
  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Χώρα";
  	return false;
  }
  country.style.backgroundColor = "#FFFFFF";

//	var contactphone = document.getElementById("contact-phone");
//  var phone = contactphone.value;
//  phone = phone.replace(/[\s\t-\(\)]/g,"");
//  if(phone == '' || !phone.match(/^\+?[\.\d]+$/))
//  {
//  	contactphone.style.backgroundColor = "#FF0000";
//     statpersinfo.style.color = "#FF0000";
//  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο Τηλέφωνο Επικοινωνίας";
//  	return false;
//  }
//  contactphone.style.backgroundColor = "#FFFFFF";

//  var fax = document.getElementById("fax");
	var email = document.getElementById("e-mail");
  if(email.value == '' || !email.value.match(/^[^@]+@[^\.]+\.\w{2,4}/))
  {
  	email.style.backgroundColor = "#FF0000";
     statpersinfo.style.color = "#FF0000";
  	statpersinfo.innerHTML = "* Εισάγετε έγκυρο E-mail";
  	return false;
  }
  email.style.backgroundColor = "#FFFFFF";
  //sload();
  //alert(URLEncodeUTF8(firstname.value)+":"+firstname.value);
  load_m(true,"persinfoload");
//  reqset.req_persinfo('http://www.live2sms.gr/set/?action=persinfo',"title="+URLEncodeUTF8(perstitle.value)+"&first-name="+URLEncodeUTF8(firstname.value)+"&last-name="+URLEncodeUTF8(lastname.value)+"&address="+URLEncodeUTF8(address.value)+"&city="+URLEncodeUTF8(city.value)+"&zip-code="+URLEncodeUTF8(zipcode.value)+"&state="+URLEncodeUTF8(state.options[state.selectedIndex].text)+"&country="+URLEncodeUTF8(country.options[country.selectedIndex].text)+"&contact-phone="+URLEncodeUTF8(phone)+"&fax="+URLEncodeUTF8(fax.value)+"&e-mail="+URLEncodeUTF8(email.value));//
    reqset.req_persinfo('http://www.live2sms.gr/set/?action=persinfo',"title="+URLEncodeUTF8(perstitle.value)+"&first-name="+URLEncodeUTF8(firstname.value)+"&last-name="+URLEncodeUTF8(lastname.value)+"&country="+URLEncodeUTF8(country.options[country.selectedIndex].text)+"&e-mail="+URLEncodeUTF8(email.value));

  //statpersinfo.style.color = "#0099FF";
  //statpersinfo.innerHTML = "* Επιτυχής Αναβάθμιση";
  return false;
}

function Chk_GSM(type)
{
  var statgsm = document.getElementById("statgsm");
  if(type==1)
  {
	  	var ccode = document.getElementById("ccode");
  	var country = ccode.value;
  	//country = country.replace(/[+\s0.]/g,"");
		country = country.replace(/[+\s.]/g,"");
		country = country.replace(/^[0]+/g,"");
	  	if(country == ''|| country.match(/[^\d]/))
	  	{
	     	ccode.style.backgroundColor = "#FF0000";
	     	statgsm.style.color = "#FF0000";
	     	statgsm.innerHTML = "* Επιτρέπονται μόνο νούμερα για τον \"Κωδικό Χώρας\"";
	     	return false;
	  	}
	  	ccode.style.backgroundColor = "#FFFFFF";
     statgsm.innerHTML = "";

	  	//var opcode = document.getElementById("opcode");
  	//var oper = opcode.value;
		//oper = oper.replace(/[+\s.]/g,"");
		//oper = oper.replace(/^[0]+/g,"");
	  	//if(oper == '' || oper.match(/[^\d]/))
	  	//{
	     	//opcode.style.backgroundColor = "#FF0000";
	     	//statgsm.style.color = "#FF0000";
	     	//statgsm.innerHTML = "* Επιτρέπονται μόνο νούμερα για τον \"Κωδικό Παρόχου\"";
	     	//return false;
	  	//}
	  	//opcode.style.backgroundColor = "#FFFFFF";
     //statgsm.innerHTML = "";

	  	var changenumber = document.getElementById("phonenumber");
  	var phone = changenumber.value;
  	phone = phone.replace(/[\s\t-\(\)]/g,"");
  	phone = phone.replace(/[^\d]/g,"");
  	phone = phone.replace(/^[0]+/g,"");
	  	if(phone == '' || phone.match(/[^\d]/))
	  	{
	     	changenumber.style.backgroundColor = "#FF0000";
	     	statgsm.style.color = "#FF0000";
	     	statgsm.innerHTML = "* Επιτρέπονται μόνο νούμερα για την \"Αλλαγή Αριθμού\"";
	     	return false;
	  	}
	  	changenumber.style.backgroundColor = "#FFFFFF";
     //phone = "+"+country+"."+oper+"."+phone;
     phone = "+"+country+"."+phone;
     //alert(country+":"+oper+":"+phone);
     //return false;
     //sload();
     load_m(true,"gsmload1");
     reqset.req_gsm('http://www.live2sms.gr/set/?action=gsm','changenumber='+URLEncodeUTF8(phone));//
     //load_m(false,"gsmload1");
	  	//statgsm.style.color = "#0099FF";
	  	//statgsm.innerHTML = "* Επιτυχής Αναβάθμιση";
		return false;
  }
  else if(type==2)
  {
	  	var confirmnumber = document.getElementById("confirmnumber");
	  	if(confirmnumber.value == '' || !confirmnumber.value.match(/^\d+$/))
	  	{
	     	confirmnumber.style.backgroundColor = "#FF0000";
	     	statgsm.style.color = "#FF0000";
	     	statgsm.innerHTML = "* Εισάγετε έγκυρο \"Κωδικός Επιβεβαίωσης\"";
	     	return false;
	  	}
	  	confirmnumber.style.backgroundColor = "#FFFFFF";

     //sload();
     load_m(true,"gsmload2");
     reqset.req_gsm('http://www.live2sms.gr/set/?action=gsm','confirmnumber='+URLEncodeUTF8(confirmnumber.value));//
     //load_m(false,"gsmload2");
	  	//statgsm.style.color = "#0099FF";
	  	//statgsm.innerHTML = "* Επιτυχής Αναβάθμιση";
		return false;
  }
  else if(type==3)
  {
     var smsprov = document.getElementById("smsprov");
  	//alert("Not implemented yet:"+smsprov.options[smsprov.selectedIndex].value);
     load_m(true,"routingload");
     reqset.req_smsprov('http://www.live2sms.gr/set/?action=gsm','testprov='+URLEncodeUTF8(smsprov.options[smsprov.selectedIndex].value));//
  }
	return false;
}

function Chk_ESMS(type)
{
  var statesms = document.getElementById("statemailsms");
  if(type==0)
  {
	  	var changemailsms = document.getElementById("changemailsms");
  	var phone = changemailsms.value;
  	phone = phone.replace(/[\s\t-\(\)]/g,"");
	  	if(phone == '') // || !phone.match(/^\+?\d+$/)
	  	{
	     	changemailsms.style.backgroundColor = "#FF0000";
	     	statesms.style.color = "#FF0000";
	     	statesms.innerHTML = "* Εισάγετε έγκυρο \"Αλλαγή αριθμού\"";
	     	return false;
	  	}
	  	changemailsms.style.backgroundColor = "#FFFFFF";

     //sload();
     load_m(true,"esmsload1");
     reqset.req_esms('http://www.live2sms.gr/set/?action=esms','changeaddr='+URLEncodeUTF8(changemailsms.value));//
	  	//statgsm.style.color = "#0099FF";
	  	//statgsm.innerHTML = "* Επιτυχής Αναβάθμιση";
		return false;
  }
  else if(type==1)
  {
	  	var confirmsmsemailaddr = document.getElementById("confirmsmsemailaddr");
	  	if(confirmsmsemailaddr.value == '' || !confirmsmsemailaddr.value.match(/^\d+$/))
	  	{
	     	confirmsmsemailaddr.style.backgroundColor = "#FF0000";
	     	statesms.style.color = "#FF0000";
	     	statesms.innerHTML = "* Εισάγετε έγκυρο \"Κωδικός Επιβεβαίωσης\"";
	     	return false;
	  	}
	  	confirmsmsemailaddr.style.backgroundColor = "#FFFFFF";

     //sload();
     load_m(true,"esmsload2");
     reqset.req_esms('http://www.live2sms.gr/set/?action=esms','confirmaddr='+URLEncodeUTF8(confirmsmsemailaddr.value));//
	  	//statgsm.style.color = "#0099FF";
	  	//statgsm.innerHTML = "* Επιτυχής Αναβάθμιση";
		return false;
  }
  else if(type==2)
  {
     //alert("NOT IMPLEMENTED:"+esmsen);
     load_m(true,"esmsenload");
     //if(esmsen){esmsen=0;}
     //else{esmsen=1;}
     if(esmsen==1){reqset.req_esms('http://www.live2sms.gr/set/?action=esms','enesms=0');}
     else{reqset.req_esms('http://www.live2sms.gr/set/?action=esms','enesms=1');}
		return false;
  }
	return false;
}

function Chk_Messlenght(type)
{
	var statmesslenght = document.getElementById("statmesslenght");
	switch(type)
  {
     case 0:
	  		var smstosms = document.getElementById("smstosms");
	  		if(smstosms.value == '' || !smstosms.value.match(/^\d+$/))
	  		{
	     		smstosms.style.backgroundColor = "#FF0000";
	     		statmesslenght.style.color = "#FF0000";
	     		statmesslenght.innerHTML = "* Εισάγετε έγκυρο SMS to SMS";
	     		return false;
	  		}
	  		smstosms.style.backgroundColor = "#FFFFFF";

        //sload();
        load_m(true,"msgload1");
     	reqset.req_messlen('http://www.live2sms.gr/set/?action=messlenght','smstosms='+URLEncodeUTF8(smstosms.value));//
	  		//statmesslenght.style.color = "#0099FF";
	  		//statmesslenght.innerHTML = "* Επιτυχής Αναβάθμιση";
     break;
     case 1:
	  		var emailtosms = document.getElementById("emailtosms");
	  		if(emailtosms.value == '' || !emailtosms.value.match(/^\d+$/))
	  		{
	     		emailtosms.style.backgroundColor = "#FF0000";
	     		statmesslenght.style.color = "#FF0000";
	     		statmesslenght.innerHTML = "* Εισάγετε έγκυρο E-mail σε SMS";
	     		return false;
	  		}
	  		emailtosms.style.backgroundColor = "#FFFFFF";

        //sload();
        load_m(true,"msgload2");
     	reqset.req_messlen('http://www.live2sms.gr/set/?action=messlenght','emailtosms='+URLEncodeUTF8(emailtosms.value));//
	  		//statmesslenght.style.color = "#0099FF";
	  		//statmesslenght.innerHTML = "* Επιτυχής Αναβάθμιση";
     break;
     case 2:
        //sload();
        load_m(true,"msgload3");
     	reqset.req_messlen('http://www.live2sms.gr/set/?action=messlenght','checksmstosms=1');
	  		//statmesslenght.style.color = "#0099FF";
	  		//statmesslenght.innerHTML = "* Επιτυχής Αναβάθμιση";
     break;
     case 3:
        //sload();
        load_m(true,"msgload4");
     	reqset.req_messlen('http://www.live2sms.gr/set/?action=messlenght','checkemailtosms=1');
	  		//statmesslenght.style.color = "#0099FF";
	  		//statmesslenght.innerHTML = "* Επιτυχής Αναβάθμιση";
     break;
  }
  return false;
}

function Chk_Chpass()
{
	var statchpass = document.getElementById("statchpass");
  var oldpass = document.getElementById("oldpass");
	var newpass = document.getElementById("newpass");
	var retpass = document.getElementById("retpass");

  if(oldpass.value == '' || oldpass.value.match(/^\s+$/))
  {
  	oldpass.style.backgroundColor = "#FF0000";
     statchpass.style.color = "#FF0000";
  	statchpass.innerHTML = "* Εισάγετε έγκυρο Παλαιός Κωδικός";
  	return false;
  }

  if(newpass.value == '' || newpass.value.match(/^\s+$/))
  {
  	newpass.style.backgroundColor = "#FF0000";
     statchpass.style.color = "#FF0000";
  	statchpass.innerHTML = "* Εισάγετε έγκυρο Νέος Κωδικός";
  	return false;
  }
  newpass.style.backgroundColor = "#FFFFFF";

  if(newpass.value != retpass.value)
  {
  	newpass.style.backgroundColor = "#FF0000";
     retpass.style.backgroundColor = "#FF0000";
     statchpass.style.color = "#FF0000";
  	statchpass.innerHTML = "* Ο κωδικός δεν ταιριάζει";
  	return false;
  }
  oldpass.style.backgroundColor = "#FEFFD7";
  newpass.style.backgroundColor = "#FEFFD7";
  retpass.style.backgroundColor = "#FEFFD7";

  //sload();
  load_m(true,"chpassload");
  reqset.req_chpass('http://www.live2sms.gr/set/?action=chpass','oldpass='+URLEncodeUTF8(oldpass.value)+'&pass='+URLEncodeUTF8(newpass.value)+"&pass1="+URLEncodeUTF8(retpass.value));
  //statchpass.style.color = "#0099FF";
  //statchpass.innerHTML = "* Επιτυχής Αναβάθμιση";
  return false;
}

function Chk_Settings()
{
  var statsettings = document.getElementById("statsettings");
	var sport = document.getElementById("sport");
  if(sport.options[sport.selectedIndex].value == '' || sport.options[sport.selectedIndex].value.match(/^\s+$/))
  {
  	sport.style.backgroundColor = "#FF0000";
     statsettings.style.color = "#FF0000";
  	statsettings.innerHTML = "* Εισάγετε έγκυρο Άθλημα";
  	return false;
  }
  sport.style.backgroundColor = "#FFFFFF";
	var timezonec = document.getElementById("timezone");
  if(timezonec.options[timezonec.selectedIndex].value == '' || timezonec.options[timezonec.selectedIndex].value.match(/^\s+$/))
  {
  	timezonec.style.backgroundColor = "#FF0000";
     statsettings.style.color = "#FF0000";
  	statsettings.innerHTML = "* Εισάγετε έγκυρο Χρονική Ζώνη";
  	return false;
  }
  timezonec.style.backgroundColor = "#FFFFFF";
	var metrics = document.getElementById("metrics");
  if(metrics.options[metrics.selectedIndex].value == '' || metrics.options[metrics.selectedIndex].value.match(/^\s+$/))
  {
  	metrics.style.backgroundColor = "#FF0000";
     statsettings.style.color = "#FF0000";
  	statsettings.innerHTML = "* Εισάγετε έγκυρο Metrics";
  	return false;
  }
  metrics.style.backgroundColor = "#FFFFFF";
	//var oddtype = document.getElementById("oddtype1");
  //if(oddtype.options[oddtype.selectedIndex].value == '' || oddtype.options[oddtype.selectedIndex].value.match(/^\s+$/))
  //{
  //	oddtype.style.backgroundColor = "#FF0000";
  //   statsettings.style.color = "#FF0000";
  //	statsettings.innerHTML = "* Εισάγετε έγκυρο Τύπος Πιθανοτήτων";
  //	return false;
  //}
  //oddtype.style.backgroundColor = "#FFFFFF";
  var prefmsg = document.getElementById("prefmsg");
  if(prefmsg.options[prefmsg.selectedIndex].value == '' || prefmsg.options[prefmsg.selectedIndex].value.match(/^\s+$/))
  {
  	prefmsg.style.backgroundColor = "#FF0000";
     statsettings.style.color = "#FF0000";
  	statsettings.innerHTML = "* Πρέπει πρώτα να ορίσετε τον αριθμό τηλεφώνου σας ή την διεύθυνση E-mail σε SMS";
  	return false;
  }
  prefmsg.style.backgroundColor = "#FFFFFF";
	//var smsprov = document.getElementById("smsprov");
  //if(smsprov.options[smsprov.selectedIndex].value == '' || smsprov.options[smsprov.selectedIndex].value.match(/^\s+$/))
  //{
  //	smsprov.style.backgroundColor = "#FF0000";
  //   statsettings.style.color = "#FF0000";
  //	statsettings.innerHTML = "* Εισάγετε έγκυρο SMS Provider";
  //	return false;
  //}
  //smsprov.style.backgroundColor = "#FFFFFF";
  timezone = timezonec.options[timezonec.selectedIndex].value*60
  //alert(timezone);
  if(mytime.value){ConvertMyTime(timezone,mytime);}
  else{ConvertLocalTime(timezone,mytime);}

  //sload();
  load_m(true,"setload");
  //reqset.req_settings('http://www.live2sms.gr/set/?action=settings','sport='+URLEncodeUTF8(sport.options[sport.selectedIndex].value)+"&timezone="+URLEncodeUTF8(timezonec.options[timezonec.selectedIndex].value)+"&metrics="+URLEncodeUTF8(metrics.options[metrics.selectedIndex].value)+"&oddtype="+URLEncodeUTF8(oddtype.options[oddtype.selectedIndex].value)+"&prefmsg="+URLEncodeUTF8(prefmsg.options[prefmsg.selectedIndex].value)+"&smsprov="+URLEncodeUTF8(smsprov.options[smsprov.selectedIndex].value));
  reqset.req_settings('http://www.live2sms.gr/set/?action=settings','sport='+URLEncodeUTF8(sport.options[sport.selectedIndex].value)+"&timezone="+URLEncodeUTF8(timezonec.options[timezonec.selectedIndex].value)+"&metrics="+URLEncodeUTF8(metrics.options[metrics.selectedIndex].value)+"&prefmsg="+URLEncodeUTF8(prefmsg.options[prefmsg.selectedIndex].value));
  //statsettings.style.color = "#0099FF";
  //statsettings.innerHTML = "* Επιτυχής Αναβάθμιση";
	return false;
}

function Chk_Eventhys(type)
{
  var stateventhys = document.getElementById("stateventhys");
	var date2 = document.getElementById("datefrom");
	if(date2.value == '' || date2.value.match(/^\s+$/))
	{
		date2.style.backgroundColor = "#FF0000";
		stateventhys.style.color = "#FF0000";
		stateventhys.innerHTML = "* Εισάγετε έγκυρο Εύρος Ημερομηνιών";
		return false;
	}
	date2.style.backgroundColor = "#DFE9F4";

	var date3 = document.getElementById("dateto");
	if(date3.value == '' || date3.value.match(/^\s+$/))
	{
		date3.style.backgroundColor = "#FF0000";
		stateventhys.style.color = "#FF0000";
		stateventhys.innerHTML = "* Εισάγετε έγκυρο Εύρος Ημερομηνιών";
		return false;
	}
	date3.style.backgroundColor = "#DFE9F4";

  //var tevents = document.getElementById("tevents");
	//tevents.style.visibility = "hidden";
	//tevents.style.display = "none";
  switch(type)
  {
     case 0:
	     	//alert("REC1");
	     	//sload();
	     	load_m(true,"evhysload");
	     	reqset.req_eventhys('http://www.live2sms.gr/set/?action=eventhys','type=all&date2='+URLEncodeUTF8(date2.value)+"&date3="+URLEncodeUTF8(date3.value));
	     	return false;
     break;
     case 1:
        //sload();
        load_m(true,"evhysload");
	     	//alert("REC2");
			reqset.req_eventhys('http://www.live2sms.gr/set/?action=eventhys','type=smstosms&date2='+URLEncodeUTF8(date2.value)+"&date3="+URLEncodeUTF8(date3.value));
	     	return false;
     break;
     case 2:
        //sload();
        load_m(true,"evhysload");
	     	//alert("REC3");
	     	reqset.req_eventhys('http://www.live2sms.gr/set/?action=eventhys','type=emailtosms&date2='+URLEncodeUTF8(date2.value)+"&date3="+URLEncodeUTF8(date3.value));
	     	return false;
     break;
  }

  //stateventhys.style.color = "#0099FF";
  //stateventhys.innerHTML = "* Επιτυχής Αναβάθμιση";
	return false;
}

function Chk_Deposhys(type)
{
  var statdeposhys = document.getElementById("statdeposhys");
	var date4 = document.getElementById("datefrom1");
	if(date4.value == '' || date4.value.match(/^\s+$/))
	{
		date4.style.backgroundColor = "#FF0000";
		statdeposhys.style.color = "#FF0000";
		statdeposhys.innerHTML = "* Εισάγετε έγκυρο Εύρος Ημερομηνιών";
		return false;
	}
	date4.style.backgroundColor = "#DFE9F4";

	var date5 = document.getElementById("dateto1");
	if(date5.value == '' || date5.value.match(/^\s+$/))
	{
		date5.style.backgroundColor = "#FF0000";
		statdeposhys.style.color = "#FF0000";
		statdeposhys.innerHTML = "* Εισάγετε έγκυρο Εύρος Ημερομηνιών";
		return false;
	}
	date5.style.backgroundColor = "#DFE9F4";

  //sload();
  load_m(true,"dephysload");
  reqset.req_deposhys('http://www.live2sms.gr/set/?action=deposhys','date4='+URLEncodeUTF8(date4.value)+"&date5="+URLEncodeUTF8(date5.value));
	return false;
  //switch(type)
  //{
     //case 0:
	     	//sload();
	     	////reqset.req_eventhys('http://www.live2sms.gr/set/?action=eventhys','type=all&date2='+URLEncodeUTF8(date2.value)+"&date3="+URLEncodeUTF8(date3.value));
        //reqset.req_deposhys('http://www.live2sms.gr/set/?action=deposhys','type=all&date4='+URLEncodeUTF8(date4.value)+"&date5="+URLEncodeUTF8(date5.value));
	     	//return false;
     //break;
    //case 1:
        //sload();
			////reqset.req_eventhys('http://www.live2sms.gr/set/?action=eventhys','type=smstosms&date2='+URLEncodeUTF8(date2.value)+"&date3="+URLEncodeUTF8(date3.value));
        //reqset.req_deposhys('http://www.live2sms.gr/set/?action=deposhys','type=detail&date4='+URLEncodeUTF8(date4.value)+"&date5="+URLEncodeUTF8(date5.value));
	     	//return false;
     //break;
  //}
	//return false;
}

function Chk_Deposit()
{
  var statdeposit = document.getElementById("statdeposit");

	var amount = document.getElementById("amount");
  if(amount.value == '' || amount.value.match(/^\s+$/))
  {
  	amount.style.backgroundColor = "#FF0000";
     statdeposit.style.color = "#FF0000";
  	statdeposit.innerHTML = "* Εισάγετε έγκυρο Ποσό";
  	return false;
  }
  amount.style.backgroundColor = "#FEFFD7";

  sload();
  reqset.req_deposit('http://www.live2sms.gr/set/?action=deposit',"amount="+URLEncodeUTF8(amount.value));
  //statdeposit.style.color = "#0099FF";
  //statdeposit.innerHTML = "* Επιτυχής Αναβάθμιση";
	return false;
}

function Chk_Coupon()
{
  var cpcstat = document.getElementById("cpcstat");

	var cpc = document.getElementById("cpc");
  if(cpc.value == '' || cpc.value.match(/^\s+$/) || cpc.value=="Coupon Code Her")
  {
  	cpc.style.backgroundColor = "#FF0000";
     cpcstat.style.color = "#FF0000";
  	cpcstat.innerHTML = "* Εισάγετε έγκυρο Κωδικό Κουπονιού";
  	return false;
  }
  cpc.style.backgroundColor = "#FEFFD7";
  cpcstat.innerHTML = "";
  load_m(true,"cpcload");
  reqset.req_cpc('http://www.live2sms.gr/set/?action=cpc',"coupon="+URLEncodeUTF8(cpc.value));
  //statdeposit.style.color = "#0099FF";
  //statdeposit.innerHTML = "* Επιτυχής Αναβάθμιση";
	return false;
}

function GetXMLSet()  //Obedini requestgite stoto sa edni i sasti
{
	var httpsetreq = false;
  this.req_persinfo = req_persinfo;
  this.rec_persinfo = rec_persinfo;
  this.req_gsm = req_gsm;
  this.rec_gsm = rec_gsm;
  this.req_esms = req_esms;
  this.rec_esms = rec_esms;
  this.req_messlen = req_messlen;
  this.rec_messlen = rec_messlen;
  this.req_chpass = req_chpass;
  this.rec_chpass = rec_chpass;
  this.req_settings = req_settings;
  this.rec_settings = rec_settings;
  this.req_deposit = req_deposit;
  this.rec_deposit = rec_deposit;
  this.req_eventhys = req_eventhys;
  this.rec_eventhys = rec_eventhys;
  this.req_deposhys = req_deposhys;
  this.rec_deposhys = rec_deposhys;
  this.req_serr = req_serr;
  this.rec_serr = rec_serr;
	this.req_showfaq = req_showfaq;
  this.rec_showfaq = rec_showfaq;
  this.req_loadoper = req_loadoper;
  this.rec_loadoper = rec_loadoper;
  this.req_cpc = req_cpc;
  this.rec_cpc = rec_cpc;
  this.req_smsprov = req_smsprov;
  this.rec_smsprov = rec_smsprov;
  //----------------------------------------------
  function req_persinfo(url,params) //Personal Info handler
  {
     //alert("ADE");
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	try{httpsetreq = new XMLHttpRequest();}
	     	catch(e){hload();alert(e);ErrWin(1,e);return false;}
	     	if(httpsetreq.overrideMimeType){httpsetreq.overrideMimeType('text/xml');}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch(e){hload();alert(e);ErrWin(1,e);return false;}}
	  	}
	  	if(!httpsetreq){hload();ErrWin(1,'Cannot create XMLHTTP instance');return false;}

		httpsetreq.onreadystatechange = rec_persinfo;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_persinfo()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
				var root = xmldoc.getElementsByTagName('root').item(0);
           //var status=root.childNodes.item(0).firstChild.nodeValue;
           //alert("STATUS:"+status);
           var error=1;var stepid = null;var wstep = null;var stepid1 = null;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statpersinfo = document.getElementById("statpersinfo");
                 	if(error == 1)
                 	{
     						statpersinfo.style.color = "#FF0000";
    							statpersinfo.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	statpersinfo.style.color = "#0099FF";
                       statpersinfo.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
                 /*else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                 	if(stepconf2)
                 	{
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }*/
           	}
				}
	     	}
	     	else{alert('There was a problem with the request.');}
	     	load_m(false,"persinfoload");
		}
	}
  //----------------------------------------------
  function req_gsm(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml; charset=utf-8');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_gsm;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_gsm()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+httpsetreq.responseText);
           var root = xmldoc.getElementsByTagName('root').item(0);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statgsm = document.getElementById("statgsm");
                 	if(error == 1)
                 	{
     						statgsm.style.color = "#FF0000";
    							statgsm.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                 	else if(error == 2)
                 	{
     						statgsm.style.color = "#FF0000";
    							statgsm.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                    else
                    {
                    	statgsm.style.color = "#0099FF";
                       statgsm.innerHTML = "* "+ node.firstChild.nodeValue;
                       MsgBox(1,node.firstChild.nodeValue);
                    }
                 }
                 else if(node.nodeName == 'currentnumber')
                 {
	               	var currentnumber =  document.getElementById("currentnumber");
                 	currentnumber.innerHTML = '&nbsp;'+ node.firstChild.nodeValue+'&nbsp;';
                   	var prefmsg = document.getElementById("prefmsg");
                    prefmsg.style.backgroundColor = "#FFFFFF";
  						if(prefmsg.options[0].value == '' || prefmsg.options[0].value.match(/^\s+$/))
  						{
                    	prefmsg.options[1].selected=true;
  						}
  						else
                    {
                    	prefmsg.options[0].selected=true;
                  	}
                   	prefmsg.disabled=false;
                 }
                 else if(node.nodeName == 'pricepermsg')
                 {
                 	var pricepermsg = document.getElementById("pricepermsg");
                    pricepermsg.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                    if(stepconf2)
                    {
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+encodeToHex(node.firstChild.nodeValue));
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 //else if(node.nodeName == 'bal')
                 //{
                    ////alert("BAL"+node.firstChild.nodeValue);
                 	//var bal1 =  document.getElementById("balance1");
                 	//var bal2 =  document.getElementById("balance2");
                 	//bal1.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
                 	//bal2.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
                 //}
           	}
				}
           //hload();
           load_m(false,"gsmload1");
           load_m(false,"gsmload2");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
  function req_esms(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_esms;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_esms()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           var root = xmldoc.getElementsByTagName('root').item(0);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statesms = document.getElementById("statemailsms");
                 	if(error == 1)
                 	{
     						statesms.style.color = "#FF0000";
    							statesms.innerHTML = "* "+ node.firstChild.nodeValue;
                       ErrWin(1,"* "+ node.firstChild.nodeValue);
                       //MsgBox(1,node.firstChild.nodeValue);
                 	}
                 	else if(error == 2)
                 	{
     						statesms.style.color = "#FF0000";
    							statesms.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
    							//MsgBox(1,node.firstChild.nodeValue);
                 	}
                    else
                    {
                    	statesms.style.color = "#0099FF";
                       statesms.innerHTML = "* "+ node.firstChild.nodeValue;
                       //WarnWin(1,"* "+ node.firstChild.nodeValue);
                       MsgBox(1,node.firstChild.nodeValue);
                    }
                 }
                 else if(node.nodeName == 'currentemailsms')
                 {
	               	var currentemailsms =  document.getElementById("currentemailsms");
                 	currentemailsms.innerHTML = '&nbsp;'+ node.firstChild.nodeValue+'&nbsp;';
                    var prefmsg = document.getElementById("prefmsg");
                    prefmsg.disabled=false;
                    var esmsdm = document.getElementById("esmsdm");
							esmsdm.style.visibility = "hidden";
							esmsdm.style.display = "none";
                 }
                 else if(node.nodeName == 'pricepermsg')
                 {
                 	var pricepermsg = document.getElementById("pricepermsg");
                    pricepermsg.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'bal')
                 {
                    //alert("BAL"+node.firstChild.nodeValue);
                 	var bal1 =  document.getElementById("balance1");
                 	var bal2 =  document.getElementById("balance2");
                 	bal1.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
                 	bal2.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
                 }
                 /*else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                    if(stepconf2)
                    {
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }*/
                 else if(node.nodeName === 'enesms')
                 {
                    esmsen = node.firstChild.nodeValue;
                    //alert("KKK:"+esmsen);
                 	var benesms = document.getElementById("emsmen");
                    var enesmstext = document.getElementById("enesmstext");
                    if(esmsen==1)
                    {
                    	benesms.src = "http://img2.live2sms.gr/disable.jpg";
                       enesmstext.innerHTML="Email-to-SMS currently enabled";
                       var prefmsg = document.getElementById("prefmsg");
  							if(prefmsg.options[0].value == '' || prefmsg.options[0].value.match(/^\s+$/))
  							{
                       	prefmsg.options[1].selected=true;
  							}
  							else
                       {
                        	prefmsg.options[0].selected=true;
                       }
                       prefmsg.disabled=false;
                    	var esmsdm = document.getElementById("esmsdm");
								esmsdm.style.visibility = "hidden";
								esmsdm.style.display = "none";
                    }
                    else
                    {
                    	benesms.src = "http://img.live2sms.gr/enable.jpg";
                       enesmstext.innerHTML="Email-to-SMS currently disabled";
  							var prefmsg = document.getElementById("prefmsg");
  							if(prefmsg.options[0].value == '' || prefmsg.options[0].value.match(/^\s+$/))
  							{
                       	prefmsg.options[1].selected=true;
  							}
  							else
                       {
                        	prefmsg.options[0].selected=true;
                       }
                       prefmsg.disabled=true;
                    	var esmsdm = document.getElementById("esmsdm");
								esmsdm.style.visibility = "visible";
								esmsdm.style.display = "";
  							//prefmsg.style.backgroundColor = "#FFFFFF";
                    }
                 }
                 else if(node.nodeName == 'estcost')
                 {
                 	var estimcost = document.getElementById("estimcost");
                    estimcost.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'pricepermsg')
                 {
                 	var pricepermsg = document.getElementById("pricepermsg");
                    pricepermsg.innerHTML = node.firstChild.nodeValue;
                 }
           	}
				}
           //hload();
           load_m(false,"esmsload1");
           load_m(false,"esmsload2");
           load_m(false,"esmsenload");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
  function req_messlen(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_messlen;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_messlen()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
           var root = xmldoc.getElementsByTagName('root').item(0);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statmesslenght = document.getElementById("statmesslenght");
                 	if(error == 1)
                 	{
     						statmesslenght.style.color = "#FF0000";
    							statmesslenght.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                 	else if(error == 2)
                 	{
     						statmesslenght.style.color = "#FF0000";
    							statmesslenght.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                    else
                    {
                    	statmesslenght.style.color = "#0099FF";
                       statmesslenght.innerHTML = "* "+ node.firstChild.nodeValue;
                       MsgBox(1,node.firstChild.nodeValue);
                    }
                 }
                 /*else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                    if(stepconf2)
                    {
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }*/
           	}
				}
           //hload();
           load_m(false,"msgload1");
           load_m(false,"msgload2");
				load_m(false,"msgload3");
				load_m(false,"msgload4");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
  function req_chpass(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_chpass;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_chpass()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
           var root = xmldoc.getElementsByTagName('root').item(0);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statchpass = document.getElementById("statchpass");
                 	if(error == 1)
                 	{
     						statchpass.style.color = "#FF0000";
    							statchpass.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	statchpass.style.color = "#0099FF";
                       statchpass.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
           	}
				}
           //hload();
           load_m(false,"chpassload");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
  function req_settings(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_settings;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_settings()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
				var root = xmldoc.getElementsByTagName('root').item(0);
           //var status=root.childNodes.item(0).firstChild.nodeValue;
           //alert("STATUS:"+status);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'estcost')
                 {
                 	var estimcost = document.getElementById("estimcost");
                    estimcost.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'pricepermsg')
                 {
                 	var pricepermsg = document.getElementById("pricepermsg");
                    pricepermsg.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statsettings = document.getElementById("statsettings");
                 	if(error == 1)
                 	{
     						statsettings.style.color = "#FF0000";
    							statsettings.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	statsettings.style.color = "#0099FF";
                       statsettings.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
               	/*else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                    if(stepconf2)
                    {
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }*/
           	}
				}
           //hload();
           load_m(false,"setload");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
  function req_deposit(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_deposit;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_deposit()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
				var root = xmldoc.getElementsByTagName('root').item(0);
           //var status=root.childNodes.item(0).firstChild.nodeValue;
           //alert("STATUS:"+status);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statdeposit = document.getElementById("statdeposit");
                 	if(error == 1)
                 	{
     						statdeposit.style.color = "#FF0000";
    							statdeposit.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	statdeposit.style.color = "#0099FF";
                       statdeposit.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
           	}
				}
           hload();
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	hload();
		}
	}
  //----------------------------------------------
  function req_eventhys(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_eventhys;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
  function rec_eventhys()
  {
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
           //return;
				var root = xmldoc.getElementsByTagName('root').item(0);
           var tevents = document.getElementById("tevents");
				tevents.style.visibility = "hidden";
				tevents.style.display = "none";
           //var tbevents = document.getElementById("tbevents");
           if(tevents.firstChild != 'undefined' && tevents.firstChild != null)
           {
           	tevents.removeChild(tevents.firstChild);
           }
				//var len = tevents.childNodes.length;
				//for(var i = 0; i < len; i++)
   			//{
           //   //alert("UU:"+len+":"+tevents.childNodes[i]);
   			//	if(tevents.childNodes[i] == undefined || tevents.childNodes[i] === null){continue;}
           //   //alert("SS");
      		//	tevents.removeChild(tevents.childNodes[i]);
   			//}
           var tbevents = document.createElement("tbody");

           //var tblc = '<tr><td class="text-center-info" width="60" align="center">Date</td><td class="text-center-info" width="60" align="center">Time</td><td class="text-center-info" width="170" align="center">Event</td><td class="text-center-info" width="210" align="center">Message Text</td></tr>';
				var tr = document.createElement("tr");
				var td = document.createElement("td");td.setAttribute("align","center");td.style.width = "80";td.className = "text-center-info";td.innerHTML = "Date";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.className = "text-center-info";td.innerHTML = "Time";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "210";td.className = "text-center-info";td.innerHTML = "Message Text";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.className = "text-center-info";td.innerHTML = "Price";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.className = "text-center-info";td.innerHTML = "Sent";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.className = "text-center-info";td.innerHTML = "Rcvd";tr.appendChild(td);
           tbevents.appendChild(tr);


           //var status=root.childNodes.item(0).firstChild.nodeValue;
           //alert("STATUS:"+status);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var stateventhys = document.getElementById("stateventhys");
                 	if(error == 1)
                 	{
     						stateventhys.style.color = "#FF0000";
    							stateventhys.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	stateventhys.style.color = "#0099FF";
                       stateventhys.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
                 else if(node.nodeName == 'smstosms')
                 {
                 	var smssmsin = document.getElementById("smssmsin");
                    if(node.firstChild.nodeValue == 0){smssmsin.style.cursor='default';smssmsin.style.textDecoration='none';smssmsin.onclick = function(){return false;}}
                    else{smssmsin.style.cursor='pointer';smssmsin.style.textDecoration='underline';smssmsin.onclick = function(){Chk_Eventhys(1);return false;}}
                    smssmsin.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'smsamount')
                 {
                 	var smsamount = document.getElementById("smsamount");
                    smsamount.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'emailtosms')
                 {
                 	var emailsmsin = document.getElementById("emailsmsin");
                    if(node.firstChild.nodeValue == 0){emailsmsin.style.cursor='default';emailsmsin.style.textDecoration='none';emailsmsin.onclick = function(){return false;}}
                    else{emailsmsin.style.cursor='pointer';emailsmsin.style.textDecoration='underline';emailsmsin.onclick = function(){Chk_Eventhys(2);return false;}}
                    emailsmsin.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'emailamount')
                 {
                 	var emailamount = document.getElementById("emailamount");
                    emailamount.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'event')
                 {
                 	//alert("EVENT:");
							tevents.style.visibility = "visible";
							tevents.style.display = "";
                    var date='';var time='';var text='';var price=0;var lstatus='';var rstatus='';
                    //----------------
                    for (var jNode = 0; jNode < node.childNodes.length; jNode++)
                    {
                    	var node1 = node.childNodes.item(jNode);
                       if(node1.nodeName == '#text'){continue;}
                       if(node1.firstChild !== 'undefined' && node1.firstChild !== null)
                       {
                       	//alert("U:"+node1.firstChild.nodeValue);
                       	switch (node1.nodeName)
                       	{
                          	case 'date':
                          		date = node1.firstChild.nodeValue;
                          	break;
                          	case 'time':
                          		time = node1.firstChild.nodeValue;
                          	break;
                          	case 'text':
                          		text = node1.firstChild.nodeValue;
                          	break;
                          	case 'price':
                          		price = node1.firstChild.nodeValue;
                          	break;
                          	case 'lstatus':
                          		lstatus = node1.firstChild.nodeValue;
                          	break;
                          	case 'rstatus':
                          		rstatus = node1.firstChild.nodeValue;
                          	break;
                       	}
                       }
                    }
                    //alert("D:"+date+" T:"+time+" M:"+match+" T:"+text);
                    //tblc += '<tr><td class="result" width="60" align="center" style="padding:2 0 2 0" valign="top">'+date+'</td><td class="result" width="60" align="center" style="padding:2 0 2 0" valign="top">'+time+'</td><td class="result" width="170" style="padding:2 5 2 5" valign="top">'+match+'</td><td class="result" width="210" style="padding:2 5 2 5" valign="top">'+text+'</td></tr>';
                    //alert(price);
							tr = document.createElement("tr");
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "80";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = date;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = time;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "210";td.setAttribute("padding","2 5 2 5");td.style.valign = "top";td.className = "tabletext";td.innerHTML = text;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = price;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = lstatus;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "50";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = rstatus;tr.appendChild(td);
							tbevents.appendChild(tr);
                 }
           	}
				}
           //alert(tblc);
           //return false;
           //alert("APPEND TBODY");
				tevents.appendChild(tbevents);
           //hload();
           load_m(false,"evhysload");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	hload();
		}
  }
  //----------------------------------------------
  function req_deposhys(url,params)
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_deposhys;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
  function rec_deposhys()
  {
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert(xmldoc);
           //return;
				var root = xmldoc.getElementsByTagName('root').item(0);
           var tdeposevents = document.getElementById("tdeposevents");
				tdeposevents.style.visibility = "hidden";
				tdeposevents.style.display = "none";
           if(tdeposevents.firstChild != 'undefined' && tdeposevents.firstChild != null)
           {
           	tdeposevents.removeChild(tdeposevents.firstChild);
           }
           var tbevents = document.createElement("tbody");
				var tr = document.createElement("tr");
				var td = document.createElement("td");td.setAttribute("align","center");td.style.width = "100";td.className = "text-center-info";td.innerHTML = "Date";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.className = "text-center-info";td.innerHTML = "Type";tr.appendChild(td);
           td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.className = "text-center-info";td.innerHTML = "Amount";tr.appendChild(td);
				td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.className = "text-center-info";td.innerHTML = "Status";tr.appendChild(td);
           tbevents.appendChild(tr);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statdeposhys = document.getElementById("statdeposhys");
                 	if(error == 1)
                 	{
     						statdeposhys.style.color = "#FF0000";
    							statdeposhys.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	statdeposhys.style.color = "#0099FF";
                       statdeposhys.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
                 else if(node.nodeName == 'count')
                 {
                 	var depcount = document.getElementById("depcount");
                    depcount.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'amount')
                 {
                 	var depamount = document.getElementById("depamount");
                    depamount.innerHTML = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'event')
                 {
                 	//alert("EVENT:");
							tdeposevents.style.visibility = "visible";
							tdeposevents.style.display = "";
                    var date='';var amount=0;var status='';var type='';var comment='';
                    //----------------
                    for (var jNode = 0; jNode < node.childNodes.length; jNode++)
                    {
                    	var node1 = node.childNodes.item(jNode);
                       if(node1.nodeName == '#text'){continue;}
                       if(node1.firstChild !== 'undefined' && node1.firstChild !== null)
                       {
                       	//alert("U:"+node1.nodeName);
                       	switch (node1.nodeName)
                       	{
                          	case 'date':
                          		date = node1.firstChild.nodeValue;
                          		//alert(date);
                          	break;
                          	case 'amount':
                          		amount = node1.firstChild.nodeValue;
                          	break;
                          	case 'status':
                          		status = node1.firstChild.nodeValue;
                          	break;
                          	case 'type':
                          		type = node1.firstChild.nodeValue;
                          	break;
                          	case 'comment':
                          		comment = node1.firstChild.nodeValue;
                          	break;
                       	}
                       }
                    }
                    //alert("D:"+date+" T:"+time+" M:"+match+" T:"+text);
                    //tblc += '<tr><td class="result" width="60" align="center" style="padding:2 0 2 0" valign="top">'+date+'</td><td class="result" width="60" align="center" style="padding:2 0 2 0" valign="top">'+time+'</td><td class="result" width="170" style="padding:2 5 2 5" valign="top">'+match+'</td><td class="result" width="210" style="padding:2 5 2 5" valign="top">'+text+'</td></tr>';
                    //alert(comment);
							tr = document.createElement("tr");
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "100";td.setAttribute("padding","2 0 2 0");td.style.valign = "top";td.className = "tabletext";td.innerHTML = date;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.setAttribute("padding","2 5 2 5");td.style.valign = "top";td.className = "tabletext";td.innerHTML = type;td.title=comment;if(comment){td.style.fontWeight='bold';}tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.setAttribute("padding","2 5 2 5");td.style.valign = "top";td.className = "tabletext";td.innerHTML = amount;tr.appendChild(td);
							td = document.createElement("td");td.setAttribute("align","center");td.style.width = "60";td.setAttribute("padding","2 5 2 5");td.style.valign = "top";td.className = "tabletext";td.innerHTML = status;tr.appendChild(td);
                    tbevents.appendChild(tr);
                 }
           	}
				}
				tdeposevents.appendChild(tbevents);
           //hload();
           load_m(false,"dephysload");
           return false;
			}
			//hload();
			//load_m(false,"dephysload");
		}
  }
  //----------------------------------------------
  function req_serr(url,cX,cY,params)
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange =  function(){rec_serr(cX,cY);};
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
  function rec_serr(cX,cY)
  {
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert(xmldoc);
           //return;
				var root = xmldoc.getElementsByTagName('root').item(0);
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
						if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                 	//alert(node.firstChild.nodeValue);
                    WarnWin(1,node.firstChild.nodeValue,cX,cY);
                 }
           	}
				}
           hload();
           return false;
			}
			hload();
		}
  }
  //----------------------------------------------
  function req_showfaq(url,cX,cY,params)
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange =  function(){rec_showfaq(cX,cY);};
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_showfaq(cX,cY)
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert(xmldoc);
           //return;
				var root = xmldoc.getElementsByTagName('root').item(0);
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
						if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    //balshow = 1;
                    document.body.onclick = function(){bodyclick();};

							var balhelp = document.getElementById("balhelp");
                    var balhelptext = document.getElementById("balhelptext");
                    balhelptext.innerHTML = node.firstChild.nodeValue;
                    //+//var ibalhelp = document.getElementById("ibalhelp");
							//+//balhelp.style.display = "";

							if((cX+balhelp.clientWidth+document.body.scrollLeft-35) >= 1000 || (cX-document.body.scrollLeft) <= (balhelp.clientWidth +35))//lqw
							{
                       //alert("X1:"+cX+":"+balhelp.clientWidth+":"+document.body.scrollLeft);
								if((cY-document.body.scrollTop)>=(balhelp.clientHeight+10))//top
								{
                          //alert("Y1:"+cY+":"+document.body.scrollTop+":"+balhelp.clientHeight);
                          document.getElementById("blimg1").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_01.gif" width="34" height="23">';
                          document.getElementById("blimg2").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_04.gif')";document.getElementById("blimg2").style.backgroundRepeat="repeat-x";document.getElementById("blimg2").innerHTML="";document.getElementById("blimg2").style.width="";
                          document.getElementById("blimg3").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_04.gif')";document.getElementById("blimg3").style.backgroundRepeat="repeat-x";document.getElementById("blimg3").innerHTML="";document.getElementById("blimg3").style.width="";
                          document.getElementById("blimg4").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_06.gif" width="37" height="23">';

                          document.getElementById("blimg5").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_13.gif" width="34" height="46">';
                          document.getElementById("blimg6").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg6").style.backgroundRepeat="repeat-x";document.getElementById("blimg6").style.width="100%";document.getElementById("blimg6").innerHTML="";
                       	document.getElementById("blimg7").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-left_14.gif" width="42" height="46" alt="" border="0">';document.getElementById("blimg7").style.backgroundImage="";document.getElementById("blimg7").style.width="";
                          document.getElementById("blimg8").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_17.gif" width="37" height="46">';
                          cX -= balhelp.clientWidth-40;
									cY -= balhelp.clientHeight;
								}
								else//bottom
								{
                          //alert("Y2:"+cY+":"+document.body.scrollTop+":"+balhelp.clientHeight);
                          document.getElementById("blimg1").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-top_01.gif" width="34" height="46">';
                          document.getElementById("blimg2").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon-top_03.gif')";document.getElementById("blimg2").style.backgroundRepeat="repeat-x";document.getElementById("blimg2").style.width="100%";document.getElementById("blimg2").innerHTML="";
                          document.getElementById("blimg3").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon3_02.gif" width="42" height="46">';document.getElementById("blimg3").style.backgroundImage="";document.getElementById("blimg3").style.width="";
									document.getElementById("blimg4").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-top_05.gif" width="37" height="46">';

                          document.getElementById("blimg5").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_13.gif" width="34" height="46">';
                          document.getElementById("blimg6").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg6").style.backgroundRepeat="repeat-x";document.getElementById("blimg6").innerHTML="";document.getElementById("blimg6").style.width="";
                          document.getElementById("blimg7").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg7").style.backgroundRepeat="repeat-x";document.getElementById("blimg7").innerHTML="";document.getElementById("blimg7").style.width="";
                          document.getElementById("blimg8").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_17.gif" width="37" height="46">';

									cX -= balhelp.clientWidth-40;
									cY += 5;
								}
							}
							else//desen
							{
                       //alert("X2:"+cX+":"+balhelp.clientWidth+":"+document.body.scrollLeft);
								if((cY-document.body.scrollTop)>=(balhelp.clientHeight+10))//top
								{
                          //alert("Y3:"+cY+":"+document.body.scrollTop+":"+balhelp.clientHeight);
                          document.getElementById("blimg1").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_01.gif" width="34" height="23">';
                          document.getElementById("blimg2").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_04.gif')";document.getElementById("blimg2").style.backgroundRepeat="repeat-x";document.getElementById("blimg2").innerHTML="";document.getElementById("blimg2").style.width="";
                          document.getElementById("blimg3").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_04.gif')";document.getElementById("blimg3").style.backgroundRepeat="repeat-x";document.getElementById("blimg3").innerHTML="";document.getElementById("blimg3").style.width="";
                          document.getElementById("blimg4").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_06.gif" width="37" height="23">';

                          document.getElementById("blimg5").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_13.gif" width="34" height="46">';
                       	document.getElementById("blimg6").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_16.gif" width="42" height="46" alt="">';document.getElementById("blimg6").style.backgroundImage="";document.getElementById("blimg6").style.width="";
                          document.getElementById("blimg7").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg7").style.backgroundRepeat="repeat-x";document.getElementById("blimg7").style.width="100%";document.getElementById("blimg7").innerHTML="";
                          document.getElementById("blimg8").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_17.gif" width="37" height="46">';
                          cX -= 40;
									cY -= balhelp.clientHeight;
								}
								else//bottom
								{
                          //alert("Y4:"+cY+":"+document.body.scrollTop+":"+balhelp.clientHeight);
                          document.getElementById("blimg1").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-top_01.gif" width="34" height="46">';
                          document.getElementById("blimg2").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-top_04.gif" width="42" height="46">';document.getElementById("blimg2").style.backgroundImage="";document.getElementById("blimg2").style.width="";
                          document.getElementById("blimg3").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon-top_03.gif')";document.getElementById("blimg3").style.backgroundRepeat="repeat-x";document.getElementById("blimg3").style.width="100%";document.getElementById("blimg3").innerHTML="";
                       	document.getElementById("blimg4").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon-top_05.gif" width="37" height="46">';

                          document.getElementById("blimg5").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_13.gif" width="34" height="46">';
                          document.getElementById("blimg6").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg6").style.backgroundRepeat="repeat-x";document.getElementById("blimg6").innerHTML="";document.getElementById("blimg6").style.width="";
                          document.getElementById("blimg7").style.backgroundImage="url('http://img3.live2sms.gr/speech-baloon2_15.gif')";document.getElementById("blimg7").style.backgroundRepeat="repeat-x";document.getElementById("blimg7").innerHTML="";document.getElementById("blimg7").style.width="";
                          document.getElementById("blimg8").innerHTML = '<img src="http://img3.live2sms.gr/speech-baloon2_17.gif" width="37" height="46">';

									cX -= 40;
									cY += 5;
                       }
							}

  						//alert("X:"+event.clientX+":"+document.body.scrollLeft+":-"+balhelp.clientWidth+"  Y:"+event.clientY+":"+document.body.scrollTop+":-"+balhelp.clientHeight);
							balhelp.style.top = cY+"px";
							balhelp.style.left = cX+"px";

							//ibalhelp.style.top = cY+"px";
							//ibalhelp.style.left = cX+"px";
							//ibalhelp.style.height = balhelp.clientHeight;
							//ibalhelp.style.width = balhelp.clientWidth;

							//+//balhelp.style.visibility = "visible";
							if(document.getElementById)
							{
		 						balhelp.style.visibility = "visible";
							}
							else if(document.layers)
							{
		 						document.layers[balhelp].visibility = "show";
							}
  						else if(document.all)
  						{
        					document.all[balhelp].style.visibility = "visible";
  						}
                    //ibalhelp.style.visibility = "visible";
                 }
           	}
				}
           hload();
           return false;
			}
			hload();
		}
	}
  //----------------------------------------------
  function req_loadoper(url,params)
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_loadoper;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
  function rec_loadoper()
  {
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
				var root = xmldoc.getElementsByTagName('root').item(0);
           var ecodes = document.getElementById("ecodes");
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 var country='';var oper = '';var code = '';
                 if(node.nodeName == 'error')
                 {
                 	if(node.firstChild.nodeValue == 1)
                 	{
                       ecodes.disabled=true;
                 	}
                    else
                    {
                       ecodes.disabled=false;
                    }
                 }
                 else if(node.nodeName == 'oper')
                 {
                 	oper = node.firstChild.nodeValue;
                    var code = node.getAttribute("code");
                    var opt = document.createElement('option');
  						opt.text = oper;
  						opt.value = code;
  						try{ecodes.add(opt,null);} // standards compliant; doesn't work in IE
  						catch(ex){ecodes.add(opt);} // IE only
                 }
           	}
				}
           hload();
           return false;
			}
			hload();
		}
  }
  //----------------------------------------------
  function req_cpc(url,params)
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_cpc;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
  function rec_cpc()
  {
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
				var root = xmldoc.getElementsByTagName('root').item(0);
           //var cpcstat = document.getElementById("cpcstat");
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var cpcstat = document.getElementById("cpcstat");
                 	if(error == 1)
                 	{
     						cpcstat.style.color = "#FF0000";
    							cpcstat.innerHTML = "* "+ node.firstChild.nodeValue;
                 	}
                    else
                    {
                    	cpcstat.style.color = "#0099FF";
                       cpcstat.innerHTML = "* "+ node.firstChild.nodeValue;
                    }
                 }
              	else if(node.nodeName == 'bal')
              	{
                 	//alert("BALANCE"+node.firstChild.nodeValue);
                 	var bal1 =  document.getElementById("balance1");
                 	var bal2 =  document.getElementById("balance2");
                 	bal1.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
                 	bal2.innerHTML = node.firstChild.nodeValue+"&nbsp;&#128;";
              	}
               	else if(node.nodeName === 'stepid')
                 {
                 	stepid = document.getElementById("step_"+node.firstChild.nodeValue);
                    wstep = document.getElementById("wstep_"+node.firstChild.nodeValue);
                    //alert("1:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.className = "comleted";
                    	wstep.innerHTML = '<img src="http://img.live2sms.gr/check1a.jpg" border="0">';
                 	}
                 }
                 else if(node.nodeName === 'stepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid==='object' && stepid !== 'undefined')
                 	{
                    	stepid.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
                 else if(node.nodeName === 'dstepid')
                 {
                 	var stepconf2 = document.getElementById("stepconf2");
                    if(stepconf2)
                    {
           				stepconf2.style.visibility = "hidden";
           				stepconf2.style.display = "none";
           				stepconf2.innerHTML="";
           			}
                 }
                 else if(node.nodeName === 'nstepid')
                 {
                    stepid1 = document.getElementById("step_"+node.firstChild.nodeValue);
               	}
                 else if(node.nodeName === 'nstepcont')
                 {
                    //alert("2:"+stepid);
                 	if (typeof stepid1==='object' && stepid1 !== 'undefined')
                 	{
                    	stepid1.innerHTML = node.firstChild.nodeValue;
                 	}
                 }
           	}
				}
           load_m(false,"cpcload");
           return false;
			}
			load_m(false,"cpcload");
		}
  }
  //----------------------------------------------
  //----------------------------------------------
  function req_smsprov(url,params) //Personal Info handler
  {
	  	httpsetreq = false;
	  	if (window.XMLHttpRequest) //Mozilla
	  	{
	     	httpsetreq = new XMLHttpRequest();
	     	if (httpsetreq.overrideMimeType)
	     	{
	        	httpsetreq.overrideMimeType('text/xml');
	     	}
	  	}
	  	else if (window.ActiveXObject)// IE
	  	{
	     	try{httpsetreq = new ActiveXObject("Msxml2.XMLHTTP");}
	     	catch (e){try{httpsetreq = new ActiveXObject("Microsoft.XMLHTTP");}catch (e) {}}
	  	}
	  	if (!httpsetreq)
	  	{
	     	alert('Cannot create XMLHTTP instance');
	     	return false;
	  	}

		httpsetreq.onreadystatechange = rec_smsprov;
		httpsetreq.open('POST', url+"&rand="+Math.floor(Math.random()*1000000), true);
		httpsetreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		httpsetreq.setRequestHeader("Content-length", params.length);
		httpsetreq.setRequestHeader("Connection", "close");
		httpsetreq.send(params);
  }
	function rec_smsprov()
	{
	  	if (httpsetreq.readyState == 4)
		{
	     	if (httpsetreq.status == 200)
			{
				var xmldoc = httpsetreq.responseXML;//responseXML;//responseText
           //alert("PI:"+xmldoc);
           var root = xmldoc.getElementsByTagName('root').item(0);
           var error=1;
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)//root
				{
           	var node = root.childNodes.item(iNode);
              if(node.nodeName == '#text'){continue;}
					if(node.firstChild !== 'undefined' && node.firstChild !== null)
              {
                 //alert("K: "+node.nodeName+" V: "+node.firstChild.nodeValue);
                 if(node.nodeName == 'error')
                 {
                 	error = node.firstChild.nodeValue;
                 }
                 else if(node.nodeName == 'status')// && node.firstChild.nodeValue != ''
                 {
                    var statsettings = document.getElementById("statsettings");
                 	if(error == 1)
                 	{
     						statsettings.style.color = "#FF0000";
    							statsettings.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                 	else if(error == 2)
                 	{
     						statsettings.style.color = "#FF0000";
    							statsettings.innerHTML = "* "+ node.firstChild.nodeValue;
    							ErrWin(1,"* "+ node.firstChild.nodeValue);
                 	}
                    else
                    {
                    	statsettings.style.color = "#0099FF";
                       statsettings.innerHTML = "* "+ node.firstChild.nodeValue;
                       MsgBox(1,node.firstChild.nodeValue);
                    }
                 }
           	}
				}
           //hload();
           load_m(false,"routingload");
           //load_m(false,"gsmload2");
           return false;
	     	}
	     	else{alert('There was a problem with the request.');}
	     	//hload();
		}
	}
  //----------------------------------------------
}

function load_m(en,name)
{
  if(typeof document.getElementById(name)!='object'){return false;}
	if(en)
	{
  	document.getElementById(name).innerHTML = '<img src="http://img.live2sms.gr/loadmidi.gif">';
	}
	else
	{
  	document.getElementById(name).innerHTML = "";
	}
	return false;
}
//showerr(event,0,0)
function showerr(event,lstatus,rstatus)
{
  sload();
	//var cX = event.clientX-document.getElementById("wres_"+mid).offsetLeft;
  //var cY = event.clientY+document.body.scrollTop-document.getElementById("wres_"+mid).offsetTop;
  //alert("X:"+event.clientX+" Y:"+event.clientY+" T:"+document.body.scrollTop+" L:"+document.body.scrollLeft);
  var cX =  event.clientX+document.body.scrollLeft;
  var cY = event.clientY+document.body.scrollTop;
  //alert(cX+":"+cY);
  reqset.req_serr('http://www.live2sms.gr/set/?action=showerr',cX,cY,'lstatus='+lstatus+'&rstatus='+rstatus);//
  //lfob.cfshowres('http://www.live2sms.gr/xcf/',mid,cX,cY,left);
	return;
}

function LoadOper(country)
{
  var ecodes = document.getElementById("ecodes");
  ecodes.disabled=true;
  //var i;
  for(var i=ecodes.length-1; i>0;i--)
  {
		ecodes.remove(i);
  }
  ecodes.options[0].selected=true;
  var gsmoperator = document.getElementById("gsmoperator");
  gsmoperator.innerHTML = "&nbsp;&nbsp;";
	sload();
  reqset.req_loadoper('http://www.live2sms.gr/set/?action=loadoper','country='+country);//onChange="CEmalSMS(this.options[this.selectedIndex].value);return false;"
	return false;
}
function CEmalSMS(oper)
{
  //alert(oper);
  var gsmoperator = document.getElementById("gsmoperator");
  gsmoperator.innerHTML = oper;
  //reqset.req_loadoper('http://www.live2sms.gr/set/?action=loadoper','&country='+country+'&oper='+oper);//
	return false;
}

//function URLEncodeUTF8(text) {
//	var SAFECHARS = "0123456789" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	"abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()";
//	var HEX = "0123456789ABCDEF";
//	var encoded = "";
//	for (var i = 0; i < text.length; i++ )
//	{
//		var ch = text.charAt(i);
//	   if (ch == " ")
//	   {
//			encoded += "+";				// x-www-urlencoded, rather than %20
//		}
//		else if (SAFECHARS.indexOf(ch) != -1)
//		{
//			encoded += ch;
//		}
//		else
//		{
//			var charCode = ch.charCodeAt(0);
//			if (charCode > 255)
//			{
//				alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." );
//				encoded += "+";
//			}
//			else
//			{
//				encoded += "%";
//				encoded += HEX.charAt((charCode >> 4) & 0xF);
//				encoded += HEX.charAt(charCode & 0xF);
//			}
//		}
//	}
//	return encoded;
//}

function URLEncodeUTF8(string) {
	return string;
	//TODO - mahni wsi4ki izwikwaniq na funkciqtq
	string = string.replace(/\r\n/g,"\n");
	var utftext = "";
	for (var n = 0; n < string.length; n++) {
		var c = string.charCodeAt(n);
     if (c < 128) {
			utftext += String.fromCharCode(c);
		}
		else if((c > 127) && (c < 2048)) {
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		}
		else {
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}
	}
  return utftext;
}

function URLDecodeUTF8(utftext) {
	return string;
	//TODO - mahni wsi4ki izwikwaniq na funkciqtq
	var string = "";
	var i = 0;
	var c = c1 = c2 = 0;
  while ( i < utftext.length ) {
		c = utftext.charCodeAt(i);
     if (c < 128) {
			string += String.fromCharCode(c);
			i++;
		}
		else if((c > 191) && (c < 224)) {
			c2 = utftext.charCodeAt(i+1);
			string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
			i += 2;
		}
		else {
			c2 = utftext.charCodeAt(i+1);
			c3 = utftext.charCodeAt(i+2);
			string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
		}
	}
	return string;
}

function hsmsprov(dmethod)
{
  var rsmsprov = document.getElementById("rsmsprov");
  var routmsg =  document.getElementById("routmsg");
  if(dmethod)
  {
  	rsmsprov.style.display = "none";
  	rsmsprov.style.visibility = "hidden";
  	routmsg.style.display = "none";
  	routmsg.style.visibility = "hidden";
  }
  else
  {
  	rsmsprov.style.display = "";
  	rsmsprov.style.visibility = "visible";
  	routmsg.style.display = "";
  	routmsg.style.visibility = "visible";
  }
}
