function goBack() { history.go(-1); }

function goTo(url) { window.location.href = url; }

function waitThenGoTo(url,time)
{
	if(time < 1000) time = time * 1000;
	setTimeout("goTo('"+url+"')",time);
}

function waitThenGoBack(time)
{
	if(time < 1000) time = time * 1000;
	setTimeout('goBack()',time);
}
function reload() { window.reload(); }

function isInt(sText)
{
	var ValidChars = "0123456789";
	var isInt=true;
	var Char;
	
	for (i = 0; i < sText.length && isInt == true; i++) 
	  { 
	  Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) 
		{
			isInt = false;
		}
	  }
	return isInt;
}

function convertAddr(sDom, sUser){
  return("mail"+"to:"+sUser.replace(/%23/g,".").replace(/%24/g,"-")+"@"+sDom.replace(/%23/g,".").replace(/%24/g,"-"));
}

function activate(id) {
	$(id).addClass('active');
}
