
function Favorite(){
if(document.all){ window.external.AddFavorite(window.document.location,window.document.title);}
}

function Out(td)
{
    if(document.getElementById||(document.all && !(document.getElementById)))
    {
        td.style.Color="#000000";
    }
}


/**/
var isReady=true;
var stitle='{title} {titles}  {title}'.replace(/[^a-zء-ي0-9]/gi," ");

function popIt2(h,w)
{
    var n = window.open('', 'formwin', 'scrollbars=yes,height='+h+',width='+w+',status=no');
    return true;
}

function block_switsh(bid)
{
    if (bid.style.display=='none')
    {
        bid.style.display='';
        }else{
        bid.style.display='none';
    }
}
function printPage()
{
    if (window.print)
    {
        agree = confirm('تم تحويل الصفحة لطور الطباعة. \n\nOK اضغط على الموافق للطباعة?');
        if (agree) window.print();
    }
}

function doSaveAs()
{
    if (document.execCommand)
    {
        if (isReady)
        {
            window.document.execCommand("SaveAs",1,stitle);
        }
    }else
    {
        alert('Feature available only in Internet Exlorer 4.0 and later.');
    }
}

function changeto(highlightcolor)
{
    source=event.srcElement
    if (source.tagName=="TR"||source.tagName=="TABLE")
    return
    while(source.tagName!="TD")
    source=source.parentElement
    if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
    source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor)
{
    if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
    return
    if (event.toElement!=source)
    source.style.backgroundColor=originalcolor
}
//
startList = function()
{
    // code for IE
    if(!document.body.currentStyle) return;
    var subs = document.getElementsByName('submenu');
    for(var i=0; i<subs.length; i++)
    {
        var li = subs[i].parentNode;
    if(li && li.lastChild.style)
    {
        li.onmouseover = function()
        {
            this.lastChild.style.visibility = 'visible';
        }
        li.onmouseout = function()
        {
            this.lastChild.style.visibility = 'hidden';
        }
    }
}
}
window.onload=startList;


