var PopupWindow = ""
var hideTimeOut = "";
var hideLayerFlag = 0;
var myLayersArray = new Array();

//************************************************************************************************
function navigationMenu(strSection, strDirectory)
{
    document.writeln ("<div id='idMenu'>");
    document.writeln ("    <ul>");
    if(strSection == "aboutus")
        document.writeln ("        <li><a href='" + strDirectory + "aboutus.htm' class='selectedMenu'>about us</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "aboutus.htm'>about us</a></li>");
    if(strSection == "obstetrics")    
        document.writeln ("        <li><a href='" + strDirectory + "obstetrics.htm' class='selectedMenu'>obstetrics</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "obstetrics.htm'>obstetrics</a></li>");
    if(strSection == "gynecology")
        document.writeln ("        <li><a href='" + strDirectory + "gynecology.htm' class='selectedMenu'>gynecology</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "gynecology.htm'>gynecology</a></li>");
    if(strSection == "infertility")
        document.writeln ("        <li><a href='" + strDirectory + "infertility.htm' class='selectedMenu'>infertility</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "infertility.htm'>infertility</a></li>");   
    if(strSection == "registration") 
        document.writeln ("        <li><a href='" + strDirectory + "registration.htm' class='selectedMenu'>registration</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "registration.htm'>registration</a></li>");
    if(strSection == "contactus")
        document.writeln ("        <li><a href='" + strDirectory + "contactus.htm' class='selectedMenu'>contact us</a></li>");
    else
        document.writeln ("        <li><a href='" + strDirectory + "contactus.htm'>contact us</a></li>");  
    if(strSection != "home")
        document.writeln ("        <li><a href='" + strDirectory + "index.htm'>home</a></li>");     
    document.writeln ("    </ul>");
    document.writeln ("</div>");
}

//************************************************************************************************
function OpenPopUp(windowsname,address,width,height,scrollbars,resizable)
{
	var w = 480, h = 340;
		
	if (document.all || document.layers)
	{
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	
	var popW = width, popH = height;
	
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	if(PopupWindow)
	{
		if(!PopupWindow.closed)
		{
			PopupWindow.close();
		}
	}
	PopupWindow = window.open(address, windowsname,'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=1,toolbar=0,location=0,menubar=0,directories=0');
	PopupWindow.focus();
}

//************************************************************************************************
function SelectAll(amount,formName,fieldName)
{
	for(i=0; i < amount; i++)
	{
		strSelected = 'document.' + formName + '.' + fieldName + '[' + i + '].selected=true;'
		eval(strSelected);
	}
}

//************************************************************************************************
function DeSelectAll(amount,formName,fieldName)
{
	for(i=0; i < amount; i++)
	{
		strSelected = 'document.' + formName + '.' + fieldName + '[' + i + '].selected=false;'
		eval(strSelected);
	}
}

//************************************************************************************************
function defaultFocus()
{
	if (document.forms[0][0])
			document.forms[0][0].focus();
}


