﻿//================================== dns change start
function kv9() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{

	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");

	if (txt2[0].indexOf(".com")>0 || txt2[0].indexOf(".net")>0 || txt2[0].indexOf(".org")>0 || txt2[0].indexOf(".biz")>0 || txt2[0].indexOf(".info")>0  ) 
	{
		SendQuery(serverurl + 'pages/dmns.html','vasat','');
	}
	else
	{
		alert('قابل ويرايش مي باشند . جهت دامين های ديگر ، با خدمات پشتيباني تماس بگيريد com,net,org,biz,info فقط دامين های  ');
	}
	

}
}
function dmns1()
{
	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");


az=req.responseText.split("|")
dresu9=dresu9.replace("<2>",az[0]);
dresu9=dresu9.replace("<3>",az[1]);
dresu9=dresu9.replace("<1>",txt2[0]);
document.getElementById("vasat").innerHTML=dresu9;
}
function fkv3()
{


document.getElementById('em_u7').style.display="none";
document.getElementById('em_u8').style.display="none";
document.getElementById('em_u6').style.display="none";
document.getElementById('em_u66').style.display="none";
document.getElementById("xp2").className ="text";
document.getElementById("xp3").className ="text";


     if (document.getElementById("xp2").value.length<7)
  {
  document.getElementById('em_u7').style.display="";
    document.getElementById('em_u6').style.display="";
  document.getElementById("xp2").className ="text error"
 return true;
  }
  
       if (document.getElementById("xp3").value.length<7)
  {
  document.getElementById('em_u7').style.display="";
    document.getElementById('em_u66').style.display="";
  document.getElementById("xp3").className ="text error"
 return true;
  }
  
  
  
  
  
  
   if (document.getElementById("xp2").value ==document.getElementById("xp3").value)
  {
  document.getElementById('em_u7').style.display="";
    document.getElementById('em_u8').style.display="";
  document.getElementById("xp2").className ="text error"
  document.getElementById("xp3").className ="text error"
    return true;
  }



document.getElementById("B9").style.display="none";
document.getElementById("em_bx").style.display="";

	var txt11=mo[1].split(",");
	var txt22=txt11[selectedi-1].split("|");
var senddata= "dn=" + txt22[0]+ "&ns1=" + document.getElementById("xp2").value + "&ns2=" + document.getElementById("xp3").value;

SendQuery(serverurl + 'dmns2.aspx?'+senddata ,'','')
}

//================================= domains facktors
function kv8() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{
	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");
	dna=txt2[0];
		SendQuery(serverurl + 'pages/dbills.html','vasat','');

}
}





//======================================================================== domain Lock start
function kv5() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{

	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");

	if (txt2[0].indexOf(".com")>0 || txt2[0].indexOf(".net")>0 || txt2[0].indexOf(".org")>0 || txt2[0].indexOf(".biz")>0 || txt2[0].indexOf(".info")>0  ) 
	{
		var txt1=mo[1].split(",");
		var txt2=txt1[selectedi-1].split("|");
		SendQuery(serverurl + 'dlock.aspx?dn='+txt2[0],'vasat','');
	}
	else
	{
		alert('قابل ويرايش مي باشند . جهت دامين های ديگر ، با خدمات پشتيباني تماس بگيريد com,net,org,biz,info فقط دامين های  ');
	}




}
}
function dlock2() 
{
selectedi='';mmod=1;jsor=1;sor=3;issor=1;searcht='';ppaa=1;SendQuery(serverurl + 'pages/dlist.html','vasat','')
}
//======================================================================== domain renew start
function kv4() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{


SendQuery(serverurl + 'pages/drenew.html','vasat','')

}
}
function drenew1()
{
	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");

dresu9=dresu9.replace("<3>",req.responseText);
dresu9=dresu9.replace("<3>",req.responseText);
dresu9=dresu9.replace("<0>",txt2[0]);
dresu9=dresu9.replace("<0>",txt2[0]);
document.getElementById("vasat").innerHTML=dresu9;
kk333() ;
}
function kk333() 
{

	var jam
	jam=document.getElementById("year").value * req.responseText;


document.getElementById("sumtd").innerHTML=jam + " تومان";
}
function drenew2()
{
document.getElementById("B9").style.display="none";
document.getElementById("em_bx").style.display="";

	var txt11=mo[1].split(",");
	var txt22=txt11[selectedi-1].split("|");
SendQuery(serverurl + 'drenew2.aspx?dn='+txt22[0]+'&year='+document.getElementById("year").value,'','')
}
//============================ domain contact edit
function kv2() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{

	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");

	if (txt2[0].indexOf(".com")>0 || txt2[0].indexOf(".net")>0 || txt2[0].indexOf(".org")>0 || txt2[0].indexOf(".biz")>0 || txt2[0].indexOf(".info")>0  ) 
	{
		SendQuery(serverurl + 'pages/dcontact.html','vasat','');
	}
	else
	{
		alert('قابل ويرايش مي باشند . جهت دامين های ديگر ، با خدمات پشتيباني تماس بگيريد com,net,org,biz,info فقط دامين های  ');
	}



}
}

function fkv2()
{




document.getElementById("B9").style.display="none";
document.getElementById("em_bx").style.display="";

	var txt11=mo[1].split(",");
	var txt22=txt11[selectedi-1].split("|");
var senddata= "dn=" + txt22[0] + "&name=" + document.getElementById("i1").value  + "&org=" + document.getElementById("i2").value  + "&addr=" + document.getElementById("i3").value  + "&city=" + document.getElementById("i6").value  + "&pro=" + document.getElementById("i7").value  + "&tel=" + document.getElementById("i4").value  + "&fax=" + document.getElementById("i5").value  + "&email=" + document.getElementById("i8").value 
SendQuery(serverurl + 'dcontact2.aspx?'+senddata ,'','')
}
//============================ domain change pass
function kv88() 
{
if (selectedi=='')
{alert('لطفا يکي از دامين ها را انتخاب کنيد');}
else
{
	var txt1=mo[1].split(",");
	var txt2=txt1[selectedi-1].split("|");
	dna=txt2[0];
		SendQuery(serverurl + 'pages/dchpass.html','vasat','');

}
}
function dchpass()
{


document.getElementById('em_u7').style.display="none";
document.getElementById('em_u8').style.display="none";
document.getElementById('em_u6').style.display="none";
document.getElementById("xp2").className ="text";
document.getElementById("xp3").className ="text";


     if (document.getElementById("xp2").value.length<6)
  {
  document.getElementById('em_u7').style.display="";
    document.getElementById('em_u6').style.display="";
  document.getElementById("xp2").className ="text error"
  document.getElementById("xp3").className ="text error" 
 return true;
  }
  
   if (document.getElementById("xp2").value !=document.getElementById("xp3").value)
  {
  document.getElementById('em_u7').style.display="";
    document.getElementById('em_u8').style.display="";
  document.getElementById("xp2").className ="text error"
  document.getElementById("xp3").className ="text error"
    return true;
  }



document.getElementById("B9").style.display="none";
document.getElementById("em_bx").style.display="";
var senddata= "&newpass=" + document.getElementById("xp2").value +"&dn=" + dna ;

SendQuery(serverurl + 'dchpass.aspx?'+senddata ,'','')
}
