/*==================================================================================*\
|| ################################################################################ ||
|| # 			 Elbayt NetWork For Disigning & Developing WebSites				  #	|| 
|| # ---------------------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2007-2008 written by Elbayt NetWork developers.# ||
|| # This file may not be redistributed in whole or significant part.			  # ||
|| # ------------------------ THIS IS NOT FREE SOFTWARE ------------------------- # ||
|| # 				 http://www.elbayt.net | astm_desig@hotmail.com     		  # ||
|| ################################################################################ ||
\*==================================================================================*/

<!--------------------------->
 message = "مرحـبا بـك ^" +
                "فى موقع مدرسة الميزان^" +
                "www.l12l.com^" +
                "^"
  scrollSpeed = 25
  lineDelay   = 1500
  txt         = ""
  function scrollText(pos) {
    if (message.charAt(pos) != '^') {
      txt    = txt + message.charAt(pos)
      status = txt
      pauze  = scrollSpeed
    }
    else {
      pauze = lineDelay
      txt   = ""
      if (pos == message.length-1) pos = -1
    }
    pos++
    setTimeout("scrollText('"+pos+"')",pauze)
  }
scrollText(0)
<!--------------------------->

function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features);}

function clearf(object,text){ if(object.value == text){object.value = ""; object.focus();}} 
function setf(object,text){ if(object.value == ""){object.value = text; this.focus(); }}

function astm_print(){window.print();} 

function astm_friend(){
str = document.formfriend.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1)
{
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formfriend.email.focus();
return false;
}
}


function astm_expandIt(astm_id){
var tdiv = document.getElementById(astm_id);
var tpic = document.getElementById('astm'+astm_id);
if (tdiv.style.display=='') {
tdiv.style.display='none';
tpic.src='images/plus.gif';
tpic.title="افتح";
} else {
tdiv.style.display='';
tpic.src='images/min.gif';
tpic.title="اقفل";
}
}


function astm_comment(){
	if(document.formcomm.name.value==''){
	alert("من فضلك اكتب اسمك");
	document.formcomm.name.focus()
	return false
	}

	str = document.formcomm.email.value;
	if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
	alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
	document.formcomm.email.focus();
	return false;
	}

	if(document.formcomm.comment.value=='')	{
	alert("من فضلك اكتب تعليقك");
	document.formcomm.comment.focus()
	return false
	}
}



function astm_contact(){

if(document.formcontact.name.value==""){
alert("من فضلك اكتب اسم الراسل");
document.formcontact.name.focus()
return false
}

str = document.formcontact.e_mail.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formcontact.e_mail.focus();
return false;
}

if(document.formcontact.title.value==""){
alert("من فضلك اكتب عنوان الرسالة");
document.formcontact.title.focus()
return false
}

if(document.formcontact.msg.value==""){
alert("من فضلك اكتب الرسالة");
document.formcontact.msg.focus()
return false
}
}

function astm_ser(){

if(document.formser.SER.value=="" || document.formser.SER.value=="مفردات البحث"){
alert("من فضلك اكتب مفردات البحث");
document.formser.SER.focus()
return false
}
}
