if (screen.width != 800 || screen.height != 600)
left_corner_x =593;
else
left_corner_x =483;

if (screen.width != 800 || screen.height != 600)
left_corner_y =165;
else
left_corner_y =165;


var back_color = '#E6E6E6'; // the background color of dropdown menu 
var border_color = '#ffffff'; // the color of dropdown menu border
var border_size  = '1'; // the width of dropdown menu border
var menu_width   = '149'; // the width of dropdown menu 
//// Don't change these parameters
var delay  = 500; /////
var active_layer_id = -1;  /////
var on_layer_id  = -1;  /////
var buff_id  = -1;  /////
/// ----------------------------
// menu content; the dropdown menus themselfs between '' and items of every dropdown menu are diveded by |; 
// 

menu_content = new Array ('<a href=departments.htm target=main class=subMenu>&nbsp;القسم التأهيلي</a>| <a href=departments.htm#takhasos target=main class=subMenu>&nbsp;قسم التخصص</a> | <a href=departments.htm#master target=main class=subMenu>&nbsp;قسم الدراسات التخصصية</a>','<a href=society.htm target=main class=subMenu>&nbsp;نبذة عن الجمعية</a>| <a href=support.htm target=main class=subMenu>&nbsp;دعم الجمعية</a>');


// check browser version

NS4 = (document.layers) ? 1 : 0;

function layer_enter (id)
{
	on_layer_id = id;
}

function layer_exit (id)
{
	on_layer_id = - 1;
	setTimeout ('hide('+ id +')', delay/5);
}

function menu_enter (id)
{
	if (buff_id >= 0)
		hide (buff_id);

	show (id);
	active_layer_id = id;
}

function menu_exit (id)
{
	setTimeout ('hide('+ id +')', delay);
	buff_id = active_layer_id;
	active_layer_id = -1;
}

function show (id)
{
	if (!NS4)
		document.all['Menu' + id].style.visibility = "visible";
	else
		document.layers[id].visibility = "visible";
}

function hide (id)
{
	if (active_layer_id != id && on_layer_id != id)
	{
		if (!NS4)
			document.all['Menu' + id].style.visibility = "hidden";
		else
			document.layers[id].visibility = "hide";
	}
}

function generate_layers ()
{
	for (i = 0; i < menu_content.length; i++)
	{
		if (!NS4)
			layer_header = '<div id=Menu' + i +
					   	   ' onMouseOver="layer_enter (' + i + ');" onMouseOut = "layer_exit (' + i + ');"' +
				           ' style="visibility: hidden; position: absolute; left: ' + (left_corner_x - menu_width*i) +
				           '; top: ' + left_corner_y + ';">';
		else
			layer_header = '<layer id=' + i +
						   ' onMouseOver="layer_enter (' + i + ');" onMouseOut = "layer_exit (' + i + ');"' +
						   ' visibility=hide left=' + (left_corner_x + menu_width*i) +
						   ' top = ' + left_corner_y + '>';
		layer_header += '<table dir=rtl width=' + menu_width + ' cellpadding=0 cellspacing=0 border=0>' +
					    '<td bgcolor=' + border_color + '><table width=' + menu_width + ' cellpadding=3 ' +
					    'cellspacing=' + border_size + ' border=0><td width=' + menu_width + ' bgcolor=' + back_color + '>';
		elements = menu_content[i].split (/\s*\|\s*/);
		layer_body = '';
		for (j = 0; j < elements.length; j++)
		{
			layer_body += elements[j];	
			if ((NS4 && j < elements.length - 1) || (!NS4 && j < elements.length - 1))
				layer_body += '<hr width=' + (menu_width - 10) + ' size=1 color='+ border_color + '>';
		}
		layer_footer = '</td></table></td></table>';
		if (!NS4)
			layer_footer += '</div>';
		else
			layer_footer += '</layer>';
		document.writeln (layer_header + layer_body + layer_footer);
	}

}

generate_layers ();

<!--

function MouseOver(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = clrOver;
	}
}
function MouseOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	}
}
function MouseClick(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
    }
}

//-->
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

<!--
var chowCard = "";
function DisplayImages(a, b, pageName) {
        if (chowCard.open){
                chowCard.close();
                chowCard = window.open(pageName,"AlSAMAH",'toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width='+a+',height='+b+'');
        }else{
                chowCard = window.open( pageName,"AlSAMAH",'toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width='+a+',height='+b+'');
        }
        chowCard.focus;
}

// -->

