/*									    \\\ /// 
										( @ @ ) 
/*===============================....o00o.(_).o00o...===============================*\
|| ################################################################################ ||
|| # 	       فكرة تقنية لتصميم وتطوير المواقع والاسكربتات الخاصة	 	          # ||
|| # --------------- هذا البرنامج من برمجة مبرمجي فكرة تقنية  ------------------  # ||
|| #    هذا الكود غير مسموح لك بالتعديل او التطوير علية الا بعد الموافقة على ذلك   # ||
|| #       من خلال فكرة تقنية ويمنع منعا باتا ازالة الحقوق البرمجية منة والا        # ||
|| #        ففكرة تقنية غير مسئولة عن الاضرار التى ستنتج عن ذلك مستقبلا 	          # ||
|| #		          جميع الحقوق محفوظة لفكرة تقنية 2009-2010                    # ||
|| # -------------  هذا البرنامج ليس مجاني | للاتصال بالدعم الفني ---------------- # ||
|| # 			      http://www.ti4it.com  | support@ti4it.com 		          # ||
|| ################################################################################ ||
\*==================================================================================*/
/*==================================================================================*\
|| ################################################################################ ||
|| # 			   Tecno Idea For Disigning & Developing WebSites		          # ||
|| # ------------------ Programming by  Tecno Idea Developers ------------------- # ||
|| #      This code is not Allowed you amendment or Development only after the    # ||
|| #	  approval from Tecno Idea and strictly prohibited the removal of         # ||
|| #      the rights to programming either Tecno Idea is not responsible          # ||
|| #	  for any damages will happen in the future                               # ||
|| #             All Copy rights Reserved To Tecno Idea 2009-2010                 # ||
|| # ---------- THIS IS NOT FREE SOFTWARE  | To Contact Support ----------------- # ||
|| # 			      http://www.ti4it.com  | support@ti4it.com 		          # ||
|| ################################################################################ ||
\*==================================================================================*/
var sec = 0;
var min = 0;
var hour = 0;
function stopwatch(text){
sec++;
if (sec == 60){
sec = 0;
min = min + 1;}
else {
min = min;}
if (min == 60){min = 0; hour += 1; }
if (sec<=9){ sec = "0" + sec; }
document.getElementById('stwa2').innerHTML=((hour<=9) ? "0"+hour : hour) + " : " + ((min<=9) ? "0" + min : min) + " : " + sec;
SD=window.setTimeout("stopwatch();", 1000);
}
<!--------------------------->
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 MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function astm_portal(x){
if(x==1){
document.getElementById('show_form').style.display='';
document.getElementById('show_img').style.display='none';
return false
}else if(x==2){
document.getElementById('show_form').style.display='none';
document.getElementById('show_img').style.display='';
return false
}else if(x==3){
document.getElementById('show_img').style.display='none';
document.getElementById('show_LangForm').style.display='';
return false
}else if(x==4){
document.getElementById('show_img').style.display='';
document.getElementById('show_LangForm').style.display='none';
return false
}
}

function astm_LogComp(){
if (document.FormLogComp.UserName.value=="" || document.FormLogComp.UserName.value=="اسم المستخدم"){
alert("من فضلك اكتب اسم المستخدم")
document.FormLogComp.UserName.focus()
return false
}
if (document.FormLogComp.PassWord.value=="" || document.FormLogComp.PassWord.value=="كلمة السر"){
alert("من فضلك اكتب كلمة السر")
document.FormLogComp.PassWord.focus()
return false
}
}

function astm_LogTested(){
if (document.FormLogTested.ID.value=="" || document.FormLogTested.ID.value=="السجل المدنى"){
alert("من فضلك اكتب رقم السجل المدنى")
document.FormLogTested.ID.focus()
return false
}
if (document.FormLogTested.email.value=="" || document.FormLogTested.email.value=="البريد الالكترونى"){
alert("من فضلك اكتب بريدك الالكترونى")
document.FormLogTested.email.focus()
return false
}
}

function astm_login(){
if (document.FormLog.UserName.value=="" || document.FormLog.UserName.value=="اسم المستخدم"){
alert("من فضلك اكتب اسم المستخدم")
document.FormLog.UserName.focus()
return false
}
if (document.FormLog.PassWord.value=="" || document.FormLog.PassWord.value=="كلمة السر"){
alert("من فضلك اكتب كلمة السر")
document.FormLog.PassWord.focus()
return false
}
}

function astm_forget(){
str = document.formforget.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formforget.email.focus();
return false;
}
}

function astm_Register(){
if (document.formRegister.name.value==""){
alert("من فضلك اكتب اسمك الثلاثى")
document.formRegister.name.focus()
return false
}

if (document.formRegister.user.value==""){
alert("من فضلك اكتب اسم المستخدم")
document.formRegister.user.focus()
return false
}

if (document.formRegister.pass.value==""){
alert("من فضلك اكتب كلمة السر")
document.formRegister.pass.focus()
return false
}

if (document.formRegister.pass2.value !== document.formRegister.pass.value){
alert("من فضلك تأكد من ان كلمة السر متساوية مع تأكيد كلمة السر")
document.formRegister.pass2.focus()
return false
}

if(document.formRegister.email.value!==""){
str = document.formRegister.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formRegister.email.focus();
return false;
}
if (document.formRegister.email2.value !== document.formRegister.email.value){
alert("من فضلك تأكد من ان البريد الالكتروني متساوى مع تأكيد البريد الالكتروني")
document.formRegister.email2.focus()
return false
}
}
if (document.formRegister.register_cod.value==""){
alert("من فضلك اكتب كود التاكيد");
document.formRegister.register_cod.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_print(){window.print();}

function astm_tellfriend(){
str = document.form_tell.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1)
{
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.form_tell.email.focus();
return false;
}
}

function astm_comment(){
/*
if (document.formcomment.name.value==""){
alert("من فضلك اكتب اسمك")
document.formcomment.name.focus()
return false
}
*/
if (document.formcomment.comment.value==""){
alert("من فضلك اكتب التعليق")
document.formcomment.comment.focus()
return false
}
if (document.formcomment.register_cod.value==""){
alert("من فضلك اكتب كود التاكيد");
document.formcomment.register_cod.focus()
return false
}
}

function astm_show_comment(x){
if(x==1){
 document.getElementById('show_com').style.display='';
 return false
}else{
 document.getElementById('show_com').style.display='none';
 return false
}
}

function astm_show(x){
if(x=="Report"){
 document.getElementById('Report').style.display='';
 document.getElementById('ReportForm').style.display='none';
return false
}else{
 document.getElementById('Report').style.display='none';
 document.getElementById('ReportForm').style.display='';
 return false
}
}


function astm_report(){
if (document.formReport.name.value==""){
alert("من فضلك اكتب اسمك")
document.formReport.name.focus()
return false
}
if (document.formReport.sgel.value==""){
alert("من فضلك اكتب رقم السجل")
document.formReport.sgel.focus()
return false
}
if (document.formReport.ID.value==""){
alert("من فضلك اكتب رقم الحوالة")
document.formReport.ID.focus()
return false
}
if (document.formReport.bank.value==""){
alert("من فضلك اكتب اسم البنك")
document.formReport.bank.focus()
return false
}
if (document.formReport.mobile.value=="" || isNaN(document.formReport.mobile.value)){
alert("من فضلك اكتب رقم الجوال ارقام")
document.formReport.mobile.focus()
return false
}
str = document.formReport.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formReport.email.focus();
return false;
}
if (document.formReport.name2.value==""){
alert("من فضلك اكتب اسمك")
document.formReport.name2.focus()
return false
}
if (document.formReport.sgel2.value==""){
alert("من فضلك اكتب رقم السجل")
document.formReport.sgel2.focus()
return false
}
if (document.formReport.register_cod.value==""){
alert("من فضلك اكتب كود التاكيد");
document.formReport.register_cod.focus()
return false
}
}

function astm_reportLog(){
if (document.formReportLog.sgel.value==""){
alert("من فضلك اكتب رقم السجل")
document.formReportLog.sgel.focus()
return false
}
}

function astm_GuestBook(){
if (document.formguest.name.value==""){
alert("من فضلك اكتب اسمك")
document.formguest.name.focus()
return false
}
str = document.formguest.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formguest.email.focus();
return false;
}
if (document.formguest.msg.value==""){
alert("من فضلك اكتب التوقيع")
document.formguest.msg.focus()
return false
}
if (document.formguest.register_cod.value==""){
alert("من فضلك اكتب كود التاكيد");
document.formguest.register_cod.focus()
return false
}
}

function astm_contact(){
if (document.formContact.name.value==""){
alert("من فضلك اكتب اسمك")
document.formContact.name.focus()
return false
}
if(document.formContact.mobile.value!=""){
if(isNaN(document.formContact.mobile.value)){
alert("من فضلك اكتب رقم الجوال ارقام")
document.formContact.mobile.focus()
return false
}
if(document.formContact.mobile.value.length <= "10"){
alert("من فضلك ادخل رقم الجوال الصحيح")
document.formContact.mobile.focus()
return false
}
}
str = document.formContact.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.formContact.email.focus();
return false;
}
if (document.formContact.msg.value==""){
alert("من فضلك اكتب نص الرسالة")
document.formContact.msg.focus()
return false
}
if (document.formContact.register_cod.value==""){
alert("من فضلك اكتب كود التاكيد");
document.formContact.register_cod.focus()
return false
}
}

function astm_pass(){
if(document.formpass.pass.value==""){
alert('من فضلك ادخل كلمة السر');
document.formpass.pass.focus();
return false;
}
if (document.formpass.pass.value !== document.formpass.rpass.value){
alert("من فضلك تأكد من ان كلمة السر تساوى تأكيد كلمة السر")
document.formpass.rpass.focus()
return false
}
}

function Astm_Agreement(x){
if(document.formAgree.Agree.checked==false){
if(x=="E"){
alert(" Sorry ,You can not complete the registration process before approve the agreement first");
}else{
alert("عفوا ! لاتستطيع اكمال عملية الاختبار قبل الموافقه على الاتفاقية أولاً");
}
document.formAgree.Agree.focus();
return false;
}
}

function astm_testedEN(){
if(document.form_tested.comp.value==""){
alert('Please select the company');
document.form_tested.comp.focus();
return false;
}
if(document.form_tested.pass.value==""){
alert('Please type the company password');
document.form_tested.pass.focus();
return false;
}
if(document.form_tested.name.value==""){
alert('Please type your name');
document.form_tested.name.focus();
return false;
}
if(document.form_tested.pid.value==""){
alert('Please type personal ID');
document.form_tested.pid.focus();
return false;
}
if(document.form_tested.age.value==""){
alert('Please select the age');
document.form_tested.age.focus();
return false;
}
if(document.form_tested.gender.value==""){
alert('Please select the gender');
document.form_tested.gender.focus();
return false;
}
if(document.form_tested.job.value==""){
alert('Please select the career');
document.form_tested.job.focus();
return false;
}
if(document.form_tested.job.value=="student" && document.form_tested.job2.value==""){
alert('Please select the class room');
document.form_tested.job2.focus();
return false;
}
if(document.form_tested.job.value=="employee" && document.form_tested.job3.value==""){
alert('Please select the sector');
document.form_tested.job3.focus();
return false;
}
str = document.form_tested.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('Please type your correct email');
document.form_tested.email.focus();
return false;
}
if (document.form_tested.mobile.value !=="" && isNaN(document.form_tested.mobile.value)){
alert("Please type your mobile number numeric")
document.form_tested.mobile.focus()
return false
}
if (document.form_tested.phone.value !=="" && isNaN(document.form_tested.phone.value)){
alert("Please type your phone number numeric")
document.form_tested.phone.focus()
return false
}
if(document.form_tested.adress.value==""){
alert('Please type your address');
document.form_tested.adress.focus();
return false;
}
}

function astm_tested(){
if(document.form_tested.comp.value==""){
alert('من فضلك اختار المؤسسة');
document.form_tested.comp.focus();
return false;
}
if(document.form_tested.pass.value==""){
alert('من فضلك ادخل كلمة سر المؤسسة');
document.form_tested.pass.focus();
return false;
}
if(document.form_tested.name.value==""){
alert('من فضلك اكتب اسم المختبر');
document.form_tested.name.focus();
return false;
}
if(document.form_tested.pid.value==""){
alert('من فضلك اكتب رقم السجل المدنى');
document.form_tested.pid.focus();
return false;
}
if(document.form_tested.age.value==""){
alert('من فضلك اختار العمر');
document.form_tested.age.focus();
return false;
}
if(document.form_tested.gender.value==""){
alert('من فضلك اختار الجنس');
document.form_tested.gender.focus();
return false;
}
if(document.form_tested.job.value==""){
alert('من فضلك اختار المهنة');
document.form_tested.job.focus();
return false;
}
if(document.form_tested.job.value=="student" && document.form_tested.job2.value==""){
alert('من فضلك اختار الصف الدراسى');
document.form_tested.job2.focus();
return false;
}
if(document.form_tested.job.value=="employee" && document.form_tested.job3.value==""){
alert('من فضلك اختار القطاع');
document.form_tested.job3.focus();
return false;
}
str = document.form_tested.email.value;
if (str.indexOf('@') == -1 || str.indexOf('.') == -1){
alert ('من فضلك ادخل البريد الالكتروني بشكل صحيح');
document.form_tested.email.focus();
return false;
}
if (document.form_tested.mobile.value !=="" && isNaN(document.form_tested.mobile.value)){
alert("من فضلك اكتب رقم الجوال ارقام")
document.form_tested.mobile.focus()
return false
}
if (document.form_tested.phone.value !=="" && isNaN(document.form_tested.phone.value)){
alert("من فضلك اكتب رقم الهاتف ارقام")
document.form_tested.phone.focus()
return false
}
if(document.form_tested.adress.value==""){
alert('من فضلك اكتب العنوان');
document.form_tested.adress.focus();
return false;
}
}

function astm_alert(){
if(document.formalert.note.value==""){
alert('من فضلك ادخل التنبية');
document.formalert.note.focus();
return false;
}
}

function astm_job(x){
if(x=="student"){
document.getElementById('divJob_1').style.display = '';
document.getElementById('divJob_2').style.display = 'none';
}else if(x=="employee"){
document.getElementById('divJob_1').style.display = 'none';
document.getElementById('divJob_2').style.display = '';
}else{
document.getElementById('divJob_1').style.display = 'none';
document.getElementById('divJob_2').style.display = 'none';	
}
}

function astm_emax(x){
for(i=1;i<=60;i++){
if(i==x){
document.getElementById('DIV_Q_'+x).style.display="";
}else{
document.getElementById('DIV_Q_'+i).style.display="none";
}
}
}
