/**
 *
 * @access public
 * @return void
 **/
function retu() {
document.getElementById('sendform').style.display="block";
document.getElementById('sendres').style.display="none";
}
function sendsms(){
resname=document.getElementById('name11');
resnum=document.getElementById('num11');
resemail=document.getElementById('email11');
if (resname.value.indexOf(" ")==-1) {alert (' لطفا نام خود را كامل وارد نماييد.'); resname.select(); return false;}
if (resnum.value=='' || resname.value=='') {alert ('لطفا اطلاعات را تكميل نماييد.');	return false;}
if (resnum.value.toUpperCase() != resnum.value.toLowerCase() || resnum.value.substring(0,2)!=09 || resnum.value.length!=11 ) {
alert('شماره تلفن همراه اشتباه است اصلاح فرماييد.');
resnum.select();
return false;
}

if (resemail.value.indexOf("@")==-1) {alert (' ايميل را اصلاح فرماييد.'); resemail.select(); return false;}

	var ajp = new AjaxPages();
		resu=ajp.load("sms/sendform.php?name1="+encodeURIComponent(resname.value)+"&email1="+resemail.value+"&num1="+resnum.value);
document.getElementById('sendform').style.display="none";
sendres1=document.getElementById('sendres');
sendres1.style.display="block";
if (resu=='yes') {
sendres1.innerHTML="<font size=1><BR>اطلاعات شما با موفقيت<br> ارسال شد.<br><BR></a></font>";
} else sendres1.innerHTML="<font size=1><BR>به دليل بروز خطا اطلاعات ثبت نشد.<br><BR></a></font>";
resnum.value="";
resname.value="";
resemail.value="";
window.setTimeout("retu()", 3000);
}





function timee(panel,tablep,i,drop1,j)
{ i*=j;
window.setTimeout("drop('"+panel+"','"+tablep+"',"+i+",'"+drop1+"')", 100);
}
function drop(panel,tablep,i,drop1,j)
{
	var sr=document.getElementById('arrow');
	 //sr.src="images/arrow1.gif";
	if (tablep=='messtable') defaulth=150; else defaulth=1;
	var hh=document.getElementById(tablep).clientHeight;
	var hBox=document.getElementById(panel).clientHeight;
	var panel1=document.getElementById(panel);
	if (drop1==null) {if (i==null && hBox<defaulth+1 ) drop1="open1"; else drop1="close1";}
	if (drop1=="open1") {
			if (i==null) i=defaulth;
			if (j==null) j=1.5;
			if (i<hh+defaulth) {
			panel1.style.height=i;
			} else {panel1.style.height=hh;
			sr.src="images/arrow1.gif";
			return false; }
	} else {
			if (i==null) i=hh;
			if (j==null) j=1.5/2;
			panel1.style.height=i;
			if (i<defaulth) { panel1.style.height=defaulth;
			sr.src="images/arrow.gif";
			return false;}
	}
	timee(panel,tablep,i,drop1,j);
}


/*
function cimg() {

	if (sr.src=="http://localhost/hhkh/images/arrow.gif") {
	} else {
	sr.src='images/arrow.gif';
	}

}*/
