var isExtended_new = 0;
var height_new = 342;
var width_new = 628;
var slideDuration_new = 1000;
var opacityDuration_new = 2000;

function extendContract_new(){
	
	//document.getElementById("eqform").style.paddingLeft = "150px";
	
	if(isExtended_new == 0){
		document.getElementById("eqcontainer").width = "860px";
		sideBarSlide_new(height_new, height_new, 0, width_new);
		
		sideBarOpacity_new(0, 1);
	
		isExtended_new = 1;
		
		// make expand tab arrow image face left (inwards)
	//	$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/(\.[^.]+)$/, '-active$1');
		//$('sideBarTab_new').childNodes[0].src="http://ignitee.com/images_new/rightarrow.gif";
		//$('sideBarTab_new').childNodes[0].alt ="Click to Close Navigation";
		
		
	}
	else{
		
		sideBarSlide_new(height_new, height_new, width_new, 0);
		
		sideBarOpacity_new(1, 0);
		
		isExtended_new = 0;
		
		// make expand tab arrow image face right (outwards)
		
	//	$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/-active(\.[^.]+)$/, '$1');
		//$('sideBarTab_new').childNodes[0].src="http://ignitee.com/images_new/leftarrow.gif";
		//$('sideBarTab_new').childNodes[0].alt ="Click to Navigate";
		//$('sideBarTab').onClick=function(){document.getElementById('headertxt').style.display='none';}
		setTimeout('document.getElementById("eqcontainer").width = "20px"',1000);
	}
}

function sideBarSlide_new(fromHeight, toHeight, fromWidth, toWidth){
		var myEffects = new Fx.Styles('sideBarContents_new', {duration: slideDuration_new, transition: Fx.Transitions.linear});
		myEffects.custom({
			 'height': [fromHeight, toHeight],
			 'width': [fromWidth, toWidth]
		});
/*		myEffects.addEvents({
    'complete': function() {
        alert('Done.');
    }
	});
*/
		
}

function sideBarOpacity_new(from, to){
		var myEffects = new Fx.Styles('sideBarContents_new', {duration: opacityDuration_new, transition: Fx.Transitions.linear});
		myEffects.custom({
			 'opacity': [from, to]
		});
}

function init_new(){
	$('sideBarTab_new').addEvent('click', function(){extendContract_new()});
}

window.addEvent('load', function(){init_new()});
//$('sideBarTab').childNodes[0].onClick=function(){document.getElementById('headertxt').style.display='none';}