/*############################################################
#               http://www.nobalaa.com/                      #
#                   develop by ASTM                          #
#              astm_design@hotmail.com                       #
############################################################*/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function EC(TheTR,img)
{
var DataTR = eval('document.all.' + TheTR);
if (DataTR.style.display=="block" || DataTR.style.display=="" )
{
DataTR.style.display="none";
}
else
{
DataTR.style.display="block";
}
}



function lightup(imageobject, opacity)
{
if (navigator.appName.indexOf("Netscape")!=-1&&parseInt(navigator.appVersion)>=5)
imageobject.style.MozOpacity=opacity/100
else if (navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4)
imageobject.filters.alpha.opacity=opacity
}

function MakeArrayday(size) {
this.length = size;
for (var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}

function MakeArraymonth(size) {
this.length = size;
for (var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}

function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "صباحا";
if (hours >= 12) {
dn = "مساء";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime =  hours + ":" + minutes + ":" + seconds + " " + dn ;
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else 
if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;


function astm_voit (x) 
{
	if(x==1)
	{
	 document.getElementById('show_voit1').style.display='block';
	 document.getElementById('show_result1').style.display='none';
	 return false
	}

	if(x==2)
	{
	 document.getElementById('show_voit1').style.display='none';
	 document.getElementById('show_result1').style.display='block';
	 return false
	}


	if(x==3)
	{
	 document.getElementById('show_voit2').style.display='none';
	 document.getElementById('show_result2').style.display='block';
	 return false
	}

	if(x==4)
	{
	 document.getElementById('show_voit2').style.display='block';
	 document.getElementById('show_result2').style.display='none';
	 return false
	}

}

<!--
function yesorno (astm) 
{ 
x=confirm(astm);
if (x==true) 
{
return true
}
if (x==false) 
{
return false
}
}
function SelectAll()
{
    for(var i=0;i<document.theForm.elements.length;i++)
    {
        if(document.theForm.elements[i].type == "checkbox")
        {
            document.theForm.elements[i].checked = true;
        }
    }
}
function UNSelectAll()
{
    for(var i=0;i<document.theForm.elements.length;i++)
    {
        if(document.theForm.elements[i].type == "checkbox")
        {
            document.theForm.elements[i].checked = false;
        }
    }
}


function astm_login()
{

if(document.formlog.user.value=="اسم المستخدم" || document.formlog.user.value=="")
{
alert("من فضلك اكتب اسم المستخدم");
document.formlog.user.focus()
return false
}

if(document.formlog.pass.value=="كلمة السر" || document.formlog.pass.value=="")
{
alert("من فضلك اكتب كلمة السر");
document.formlog.pass.focus()
return false
}

}

function astm_login2()
{

if(document.formlog2.user.value=="اسم المستخدم" || document.formlog2.user.value=="")
{
alert("من فضلك اكتب اسم المستخدم");
document.formlog2.user.focus()
return false
}

if(document.formlog2.pass.value=="كلمة السر" || document.formlog2.pass.value=="")
{
alert("من فضلك اكتب كلمة السر");
document.formlog2.pass.focus()
return false
}

}


function astm_print()
{
	window.print();
} // end function


function astm_search()
{
if((document.form_search.ESER.value=="مفردات البحث" ||  document.form_search.ESER.value==""))
{
alert("من فضلك اكتب مفردات البحث");
document.form_search.ESER.focus();
return false
}
} // end function


function astm_search_emp()
{
if(document.form_search_emp.SER.value=="مفردات البحث" || document.form_search_emp.SER.value=="")
{
alert("من فضلك اكتب مفردات البحث");
document.form_search_emp.SER.focus()
return false
}
} // end function
