
// ScriptGenerated =  ifModifiedSince = Fri, 02 Apr 2010 15:20:11 GMT sVar=ScriptGenerated

function ParseHiglitedMenu(mText,addDash){
	/*if(mText.toString().toLowerCase() == m_HiglitedMenuName.toString().toLowerCase()) {
		mText = "<span style=\"color: " + m_HiglitedColor + "\">" +   mText + "</span>";
	}*/
  	//if(addDash) mText += " &nbsp;<span class=\"XmenuDash\"></span>";
	return mText;
}


// ScriptGenerated =  ifModifiedSince = Fri, 02 Apr 2010 15:20:11 GMTEmpty// service =  http://www.brainfuse.com/login/csl.asp?a_id=
function openCloudPack(url){
	if ( !url ) url = '/includes/gateway.asp?redirectPage=' + encodeURIComponent('/jsp/curriculum/cloudPack.jsp?catType=3&viewStyle=explorer');
	var p = previewSettings;
	p.cloudPackSettings = (p.cloudPackSettings  || {width: 790, height:500, previewDiv:"cloudPackPreviewDiv",iFrmName:"ifrm"});
	p.generateDivAndIFrm(null, p.cloudPackSettings );
	p.preview(null, url, p.cloudPackSettings );
}
function openInPreviewer(url){
	if ( !url ) return;
	var p = previewSettings;
	p.generateDivAndIFrm(null, p);
	p.preview(null, url, p);
	
}
function openDemo(url){
			window.open (url);
}
	
function getJspURL(jspURI, noRoot){
	if ( leftJspRoot.substr(0,webRoot.length)==webRoot || noRoot)
		return webRoot+  "/includes/gateway.asp?redirectPage=" + escape(jspURI) ;
	else
		return webRoot+  "/includes/gateway.asp?redirectPage=" + escape(leftJspRoot + jspURI) ;
}
function gotoJspURL(jspURI, noRoot){
	document.location.href=getJspURL(jspURI, noRoot);
}
function gotoURL(uri){
	document.location.href=webRoot + uri;
}
function gotoSURL(uri){
	document.location.href=webSRoot + uri;
}

    var imageRoot    = "http://www.brainfuse.com/images";
    var webRoot      = "http://www.brainfuse.com";
    var webSRoot	= "https://www.brainfuse.com";
    var l_userType	 = "-1";
    var bannerTxt = '';
     var imageHeader = "";

    webfxMenuUseHover = true;
    webfxMenuHideTime = 500;
    webfxMenuShowTime = 200;
    webfxMenuImagePath	= imageRoot + "/";
    webfxMenuDefaultWidth   = 150;
    var menuBar     = new WebFXMenuBar;


// Begin Header Portion Writing =============================================================================================
    //document.write ("<div style='position: relative;height: 100px'>");


    document.write ("<table id='tblHeader' cellspacing='0' cellpadding='0'  class='tblHeader' style='position: relative;width: 100%;padding:0px 10px 0px 0px;' border=0>");
    document.write ('<tr>');
    document.write ("	<td id='tdImgLogo' valign='top' align='left'>");
    document.write ("<img id='imgHeader'  height='92' width='242' src='" + imageRoot + "/spacer.gif' border='0'/></td>");

    document.write ("	 <td id='tdempty' align='left' valign='top' style='' >");
    
    document.write ("<table border='0' cellpadding='0' cellspacing='0' style='top: 0px;left:0px;width: 100%;height:94px'>");
		document.write ("<tr>");

	
    document.write ("<td align='left' class='txtSmallLink' valign='middle' nowrap='nowrap'>");

	
    document.write (bannerTxt);
    
document.write ("</td><td  align='right' valign='bottom' style='padding-top: 3px;'>");
	
	document.write ('<div class="langBar"><a href="/login/changeLang.asp?l=en">English</a>&nbsp;<a href="/login/changeLang.asp?l=es">Espaņol</a></div>')
		
/// writing the login or the signout button

	document.write ('<a id="btnLoginHere" class="btn" href="'  + webRoot + '/login/index.asp" style="margin-bottom:5px"><div class="btn-common btn_abs btnLeft"></div>' +
					'<div class="btn-common btnMiddle"><p>Login</p></div>'+
					'<div class="btn-common btn_abs btnRight"></div></a>')

document.write ("");

document.write ("</td></tr></table>");

document.write ("</td>");


document.write ('</table>');
//document.write ('</div>');

document.write ('<table class="topEdge" cellspacing="0" cellpadding="0"><tr><td></td></tr></table>');


var openingTopNavBar ="<div id='divTopNavMenu' class='topNavTitle' ><table id=tblheaderInside   cellpadding=0 cellspacing=0 class='pageInnerSize topNavTitle'><tr> " ;
openingTopNavBar +="<td align=center valign=middle  > ";
var closingTopNavBar = "</td></tr></table>";///  holding the html closing tag for the top nav bar in case no user logged
document.write(openingTopNavBar );
// Begin Menu Items Portion Writing =============================================================================================


	var l_features	= 0;
	
	var AccountFeatures ={BRAINSHARE:2,TEST_PREP:4,HELP_NOW:8,REFERENCE: 16, 
		JOB_NOW:32,STUDY_ZONE:64, ALC_ENABLED:128,OPEN_CLASS_ROOM: 256, 
		TUTOR_SELF_SCHEDULE:512,
		COMPASS: 524288, 
		ACCU_TEST : 131072,
		hasFeature:function(feature){
			return ((l_features & feature))>0;
		}
	};



  	var NAMenu = new WebFXMenuBar;
    
	    NAMenu.add( new WebFXMenuButton( ParseHiglitedMenu("Home", true), "http://www.brainfuse.com/index.asp"));
     
        NAMenu.add( new WebFXMenuButton(  ParseHiglitedMenu("LIBRARIES", true)  , "/Home/INDEXLIB.ASP"));
        NAMenu.add( new WebFXMenuButton(  ParseHiglitedMenu("SCHOOLS", true) , "/Home/HomeNCLB.asp"));
        NAMenu.add( new WebFXMenuButton( ParseHiglitedMenu("COLLEGES & UNIVERSITIES", true) , "/Home/HomeColl_Univ.asp"));
     
    	NAMenu.add( new WebFXMenuButton( ParseHiglitedMenu("Contact Us", true) , "/company/contactus.asp"));
    
	NAMenu.add( new WebFXMenuButton("Demo", "javascript: openDemo ('http://youtu.be/mQKC8f__S_Y')"));    



 

    
    document.write(NAMenu);	
    
   // Closing The html tables
    document.write(closingTopNavBar);
document.write ("</div>");
/*    document.write ("</td>");
    document.write ('		</tr>');
    document.write ('		</table>');
    document.write ('	</td>');
    document.write ('</tr>');
    document.write ('</table>');*/
 //========================================================================================================================================
addEvent(window, "load", function(){
	var holidayRequest	= new AjaxRequest({url:"/jsp/calendar/holidays.jsp?a_id=", 
			onsuccess:function(xmlHttp){
				var xml=xmlHttp.responseXML;
				var l = xml.getElementsByTagName("message");
				if (l.length> 0 ){
					var m		= l.item(0);
					if ( m.getAttribute("status")=="-1" || m.getAttribute("status")==1){
						var div 	= document.createElement("div");
						var b		= document.getElementById("tdMainContent");
	
						b.insertBefore(div, b.firstChild);
						div.className="errMsg";			
						div.appendChild(document.createTextNode(m.firstChild.data));
					}
				}
				
			},onerror:function(xmlHttp){
				
			}	
		});
		holidayRequest.send();
	});


