function SubmitMaillingList()
{
	if(Form1.EMail.value !="")
	{ 
		var goodEmail = Form1.EMail.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if (goodEmail)
		{
	if(Form1.Join.checked)
		window.open("Mailing.aspx?Action=Join&Mail="+Form1.EMail.value,"","width=300,height=400,scrolbar=no",false);
	else
		window.open("Mailing.aspx?Action=Move&Mail="+Form1.EMail.value,"","width=300,height=400,scrolbar=no",false);
		} 
		else 
		{
			alert('من فضلك أدخل بريد الكترونى صحيح.')
	   		Form1.EMail.focus()
	   		Form1.EMail.select()
	   	}
	}
	else
	{
				alert("من فضلك أدخل البريد الالكترونى.");
				return;

	}
}
function handleEnter (field, event) 
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if (keyCode == 13) 
		SubmitSearchWord();
}      

////////////////////////////////////////////
function OpenTellFriend()
{
	window.open("TellFriend.aspx","","width=450,height=450,scrollbars=yes",false);
}
function OpenGuestBook()
{
	//window.open("SignGuestBook.aspx","","",false);
	window.open("NewSignGuestBook.aspx","","",false);
}
//////////////////////////////////////
function SubmitRawiName()
{
	if(Form1.RawiName.value !="")
	{ 
		window.document.location.href = "SearchRowa.aspx?RawiName=" + Form1.RawiName.value;
	}
	else
	{
		alert("من فضلك أدخل اسم الراوي.");
		return;
	}
}
function SubmitAyaName()
{
	if(Form1.RawiName.value !="")
	{ 
		window.document.location.href = "SearchQuran.aspx?Text=" + Form1.RawiName.value;
	}
	else
	{
		alert("من فضلك أدخل اسم االآية.");
		return;
	}
}
//////////////////////////////////////
function SubmitBookName()
{	
	if(Form1.BookName.value !="")
	{ 
		window.document.location.href = "SearchBooks.aspx?BookName=" + Form1.BookName.value;
	}
	else
	{
		alert("من فضلك أدخل اسم الكتاب.");
		return;
	}
}
function ShowAllBooks()
{	
	
	window.document.location.href = "SearchBooks.aspx";
	
}//ShowAllAuthors()
function ShowAllAuthors()
{	
	
	window.document.location.href = "SearchAuthors.aspx";
	
}
////////////////////////////
function SubmitAuthorName()
{
	if(Form1.BookName.value !="")
	{ 
		window.document.location.href = "SearchAuthors.aspx?BookName=" + Form1.BookName.value;
	}
	else
	{
		alert("من فضلك أدخل اسم المصنف.");
		return;
	}
}


/////////////////////////////
function SubmitSearchWord()
{
	if(Form1.SearchWord.value !="")
	{ 
		window.document.location.href = "Search.aspx?Text=" + Form1.SearchWord.value;
		
	}
	else
	{
			
		

				alert("من فضلك أدخل كلمة البحث.");
				return;
	}
}//
function SubmitSearchWord1()
{
	if(Form1.SearchWord.value !="")
	{ 
		window.document.location.href = "Search.aspx?Text=" + Form1.SearchWord.value;
		return;
	}
	else
	{
		alert("من فضلك أدخل كلمة البحث.");
		
	}
	
}//
//////////////////////////
function SubmitQuranSearchWord()
{
	if(Form1.SearchWordsQuran.value !="")
	{ 
		window.document.location.href = "QuranSearchR.aspx?Text=" + Form1.SearchWordsQuran.value;
	}
	else
	{
				alert("من فضلك أدخل كلمة البحث.");
				return;
	}
}//
function SubmitSearcAttraf()
{
	if(Form1.SearchText.value !="")
	{ 
		window.document.location.href = "SearchAttraf.aspx?Text=" + Form1.SearchText.value;
	}
	else
	{
				alert("من فضلك أدخل كلمة البحث.");
				return;
	}
}
///////////////////////////////////////
function ShowHelp()
{
	var fullPath = window.document.location.href;
	lastSlash = fullPath.lastIndexOf("/");
	var FileName = fullPath.substring(lastSlash+1,fullPath.length - 5);
	//alert( FileName );
	window.open("Help.aspx?From=" + FileName,"","width=300,height=400,scrolbar=no",false);
	return;
}
////////////////////////////////////
function Open(id)
{
//	window.open("ShortRawiInfo.aspx?RawiID=" + id,"","width=550,height=750,scrollbars=yes",false);

window.open("ShortRawiInfo.aspx?RawiID=" + id);
}
function OpenSearchScope()
{
	window.open("MScope.aspx","","width=500,height=390,scrollbars=yes",1);
}

function Getcount()
{
	var x = document.GetElementById("myHiddenField").value
	document.Form1.Down1_TextBox1.value = 5454;
}