// Boilerplate.js 	1 Jan 2006 	[GF]

// determine if in "staging" or production
var staging = 0; local = 0;
var stuff = new Array();
stuff = location.href.split('/');

if(stuff[2].split(":")[0]=='127.0.0.1') {local=1;};
if(stuff[3].toUpperCase()=='STAGING'){staging=1;};

var blurb = 'GRACE is OPEN Tuesday - Saturday 11am - 5pm.';

var today=new Date(); 
var Dec01=new Date('01 Dec 2011');
var diff=today-Dec01;
if(diff<0)
{
blurb += '<br>' +diff+ '<br>See the <a href="../exhibitions/CuratorCall.htm">Curator job posting</a>.'	;
}

blurb='2012 Winter Focus Exhibitions are OPEN<br>January 6 &mdash; February 17.'
	+ '<div class="para">'
		+ 'Gallery Hours are Tuesday &mdash; Saturday 11am -5pm.</div>'
	+ '<div class="para">'
		+ 'Join us for the Reception with the Artists on Saturday, January 21 from 5 - 7pm'
	+ '<div class="para">'
		+ 'Gallery Talk will begin at 5:30pm</div>';

var now = new Date();
var nowMon = now.getMonth();	
var nowYear= now.getFullYear();
var nowDay = now.getDate(); if(nowMon.toString(10).length==1){ nowMon=("0"+nowMon);}
var nowDate= nowYear + '/' + nowMon + '/' + nowDay;

var now30 =  nowYear + '/' + (nowMon*1+1) + '/' + nowDay;

var newFlag='<span style="color:white;font-weight:bold;background-color:red;">New!</span>'

var Page = document.title;

var footer = '<br>' 
if(local==0) // count hits if not local
{
	footer += '<img src="http://www.GFarnsworth.com/home/Hitcounter.cfm?site=GRACE&Page=' 
					+ Page + '" width="1" height="1" border="0"><br>'
};
	footer += '<div align="center" class="footer">'
	+	'<div style="width:100%; background-color:gray; height:1em;">'
	+ '<div align="right"><a class="footer" href="http://www.GFarnsworth.com">Webmaster</a></div>'
	+ '</div>'
	+	'GreaterReston<b style="color:black;">ArtsCenter</b> '
	+	'12001 Market Street Suite #103 Reston, VA 20190<br>';
			
		if(nowMon == 7) // August (SKIP for 2010)
			{footer +=  '<b>(Closed in August. Limited administrative hours. Call for assistance)</b><br>' }
		else footer +='Gallery Hours: Tuesday through Saturday 11am-5pm<br>';
	
	footer += 'v.703.471.9242 &nbsp; &nbsp; f.703.471.0952<br>'
	+	'&copy; ' + now.getFullYear() + ' GreaterReston<b style="color:black;">ArtsCenter</b>'
	+ '</div>';

/*** 
This is the menu creation code - place it right after your body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/

//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 0

//Menu properties   
oCMenu.pxBetween=5
oCMenu.fromLeft=10
oCMenu.fromTop=50   
oCMenu.rows=1 
oCMenu.menuPlacement="left"
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
if(local==1){oCMenu.onlineRoot="/GRACE/new" ;}; // needed for local operation
if(staging==1){oCMenu.onlineRoot="/STAGING" ;}; // needed for STAGING
oCMenu.resizeCheck=1 
oCMenu.wait=1000 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=1
oCMenu.barWidth="100%"
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=0 
oCMenu.barY=50 // below main title   
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//Level properties - ALL properties have to be specified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=150
oCMenu.level[0].height=20 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=1
oCMenu.level[0].borderY=1
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"

//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this

oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[1].width=oCMenu.level[0].width-2
/*oCMenu.level[1].height=22*/
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-2)/2+20
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"

//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to specify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=150
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"

/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

// ABOUT   
var aboutText = new Array;
var aboutLink = new Array;
m=0;aboutText[m] = 'Home Page' ; 					aboutLink[m] = '..' ;
m++;aboutText[m] = 'GRACE Blog';					aboutLink[m] = 'http://discovergrace.wordpress.com/';
m++;aboutText[m] = 'About GRACE' ; 				aboutLink[m] = '/About/' ;
m++;aboutText[m] = 'Directions & Hours' ; aboutLink[m] = '/About/directions.htm' ;
m++;aboutText[m] = 'Board of Directors' ; aboutLink[m] = '/About/Board.htm' ;
m++;aboutText[m] = 'Staff' ; 							aboutLink[m] = '/About/Staff.htm' ;
m++;aboutText[m] = 'Contact us' ; 				aboutLink[m] = '/About/ContactGrace.htm';
m++;aboutText[m] = 'Facility Rental' ;		aboutLink[m] = '/About/Rental.htm';
//alert(aboutLink[2]);
oCMenu.makeMenu('top0','','About GRACE','/About/','',170) ;
	oCMenu.makeMenu('sub00','top0',aboutText[0],aboutLink[0],'',160);
	oCMenu.makeMenu('sub01','top0',aboutText[1],aboutLink[1],'',160);
	oCMenu.makeMenu('sub02','top0',aboutText[2],aboutLink[2],'',160)
	oCMenu.makeMenu('sub03','top0',aboutText[3],aboutLink[3],'',160)
	oCMenu.makeMenu('sub04','top0',aboutText[4],aboutLink[4],'',160)
	oCMenu.makeMenu('sub05','top0',aboutText[5],aboutLink[5],'',160)
	oCMenu.makeMenu('sub06','top0',aboutText[6],aboutLink[6],'',160)
	
// EDUCATION      
var eduText = new Array;
var eduLink = new Array;
// ---------- See also leftMenu.js ----------
m=0;eduText[m] = 'About Education'; 		eduLink[m] = '/Education/';
//m++;eduText[m] = 'Blog';		eduLink[m] = 'http://discovergrace.wordpress.com/';
m++;eduText[m] = 'Art in the Schools'; 			eduLink[m] = '/Education/artintheschools.htm';
m++;eduText[m] = 'Adult Programs';					eduLink[m] = '/Education/AdultPrograms.htm';
m++;eduText[m] = 'Teen Programs';						eduLink[m] = '/Education/TeenPrograms.htm';
m++;eduText[m] = 'Youth & Family Programs'; eduLink[m] = '/Education/Youth.htm';
/*
m++;eduText[m] = '<span class="red">Summer Camp Programs</span>';
 		eduLink[m] = '/Education/Summer.htm';
m++;eduText[m] = '<span style="color:green;">Girl Scout Programs</span>';
	 	eduLink[m] = '/Education/GirlScoutPrograms.htm';
*/
m++;eduText[m] = 'Archives'; 								eduLink[m] = '/Education/Archived.htm';
m++;eduText[m] = 'Internships';							eduLink[m] = '/Education/Internship.htm';

oCMenu.makeMenu('top1','','Education','/Education','',150) ;
	oCMenu.makeMenu('sub10','top1',eduText[0],eduLink[0],'',180);
	oCMenu.makeMenu('sub11','top1',eduText[1],eduLink[1],'',180);
	oCMenu.makeMenu('sub12','top1',eduText[2],eduLink[2],'',180);
	oCMenu.makeMenu('sub13','top1',eduText[3],eduLink[3],'',180);
	oCMenu.makeMenu('sub14','top1',eduText[4],eduLink[4],'',180);
	oCMenu.makeMenu('sub15','top1',eduText[5],eduLink[5],'',180);
	oCMenu.makeMenu('sub16','top1',eduText[6],eduLink[6],'',180);
	//oCMenu.makeMenu('sub17','top1',eduText[7],eduLink[7],'',180);
	//oCMenu.makeMenu('sub18','top1',eduText[8],eduLink[8],'',180);
	//oCMenu.makeMenu('sub19','top1',eduText[9],eduLink[9],'',180);
//if(m>9)
	//{oCMenu.makeMenu('sub20','top1',eduText[10],eduLink[10],'',180);};
//alert(eduLink[1]);

//  EXHIBITIONS    	
var exText = new Array;
var exLink = new Array;
m=0;exText[m] = 'About Exhibitions';	exLink[m] = '/Exhibitions/';
m++;exText[m] = 'Current';		exLink[m] = '/Exhibitions/Current.htm';
/*if(staging+local){m++;exText[m] = 'Reviews';		exLink[m] = '/Reviews';};
m++;exText[m] = 'Employment Opportunity';	
																exLink[m] = '/Exhibitions/CuratorCall.htm';
*/
m++;exText[m] = 'Upcoming';					exLink[m] = '/Exhibitions/Coming.htm';
m++;exText[m] = 'Archives';					exLink[m] = '/Archives';
m++;exText[m] = 'Videos';						exLink[m] = '/Archives/Videos.htm';
m++;exText[m] = 'Market St.';				exLink[m] = '/Exhibitions/MarketStreet.htm';
m++;exText[m] = 'Catalogs';					exLink[m] = '/Exhibitions/Catalogs.htm';
m++;exText[m] = 'Calls for Entry'; 	exLink[m] = '/Exhibitions/Exhibit-Opps.htm';
m++;exText[m] = 'Continuing';		   	exLink[m] = '/Exhibitions/Continuing.htm';

oCMenu.makeMenu('top2','','Exhibitions</span>','/Exhibitions/','',150);
	oCMenu.makeMenu('sub20','top2',exText[0],exLink[0],'',150)
	oCMenu.makeMenu('sub21','top2',exText[1],exLink[1],'',150)
	oCMenu.makeMenu('sub22','top2',exText[2],exLink[2],'',150)
	oCMenu.makeMenu('sub23','top2',exText[3],exLink[3],'',150)
	oCMenu.makeMenu('sub24','top2',exText[4],exLink[4],'',150)
	oCMenu.makeMenu('sub25','top2',exText[5],exLink[5],'',150)
	oCMenu.makeMenu('sub26','top2',exText[6],exLink[6],'',150)
	oCMenu.makeMenu('sub27','top2',exText[7],exLink[7],'',150)
	oCMenu.makeMenu('sub28','top2',exText[8],exLink[8],'',150)
	//oCMenu.makeMenu('sub29','top2',exText[9],exLink[8],'',150)
	
//  SUPPORT       
var supText = new Array;
var supLink = new Array;
m=0;supText[m] = 'About Support'	;supLink[m] = '/support/';
m++;supText[m] = 'Annual Meeting'	;supLink[m] = '/support/AnnualMeeting.htm';
m++;supText[m] = 'Artist Members'	;supLink[m] = '/support/Artists.htm';
m++;supText[m] = 'Mailing List'		;supLink[m] = '/support/MailingList.htm';
m++;supText[m] = 'Contribute'			;supLink[m] = '/support/Contribute.htm';
m++;supText[m] = 'Membership'			;supLink[m] = '/support/Membership.htm';
m++;supText[m] = 'Facility Rental';supLink[m] = '/support/FacilityRental.htm';
m++;supText[m] = 'Volunteers'			;supLink[m] = '/Education/Volunteer.htm';

oCMenu.makeMenu('top4','','Join & Support','/support/','',160); 
	oCMenu.makeMenu('sub40','top4',supText[0],supLink[0],'',150);
	oCMenu.makeMenu('sub41','top4',supText[1],supLink[1],'',150);
	oCMenu.makeMenu('sub42','top4',supText[2],supLink[2],'',150);
	oCMenu.makeMenu('sub43','top4',supText[3],supLink[3],'',150);
	oCMenu.makeMenu('sub44','top4',supText[4],supLink[4],'',150);
	oCMenu.makeMenu('sub45','top4',supText[5],supLink[5],'',150);
	oCMenu.makeMenu('sub46','top4',supText[6],supLink[6],'',150);
	oCMenu.makeMenu('sub47','top4',supText[7],supLink[7],'',150);


//   Festival     	
var festText = new Array;
var festLink = new Array;
m=0;festText[m] = 'About the Festival';	
	festLink[m] = 'http://NorthernVirginiaFineArtsFestival.org/index.html';
m++;festText[m] = '<b class="red">Volunteer</b>'	;
		festLink[m] = 'http://northernvirginiafineartsfestival.org/GFMS/VolunteerForm1.php';
//m++;festText[m] = '2010 Festival';			festLink[m] = '/Festival/Index2010.htm'
//m++;festText[m] = 'Festival Sponsors'	;	festLink[m] = '/Festival/sponsors.htm'
//m++;festText[m] = 'Festival Publicity';	festLink[m] = '/Festival/Publicity.htm';
/*
*/
//m++;festText[m] = 'Awards';				festLink[m] = '/Festival/Awards.htm'
//m++;festText[m] = 'Artists';				festLink[m] =  '/Festival/Artists2011.htm'
//m++;festText[m] = 'Preview&nbsp;Party';	festLink[m] =  '/Festival/PreviewParty2011.htm'
//m++;festText[m] = 'Festival&nbsp;Map';		festLink[m] =  '/Festival/Map2011.htm'
//m++;festText[m] = 'Childrens&nbsp;Art&nbsp;Tent';festLink[m] =  '/Festival/children2011.htm'
//m++;festText[m] = 'Entertainment';			festLink[m] =  '/Festival/performances2011.htm'
//m++;festText[m] = 'Artist Application';	festLink[m] = '/Festival/ArtistApplication.htm'
//m++;festText[m] = 'Jurors'/* & Judges'*/;				festLink[m] = '/Festival/Jurors.htm'
m++;festText[m] = 'Contact us';	
		festLink[m] = 'http://NorthernVirginiaFineArtsFestival.org/contact.htm'

oCMenu.makeMenu('top3','','Fine Arts Festival','http://NorthernVirginiaFineArtsFestival.org','',170);
	oCMenu.makeMenu('sub30','top3',festText[0],festLink[0],'',200);
	oCMenu.makeMenu('sub31','top3',festText[1],festLink[1],'',200);
	//oCMenu.makeMenu('sub32','top3',festText[2],festLink[2],'',200);
	//oCMenu.makeMenu('sub33','top3',festText[3],festLink[3],'',200);
	//oCMenu.makeMenu('sub34','top3',festText[4],festLink[4],'',200);
	if(m>4) oCMenu.makeMenu('sub35','top3',festText[5],festLink[5],'',200);
	if(m>5) oCMenu.makeMenu('sub36','top3',festText[6],festLink[6],'',200);
	if(m>6) oCMenu.makeMenu('sub37','top3',festText[7],festLink[7],'',200);
	if(m>7) oCMenu.makeMenu('sub38','top3',festText[8],festLink[8],'',200);
	if(m>8) oCMenu.makeMenu('sub39','top3',festText[9],festLink[9],'',200);
	if(m>9) oCMenu.makeMenu('sub3a','top3',festText[10],festLink[10],'',200);

// Collector's Choice   

/*
if(staging || local)
{
var choiceText = new Array;
var choiceLink = new Array;
m=0;choiceText[m] = 'About Collector\'s Choice' ; choiceLink[m] = '/CollectorsChoice/Index.html' ;
m++;choiceText[m] = 'Collector\'s Choice Preview' ; choiceLink[m] = '/CollectorsChoice/CChoice-Preview.htm?Typ=C' ;
m++;choiceText[m] = 'Collector\'s Choice Thumbnails' ; choiceLink[m] = '/CollectorsChoice/CChoice-Thumbnails.htm?Typ=C' ;
m++;choiceText[m] = 'Collector\'s Choice Wish List' ; choiceLink[m] = '/CollectorsChoice/Wishlist.htm' ;

//m++;choiceText[m] = 'Silent Auction Preview' ; choiceLink[m] = '/CollectorsChoice/CChoice-Preview.htm?Typ=S' ;
//m++;choiceText[m] = 'Silent Auction Thumbnails' ; choiceLink[m] = '/CollectorsChoice/CChoice-Thumbnails.htm?Typ=S' ;

oCMenu.makeMenu('top5','','Collector\'s Choice','/CollectorsChoice/Index.html','',200) 
	oCMenu.makeMenu('sub50','top5',choiceText[0],choiceLink[0],'',300);
	oCMenu.makeMenu('sub51','top5',choiceText[1],choiceLink[1],'',300);
	oCMenu.makeMenu('sub52','top5',choiceText[2],choiceLink[2],'',300)
	oCMenu.makeMenu('sub53','top5',choiceText[3],choiceLink[3],'',300)
	//oCMenu.makeMenu('sub54','top5',choiceText[4],choiceLink[4],'',300)
	//oCMenu.makeMenu('sub55','top5',choiceText[5],choiceLink[5],'',300)
};
*/	
//Leave this line - it constructs the menu
oCMenu.construct()		;


