function rowIn(obj){
	if (obj!=null){
		obj.className="rowMouseIn";
	}
}
function rowOut(obj){
	if (obj!=null){
		if((parseInt(obj.id.substr(1))%2)==0){
			obj.className="rowOddMouseOut";
		}else{
			obj.className="rowParMouseOut";
		}
	}
}
function forumClick(forum){
	location.href="list.asp?forum="+forum;
}
function msgClick(id,forum,mod){
	//if (mod!=''){
	//	location.href="modify.asp?forum="+forum+"&id="+id;
	//}else{
		location.href="msg.asp?forum="+forum+"&id="+id;
	//}
}
function ValidateNewMessage(){
	var sfrom=document.getElementById("txtfrom").value;
	var sobject=document.getElementById("txtobject").value;
	var smessage=document.getElementById("txtmessage").value;
	if ((sfrom.length==0)||(sobject.length==0)||(smessage.length==0)){
		alert("Attention! all data is required.");
		return false;
	}
	return true;
}
function ValidateNewUser(){
	var suser=document.getElementById("txtuser").value;
	var spwd=document.getElementById("txtpwd").value;
	var spwd2=document.getElementById("txtpwd2").value;
	var semail=document.getElementById("txtemail").value;
	var ch1=semail.indexOf("@");
	var srv=semail.substr(ch1);
	var ch2=srv.indexOf(".");
	if ((suser.length==0)||(spwd.length==0)||(spwd2.length==0)||(semail.length==0)){
		alert("Attention! all data is required.");
		return false;
	}
	if (spwd!=spwd2){
		alert("Password and Verify Password not is identical.");
		return false;
	}
	if((ch1<1)||(ch2==-1)||(ch2>srv.length-3)){
		alert("Please, write a valid email address!");
		return false;
	}
	return true;
}
function RemoveTopic(){
	return confirm("Do you want to remove this topic, and its answers ?");
}
function RemoveMessage(){
	return confirm("Do you want to remove this message ?");
}
