// JavaScript Document

function tw_showcol(override) {

	var theValue = WA_CookieObj.getValue('display');
	
	if (override) { theValue = override; }

	if (theValue == 'show') {
		//alert('show the right column');
		tw_showhide_column('show');
	
	} 
	if (theValue == 'hide') {
		//alert('hide the right column');
		tw_showhide_column('hide');
	}
}

function tw_showhide_column(toggle) {
	if (toggle == 'hide') {
		/*
		1. Swap link to "Show Right Column".
		2. Hide container background.
		3. Hide right column content, all elements.
		4. Set cookie.
		*/
		TW_changeStyle('HideColumn','hideme');
		TW_changeStyle('ShowColumn','hideshowlink');
		
		TW_changeStyle('Container','containernobackground');
		TW_changeStyle('RightColumn','hideme');
		/* any other divs that are in this column and absolutely positioned */
		/*
		var thisid = document.getElementById("OrderSummaryBox");
		if (thisid != undefined) {
			TW_changeStyle('OrderSummaryBox','hideme');
		};
		*/
		TW_changeStyle('eServContent','withoutrightcolumn');
		
		
	}
	if (toggle == 'show') {
		/*
		1. Swap link to "Show Right Column".
		2. Hide container background.
		3. Hide right column content, all elements.
		4. Set cookie.
		*/
		TW_changeStyle('ShowColumn','hideme');
		TW_changeStyle('HideColumn','hideshowlink');
		
		TW_changeStyle('Container','containerwithbackground');
		TW_changeStyle('RightColumn','showrightcolumn');
		/* any other divs that are in this column and absolutely positioned */
		TW_changeStyle('eServContent','withrightcolumn');
		
		
	}
	
	return true;
}
