/////////////////////////////////////
//          SMSPages1.0            //
//     TO More Scripts Visit:      //
//      http://www.saphp.com       //
//      http://www.saphp.net       //
//      http://www.saphp.org       //
//     E-Mail:saphp@saphp.com      //
//           sajava.js             //
/////////////////////////////////////

function SendSMS()
{

	if(isEmpty(SMSForm.SenderName.value))
   	{
	alert("لقد نسيت كتابة اسم المرسل");
	SMSForm.SenderName.value="";
	SMSForm.SenderName.focus();
	return;
	}

	if(isEmpty(SMSForm.SMS.value))
   	{
	alert("لقد نسيت كتابة الرسالة");
	SMSForm.SMS.value="";
	SMSForm.SMS.focus();
	return;
	}

SMSForm.submit();
}
function isEmpty(str)
	{
	var i;
	var len;
	if( str == null )
	return true;

	len = str.length;
	for( var i=0; i<len; i++ )
   	{
	if( str.charAt(i) != ' ')
	return false;
	}
	return true;
	}
function GoToFourm(FourmList) { 
newPage = FourmList.options[FourmList.selectedIndex].value 
if (newPage != "") { window.location.href = newPage } 
} 
function CopyMsg()
{
	var SMS = eval('document.MsgForm.SMS')
	SMS.select();
	if (document.all)
	{
		SMSVar = SMS.createTextRange();
		SMSVar.execCommand('Copy');
		window.alert('تم نسخ الرسالة إلى الحافظة')
	}
}
function ShowSMS(saphp,SEND,Date,SID) {
  SMS.innerHTML = saphp+"<br><br><br><br><br>المرسل:<br>"+SEND+"<br><Br><BR><br><BR>أرسلت في:<br>"+Date;
  MsgForm.SMS.value=saphp;
  MsgForm.SID.value=SID;
  CopyImg.innerHTML = "<a style='cursor:hand' onclick='CopyMsg();'><img border='0' src='images/copy.gif' alt='نسخ الرسالة إلى الحافظة'></a><input border='0' alt='حفظ الرسالة' src='images/save.gif' name='SAVE' type='image'>";
}
