// [+] Intranet settings
	var extranet_url = 'http://www.waxcenter.com';
// [-] Intranet settings 

// [+] First level index
	var ewc_images = Array();
	var ewc_links_top		= 0;
	var ewc_links_nav		= 1;
	var ewc_links_bottom	= 2;
// [-] First level index

// [+] Second level index: top images
	ewc_images[ewc_links_top] = Array();
	var my_account	= 0;
	var separator1	= 1;
	var my_cart		= 2;
	var separator2	= 3;
	var track_order	= 4;
// [-] Second level index: top images

// [+] Second level index: nav images
	ewc_images[ewc_links_nav] = Array();
	var waxing			=  0;
	var products		=  1;
	var promos			=  2;
	var testimonials	=  3;
	var support			=  4;
	var facilities		=  5;
	var news			=  6;
	var brochure		=  7;
	var franchise		=  8;
	var locations		=  9;
	var contact			= 10;
// [-] Second level index: nav images

// [+] Second level index: bottom images
	ewc_images[ewc_links_bottom] = Array();
	var career		= 0;
	var our_vision	= 1;
	var blog		= 2;
	var intranet	= 3;
// [-] Second level index: bottom images

// [+] Third level index
	var img_href	= 0;
	var img_img_on	= 1;
	var img_img_off	= 2;
	var img_width	= 3;
	var img_height	= 4;
// [-] Third level index

// [+] top images (img_href, img_img_on, img_img_off, img_width, img_height)
	ewc_images[ewc_links_top][my_account] 		= [extranet_url + "/my_account.php",					"media/img/header/top_my_account_on.png", 	"media/img/header/top_my_account_off.png", 		219, 	36];
	ewc_images[ewc_links_top][separator1] 		= ["",													"media/img/header/top_link_separator.png", 	"media/img/header/top_link_separator.png", 		1, 		36];
	ewc_images[ewc_links_top][my_cart] 			= [extranet_url + "/cart.php",							"media/img/header/top_my_cart_on.png", 		"media/img/header/top_my_cart_off.png", 		81, 	36];
	ewc_images[ewc_links_top][separator2] 		= ["",													"media/img/header/top_link_separator.png", 	"media/img/header/top_link_separator.png", 		1, 		36];
	ewc_images[ewc_links_top][track_order] 		= [extranet_url + "/track_order.php",					"media/img/header/top_track_order_on.png", 	"media/img/header/top_track_order_off.png", 	113, 	36];
// [-] top images (img_href, img_img_on, img_img_off, img_width, img_height)

// [+] nav images (img_href, img_img_on, img_img_off, img_width, img_height)
	ewc_images[ewc_links_nav][waxing] 			= [extranet_url + "/waxing_services.php",				"media/img/header/nav_waxing_on.png", 		"media/img/header/nav_waxing_off.png", 			76, 	27];
	ewc_images[ewc_links_nav][products] 		= [extranet_url + "/products.php",						"media/img/header/nav_products_on.png", 	"media/img/header/nav_products_off.png", 		89, 	27];
	ewc_images[ewc_links_nav][promos] 			= [extranet_url + "/promotions.php",					"media/img/header/nav_promos_on.png", 		"media/img/header/nav_promos_off.png", 			76, 	27];
	ewc_images[ewc_links_nav][testimonials] 	= [extranet_url + "/testimonials.php",					"media/img/header/nav_testimonials_on.png", "media/img/header/nav_testimonials_off.png", 	109, 	27];
	ewc_images[ewc_links_nav][support] 			= [extranet_url + "/support.php",						"media/img/header/nav_support_on.png", 		"media/img/header/nav_support_off.png", 		76, 	27];
	ewc_images[ewc_links_nav][facilities] 		= [extranet_url + "/facilities.php",					"media/img/header/nav_facilities_on.png", 	"media/img/header/nav_facilities_off.png", 		82, 	27];
	ewc_images[ewc_links_nav][news] 			= [extranet_url + "/news.php",							"media/img/header/nav_news_on.png", 		"media/img/header/nav_news_off.png", 			64, 	27];
	ewc_images[ewc_links_nav][brochure] 		= [extranet_url + "/brochure_request.php",				"media/img/header/nav_brochure_on.png", 	"media/img/header/nav_brochure_off.png", 		87, 	27];
	ewc_images[ewc_links_nav][franchise] 		= [extranet_url + "/franchise_interests.php",			"media/img/header/nav_franchise_on.png", 	"media/img/header/nav_franchise_off.png", 		144, 	27];
	ewc_images[ewc_links_nav][locations] 		= [extranet_url + "/locations.php",						"media/img/header/nav_locations_on.png", 	"media/img/header/nav_locations_off.png", 		94, 	27];
	ewc_images[ewc_links_nav][contact] 			= [extranet_url + "/contact_us.php",					"media/img/header/nav_contact_on.png", 		"media/img/header/nav_contact_off.png", 		83, 	27];
// [-] nav images (img_href, img_img_on, img_img_off, img_width, img_height)

// [+] bottom images (img_href, img_img_on, img_img_off, img_width, img_height)
	ewc_images[ewc_links_bottom][career] 		= [extranet_url + "/career_opportunities.php",			"media/img/footer/career_on.png", 			"media/img/footer/career_off.png", 				115, 	14];
	ewc_images[ewc_links_bottom][our_vision] 	= [extranet_url + "/vision_and_history.php",			"media/img/footer/our_vision_on.png", 		"media/img/footer/our_vision_off.png", 			115, 	16];
	ewc_images[ewc_links_bottom][blog] 			= [extranet_url + "/blog",								"media/img/footer/blog_on.png", 			"media/img/footer/blog_off.png", 				115, 	15];
	ewc_images[ewc_links_bottom][intranet] 		= [               "/intranet/",							"media/img/footer/intranet_on.png", 		"media/img/footer/intranet_off.png",			115, 	15];
// [-] bottom images (img_href, img_img_on, img_img_off, img_width, img_height)

///////////////////////////////////////////
function render_links(area, current_page) {
///////////////////////////////////////////
	
	// Links to render
	var to_render = '';
	switch(area) {
		
		///////////////////
		case ewc_links_top:
		///////////////////      
			
			for(i = 0; i < ewc_images[ewc_links_top].length; i++) {
				if(i == current_page)
					ewc_images[ewc_links_top][i][img_img_off] = ewc_images[ewc_links_top][i][img_img_on];
				
				to_render = to_render + (ewc_images[ewc_links_top][i][img_href] == ''? '': '<a href="' + ewc_images[ewc_links_top][i][img_href] + '">')
									  + '<img src="' + ewc_images[ewc_links_top][i][img_img_off] + '" '
									  +      'width="' + ewc_images[ewc_links_top][i][img_width] + '" '
									  +      'height="' + ewc_images[ewc_links_top][i][img_height] + '" '
									  +      'onMouseOver="this.src = \''+ewc_images[ewc_links_top][i][img_img_on]+'\'" '
									  +      'onMouseOut="this.src = \''+ewc_images[ewc_links_top][i][img_img_off]+'\'">'
									  + (ewc_images[ewc_links_top][i][img_href] == ''? '': '</a>') + '\n'
			} // end for
			break;
			
		///////////////////
		case ewc_links_nav:
		///////////////////      
			
			// Page choosing
			for(i = 0; i < ewc_images[ewc_links_nav].length; i++) {
				if(i == current_page)
					ewc_images[ewc_links_nav][i][img_img_off] = ewc_images[ewc_links_nav][i][img_img_on];
				
				to_render = to_render + (ewc_images[ewc_links_nav][i][img_href] == ''? '': '<a href="' + ewc_images[ewc_links_nav][i][img_href] + '">')
									  + '<img src="' + ewc_images[ewc_links_nav][i][img_img_off] + '" '
									  +      'width="' + ewc_images[ewc_links_nav][i][img_width] + '" '
									  +      'height="' + ewc_images[ewc_links_nav][i][img_height] + '" '
									  +      'onMouseOver="this.src = \''+ewc_images[ewc_links_nav][i][img_img_on]+'\'" '
									  +      'onMouseOut="this.src = \''+ewc_images[ewc_links_nav][i][img_img_off]+'\'">'
									  + (ewc_images[ewc_links_nav][i][img_href] == ''? '': '</a>') + '\n'
			} // end for
			break;
			
		//////////////////////
		case ewc_links_bottom:
		//////////////////////
			
			// Page choosing
			for(i = 0; i < ewc_images[ewc_links_bottom].length; i++) {
				if(i == current_page)
					ewc_images[ewc_links_bottom][i][img_img_off] = ewc_images[ewc_links_bottom][i][img_img_on];
				
				to_render = to_render + (ewc_images[ewc_links_bottom][i][img_href] == ''? '': '<a href="' + ewc_images[ewc_links_bottom][i][img_href] + '">')
									  + '<img src="' + ewc_images[ewc_links_bottom][i][img_img_off] + '" '
									  +      'width="' + ewc_images[ewc_links_bottom][i][img_width] + '" '
									  +      'height="' + ewc_images[ewc_links_bottom][i][img_height] + '" '
									  +      'onMouseOver="this.src = \''+ewc_images[ewc_links_bottom][i][img_img_on]+'\'" '
									  +      'onMouseOut="this.src = \''+ewc_images[ewc_links_bottom][i][img_img_off]+'\'">'
									  + (ewc_images[ewc_links_bottom][i][img_href] == ''? '': '</a>') + '<br>\n'

			} // end for
			break;
			
	} // end switch
	
	document.write(to_render);

	
/////////////////
} // end function
/////////////////
