/*==================================================================================*\
|| ################################################################################ ||
|| # 			   Saudi Look For Disigning & Developing WebSites				  #	|| 
|| # ---------------------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2008-2009 written by Saudi Look developers.    # ||
|| # This file may not be redistributed in whole or significant part.			  # ||
|| # ------------------------ THIS IS NOT FREE SOFTWARE ------------------------- # ||
|| # 				 http://www.saudilook.com | astm_desig@hotmail.com 			  # ||
|| ################################################################################ ||
\*==================================================================================*/

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_contact(){
if (document.astm_form.name.value ==""){
alert("من فضلك اكتب اسمك");
document.astm_form.name.focus();
return false;
}

if(document.astm_form.CID.value==""){
alert("من فضلك اكتب رقم السجل المدنى ارقام")
document.astm_form.CID.focus()
return false
}

if(isNaN(document.astm_form.CID.value)){
alert("من فضلك اكتب رقم السجل المدنى ارقام")
document.astm_form.CID.focus()
return false
}

if(isNaN(document.astm_form.phone.value)){
alert("من فضلك اكتب رقم الهاتف ارقام")
document.astm_form.phone.focus()
return false
}

if(document.astm_form.phone.value.length <= "5"){
alert("من فضلك ادخل رقم الهاتف الصحيح")
document.astm_form.phone.focus()
return false
}

if (document.astm_form.email.value !==""){
str = document.astm_form.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك اكتب البريد الالكتروني بشكل صحيح');
document.astm_form.email.focus();
return false;
}
}

if (document.astm_form.city.value ==""){
alert("من فضلك اختار المدينة");
document.astm_form.city.focus();
return false;
}

if (document.astm_form.title.value ==""){
alert("من فضلك اختار نوع الورشة");
document.astm_form.title.focus();
return false;
}


}