var xmlHttp;
var id;
var colorwa;
var Adadesh;
var starteshA;
var nanayok;
function showColor(warn,adadesh,startesh,nanay){

	colorwa = warn;
	Adadesh = adadesh;
	starteshA = startesh;
	nanayok = nanay;
	
	starteshA = encodeURI(starteshA);
	Adadesh = encodeURI(Adadesh);
		nanayok = encodeURI(nanayok);
	

var str = "r="+(new Date().getTime()) ;

//alert(colorwa);
id = "HmyColorNew";

if (colorwa == "MailIndex_Tab"){
document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG2").src = "../images/webmail/down1.gif";
document.getElementById("IMG2B").src = "../images/webmail/down2.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG").src = "../images/webmail/up1.gif";
document.getElementById("IMGB").src = "../images/webmail/up2.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";


	var url="Mail_Box_Panel.php?r="+(new Date().getTime());
}

if (colorwa == "ViewMail_Tab"){
	document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";




	var url="Check_Mails.php?r="+(new Date().getTime());
}

if (colorwa == "Search_ontheMails"){
	
	document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";



var mysearchek = encodeURI(document.all.myMail_Search.value);

	var url="Check_Mails.php?SerVal="+mysearchek+'&r='+(new Date().getTime());
	
}

if (colorwa == "Delete_ItemUpload"){
	
	var url="Delete_ItemUpload.php?itemID="+Adadesh+'&start='+starteshA+'&r='+(new Date().getTime());
}



//*********************************************************  VIEW MAIL BY YAHOO
if (colorwa == "ViewMailYahoo_Tab"){
	document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";


	var url="Check_Mails.php?NOESERV="+Adadesh+'&r='+(new Date().getTime());
}

//********************************************************************

if (colorwa == "Mail_IndexNextPreFolder"){
	var WS = document.getElementById('WSortDiv').innerHTML;
	var WAD = document.getElementById('WSortADDiv').innerHTML;
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_Mail_IndexNextFolder.php?myStart="+Adadesh+'&start='+starteshA+'&sort='+WS+'&Vaziat='+WAD+'&Idf='+IDDFOLL+'&r='+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());

}

if (colorwa == "View_FriendDetMail"){
	
	var url="aj_FriendDetMail.php?IDUSER="+Adadesh+'&r='+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());

}

if (colorwa == "Delete_FriendMail"){
	
	var url="aj_Delete_FriendMail.php?IDUSER="+Adadesh+'&r='+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());
}

if (colorwa == "View_NewsOnFriend"){
	var FNok = document.all.NewsSelectFolder;
    var myentshode1ok = FNok.options[FNok.selectedIndex].value;	
    
	var url="aj_View_NewsOnFriend.php?IDFol="+myentshode1ok+'&r='+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());
}


if (colorwa == "add_FriendMail"){
	var myyyN = encodeURI(document.all.Name_Friend.value);
	var myyyF = encodeURI(document.all.Family_Friend.value);
	var myyyEAF = encodeURI(document.all.Email_AdFriend.value);
	var ID_U= encodeURI(document.all.ID_U.value);
	var FNok = document.all.Nok;
    var myentshode1ok = FNok.options[FNok.selectedIndex].value;	
    var TozihN = encodeURI(document.all.Tozih.value);
    
	var url="aj_Mail_AddFriend.php?IDd="+Adadesh+'&Nok='+myentshode1ok+'&Name='+myyyN+'&Family='+myyyF+'&myyyEAF='+myyyEAF+'&ID_U='+ID_U+'&TozihN='+TozihN+'&r='+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());
}

if (colorwa == "ViewFriendmail_Tab"){
	
	document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG3").src = "../images/webmail/up2.gif";
document.getElementById("IMG3B").src = "../images/webmail/up1.gif";


	document.getElementById("DUBG2").style.backgroundImage =  "url('../images/webmail/down3.gif')";
document.getElementById("IMG2").src = "../images/webmail/down1.gif";
document.getElementById("IMG2B").src ="../images/webmail/down2.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";

	var url="FriendList_Mails.php?&r="+(new Date().getTime());
	//var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());
}


if (colorwa == "Sended_Emails"){
	document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";

	var url="Check_MailsSended.php?&r="+(new Date().getTime());

}

if (colorwa == "Filterr_EachEmailFolder"){
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_FilterMarkFolder.php?EM="+Adadesh+'&IDM='+starteshA+'&IDFOL='+IDDFOLL+'&r='+(new Date().getTime());

}

if (colorwa == "ViewFriendMailsByNok"){
	var url="aj_ViewFriendMailsNok.php?Nok="+Adadesh+'&r='+(new Date().getTime());

}


if (colorwa == "Mail_Register_Mail"){
	//alert('df');
	var mailBoxok = encodeURI(document.all.mailBox.value);
	var url="aj_Mail_Register_Mail.php?mailBo="+mailBoxok+'&r='+(new Date().getTime());

}


if (colorwa == "View_MailSended"){
		var url="aj_VIEW_Mail_Sended.php?IDMAIL="+adadesh+'&r='+(new Date().getTime());
	
}
if (colorwa == "add_ServerFilter"){
	var Server_Nameok = encodeURI(document.all.Server_Name.value);
		var url="aj_add_ServerFilter.php?Sname="+Server_Nameok+'&r='+(new Date().getTime());
	
}

if (colorwa == "Mail_AfterSend"){
	
	var url="Mail_PageAfterMailSend.php?id="+IDMAILL+'&r='+(new Date().getTime());

}

if (colorwa == "delete_ServerFilter"){
	
	//alert(document.getElementById("myText").style.textAlign);
	var Filter_Del = document.all.Filter_Del;
    var myentshode1ok = Filter_Del.options[Filter_Del.selectedIndex].value;	
	var url="aj_Delete_ServerFilter.php?id="+myentshode1ok+'&r='+(new Date().getTime());

}


if (colorwa == "Action_ProMAil"){
		document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";

	var url="Action_ProMAil.php?ACTT="+Adadesh+'&r='+(new Date().getTime());

}


if (colorwa == "ViewMail_ByFolder"){
		document.getElementById("DUBG2").style.backgroundImage = "url('../images/webmail/up3.gif')";
document.getElementById("IMG2").src = "../images/webmail/up2.gif";
document.getElementById("IMG2B").src = "../images/webmail/up1.gif";


document.getElementById("DUBG").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG").src = "../images/webmail/down2.gif";
document.getElementById("IMGB").src = "../images/webmail/down1.gif";


document.getElementById("DUBG3").style.backgroundImage = "url('../images/webmail/down3.gif')";
document.getElementById("IMG3").src = "../images/webmail/down1.gif";
document.getElementById("IMG3B").src = "../images/webmail/down2.gif";

	var url="aj_ViewMailsByFolder.php?idf="+Adadesh+'&r='+(new Date().getTime());

}

if (colorwa == "Move_EmailSended"){
	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";


	
	
		var my0= document.all.cboxD[0];
		if (my0 != null) {
			if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
			}
		}
		
		var my1= document.all.cboxD[1];
		if (my1 != null) {
				if (document.all.cboxD[1].checked){
					cboxx1 =  encodeURI(document.all.cboxD[1].value);
				}
		}
		
		var my2= document.all.cboxD[2];
		if (my2 != null) {
			if (document.all.cboxD[2].checked){
				cboxx2 = encodeURI(document.all.cboxD[2].value);
			}
		}
		
		var my3= document.all.cboxD[3];
		if (my3 != null) {
			if (document.all.cboxD[3].checked){
					cboxx3 = encodeURI(document.all.cboxD[3].value);
			}
		}
		
		
		var my4= document.all.cboxD[4];
		if (my4 != null) {
			if (document.all.cboxD[4].checked){
				cboxx4 = encodeURI(document.all.cboxD[4].value);
			}
		}
		
		
		
		var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}

	//alert(myIdOpenEmail);
	
	if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && myIdOpenEmail != null){
		
			displayMessMove('aj_Move_MailSEnded.php?cobxx0='+myIdOpenEmail);
		
	
	}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && myIdOpenEmail == null){
			alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
	}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != ""){
	
		displayMessMove('aj_Move_MailSEnded.php?cobxx0='+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5);
		
	
		}
		
		
	var url="Mail_PageAfterMailSend.php?&r="+(new Date().getTime());

}



if (colorwa == "Move_Email"){
	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";cboxx10 = "";cboxx11 = "";cboxx12 = "";cboxx13 = "";cboxx14 = "";cboxx15 = "";

	//var iconn;
	//for (iconn=0;iconn<30;iconn++){
	var my0= document.all.cboxD[0];
		if (my0 != null) {
		if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
		}
		}
		
		var my1= document.all.cboxD[1];
		if (my1 != null) {
		if (document.all.cboxD[1].checked){
			cboxx1 =  encodeURI(document.all.cboxD[1].value);
		}
		}
		
		var my2= document.all.cboxD[2];
		if (my2 != null) {
		if (document.all.cboxD[2].checked){
			cboxx2 = encodeURI(document.all.cboxD[2].value);
		}
		}
		
		var my3= document.all.cboxD[3];
		if (my3 != null) {
		if (document.all.cboxD[3].checked){
			cboxx3 = encodeURI(document.all.cboxD[3].value);
		}
		}
		
		var my4= document.all.cboxD[4];
		if (my4 != null) {
		if (document.all.cboxD[4].checked){
			cboxx4 = encodeURI(document.all.cboxD[4].value);
		}
		}
		
		var my5= document.all.cboxD[5];
		if (my5 != null) {
		if (document.all.cboxD[5].checked){
			cboxx5 = encodeURI(document.all.cboxD[5].value);
		}
		}
		
		var my6= document.all.cboxD[6];
		if (my6 != null) {
		if (document.all.cboxD[6].checked){
			cboxx6 = encodeURI(document.all.cboxD[6].value);
		}
		}
		//alert(cboxx6);
		
		var my7= document.all.cboxD[7];
		if (my7 != null) {
		if (document.all.cboxD[7].checked){
			cboxx7 = encodeURI(document.all.cboxD[7].value);
		}
		}
		
		var my8= document.all.cboxD[8];
		if (my8 != null) {
		if (document.all.cboxD[8].checked){
			cboxx8 = encodeURI(document.all.cboxD[8].value);
		}
		}
		
		var my9= document.all.cboxD[9];
		if (my9 != null) {
		if (document.all.cboxD[9].checked){
			cboxx9 = encodeURI(document.all.cboxD[9].value);
		}
		}
		
		var my10= document.all.cboxD[10];
		if (my10 != null) {
		if (document.all.cboxD[10].checked){
			cboxx10 = encodeURI(document.all.cboxD[10].value);
		}
		}
		
		var my11= document.all.cboxD[11];
		if (my11 != null) {
		if (document.all.cboxD[11].checked){
			cboxx11 = encodeURI(document.all.cboxD[11].value);
		}
		}
		
		var my12= document.all.cboxD[12];
		if (my12 != null) {
		if (document.all.cboxD[12].checked){
			cboxx12 = encodeURI(document.all.cboxD[12].value);
		}
		}
		
		var my13= document.all.cboxD[13];
		if (my13 != null) {
		if (document.all.cboxD[13].checked){
			cboxx13 = encodeURI(document.all.cboxD[13].value);
		}
		}
		
		var my14= document.all.cboxD[14];
		if (my14 != null) {
		if (document.all.cboxD[14].checked){
			cboxx14 = encodeURI(document.all.cboxD[14].value);
		}
		}
		
		var my15= document.all.cboxD[15];
		if (my15 != null) {
		if (document.all.cboxD[15].checked){
			cboxx15 = encodeURI(document.all.cboxD[15].value);
		}
		}
		
		
		var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}
	
	//alert(myIdOpenEmail);
	
	if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail != null){
		
			displayMessMove('aj_Move_Mail.php?cobxx0='+myIdOpenEmail);
		
	
	}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail == null){
			alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
	}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
	
		
		displayMessMove('aj_Move_Mail.php?cobxx0='+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15);
		
	
		}
		
		
	var url="Mail_PageAfterMailSend.php?&r="+(new Date().getTime());

}


if (colorwa == "ActionMove_Email"){
	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";cboxx10 = "";cboxx11 = "";cboxx12 = "";cboxx13 = "";cboxx14 = "";cboxx15 = "";

	cboxx0 = document.all.cboxD.value;
	//var iconn;
	//for (iconn=0;iconn<30;iconn++){
	var my0= document.all.cboxD[0];
		if (my0 != null) {
		if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
		}
		}
		
		var my1= document.all.cboxD[1];
		if (my1 != null) {
		if (document.all.cboxD[1].checked){
			cboxx1 =  encodeURI(document.all.cboxD[1].value);
		}
		}
		
		var my2= document.all.cboxD[2];
		if (my2 != null) {
		if (document.all.cboxD[2].checked){
			cboxx2 = encodeURI(document.all.cboxD[2].value);
		}
		}
		
		var my3= document.all.cboxD[3];
		if (my3 != null) {
		if (document.all.cboxD[3].checked){
			cboxx3 = encodeURI(document.all.cboxD[3].value);
		}
		}
		
		var my4= document.all.cboxD[4];
		if (my4 != null) {
		if (document.all.cboxD[4].checked){
			cboxx4 = encodeURI(document.all.cboxD[4].value);
		}
		}
		
		
		var my5= document.all.cboxD[5];
		if (my5 != null) {
		if (document.all.cboxD[5].checked){
			cboxx5 = encodeURI(document.all.cboxD[5].value);
		}
		}
		
		var my6= document.all.cboxD[6];
		if (my6 != null) {
		if (document.all.cboxD[6].checked){
			cboxx6 = encodeURI(document.all.cboxD[6].value);
		}
		}
		//alert(cboxx6);
		
		var my7= document.all.cboxD[7];
		if (my7 != null) {
		if (document.all.cboxD[7].checked){
			cboxx7 = encodeURI(document.all.cboxD[7].value);
		}
		}
		
		var my8= document.all.cboxD[8];
		if (my8 != null) {
		if (document.all.cboxD[8].checked){
			cboxx8 = encodeURI(document.all.cboxD[8].value);
		}
		}
		
		var my9= document.all.cboxD[9];
		if (my9 != null) {
		if (document.all.cboxD[9].checked){
			cboxx9 = encodeURI(document.all.cboxD[9].value);
		}
		}
		
		var my10= document.all.cboxD[10];
		if (my10 != null) {
		if (document.all.cboxD[10].checked){
			cboxx10 = encodeURI(document.all.cboxD[10].value);
		}
		}
		
		var my11= document.all.cboxD[11];
		if (my11 != null) {
		if (document.all.cboxD[11].checked){
			cboxx11 = encodeURI(document.all.cboxD[11].value);
		}
		}
		
		var my12= document.all.cboxD[12];
		if (my12 != null) {
		if (document.all.cboxD[12].checked){
			cboxx12 = encodeURI(document.all.cboxD[12].value);
		}
		}
		
		var my13= document.all.cboxD[13];
		if (my13 != null) {
		if (document.all.cboxD[13].checked){
			cboxx13 = encodeURI(document.all.cboxD[13].value);
		}
		}
		
		var my14= document.all.cboxD[14];
		if (my14 != null) {
		if (document.all.cboxD[14].checked){
			cboxx14 = encodeURI(document.all.cboxD[14].value);
		}
		}
		
		var my15= document.all.cboxD[15];
		if (my15 != null) {
		if (document.all.cboxD[15].checked){
			cboxx15 = encodeURI(document.all.cboxD[15].value);
		}
		}
		
		var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}
	
	//alert(myIdOpenEmail);
	
	if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail != null){
		
			displayMessMove('aj_ActionMoveMail.php?cobxx0='+myIdOpenEmail);
		
	
	}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail == null){
			alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
	}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
	
		displayMessMove('aj_ActionMoveMail.php?cobxx0='+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15);
		
	
		}
		
		
	var url="Mail_PageAfterMailSend.php?&r="+(new Date().getTime());

}


if (colorwa == "Move_Email_Action"){
	var IBOX0="";var IBOX1="";var IBOX2="";var IBOX3="";var IBOX4="";var IBOX5="";var IBOX6="";var IBOX7="";var IBOX8="";var IBOX9="";var IBOX10="";var IBOX11="";var IBOX12="";var IBOX13="";var IBOX14="";var IBOX15="";
	
	var myx0= document.getElementById('IBox0');
	var myx1= document.getElementById('IBox1');
	var myx2= document.getElementById('IBox2');
		var myx3= document.getElementById('IBox3');
			var myx4= document.getElementById('IBox4');
			var myx5= document.getElementById('IBox5');
			var myx6= document.getElementById('IBox6');
			var myx7= document.getElementById('IBox7');
			var myx8= document.getElementById('IBox8');
			var myx9= document.getElementById('IBox9');
			var myx10= document.getElementById('IBox10');
			var myx11= document.getElementById('IBox11');
			var myx12= document.getElementById('IBox12');
			var myx13= document.getElementById('IBox13');
			var myx14= document.getElementById('IBox14');
			var myx15= document.getElementById('IBox15');
			
	if (myx0 != null) {
	IBOX0 = encodeURI(document.all.IBox0.value);
	}
	
	if (myx1 != null) {
	IBOX1 = encodeURI(document.all.IBox1.value);
	}
	
	if (myx2 != null) {
	IBOX2 = encodeURI(document.all.IBox2.value);
	}
	
	if (myx3 != null) {
	IBOX3 = encodeURI(document.all.IBox3.value);
	}
	
	if (myx4 != null) {
	IBOX4 = encodeURI(document.all.IBox4.value);
	}
	
	if (myx5 != null) {
	IBOX5 = encodeURI(document.all.IBox5.value);
	}
	if (myx6 != null) {
	IBOX6 = encodeURI(document.all.IBox6.value);
	}
	if (myx7 != null) {
	IBOX7 = encodeURI(document.all.IBox7.value);
	}
	if (myx8 != null) {
	IBOX8 = encodeURI(document.all.IBox8.value);
	}
	if (myx9 != null) {
	IBOX9 = encodeURI(document.all.IBox9.value);
	}
	if (myx10 != null) {
	IBOX10 = encodeURI(document.all.IBox10.value);
	}
	if (myx11 != null) {
	IBOX11 = encodeURI(document.all.IBox11.value);
	}
	if (myx12 != null) {
	IBOX12 = encodeURI(document.all.IBox12.value);
	}
	if (myx13 != null) {
	IBOX13 = encodeURI(document.all.IBox13.value);
	}
	if (myx14 != null) {
	IBOX14 = encodeURI(document.all.IBox14.value);
	}
	if (myx15 != null) {
	IBOX15 = encodeURI(document.all.IBox15.value);
	}
	
	//alert(IBOX10);
	
	 var FolMove1 = document.all.Folder1_Move;
    var myentshode1ok = FolMove1.options[FolMove1.selectedIndex].value;	
    
     var FolMove2 = document.all.Folder2_Move;
    var myentshode2ok = FolMove2.options[FolMove2.selectedIndex].value;	
    
     var FolMove3 = document.all.Folder3_Move;
    var myentshode3ok = FolMove3.options[FolMove3.selectedIndex].value;	
    
	var url="Move_Email_Action.php?FolMove1="+myentshode1ok+'&FolMove2='+myentshode2ok+'&FolMove3='+myentshode3ok+'&IBOX0='+IBOX0+'&IBOX1='+IBOX1+'&IBOX2='+IBOX2+'&IBOX3='+IBOX3+'&IBOX4='+IBOX4+'&IBOX5='+IBOX5+'&IBOX6='+IBOX6+'&IBOX7='+IBOX7+'&IBOX8='+IBOX8+'&IBOX9='+IBOX9+'&IBOX10='+IBOX10+'&IBOX11='+IBOX11+'&IBOX12='+IBOX12+'&IBOX13='+IBOX13+'&IBOX14='+IBOX14+'&IBOX15='+IBOX15+'&r='+(new Date().getTime());
	
	//alert(url);
}


if (colorwa == "ActionMove_Email_Action"){
	var IBOX0="";var IBOX1="";var IBOX2="";var IBOX3="";var IBOX4="";var IBOX5="";var IBOX6="";var IBOX7="";var IBOX8="";var IBOX9="";var IBOX10="";var IBOX11="";var IBOX12="";var IBOX13="";var IBOX14="";var IBOX15="";
	
	var myx0= document.getElementById('IBox0');
	var myx1= document.getElementById('IBox1');
	var myx2= document.getElementById('IBox2');
		var myx3= document.getElementById('IBox3');
			var myx4= document.getElementById('IBox4');
			var myx5= document.getElementById('IBox5');
			var myx6= document.getElementById('IBox6');
			var myx7= document.getElementById('IBox7');
			var myx8= document.getElementById('IBox8');
			var myx9= document.getElementById('IBox9');
			var myx10= document.getElementById('IBox10');
			var myx11= document.getElementById('IBox11');
			var myx12= document.getElementById('IBox12');
			var myx13= document.getElementById('IBox13');
			var myx14= document.getElementById('IBox14');
			var myx15= document.getElementById('IBox15');
			
	if (myx0 != null) {
	IBOX0 = encodeURI(document.all.IBox0.value);
	}
	
	if (myx1 != null) {
	IBOX1 = encodeURI(document.all.IBox1.value);
	}
	
	if (myx2 != null) {
	IBOX2 = encodeURI(document.all.IBox2.value);
	}
	
	if (myx3 != null) {
	IBOX3 = encodeURI(document.all.IBox3.value);
	}
	
	if (myx4 != null) {
	IBOX4 = encodeURI(document.all.IBox4.value);
	}
	
	if (myx5 != null) {
	IBOX5 = encodeURI(document.all.IBox5.value);
	}
	if (myx6 != null) {
	IBOX6 = encodeURI(document.all.IBox6.value);
	}
	if (myx7 != null) {
	IBOX7 = encodeURI(document.all.IBox7.value);
	}
	if (myx8 != null) {
	IBOX8 = encodeURI(document.all.IBox8.value);
	}
	if (myx9 != null) {
	IBOX9 = encodeURI(document.all.IBox9.value);
	}
	if (myx10 != null) {
	IBOX10 = encodeURI(document.all.IBox10.value);
	}
	if (myx11 != null) {
	IBOX11 = encodeURI(document.all.IBox11.value);
	}
	if (myx12 != null) {
	IBOX12 = encodeURI(document.all.IBox12.value);
	}
	if (myx13 != null) {
	IBOX13 = encodeURI(document.all.IBox13.value);
	}
	if (myx14 != null) {
	IBOX14 = encodeURI(document.all.IBox14.value);
	}
	if (myx15 != null) {
	IBOX15 = encodeURI(document.all.IBox15.value);
	}
	
	
	 var FolMove1 = document.all.Folder1_Move;
    var myentshode1ok = FolMove1.options[FolMove1.selectedIndex].value;	
    
   
    var NOEACTION = document.getElementById('NOEACTION').innerHTML;
    
	var url="ActionMove_Email_Action.php?FolMove1="+myentshode1ok+'&FolMove2='+myentshode2ok+'&FolMove3='+myentshode3ok+'&IBOX0='+IBOX0+'&IBOX1='+IBOX1+'&IBOX2='+IBOX2+'&IBOX3='+IBOX3+'&IBOX4='+IBOX4+'&IBOX5='+IBOX5+'&IBOX6='+IBOX6+'&IBOX7='+IBOX7+'&IBOX8='+IBOX8+'&IBOX9='+IBOX9+'&IBOX10='+IBOX10+'&IBOX11='+IBOX11+'&IBOX12='+IBOX12+'&IBOX13='+IBOX13+'&IBOX14='+IBOX14+'&IBOX15='+IBOX15+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
	
	//alert(url);
}




if (colorwa == "Delete_EachMAilSended"){

	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";

	//var iconn;
	//for (iconn=0;iconn<30;iconn++){
	var ok0=document.all.cboxD[0];
	if (ok0 != null){
		if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
		}
	}
	var ok1=document.all.cboxD[1];
	if (ok1 != null){
		if (document.all.cboxD[1].checked){
			cboxx1 =  encodeURI(document.all.cboxD[1].value);
		}
	}
	var ok2=document.all.cboxD[2];
	if (ok2 != null){
		if (document.all.cboxD[2].checked){
			cboxx2 = encodeURI(document.all.cboxD[2].value);
		}
	}
	var ok3=document.all.cboxD[3];
	if (ok3 != null){
		if (document.all.cboxD[3].checked){
			cboxx3 = encodeURI(document.all.cboxD[3].value);
		}
	}
	var ok4=document.all.cboxD[4];
	if (ok4 != null){
		if (document.all.cboxD[4].checked){
			cboxx4 = encodeURI(document.all.cboxD[4].value);
		}
	}
		
	var my5= document.all.cboxD[5];
		if (my5 != null) {
		if (document.all.cboxD[5].checked){
			cboxx5 = encodeURI(document.all.cboxD[5].value);
		}
		}
		
		var my6= document.all.cboxD[6];
		if (my6 != null) {
		if (document.all.cboxD[6].checked){
			cboxx6 = encodeURI(document.all.cboxD[6].value);
		}
		}
		//alert(cboxx6);
		
		var my7= document.all.cboxD[7];
		if (my7 != null) {
		if (document.all.cboxD[7].checked){
			cboxx7 = encodeURI(document.all.cboxD[7].value);
		}
		}
		
		var my8= document.all.cboxD[8];
		if (my8 != null) {
		if (document.all.cboxD[8].checked){
			cboxx8 = encodeURI(document.all.cboxD[8].value);
		}
		}
		
		var my9= document.all.cboxD[9];
		if (my9 != null) {
		if (document.all.cboxD[9].checked){
			cboxx9 = encodeURI(document.all.cboxD[9].value);
		}
		}
		
		var my10= document.all.cboxD[10];
		if (my10 != null) {
		if (document.all.cboxD[10].checked){
			cboxx10 = encodeURI(document.all.cboxD[10].value);
		}
		}
		
		var my11= document.all.cboxD[11];
		if (my11 != null) {
		if (document.all.cboxD[11].checked){
			cboxx11 = encodeURI(document.all.cboxD[11].value);
		}
		}
		
		var my12= document.all.cboxD[12];
		if (my12 != null) {
		if (document.all.cboxD[12].checked){
			cboxx12 = encodeURI(document.all.cboxD[12].value);
		}
		}
		
		var my13= document.all.cboxD[13];
		if (my13 != null) {
		if (document.all.cboxD[13].checked){
			cboxx13 = encodeURI(document.all.cboxD[13].value);
		}
		}
		
		var my14= document.all.cboxD[14];
		if (my14 != null) {
		if (document.all.cboxD[14].checked){
			cboxx14 = encodeURI(document.all.cboxD[14].value);
		}
		}
		
		var my15= document.all.cboxD[15];
		if (my15 != null) {
		if (document.all.cboxD[15].checked){
			cboxx15 = encodeURI(document.all.cboxD[15].value);
		}
		}
	
	var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}
	
	//alert(myIdOpenEmail);
	
	if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == ""  && myIdOpenEmail != null){
		if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
			var url="Mail_DeleteSended.php?cboxx0="+myIdOpenEmail+'&r='+(new Date().getTime());
		}
	
	}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == ""  && myIdOpenEmail == null){
			alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
	}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
	if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
		var url="Mail_DeleteSended.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15+'&r='+(new Date().getTime());
		
	}
		}
		
}

if (colorwa == "Delete_EachMAil"){

		cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";cboxx10 = "";cboxx11 = "";cboxx12 = "";cboxx13 = "";cboxx14 = "";cboxx15 = "";

		var my0= document.all.cboxD[0];
		if (my0 != null) {
		if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
		}
		}
		
		var my1= document.all.cboxD[1];
		if (my1 != null) {
		if (document.all.cboxD[1].checked){
			cboxx1 =  encodeURI(document.all.cboxD[1].value);
		}
		}
		
		var my2= document.all.cboxD[2];
		if (my2 != null) {
		if (document.all.cboxD[2].checked){
			cboxx2 = encodeURI(document.all.cboxD[2].value);
		}
		}
		
		var my3= document.all.cboxD[3];
		if (my3 != null) {
		if (document.all.cboxD[3].checked){
			cboxx3 = encodeURI(document.all.cboxD[3].value);
		}
		}
		
		var my4= document.all.cboxD[4];
		if (my4 != null) {
		if (document.all.cboxD[4].checked){
			cboxx4 = encodeURI(document.all.cboxD[4].value);
		}
		}
		
		var my5= document.all.cboxD[5];
		if (my5 != null) {
		if (document.all.cboxD[5].checked){
			cboxx5 = encodeURI(document.all.cboxD[5].value);
		}
		}
		
		var my6= document.all.cboxD[6];
		if (my6 != null) {
		if (document.all.cboxD[6].checked){
			cboxx6 = encodeURI(document.all.cboxD[6].value);
		}
		}
		//alert(cboxx6);
		
		var my7= document.all.cboxD[7];
		if (my7 != null) {
		if (document.all.cboxD[7].checked){
			cboxx7 = encodeURI(document.all.cboxD[7].value);
		}
		}
		
		var my8= document.all.cboxD[8];
		if (my8 != null) {
		if (document.all.cboxD[8].checked){
			cboxx8 = encodeURI(document.all.cboxD[8].value);
		}
		}
		
		var my9= document.all.cboxD[9];
		if (my9 != null) {
		if (document.all.cboxD[9].checked){
			cboxx9 = encodeURI(document.all.cboxD[9].value);
		}
		}
		
		var my10= document.all.cboxD[10];
		if (my10 != null) {
		if (document.all.cboxD[10].checked){
			cboxx10 = encodeURI(document.all.cboxD[10].value);
		}
		}
		
		var my11= document.all.cboxD[11];
		if (my11 != null) {
		if (document.all.cboxD[11].checked){
			cboxx11 = encodeURI(document.all.cboxD[11].value);
		}
		}
		
		var my12= document.all.cboxD[12];
		if (my12 != null) {
		if (document.all.cboxD[12].checked){
			cboxx12 = encodeURI(document.all.cboxD[12].value);
		}
		}
		
		var my13= document.all.cboxD[13];
		if (my13 != null) {
		if (document.all.cboxD[13].checked){
			cboxx13 = encodeURI(document.all.cboxD[13].value);
		}
		}
		
		var my14= document.all.cboxD[14];
		if (my14 != null) {
		if (document.all.cboxD[14].checked){
			cboxx14 = encodeURI(document.all.cboxD[14].value);
		}
		}
		
		var my15= document.all.cboxD[15];
		if (my15 != null) {
		if (document.all.cboxD[15].checked){
			cboxx15 = encodeURI(document.all.cboxD[15].value);
		}
		}
	
	//}
	
	var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}
	
	//alert(myIdOpenEmail);
	var mChiWAHT= document.all.ChiWAHT;
		if (mChiWAHT != null) {
			
			//alert(cboxx6);
	//**********************************************************************  AGAR VIEWBYFOLDER HASTAND
				if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail != null){
					if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
						var IDDDFF= document.getElementById('IDDFOLL').innerHTML; 
						var url="Mail_Delete_ViewFolder.php?cboxx0="+myIdOpenEmail+'&IDDDFF='+IDDDFF+'&r='+(new Date().getTime());
					}
	
				}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail == null){
					alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
			}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
			if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
				var IDDDFF= document.getElementById('IDDFOLL').innerHTML; 
			var url="Mail_Delete_ViewFolder.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15+'&IDDDFF='+IDDDFF+'&r='+(new Date().getTime());
		
			}
			}
		
	//**********************************************************************  AGAR VIEWBYFOLDER NISTAND
		
		}else{		
			if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail != null){
			if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
				var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
				var url="Mail_Delete.php?cboxx0="+myIdOpenEmail+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
				}
	
			}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail == null){
				alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
			}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
			if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
				var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
			var url="Mail_Delete.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
		
				}
			}
		}

}


if (colorwa == "Delete_EachMAil_Action"){
cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";cboxx10 = "";cboxx11 = "";cboxx12 = "";cboxx13 = "";cboxx14 = "";cboxx15 = "";

	//var iconn;
	//for (iconn=0;iconn<30;iconn++){
	cboxx0=encodeURI(document.all.cboxD.value);
	
	var ok0=document.all.cboxD[0];
	if (ok0 != null){
		if (document.all.cboxD[0].checked){
			cboxx0 = encodeURI(document.all.cboxD[0].value);
		}
	}
	var ok1=document.all.cboxD[1];
	if (ok1 != null){
		if (document.all.cboxD[1].checked){
			cboxx1 =  encodeURI(document.all.cboxD[1].value);
		}
	}
	var ok2=document.all.cboxD[2];
	if (ok2 != null){
		if (document.all.cboxD[2].checked){
			cboxx2 = encodeURI(document.all.cboxD[2].value);
		}
	}
	var ok3=document.all.cboxD[3];
	if (ok3 != null){
		if (document.all.cboxD[3].checked){
			cboxx3 = encodeURI(document.all.cboxD[3].value);
		}
	}
	var ok4=document.all.cboxD[4];
	if (ok4 != null){
		if (document.all.cboxD[4].checked){
			cboxx4 = encodeURI(document.all.cboxD[4].value);
		}
	}
	var ok5=document.all.cboxD[5];
	if (ok5 != null){
		if (document.all.cboxD[5].checked){
			cboxx5 = encodeURI(document.all.cboxD[5].value);
		}
	}
	var ok6=document.all.cboxD[6];
	if (ok6 != null){
		if (document.all.cboxD[6].checked){
			cboxx6 = encodeURI(document.all.cboxD[5].value);
		}
	}
	var ok7=document.all.cboxD[7];
	if (ok7 != null){
		if (document.all.cboxD[7].checked){
			cboxx7 = encodeURI(document.all.cboxD[7].value);
		}
	}
	var ok8=document.all.cboxD[8];
	if (ok8 != null){
		if (document.all.cboxD[8].checked){
			cboxx8 = encodeURI(document.all.cboxD[8].value);
		}
	}
	var ok9=document.all.cboxD[9];
	if (ok9 != null){
		if (document.all.cboxD[9].checked){
			cboxx9 = encodeURI(document.all.cboxD[9].value);
		}
	}
	var ok10=document.all.cboxD[10];
	if (ok10 != null){
		if (document.all.cboxD[10].checked){
			cboxx10 = encodeURI(document.all.cboxD[10].value);
		}
	}
	var ok11=document.all.cboxD[11];
	if (ok11 != null){
		if (document.all.cboxD[11].checked){
			cboxx11 = encodeURI(document.all.cboxD[11].value);
		}
	}
	var ok12=document.all.cboxD[12];
	if (ok12 != null){
		if (document.all.cboxD[12].checked){
			cboxx12 = encodeURI(document.all.cboxD[12].value);
		}
	}
	var ok13=document.all.cboxD[13];
	if (ok13 != null){
		if (document.all.cboxD[13].checked){
			cboxx13 = encodeURI(document.all.cboxD[13].value);
		}
	}
	var ok14=document.all.cboxD[14];
	if (ok14 != null){
		if (document.all.cboxD[14].checked){
			cboxx14 = encodeURI(document.all.cboxD[14].value);
		}
	}
	var ok15=document.all.cboxD[15];
	if (ok15 != null){
		if (document.all.cboxD[15].checked){
			cboxx15 = encodeURI(document.all.cboxD[15].value);
		}
	}
	
	
	var myIdOpenEmail= document.getElementById('IDMAILL'); 
	
	if (myIdOpenEmail != null){
	var	myIdOpenEmail= document.getElementById('IDMAILL').innerHTML; 
	}
	
	
	 var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	
	//alert(myIdOpenEmail);
	
	if (cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail != null){
		if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
			var url="Mail_DeleteActionAct.php?cboxx0="+myIdOpenEmail+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
		}
	
	}else if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == "" && cboxx10 == "" && cboxx11 == "" && cboxx12 == "" && cboxx13 == "" && cboxx14 == "" && cboxx15 == "" && myIdOpenEmail == null){
			alert('لطفا ابتدا نامه (های) مورد نظرتان را انتخاب نمایید');
			
	}else if(cboxx0 != "" || cboxx1 != "" || cboxx2 != "" || cboxx3 != "" || cboxx4 != "" || cboxx5 != "" || cboxx6 != "" || cboxx7 != "" || cboxx8 != "" || cboxx9 != "" || cboxx10 != "" || cboxx11 != "" || cboxx12 != "" || cboxx13 != "" || cboxx14 != "" || cboxx15 != ""){
	if(window.confirm('از حذف این نامه (ها) مطمئن هستید ؟')){
		var url="Mail_DeleteActionAct.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&cboxx10='+cboxx10+'&cboxx11='+cboxx11+'&cboxx12='+cboxx12+'&cboxx13='+cboxx13+'&cboxx14='+cboxx14+'&cboxx15='+cboxx15+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
		
	}
		}
}


if (colorwa == "Delete_myFoldersMail"){
	//alert(document.getElementById("myText").style.textAlign);
	//var WAD = document.getElementById('WSortADDiv').innerHTML;
		if(window.confirm('ایا از حذف شاخه ' + starteshA + 'مطمئن هستید - با حذف این پوشه تمام نامه های داخل آن حذف خواهد شد')){
			var url="aj_Delete_Folder_Mail.php?id="+Adadesh+'&r='+(new Date().getTime());
		}

}

if (colorwa == "Reply_mail"){
	//alert(document.getElementById("myText").style.textAlign);
	var IDMAILL = document.getElementById('IDMAILL').innerHTML;
	//var WAD = document.getElementById('WSortADDiv').innerHTML;
	var url="aj_Reply_Mail.php?id="+IDMAILL+'&r='+(new Date().getTime());

}

if (colorwa == "Mail_IndexNextPre"){
	//alert(document.getElementById("myText").style.textAlign);
	var WS = document.getElementById('WSortDiv').innerHTML;
	var WAD = document.getElementById('WSortADDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	
	var url="aj_Mail_IndexNext.php?myStart="+Adadesh+'&start='+starteshA+'&sort='+WS+'&Vaziat='+WAD+'&MAILFROMSERV='+MAILFROMSERV+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
//alert(url);	
}

if (colorwa == "Mail_IndexNextPreAction"){
	//alert(document.getElementById("myText").style.textAlign);
	var WS = document.getElementById('WSortDiv').innerHTML;
	var WAD = document.getElementById('WSortADDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	
	  var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	  
	var url="aj_Mail_IndexNextAction.php?myStart="+Adadesh+'&start='+starteshA+'&sort='+WS+'&Vaziat='+WAD+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
//alert(url);	
}


if (colorwa == "Mail_IndexNextPreSended"){
	//alert(document.getElementById("myText").style.textAlign);
	var WS = document.getElementById('WSortDiv').innerHTML;
	var WAD = document.getElementById('WSortADDiv').innerHTML;
	var url="aj_Mail_IndexNextSended.php?myStart="+Adadesh+'&start='+starteshA+'&sort='+WS+'&Vaziat='+WAD+'&r='+(new Date().getTime());
//alert(url);	
}


if (colorwa == "RightToLeftMatn"){
	//alert(document.getElementById("myText").style.textAlign);
	document.getElementById("myTextdiv").style.textAlign = "right";
	document.getElementById("myText").dir="rtl";
	var url="&r="+(new Date().getTime());
	
}
if (colorwa == "LeftToRightMatn"){
	//alert(document.getElementById("myText").style.textAlign);
	document.getElementById("myTextdiv").style.textAlign = "left";
	document.getElementById("myText").dir="ltr";
	var url="&r="+(new Date().getTime());
}


if (colorwa == "CheckMark_Eachmail"){
	//var FishNO = encodeURI(document.all.Fish_No.value);
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	
	var url="aj_CheckMark.php?IDM="+Adadesh+'&MAILFROMSERV='+MAILFROMSERV+'&r='+(new Date().getTime());

}

if (colorwa == "CheckMark_EachmailFolder"){
	//var FishNO = encodeURI(document.all.Fish_No.value);
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="CheckMark_EachmailFolder.php?IDM="+adadesh+'&IDFOL='+IDDFOLL+'&r='+(new Date().getTime());

}

if (colorwa == "Filterr_EachEmail"){
	//alert('fgfgfg');
	//var FishNO = encodeURI(document.all.Fish_No.value);
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	
	var url="aj_FilterMark.php?EM="+Adadesh+'&IDM='+starteshA+'&MAILFROMSERV='+MAILFROMSERV+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
	//alert(url);

}

if (colorwa == "FilterrAction_EachEmail"){
	//alert('fgfgfg');
	 var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var url="aj_FilterActionMark.php?EM="+Adadesh+'&IDM='+starteshA+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
	//alert(url);

}



if (colorwa == "MashkookAction_EachEmail"){
	
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	 var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	var url="aj_MashkookAction.php?EM="+Adadesh+'&IDM='+starteshA+'&ACTT='+NOEACTION+'&MAILFROMSERV='+MAILFROMSERV+'&r='+(new Date().getTime());
	//alert(url);

}

if (colorwa == "Filterr_EachEmailAction"){
	
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	 var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	var url="aj_FilterMarkAction.php?EM="+Adadesh+'&IDM='+starteshA+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
	//alert(url);

}



if (colorwa == "Fish_Reg"){
	var FishNO = encodeURI(document.all.Fish_No.value);
	var url="aj_Reg_Fish.php?Fish="+FishNO+'&r='+(new Date().getTime());

}
//************************************************************************  Without Folder
if (colorwa == "SortCapaWebmail"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	
	var url="aj_Sort_Capa_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
}

if (colorwa == "SortCapaWebmailAction"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	
	 var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	var url="aj_ActionSort_Capa_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
}


if (colorwa == "SortNameWebmail"){
	
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;

	  var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	 
	var url="aj_Sort_Name_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
	//alert(url);

}

if (colorwa == "SortNameWebmailAction"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
  var NOEACTION = document.getElementById('NOEACTION').innerHTML;
  
	var url="aj_ActionSort_Name_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
	//alert(url);

}

if (colorwa == "SortSubjectWebmail"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	var url="aj_Sort_Subject_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());

}

if (colorwa == "SortSubjectWebmailAction"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	  var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	  
	var url="aj_ActionSort_Subject_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());

}

if (colorwa == "SortDateWebmail"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	var SEARCHVAL = document.getElementById('SEARCHVAL').innerHTML;
	var url="aj_Sort_Date_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&SerVal='+SEARCHVAL+'&r='+(new Date().getTime());
	//alert(url);
}

if (colorwa == "SortDateWebmailAction"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var MAILFROMSERV = document.getElementById('MAILFROMSERV').innerHTML;
	
	  var NOEACTION = document.getElementById('NOEACTION').innerHTML;
	
	var url="aj_ActionSort_Date_Mail.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&MAILFROMSERV='+MAILFROMSERV+'&ACTT='+NOEACTION+'&r='+(new Date().getTime());
	//alert(url);
}

//********************************************************************** With Folder

if (colorwa == "SortCapaWebmailFolder"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_Sort_Capa_MailFolder.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&Idfol='+IDDFOLL+'&r='+(new Date().getTime());
}

if (colorwa == "SortNameWebmailFolder"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_Sort_Name_MailFolder.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&Idfol='+IDDFOLL+'&r='+(new Date().getTime());
	//alert(url);

}
if (colorwa == "SortSubjectWebmailFolder"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_Sort_Subject_MailFolder.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&Idfol='+IDDFOLL+'&r='+(new Date().getTime());

}
if (colorwa == "SortDateWebmailFolder"){
	var vaziat = document.getElementById('VaziatSort').innerHTML;
	var startok = document.getElementById('startDiv').innerHTML;
	var mystartok = document.getElementById('myStartDiv').innerHTML;
	var IDDFOLL = document.getElementById('IDDFOLL').innerHTML;
	var url="aj_Sort_Date_MailFolder.php?vaziat="+vaziat+'&myStart='+mystartok+'&start='+startok+'&Idfol='+IDDFOLL+'&r='+(new Date().getTime());
	//alert(url);
}

//************************************************************************

if (colorwa == "View_Mail"){
	//alert('fgfg');
	//var FishNO = encodeURI(document.all.Fish_No.value);
	var url="aj_VIEW_Mail.php?IDMAIL="+adadesh+'&r='+(new Date().getTime());
	
}

if (colorwa == "Advanced_Search_Complet"){
	
	var NameOkk1 = encodeURI(document.all.Name_Advanced.value);
	var FamilyOkk1 = encodeURI(document.all.Family_Advanced.value);
	var sal = encodeURI(document.all.sal.value);
	var sal_Baze_Az = encodeURI(document.all.sal_Baze_Az.value);
	
	var sal_Baze_Ta = encodeURI(document.all.sal_Baze_Ta.value);
	
	var Mahal = encodeURI(document.all.Mahal.value);
	var Alaghe = encodeURI(document.all.Alaghe.value);
	var Email = encodeURI(document.all.Email.value);
	var MahaleTah = encodeURI(document.all.MahaleTah.value);
	var NameDabestan = encodeURI(document.all.NameDabestan.value);
	var SaleVoroodDabestan = encodeURI(document.all.SaleVoroodDabestan.value);
	var MoalemDabestan = encodeURI(document.all.MoalemDabestan.value);
	
	var NameRahnamaie = encodeURI(document.all.NameRahnamaie.value);
	var SaleVoroodBeRahnamaie = encodeURI(document.all.SaleVoroodBeRahnamaie.value);
	var NameMoalemRahnamaie = encodeURI(document.all.NameMoalemRahnamaie.value);
	var NameDabirestan = encodeURI(document.all.NameDabirestan.value);
	var SaleVoroodBeDabirestan = encodeURI(document.all.SaleVoroodBeDabirestan.value);
	
	var NameMoalemDabirestan = encodeURI(document.all.NameMoalemDabirestan.value);
	var ReshteDiplom = encodeURI(document.all.ReshteDiplom.value);
	var SaleEtmameDiplom = encodeURI(document.all.SaleEtmameDiplom.value);
	
	var MahaleSarbazi = encodeURI(document.all.MahaleSarbazi.value);
	var SaleVoroodBedaneshgah = encodeURI(document.all.SaleVoroodBedaneshgah.value);
	var NameAsatideDaneshgah = encodeURI(document.all.NameAsatid.value);
	var ReshteDaneshgah = encodeURI(document.all.ReshteDaneshgah.value);
	var SaleAkhzeMadrak = encodeURI(document.all.SaleAkhz.value);
	
	var MahaleSokoonat = encodeURI(document.all.MahaleSokoonat.value);
	var FaaliatKari = encodeURI(document.all.FaaliatKari.value);
	var BiEtelaa = encodeURI(document.all.BiEtelaa.value);
	var BaEtelaa = encodeURI(document.all.BaEtelaa.value);

	
	var myenta1 = document.all.Gensiat;
    var myentshodea1 = encodeURI(myenta1.options[myenta1.selectedIndex].value);
    
    var myent211 = document.all.Rooz;
    var myentshode21 = myent211.options[myent211.selectedIndex].value;	
    
    var myent31 = document.all.Mah;
    var myentshode31 = myent31.options[myent31.selectedIndex].value;	
  //  alert('ok');
    var myent41 = document.all.Vaziat;
    var myentshode4 = encodeURI(myent41.options[myent41.selectedIndex].value);	
    
  
  if (document.all.Pic[0].checked == true){
   var D9 = document.all.Pic[0].value;
  }
   if (document.all.Pic[1].checked == true){
   var D9 = document.all.Pic[1].value;
  }
   if (document.all.Pic[2].checked == true){
   var D9 = document.all.Pic[2].value;
  }
    
  
    displayMess('Aj_Search_Advanced_Comple.php?NameOkk1='+NameOkk1+'&FamilyOkk1='+FamilyOkk1+'&BaEtelaa='+BaEtelaa+'&BiEtelaa='+BiEtelaa+'&sal='+sal+'&sal_Baze_Az='+sal_Baze_Az+'&sal_Baze_Ta='+sal_Baze_Ta+'&Mahal='+Mahal+'&Alaghe='+Alaghe+'&Email='+Email+'&MahaleTah='+MahaleTah+'&NameDabestan='+NameDabestan+'&SaleVoroodDabestan='+SaleVoroodDabestan+'&MoalemDabestan='+MoalemDabestan+'&NameRahnamaie='+NameRahnamaie+'&SaleVoroodBeRahnamaie='+SaleVoroodBeRahnamaie+'&NameMoalemRahnamaie='+NameMoalemRahnamaie+'&NameDabirestan='+NameDabirestan+'&SaleVoroodBeDabirestan='+SaleVoroodBeDabirestan+'&NameMoalemDabirestan='+NameMoalemDabirestan+'&ReshteDiplom='+ReshteDiplom+'&SaleEtmameDiplom='+SaleEtmameDiplom+'&MahaleSarbazi='+MahaleSarbazi+'&SaleVoroodBedaneshgah='+SaleVoroodBedaneshgah+'&NameAsatideDaneshgah='+NameAsatideDaneshgah+'&ReshteDaneshgah='+ReshteDaneshgah+'&SaleAkhzeMadrak='+SaleAkhzeMadrak+'&MahaleSokoonat='+MahaleSokoonat+'&FaaliatKari='+FaaliatKari+'&Gensiat='+myentshodea1+'&Rooz='+myentshode21+'&Mah='+myentshode31+'&Vaziat='+myentshode4+'&Pic='+D9+'&r='+(new Date().getTime()));
	
    var url="Aj_Search_Advanced_Comple.php?NameOkk1="+NameOkk1+'&FamilyOkk1='+FamilyOkk1+'&sal='+sal+'&sal_Baze_Az='+sal_Baze_Az+'&sal_Baze_Ta='+sal_Baze_Ta+'&Mahal='+Mahal+'&Alaghe='+Alaghe+'&Email='+Email+'&MahaleTah='+MahaleTah+'&NameDabestan='+NameDabestan+'&SaleVoroodDabestan='+SaleVoroodDabestan+'&MoalemDabestan='+MoalemDabestan+'&NameRahnamaie='+NameRahnamaie+'&SaleVoroodBeRahnamaie='+SaleVoroodBeRahnamaie+'&NameMoalemRahnamaie='+NameMoalemRahnamaie+'&NameDabirestan='+NameDabirestan+'&SaleVoroodBeDabirestan='+SaleVoroodBeDabirestan+'&NameMoalemDabirestan='+NameMoalemDabirestan+'&ReshteDiplom='+ReshteDiplom+'&SaleEtmameDiplom='+SaleEtmameDiplom+'&MahaleSarbazi='+MahaleSarbazi+'&SaleVoroodBedaneshgah='+SaleVoroodBedaneshgah+'&NameAsatideDaneshgah='+NameAsatideDaneshgah+'&ReshteDaneshgah='+ReshteDaneshgah+'&SaleAkhzeMadrak='+SaleAkhzeMadrak+'&MahaleSokoonat='+MahaleSokoonat+'&FaaliatKari='+FaaliatKari+'&Gensiat='+myentshodea1+'&Rooz='+myentshode21+'&Mah='+myentshode31+'&Vaziat='+myentshode4+'&Pic='+D9+'&r='+(new Date().getTime());
}


if (colorwa == "InviteFriend"){
var Email = encodeURI(document.all.Email.value);

	if (document.all.Vaziat[0].checked == true){
   var vaziatok = document.all.Vaziat[0].value;
  }
  
  if (document.all.ThemeInv[1].checked == true){
   var themeinv = document.all.ThemeInv[1].value;
  }
   if (document.all.ThemeInv[2].checked == true){
   var themeinv = document.all.ThemeInv[2].value;
  }
   if (document.all.ThemeInv[3].checked == true){
   var themeinv = document.all.ThemeInv[3].value;
  }
   if (document.all.ThemeInv[4].checked == true){
   var themeinv = document.all.ThemeInv[4].value;
  }
  
	var url="aj_Invite_Friend.php?Email="+Email+'&vaziat='+vaziatok+'&themeinv='+themeinv+'&start='+Adadesh+'&r='+(new Date().getTime());
//alert(url);
}



if (colorwa == "Upload_Fi_Next"){
	//alert(starteshA);
	var url="aj_Upload_Fi_Next.php?Quer="+starteshA+'&start='+Adadesh+'&r='+(new Date().getTime());

}


if (colorwa == "NextPre_SEARCH_Complete"){
	
	var url="aj_NextPre_SEARCH_Complete2.php?Quer="+starteshA+'&start='+Adadesh+'&r='+(new Date().getTime());
	
	//alert(url);
}

if (colorwa == "NextPre_SEARCH_ById"){
	//alert(starteshA);
	var url="aj_NextPre_SEARCH_ById.php?Quer="+starteshA+'&start='+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "ID_SEARCH"){
	var Td_ID = encodeURI(document.all.Td_ID.value);
	var Yahoo_ID = encodeURI(document.all.Yahoo_ID.value);
	var Msn_ID = encodeURI(document.all.Msn_ID.value);
	var Icq_ID = encodeURI(document.all.Icq_ID.value);
	var Platalk_ID = encodeURI(document.all.Platalk_ID.value);
	  var Noeb = document.all.Noe;
    var noeok = encodeURI(Noeb.options[Noeb.selectedIndex].value);	
    displayMess('ID_SEARCH.php?Td_ID='+Td_ID+'&Yahoo_ID='+Yahoo_ID+'&Msn_ID='+Msn_ID+'&Icq_ID='+Icq_ID+'&noeok='+noeok+'&Platalk_ID='+Platalk_ID+'&r='+(new Date().getTime()));
	var url="ID_SEARCH.php?Td_ID="+Td_ID+'&Yahoo_ID='+Yahoo_ID+'&Msn_ID='+Msn_ID+'&Icq_ID='+Icq_ID+'&noeok='+noeok+'&r='+(new Date().getTime());
//alert(url);
}

if (colorwa == "NextPre_SEARCH_Search"){
	var url="aj_Result_search_user_Result.php?Name="+starteshA+'&start='+Adadesh+'&Family='+nanayok+'&r='+(new Date().getTime());
//alert(url);
}

if (colorwa == "NextPreProfile"){
	var url="aj_NextPreProfile.php?Uname="+starteshA+'&start='+Adadesh+'&r='+(new Date().getTime());
//alert(url);
}
if (colorwa == "Search_Result_Result"){
	

	var Name_search = encodeURI(document.all.Name.value);
	var Family_search = encodeURI(document.all.Family.value);
	displayMess('Search_Panel_Result.php?Name='+Name_search+'&Family='+Family_search+'&r='+(new Date().getTime()));
	
	var url="aj_Result_search_user_Result.php?Name="+Name_search+'&Family='+Family_search+'&r='+(new Date().getTime());
//alert(url);
}

if (colorwa == "Forgot_Pass.php"){
	var Fo_Username = encodeURI(document.all.Fo_Username.value);
	var Fo_Email = encodeURI(document.all.Fo_Email.value);
	var url="aj_ForgotPass.php?UName="+Fo_Username+'&FEmail='+Fo_Email+'&r='+(new Date().getTime());
}

if (colorwa == "Delete_AlbumPic"){
	
	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";
	
	var my0= document.all.cDbox[0];
		if (my0 != null) {
				if (document.all.cDbox[0].checked){
					cboxx0 =  encodeURI(document.all.cDbox[0].value);
				}
		}

		var my1= document.all.cDbox[1];
		if (my1 != null) {
				if (document.all.cDbox[1].checked){
					cboxx1 =  encodeURI(document.all.cDbox[1].value);
				}
		}
		
		var my2= document.all.cDbox[2];
		if (my2 != null) {
				if (document.all.cDbox[2].checked){
					cboxx2 =  encodeURI(document.all.cDbox[2].value);
				}
		}
		
		var my3= document.all.cDbox[3];
		if (my3 != null) {
				if (document.all.cDbox[3].checked){
					cboxx0 =  encodeURI(document.all.cDbox[3].value);
				}
		}
		
		
	
	var url="aj_Delete_Album_Pic.php?cbox0="+cboxx0+'&cbox1='+cboxx1+'&cbox2='+cboxx2+'&cbox3='+cboxx3+'&r='+(new Date().getTime());
//alert(url);
}

if (colorwa == "Today_reg_Next"){
	var url="aj_Today_reg_Next.php?start="+Adadesh+'&Family='+nanayok+'&r='+(new Date().getTime());
//alert(url);
}


if (colorwa == "NextPre_SEARCH"){
	var url="aj_NextPre_SEARCH.php?Name="+starteshA+'&start='+Adadesh+'&Family='+nanayok+'&r='+(new Date().getTime());
//alert(url);
}

if (colorwa == "Search_User"){
	var Name_search = encodeURI(document.all.Name.value);
	var Family_search = encodeURI(document.all.Family.value);
	var url="Aj_Result_search_user.php?Name="+Name_search+'&Family='+Family_search+'&r='+(new Date().getTime());
	
}

if (colorwa == "Delete_mylistIgnors"){
cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";
	

var my0= document.all.cbox[0];
		if (my0 != null) {
				if (document.all.cbox[0].checked){
					cboxx0 =  encodeURI(document.all.cbox[0].value);
				}
		}
		
		var my1= document.all.cbox[1];
		if (my1 != null) {
				if (document.all.cbox[1].checked){
					cboxx1 =  encodeURI(document.all.cbox[1].value);
				}
		}
		
		var my2= document.all.cbox[2];
		if (my2 != null) {
				if (document.all.cbox[2].checked){
					cboxx2 =  encodeURI(document.all.cbox[2].value);
				}
		}
		
		var my3= document.all.cbox[3];
		if (my3 != null) {
				if (document.all.cbox[3].checked){
					cboxx3 =  encodeURI(document.all.cbox[3].value);
				}
		}
		
		var my4= document.all.cbox[4];
		if (my4 != null) {
				if (document.all.cbox[4].checked){
					cboxx4 =  encodeURI(document.all.cbox[4].value);
				}
		}
		
		var my5= document.all.cbox[5];
		if (my5 != null) {
				if (document.all.cbox[5].checked){
					cboxx5 =  encodeURI(document.all.cbox[5].value);
				}
		}
		
		var my6= document.all.cbox[6];
		if (my6 != null) {
				if (document.all.cbox[6].checked){
					cboxx6 =  encodeURI(document.all.cbox[6].value);
				}
		}
		
		var my7= document.all.cbox[7];
		if (my7 != null) {
				if (document.all.cbox[7].checked){
					cboxx7 =  encodeURI(document.all.cbox[7].value);
				}
		}
		
		var my8= document.all.cbox[8];
		if (my8 != null) {
				if (document.all.cbox[8].checked){
					cboxx8 =  encodeURI(document.all.cbox[8].value);
				}
		}
		
		var my9= document.all.cbox[9];
		if (my9 != null) {
				if (document.all.cbox[9].checked){
					cboxx9 =  encodeURI(document.all.cbox[9].value);
				}
		}
		
		


	//alert(cboxx0);
if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == ""){
	alert('لطفا ابتدا کاربر (های) مورد نظر را انتخاب نمایید');
}else{
	var url="aj_Delete_myListIgnors.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&r='+(new Date().getTime());
}

}

if (colorwa == "Delete_mylist"){
	cboxx0 = "";cboxx1 = "";cboxx2 = "";cboxx3 = "";cboxx4 = "";cboxx5 = "";cboxx6 = "";cboxx7 = "";cboxx8 = "";cboxx9 = "";
	
	if (document.all.cbox[0].checked){
		var cboxx0 = encodeURI(document.all.cbox[0].value);
	}
	
	if (document.all.cbox[1].checked){
		var cboxx1 = encodeURI(document.all.cbox[1].value);
	}
	
	if (document.all.cbox[2].checked){
		var cboxx2 = encodeURI(document.all.cbox[2].value);
	}
	if (document.all.cbox[3].checked){
		var cboxx3 = encodeURI(document.all.cbox[3].value);
	}
	
	if (document.all.cbox[4].checked){
		var cboxx4 = encodeURI(document.all.cbox[4].value);
	}
//alert(document.all.cbox[0].checked);
	if (document.all.cbox[5].checked){
		var cboxx5 = encodeURI(document.all.cbox[5].value);
	}
	
	if (document.all.cbox[6].checked){
		var cboxx6 = encodeURI(document.all.cbox[6].value);
	}
	
	if (document.all.cbox[7].checked){
		var cboxx7 = encodeURI(document.all.cbox[7].value);
	}
	if (document.all.cbox[8].checked){
		var cboxx8 = encodeURI(document.all.cbox[8].value);
	}
	
	if (document.all.cbox[9].checked){
		var cboxx9 = encodeURI(document.all.cbox[9].value);
	}


	//alert(cboxx0);
if(cboxx0 == "" && cboxx1 == "" && cboxx2 == "" && cboxx3 == "" && cboxx4 == "" && cboxx5 == "" && cboxx6 == "" && cboxx7 == "" && cboxx8 == "" && cboxx9 == ""){
	alert('لطفا ابتدا کاربر (های) مورد نظر را انتخاب نمایید');
}else{
	var url="aj_Delete_myList.php?cboxx0="+cboxx0+'&cboxx1='+cboxx1+'&cboxx2='+cboxx2+'&cboxx3='+cboxx3+'&cboxx4='+cboxx4+'&cboxx5='+cboxx5+'&cboxx6='+cboxx6+'&cboxx7='+cboxx7+'&cboxx8='+cboxx8+'&cboxx9='+cboxx9+'&r='+(new Date().getTime());
}

}


if (colorwa == "YesFriend"){
	var url="Aj_YesFriend.php?ID="+Adadesh+'&r='+(new Date().getTime());
}
if (colorwa == "NoFriend"){
	var url="Aj_NoFriend.php?ID="+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "showPic"){
	var url="Aj_TD_Shop_Pic.php?ID="+Adadesh+'&r='+(new Date().getTime());
}
if (colorwa == "SmileyRefre"){
	var url="SmileyRefre.php?r="+(new Date().getTime());
}

if (colorwa == "EditPassword"){
	var LastPAss = encodeURI(document.all.LastPass.value);
	var NewPASS = encodeURI(document.all.NewPass.value);
	
	var url="EditPass.php?LastPass="+LastPAss+'&NewPass='+NewPASS+'&r='+(new Date().getTime());
}

if (colorwa == "Add_friend"){
var Add_Username = encodeURI(document.all.USERNAME.value);
	
	var url="Aj_Add_Friend.php?username="+Add_Username+'&r='+(new Date().getTime());
}


if (colorwa == "RegisterNewUser"){
	
	var NameOkk = encodeURI(document.all.Name.value);
	var FamilyOkk = encodeURI(document.all.Family.value);
	var UsernameOkk = encodeURI(document.all.Username.value);
	var PasswordOkk = encodeURI(document.all.Password.value);
	var EmailOkk = encodeURI(document.all.Email.value);
	var MahalOkk = encodeURI(document.all.Mahal.value);
	var PicOkk = encodeURI(document.all.Pic.value);
	var SalOkk = encodeURI(document.all.sal.value);
	
	
	var myenta = document.all.Gensiat;
    var myentshodea = encodeURI(myenta.options[myenta.selectedIndex].value);	
    
	var myent = document.all.Country;
    var myentshode = encodeURI(myent.options[myent.selectedIndex].value);	
    
    var myent2 = document.all.Rooz;
    var myentshode2 = myent2.options[myent2.selectedIndex].value;	
    
    var myent3 = document.all.Mah;
    var myentshode3 = myent3.options[myent3.selectedIndex].value;	
    //alert(myentshode3);
    //alert('gggg');
	var url="Aj_TD_RegisterNewUser.php?Username="+UsernameOkk+'&Password='+PasswordOkk+'&Name='+NameOkk+'&Family='+FamilyOkk+'&Gensiat='+myentshodea+'&Email='+EmailOkk+'&Pic='+PicOkk+'&Country='+myentshode+'&Rooz='+myentshode2+'&Mah='+myentshode3+'&Sal='+SalOkk+'&Mahal='+MahalOkk+'&r='+(new Date().getTime());

}

if (colorwa == "editmyprofile"){
	
	var NameOkk1 = encodeURI(document.all.Name.value);
	var FamilyOkk1 = encodeURI(document.all.Family.value);
	var EmailOkk1 = encodeURI(document.all.Email.value);
	var MahalOkk1 = encodeURI(document.all.Mahal.value);
	
	var SalOkk1 = encodeURI(document.all.sal.value);
	
	var Alaghe = encodeURI(document.all.Alaghe.value);
	var YahooId = encodeURI(document.all.YahooId.value);
	var Msn = encodeURI(document.all.Msn.value);
	var ICQ = encodeURI(document.all.ICQ.value);
	var Platalk = encodeURI(document.all.Platalk.value);
	var MahaleTahsil = encodeURI(document.all.MahaleTahsil.value);
	var NameDabestan = encodeURI(document.all.NameDabestan.value);
	
	var SaleVoroodBeDabestan = encodeURI(document.all.SaleVoroodBeDabestan.value);
	var MoalemDabestan = encodeURI(document.all.MoalemDabestan.value);
	var NameRahnamaie = encodeURI(document.all.NameRahnamaie.value);
	var SaleVoroodRahnamaie = encodeURI(document.all.SaleVoroodRahnamaie.value);
	var MoalemRahnamaie = encodeURI(document.all.MoalemRahnamaie.value);
	
	var NameDabirestan = encodeURI(document.all.NameDabirestan.value);
	var SaleVoroodBeDabirestan = encodeURI(document.all.SaleVoroodBeDabirestan.value);
	var MoalemhayeDabirestan = encodeURI(document.all.MoalemhayeDabirestan.value);
	
	var ReshteDiplom = encodeURI(document.all.ReshteDiplom.value);
	var EndDiplom = encodeURI(document.all.EndDiplom.value);
	var MahaleKhedmat = encodeURI(document.all.MahaleKhedmat.value);
	var SaleVoroodBeDaneshgah = encodeURI(document.all.SaleVoroodBeDaneshgah.value);
	var NameAsatideDaneshgah = encodeURI(document.all.NameAsatideDaneshgah.value);
	
	var ReshteDaneshgah = encodeURI(document.all.ReshteDaneshgah.value);
	var SaleAkhzeMadrak = encodeURI(document.all.SaleAkhzeMadrak.value);
	var MahaleSokoonat = encodeURI(document.all.MahaleSokoonat.value);
	var FaaliatKari = encodeURI(document.all.FaaliatKari.value);
	var DoostaneBedooneEtela = encodeURI(document.all.DoostaneBedooneEtela.value);
	var DoostaneBaEtela = encodeURI(document.all.DoostaneBaEtela.value);

	
	var myenta1 = document.all.Gensiat;
    var myentshodea1 = encodeURI(myenta1.options[myenta1.selectedIndex].value);
    
    var myent211 = document.all.Rooz;
    var myentshode21 = myent211.options[myent211.selectedIndex].value;	
    
    var myent31 = document.all.Mah;
    var myentshode31 = myent31.options[myent31.selectedIndex].value;	
  //  alert('ok');
    var myent41 = document.all.Vaziat;
    var myentshode4 = encodeURI(myent41.options[myent41.selectedIndex].value);	
    
    var myent5 = document.all.D9;
    var D9 = encodeURI(myent5.options[myent5.selectedIndex].value);	
    	
    var url="Aj_TD_EditmyProfile.php?Alaghe="+Alaghe+'&YahooId='+YahooId+'&Msn='+Msn+'&ICQ='+ICQ+'&Platalk='+Platalk+'&MahaleTahsil='+MahaleTahsil+'&NameDabestan='+NameDabestan+'&SaleVoroodBeDabestan='+SaleVoroodBeDabestan+'&MoalemDabestan='+MoalemDabestan+'&NameRahnamaie='+NameRahnamaie+'&SaleVoroodRahnamaie='+SaleVoroodRahnamaie+'&MoalemRahnamaie='+MoalemRahnamaie+'&NameDabirestan='+NameDabirestan+'&SaleVoroodBeDabirestan='+SaleVoroodBeDabirestan+'&ReshteDiplom='+ReshteDiplom+'&EndDiplom='+EndDiplom+'&MahaleKhedmat='+MahaleKhedmat+'&SaleVoroodBeDaneshgah='+SaleVoroodBeDaneshgah+'&NameAsatideDaneshgah='+NameAsatideDaneshgah+'&ReshteDaneshgah='+ReshteDaneshgah+'&SaleAkhzeMadrak='+SaleAkhzeMadrak+'&MahaleSokoonat='+MahaleSokoonat+'&FaaliatKari='+FaaliatKari+'&DoostaneBedooneEtela='+DoostaneBedooneEtela+'&DoostaneBaEtela='+DoostaneBaEtela+'&Gensiat='+myentshodea1+'&Rooz='+myentshode21+'&Mah='+myentshode31+'&Vaziat='+myentshode4+'&Name='+NameOkk1+'&Family='+FamilyOkk1+'&Email='+EmailOkk1+'&Mahal='+MahalOkk1+'&D9='+D9+'&Sal='+SalOkk1+'&r='+(new Date().getTime());

}
if (colorwa == "TedadeAlbum"){
	var url="TedadeAlbum.php?r="+(new Date().getTime());
}

if (colorwa == "SentToAdmin"){
	var url="OKAdminImage.php?ImageNumber="+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "CancelAdmin"){
	var url="CancelAdmin.php?ImageNumber="+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "SentToAdminGallery"){
	var url="OKAdminImageGallery.php?ImageNumber="+Adadesh+'&r='+(new Date().getTime());
}
if (colorwa == "CancelAdminGallery"){
	var url="CancelAdminGallery.php?ImageNumber="+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "CheckUserPass"){
	var UsernameOk = encodeURI(document.all.Username.value);	
	var PasswordOk = encodeURI(document.all.Password.value);
	var CokRemindOk = document.all.CokRemind.value;	
	//alert(CokRemindOk);
	var url="Check.php?Username="+UsernameOk+'&Password='+PasswordOk+'&CokRemind='+CokRemindOk+'&r='+(new Date().getTime());
}

if (colorwa == "CheckUserPass2"){
	var UsernameOk2 = encodeURI(document.all.Username2.value);	
	var PasswordOk2 = encodeURI(document.all.Password2.value);
	var CokRemindOk2 = encodeURI(document.all.CokRemind2.value);	
	//alert(CokRemindOk);
	var url="Check.php?Username="+UsernameOk2+'&Password='+PasswordOk2+'&CokRemind='+CokRemindOk2+'&r='+(new Date().getTime());
}

if (colorwa == "CheckUsername"){
	var UsernameOk = encodeURI(document.all.Username.value);	
	//var PasswordOk = encodeURI(document.all.Password.value);	
	var url="CheckUsername.php?Username="+UsernameOk+'&r='+(new Date().getTime());
}

if (colorwa == "add_FolderMail"){
	var nameOk = encodeURI(document.all.Name_Folder.value);	
	//var PasswordOk = encodeURI(document.all.Password.value);	
	var url="Mail_AddFolder.php?name="+nameOk+'&r='+(new Date().getTime());
}


if (colorwa == "soorati"){
	var url="CheckUsername.php&r="+(new Date().getTime());
}
if (colorwa == "ghermez"){
	var url="CheckUsername.php&r="+(new Date().getTime());
}
if (colorwa == "abi"){
	var url="CheckUsername.php&r="+(new Date().getTime());
}
if (colorwa == "khakestari"){
	var url="CheckUsername.php&r="+(new Date().getTime());
}
if (colorwa == "sabz"){
	var url="CheckUsername.php&r="+(new Date().getTime());
}

xmlHttp=GetXmlHttpObject(stateChanged);
xmlHttp.open("POST", url , true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); 
//xmlHttp.setRequestHeader("enctype", "multipart/form-data"); 
xmlHttp.send(str);


}
//********** Methode Get mishe


function stateChanged() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading")
{	
if (colorwa == "SentToAdmin"){
		document.getElementById('OBK').style.visibility="hidden";
		document.getElementById('OBK').style.display="none";	
		document.getElementById('SEnt_FileProfile').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	
	if (colorwa == "CancelAdmin"){
		document.getElementById('OBK').style.visibility="hidden";
		document.getElementById('OBK').style.display="none";	
		document.getElementById('SEnt_FileProfile').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	
	if (colorwa == "SentToAdminGallery"){
		document.getElementById('OBK2').style.visibility="hidden";
		document.getElementById('OBK2').style.display="none";	
		document.getElementById('SEnt_FileProfileGallery').innerHTML ="<p align='center'><img src='../ajax-loader2.gif'></p>";
}
	if (colorwa == "CancelAdminGallery"){
		document.getElementById('OBK2').style.visibility="hidden";
		document.getElementById('OBK2').style.display="none";	
		document.getElementById('SEnt_FileProfileGallery').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
}
	if (colorwa == "Delete_ItemUpload"){
		document.getElementById('Upload_Fi_Content').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	
	if (colorwa == "Add_friend"){
			document.getElementById('Add_friend').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "SmileyRefre"){
		document.getElementById('EhsaseTo').innerHTML="<p align='right'><img src='../ajax-loader2.gif'></p>";

	}
	
	if (colorwa == "CheckUserPass"){
					document.getElementById('Natije').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
		
	}
	if (colorwa == "CheckUserPass2"){
					document.getElementById('LoginNextRegister').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
		
	}
	if (colorwa == "EditPassword"){
		document.getElementById('myEditPassDiv').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	
	}
	
	if (colorwa == "editmyprofile"){
		document.getElementById('editmyProfile').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	
	}
	if (colorwa == "YesFriend"){
		document.getElementById('Loader_Request').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	if (colorwa == "NoFriend"){
		document.getElementById('Loader_Request').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	
	if (colorwa == "NextPreProfile"){
		document.getElementById('nextprevWai').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	if (colorwa == "Search_User"){
		document.getElementById('Result_search_user').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "NextPre_SEARCH"){
		document.getElementById('Result_search_user').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "Today_reg_Next"){
		document.getElementById('main_Today_Registerr').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "NextPre_SEARCH_Search"){
		document.getElementById('Result_search_user_Result').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "Fish_Reg"){
			document.getElementById('reg_Fish').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	if (colorwa == "View_Mail"){
		document.getElementById('View_Mail').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "SortCapaWebmail"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
}

if (colorwa == "SortCapaWebmailAction"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
}

if (colorwa == "SortNameWebmail"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";

}

if (colorwa == "SortNameWebmailAction"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";

}

if (colorwa == "SortSubjectWebmail"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";

}
if (colorwa == "SortSubjectWebmailAction"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";

}


if (colorwa == "SortDateWebmail"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	//alert(url);
}

if (colorwa == "SortDateWebmailAction"){
			document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	//alert(url);
}

	if (colorwa == "Filterr_EachEmail"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "FilterrAction_EachEmail"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "MashkookAction_EachEmail"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "CheckMark_Eachmail"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "MailIndex_Tab"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "ViewMail_Tab"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Search_ontheMails"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mail_IndexNextPre"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mail_IndexNextPreAction"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "add_FolderMail"){
		document.getElementById('Natije_AddFolderMail').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Delete_myFoldersMail"){
		document.getElementById('my_Folderst').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mail_IndexNextPreFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "CheckMark_EachmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
		
	}
	if (colorwa == "Filterr_EachEmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "SortCapaWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "SortDateWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "SortSubjectWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "SortNameWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "View_MailSended"){
		document.getElementById('View_Mail').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Delete_EachMAilSended"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mail_IndexNextPreSended"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Sended_Emails"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
		
	}
	if (colorwa == "add_FriendMail"){
		document.getElementById('BIn').value="لطفا کمی صبر نمایید ...";
		document.all.BIn.disabled= false;
	}
	if (colorwa == "ViewFriendmail_Tab"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Delete_FriendMail"){
		document.getElementById('BarayeNok').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	if (colorwa == "ViewFriendMailsByNok"){
		document.getElementById('BarayeNok').innerHTML="<p align='center'><img src='../ajax-loader2.gif'></p>";
	}
	if (colorwa == "add_ServerFilter"){
		document.getElementById('Natije_AddDel').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "delete_ServerFilter"){
		document.getElementById('Natije_AddDel').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "View_NewsOnFriend"){
		document.getElementById('Last_News').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Action_ProMAil"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "ViewMailYahoo_Tab"){
		document.getElementById('content_Tab').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "ActionMove_Email_Action"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Delete_EachMAil"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Forgot_Pass.php"){
		document.getElementById('natije_forgot').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mail_Register_Mail"){
		document.getElementById('Nam_Reg').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "InviteFriend"){
		document.getElementById('invite_DIVV').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";

	}
	if (colorwa == "NextPre_SEARCH_Complete"){
		document.getElementById('Result_search_user_Result').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "ViewMail_ByFolder"){
		document.getElementById('Mail_Pack').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
}
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
if (colorwa == "SentToAdmin"){
		document.getElementById('BButton').style.visibility="visible";
		document.getElementById('mypic').style.visibility="visible";
		document.getElementById('mypic').style.display="";
		document.all.mypic.value="";
		document.getElementById('SEnt_FileProfile').innerHTML="";
		alert('تصویر ارسالی به عنوان تصویر کاربری انتخاب شد');
		//alert(xmlHttp.responseText);
	}
	
	if (colorwa == "CancelAdmin"){
		document.getElementById('BButton').style.visibility="visible";
		document.getElementById('mypic').style.visibility="visible";
		document.getElementById('mypic').style.display="";
		document.all.mypic.value="";
		document.getElementById('SEnt_FileProfile').innerHTML="";
	}
	
	if (colorwa == "SentToAdminGallery"){
		document.getElementById('BButton2').style.visibility="visible";
		document.getElementById('mypicGallery').style.visibility="visible";
		document.getElementById('mypicGallery').style.display="";
		document.all.mypicGallery.value="";
		document.getElementById('SEnt_FileProfileGallery').innerHTML="";
		alert('تصویر ارسالی شما به مدیریت سایت ارسال شد ، این تصویر پس از تایید در گالری عکس شما نمایش می یابد');
	}
	
	if (colorwa == "CancelAdminGallery"){
		document.getElementById('BButton2').style.visibility="visible";
		document.getElementById('mypicGallery').style.visibility="visible";
		document.getElementById('mypicGallery').style.display="";
		document.all.mypicGallery.value="";
		document.getElementById('SEnt_FileProfileGallery').innerHTML="";
	}
	if (colorwa == "Forgot_Pass.php"){
		if (xmlHttp.responseText == "UsernameNotFound"){
			document.getElementById('natije_forgot').innerHTML="";
			alert('این نام کاربری و آدرس ایمیل در سیستم وجود ندارد');
		}else{
			alert('کلمه عبور جدید شما به ایمیل شما ارسال شد');
			document.getElementById('natije_forgot').innerHTML="";
		}
	}
	if (colorwa == "Delete_ItemUpload"){
		document.getElementById('Upload_Fi_Content').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "View_NewsOnFriend"){
		document.getElementById('Last_News').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "delete_ServerFilter"){
		alert('سرور مورد نظر از حالت فیلتر خارج شد');
		document.getElementById('Natije_AddDel').innerHTML="";
	}
	if (colorwa == "add_ServerFilter"){
		alert('سرور مورد نظر فیلتر شد');
		document.getElementById('Natije_AddDel').innerHTML="";
	}
	if (colorwa == "Delete_EachMAil_Action"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		document.getElementById('View_Mail').innerHTML="";
	}
	if (colorwa == "ActionMove_Email_Action"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;	
		alert('انتقال ایمیل (ها) با موفقیت انجام شد');
	}
	if (colorwa == "Action_ProMAil"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	if (colorwa == "Delete_FriendMail"){
		document.getElementById('BarayeNok').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "ViewFriendMailsByNok"){
		document.getElementById('BarayeNok').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "View_FriendDetMail"){
		
		document.getElementById('COntent_Mail_Friend').innerHTML=xmlHttp.responseText;
		document.getElementById('AXEANUSER').innerHTML="";
		document.getElementById('EHSASEUSER').innerHTML="";
		
		Myresponseokw = xmlHttp.responseText ;
		
		
		AXAZMATN = Myresponseokw.split('JODAKON');
		okk=AXAZMATN[1];
		//alert(Myresponseokw);
		AXVAGHEIE =okk.split('BADISH22');
		
		$OKN = AXVAGHEIE[1];
		
		EHSASESH = $OKN.split('BABA3');
		
		
		document.getElementById('COntent_Mail_Friend').innerHTML=AXAZMATN[0];
		document.getElementById('AXEANUSER').innerHTML=AXVAGHEIE[0];
		document.getElementById('EHSASEUSER').innerHTML=EHSASESH[0];
		  
	}
	if (colorwa == "ViewFriendmail_Tab"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "add_FriendMail"){
		document.getElementById('BIn').value="عملیات با موفقیت انجام شد";
		alert('این کاربر به لیست دوستان شما اضافه شد');
		messageObj.close();	
	}
	if (colorwa == "Mail_Register_Mail"){
		//alert(xmlHttp.responseText);
		document.getElementById('Nam_Reg').innerHTML="";
		if (xmlHttp.responseText == "NameERR"){
			alert('نام وارد شده غیر مجاز است');
		}
		if (xmlHttp.responseText == "ExistErr"){
			alert('این نام توسط شخص دیگری ثبت شده است');
		}
			
		if (xmlHttp.responseText == "OK"){
			document.forms["FormOk"].submit( );
		}
	}
	if (colorwa == "Mail_IndexNextPreSended"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Delete_EachMAilSended"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		document.getElementById('View_Mail').innerHTML="";
	}
	if (colorwa == "View_MailSended"){
		document.getElementById('View_Mail').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Sended_Emails"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	if (colorwa == "SortCapaWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("CapaSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("CapaSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortDateWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("DateSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("DateSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortSubjectWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("SubSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("SubSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortNameWebmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("NameSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("NameSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "Filterr_EachEmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "CheckMark_EachmailFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		alert('علامت گذاری / برداری این نامه انجام شد');	
	}
	if (colorwa == "Mail_IndexNextPreFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "ViewMail_ByFolder"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Move_Email_Action"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;	
		alert('انتقال ایمیل (ها) با موفقیت انجام شد');
	}
	
	if (colorwa == "Delete_myFoldersMail"){
		document.getElementById('my_Folderst').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "add_FolderMail"){
		
		
		Myresponseokw = xmlHttp.responseText ;
		tableJodaKon = Myresponseokw.split('Tablesh Va Data');

		document.getElementById('Natije_AddFolderMail').innerHTML=tableJodaKon[0];
		document.getElementById('my_Folderst').innerHTML=tableJodaKon[1];
	}
	if (colorwa == "Delete_EachMAil"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		document.getElementById('View_Mail').innerHTML="";
	}
	if (colorwa == "Mail_AfterSend"){
		//alert(xmlHttp.responseText);
		document.getElementById('Head_Mail').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "MailIndex_Tab"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "ViewMailYahoo_Tab"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	if (colorwa == "ViewMail_Tab"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	if (colorwa == "Search_ontheMails"){
		document.getElementById('content_Tab').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	
	if (colorwa == "Reply_mail"){
		//alert(xmlHttp.responseText);
		Myresponseok = xmlHttp.responseText ;
		//document.getElementById('Head_Mail').innerHTML=xmlHttp.responseText;
		EditorJodaKon = Myresponseok.split('INJA MATN AZ EDITOR JODA MISHAVAD');

		EditorJodaKon2=EditorJodaKon[1];
		
		document.getElementById('Head_Mail').innerHTML=EditorJodaKon[0];
		
		EditoreMa = EditorJodaKon2.split('//INJA EDITOR AZ BAGHI MATN');
		
		eval(EditoreMa[0]);
		
		document.getElementById('Head_Mail').innerHTML+=EditoreMa[1];
	}
	
	if (colorwa == "Mail_IndexNextPre"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Mail_IndexNextPreAction"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Filterr_EachEmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		alert('فیلتر گذاری / برداری بر روی این فرستنده انجام شد ');
	}
	
	if (colorwa == "MashkookAction_EachEmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		alert('این فرستنده از حالت مشکوک خارج شد .');
	}
		if (colorwa == "FilterrAction_EachEmail"){
			document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		alert('فیلتر از این فرستنده برداشته شد');
		}
	if (colorwa == "CheckMark_Eachmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		alert('علامت گذاری / برداری این نامه انجام شد');	
	}
	if (colorwa == "SortCapaWebmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("CapaSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("CapaSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortCapaWebmailAction"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("CapaSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("CapaSort").src = "../images/webmail/05.gif"; }
	}
	
	
	if (colorwa == "SortDateWebmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("DateSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("DateSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortDateWebmailAction"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("DateSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("DateSort").src = "../images/webmail/05.gif"; }
	}
	
	
	
	if (colorwa == "SortSubjectWebmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("SubSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("SubSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortSubjectWebmailAction"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("SubSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("SubSort").src = "../images/webmail/05.gif"; }
	}
	
	
	if (colorwa == "SortNameWebmail"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("NameSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("NameSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "SortNameWebmailAction"){
		document.getElementById('Mail_Pack').innerHTML=xmlHttp.responseText;
		var vaziatok = document.getElementById('VaziatSort').innerHTML;
		if (vaziatok == 'ASC'){ document.getElementById('VaziatSort').innerHTML="DESC"; document.getElementById("NameSort").src = "../images/webmail/04.gif"; }
		if (vaziatok == 'DESC'){ document.getElementById('VaziatSort').innerHTML="ASC"; document.getElementById("NameSort").src = "../images/webmail/05.gif"; }
	}
	
	if (colorwa == "View_Mail"){
		//alert(Adadesh);
		// = "#F7F7F7";
		document.getElementById('View_Mail').innerHTML=xmlHttp.responseText;
		document.getElementById('Mail_Tab_Div').innerHTML = document.getElementById('Payam_Tab').innerHTML;
	}
	if (colorwa == "Delete_AlbumPic"){
		document.getElementById('User_Album_Pic').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "Fish_Reg"){
		alert('اطلاعات شما در سیستم ثبت شد و در اسرع وقت به درخواست شما رسیدگی خواهد شد');
		document.getElementById('reg_Fish').innerHTML="";
	}
	if (colorwa == "soorati"){
		
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_soorati.jpg')";
	document.body.style.backgroundColor = "#FFEAEA";
	}
	if (colorwa == "ghermez"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_banafsh.jpg')";
	document.body.style.backgroundColor = "#FFDDFF";
	}
	if (colorwa == "abi"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_blue.jpg')";
	document.body.style.backgroundColor = "#EBEBF5";
	}
	if (colorwa == "sabz"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_sabz.jpg')";
	document.body.style.backgroundColor = "#EAFFEA";
	}
	if (colorwa == "khakestari"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_khakestari.jpg')";
	document.body.style.backgroundColor = "#F2F2F2";
	}
	
	if (colorwa == "InviteFriend"){
		//alert(xmlHttp.responseText);
		document.getElementById('invite_DIVV').innerHTML="";
		if (xmlHttp.responseText == "ok"){
			alert('دعوت نامه شما برای فرد مورد نظرتان ارسال شد');
		}
	}
	
	if (colorwa == "Upload_Fi_Next"){
		document.getElementById('Upload_Fi_Content').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "Today_reg_Next"){
		document.getElementById('main_Today_Registerr').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "NextPre_SEARCH_Complete"){
		document.getElementById('Result_search_user_Result').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "NextPre_SEARCH_ById"){
		document.getElementById('Result_search_user_Result').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "NextPre_SEARCH_Search"){
		//alert('fgfg');
		document.getElementById('Result_search_user_Result').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "NextPre_SEARCH"){
		document.getElementById('Result_search_user').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Search_User"){
		document.getElementById('Result_search_user').innerHTML=xmlHttp.responseText;		
	}
	
	if (colorwa == "NextPreProfile"){
		Myresponseok = xmlHttp.responseText ;
updatenextprev = Myresponseok.split('<2Radif>');

	document.getElementById('myresult').innerHTML=updatenextprev[0];
	
	//alert('dfdf');
	
	document.getElementById('nextpreDiiv').innerHTML=updatenextprev[1];
	
	}
	
	
	if (colorwa == "Delete_mylistIgnors"){
		Myresponse = xmlHttp.responseText ;
update = Myresponse.split('<2Radif>');

	document.getElementById('Natije_DeleteUser1').innerHTML=update[0];
	document.getElementById('Natije_DeleteUser2').innerHTML=update[1];
	alert('کاربران انتخاب شده از لیست شما حذف و مجاز به برقراری ارتباط با شما نیستند');
		
	}
	
	if (colorwa == "Delete_mylist"){
	
	Myresponse = xmlHttp.responseText ;
update = Myresponse.split('<2Radif>');

	document.getElementById('Natije_DeleteUser1').innerHTML=update[0];
	document.getElementById('Natije_DeleteUser2').innerHTML=update[1];
	alert('کاربران انتخاب شده از لیست شما حذف شدند');
}
	

	//document.all.search0.disabled= false;
	if (colorwa == "YesFriend"){
		document.getElementById('Natije_Request').innerHTML=xmlHttp.responseText;	
		document.getElementById('Loader_Request').innerHTML="";
	}
	if (colorwa == "NoFriend"){
		//alert('fggf');
		document.getElementById('Natije_Request').innerHTML=xmlHttp.responseText;	
		document.getElementById('Loader_Request').innerHTML="";
	}
	if (colorwa == "Add_friend"){
		if (xmlHttp.responseText == "NOUSERNAME"){
			alert('این نام کاربری در سیستم وجود ندارد');
			document.getElementById('Add_friend').innerHTML="";
		}else{
			alert('درخواست شما برای اضافه کردن این کاربر به لیست خود ارسال شد ، لطفا تا تایید کاربر مورد نظر صبر نمایید');
			document.getElementById('Add_friend').innerHTML="";
		}
	}
	if (colorwa == "TedadeAlbum"){
		alert(xmlHttp.responseText);
		//document.getElementById('TEDADEErs').innerHTML=xmlHttp.responseText;
		document.getElementById('TEDADEErs').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "editmyprofile"){
		alert('مشخصات کاربری شما به روز شد .');
		document.getElementById('editmyProfile').innerHTML=xmlHttp.responseText;

	}
	if (colorwa == "SmileyRefre"){
				document.getElementById('EhsaseTo').innerHTML=xmlHttp.responseText;

	}
	if (colorwa == "RegisterNewUser"){
		//alert(xmlHttp.responseText);
		if (xmlHttp.responseText == "PicNotCorrect"){
			alert('عبارت موجود در تصویر به طور صحیح وارد نشده است');
		}else if (xmlHttp.responseText == "UsernameEmpty"){
			alert('نام کاربری وارد نشده است');
		}else if (xmlHttp.responseText == "PasswordEmpty"){
			alert('کلمه عبور وارد نشده است');
		}else if (xmlHttp.responseText == "EmailEmpty"){
			alert('آدرس ایمیل وارد نشده است');
		}else if (xmlHttp.responseText == "UsernameWasRepeat"){
			alert('این نام کاربری قبلا در سیستم ثبت شده است - لطفا نام کاربری دیگری انتخاب نمایید');
		}else if (xmlHttp.responseText == "EmailWasRepeat"){
			alert('کاربری با این آدرس ایمیل در سیستم وجود دارد ');
		}else if (xmlHttp.responseText == "Invalid character"){
			alert('در مشخصات وارد شده کاراکترهای غیر مجاز وجود دارد ، لطفا فقط از حروف و یا اعداد و یا کاراکتر  _ یا همان خط زیر استفاده نمایید');
		}else {
			document.all.Country.style.visibility = "hidden";
    	document.all.Gensiat.style.visibility = "hidden";
    	document.all.Mah.style.visibility = "hidden";
    	document.all.Rooz.style.visibility = "hidden";
		displayMessage('Action_Register.php?ID='+xmlHttp.responseText);return false;
		}
		
		
	}
	
	
	if (colorwa == "EditPassword"){
		//alert(xmlHttp.responseText);
		
		if (xmlHttp.responseText == 'NONONO'){
			alert('کلمه عبور قبلی وارد شده صحیح نمی باشد');
			document.getElementById('myEditPassDiv').innerHTML="";
		}else if(xmlHttp.responseText == "OkUpdated"){
			displayMessage('EditPassMess.php?ID='+xmlHttp.responseText);return false;
		}
	}
	
	if (colorwa == "CheckUsername"){
		if (xmlHttp.responseText == "YESReady"){
			document.getElementById('UserChecker').innerHTML="<p align='right'><font color='#008000' face='tahoma' size='1'> اين نام کاربري آماده ثبت است </font></p>";
		}
		if (xmlHttp.responseText == "NoUsed"){
			document.getElementById('UserChecker').innerHTML="<p align='right'><font color='#800000' face='tahoma' size='1'> اين نام کاربري قبلا ثبت شده است </font></p>";
		}
		
	
	}
	if (colorwa == "CheckUserPass"){
	//	alert(xmlHttp.responseText);
		if (xmlHttp.responseText == "NOWrong"){
			alert("نام کاربري يا کلمه عبور وارد شده صحيح نمي باشد");
			document.getElementById('Natije').innerHTML="";
		}
		if (xmlHttp.responseText == "YESCorrect"){
			//document.getElementById('Natije').innerHTML="<p align='right'><img src='../ajax-loader2.gif'><font face='tahoma' size='2'>لطفا كمي صبر نماييد </font></p>";
			document.forms["FriendForm"].submit( );
		}
		
	}
	
	if (colorwa == "CheckUserPass2"){
		if (xmlHttp.responseText == "NOWrong"){
			alert("نام کاربري يا کلمه عبور وارد شده صحيح نمي باشد");
			document.getElementById('LoginNextRegister').innerHTML = "";
			
		}
		if (xmlHttp.responseText == "YESCorrect"){
			
			document.forms["FriendRegister"].submit( );
		}
	}
	if (colorwa == "soorati"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_soorati.jpg')";
	document.body.style.backgroundColor = "#FFEAEA";
	}
	if (colorwa == "ghermez"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_banafsh.jpg')";
	document.body.style.backgroundColor = "#FFDDFF";
	}
	if (colorwa == "abi"){
	document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_blue.jpg')";
	document.body.style.backgroundColor = "#EBEBF5";
	}
	if (colorwa == "khakestari"){
		document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_khakestari.jpg')";
	document.body.style.backgroundColor = "#F2F2F2";
	}
	if (colorwa == "sabz"){
		document.getElementById("myTD").style.backgroundImage = "url('../images/back_tram/line_sabz.jpg')";
	document.body.style.backgroundColor = "#EAFFEA";
	}
	
}
}

function GetXmlHttpObject(handler){ 

var objXmlHttp=null;
if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") ;
return ;
}

if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP";
} 
try
{
objXmlHttp=new ActiveXObject(strName);
objXmlHttp.onreadystatechange=handler ;
return objXmlHttp;
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled");
return;
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onload=handler;
objXmlHttp.onerror=handler;
return objXmlHttp;
}
}
