//**************************************************
// uverse.js
// Author: Tong Lim
// Version: 1.3
// Date: 6/21/2008
// Update: 4/24/2009
//***************************************************

var version = navigator.appVersion;
var IE6 = (version.indexOf("MSIE 6.0") != -1) ? true : false;
var IE = (version.indexOf("MSIE") != -1) ? true : false;
var popUpDivName = new Array();


function showPopup(divId,  blockBG, closeButton) {
	try {
		var messDivObj, buttonDivObj, v_Width, vButtonStr=null;
		if (divId != undefined) {
			messDivObj = commonFunc.getElementObj(divId);
			buttonDivObj = commonFunc.getElementObj(divId + "Button");
			if (buttonDivObj != null) vButtonStr = buttonDivObj.innerHTML;
			v_Width = messDivObj.style.width.substring(0, messDivObj.style.width.length - 2);
			showPopupByStr(messDivObj.innerHTML,  messDivObj.title, blockBG, closeButton, vButtonStr, v_Width);
		}
	} catch(e) {
		// do nothing
	}
} // end of showPopup

function showFormPopup(title, pwidth) {
	try {
		var overLayDiv_id;
		overLayDiv_id = commonFunc.overLayDiv(true);
		commonFunc.getElementObj("formPopUpTitle").innerHTML = title;
		//var popupDiv = commonFunc.getElementObj("formPopupDiv");
		//popupDiv.style.width = pwidth + "px";
		commonFunc.getElementObj("formPopupDiv").style.width = pwidth + "px" ; 
		commonFunc.divPopUp('formPopupDiv',true);
	} catch(e) {
		// do nothing
	}
} // end of showFormPopup



function showPopupByStr(str,  title, blockBG, closeButton, buttonStr, pWidth, pHeight) {
	try {
		var overLayDiv_id, popupDiv, id, v_width = "600px", v_height = '500px'; 
		if ((pWidth != undefined) && (pWidth != '')) v_width = pWidth + "px";
		if ((pHeight != undefined) && (pHeight != '')) v_height = pHeight + "px";

		var v_mainPopupDivIDM = commonFunc.getElementObj('mainPopupDivIDM');
		if (v_mainPopupDivIDM.style.visibility != 'hidden') {
			v_mainPopupDivIDM.style.zIndex = '0';
		}
		var v_mainPopupDivIDM2 = commonFunc.getElementObj('mainPopupDivIDM2');
		if (v_mainPopupDivIDM2.style.visibility != 'hidden') {
			v_mainPopupDivIDM2.style.zIndex = '0';
		}
		
		if (blockBG) {
			overLayDiv_id = commonFunc.overLayDiv(true); 
		}
		if (closeButton == true) {
			commonFunc.visibleElement("popCloseButton", false);
		}
		if (str != undefined) {
			commonFunc.getElementObj("mainPopUpTitle").innerHTML = title;
			commonFunc.getElementObj("mainPopupBody").innerHTML = str;
			popupDiv = commonFunc.getElementObj("mainPopupDiv");
			popupDiv.style.width = v_width;
			//popupDiv.style.height = v_height;
		}
		if ((buttonStr != undefined) || (buttonStr != null)) {
			commonFunc.getElementObj("mainPopupButton").innerHTML  = buttonStr;
		}
		if (IE6) {
			hideSelectOption(true);
		}
		commonFunc.divPopUp('mainPopupDiv',true); 
		//popUpDivName[popUpDivName.length - 1] = 'mainPopupDiv';
	} catch(e) {
		// do nothing
	}
} // end of showPopupByStr


function showPopupByUrl(url,  title, blockBG, width) {
	try {
		var strUrl = ShoppingCart.AjaxRequest(url);
		showPopupByStr(strUrl,  title, blockBG);
		if (width != undefined)
			commonFunc.getElementObj("mainPopupDiv").style.width = width + "px";
	} catch(e) {
		// do nothing
	}
} // end of showPopupByUrl

function closePopupNew(param) {
	var vName = 'mainPopupDiv';
	if (param == '2') vName = 'mainPopupDiv2';
	commonFunc.fadeOutThePopup(vName);
	setTimeout('closePopup2(' + param + ')', 800 );
}

function closePopup(param) {
	try {
		//var mainPopupDiv = commonFunc.getElementObj(popUpDivName[popUpDivName.length - 1]);		
		var mainPopupDiv = commonFunc.getElementObj("mainPopupDiv");
		if (param == undefined) {
			if ((commonFunc.getElementObj("mainPopupDivIDM").style.visibility == 'hidden') && (commonFunc.getElementObj("mainPopupDivIDM2").style.visibility == 'hidden'))
				overLayDiv_id = commonFunc.overLayDiv(false);
			commonFunc.divPopUp('mainPopupDiv',false);
			commonFunc.getElementObj("mainPopupBody").innerHTML = " ";
			commonFunc.visibleElement("popCloseButton", true);
			commonFunc.getElementObj("mainPopupButton").innerHTML = " ";
			var v_mainPopupDivIDM = commonFunc.getElementObj('mainPopupDivIDM'); 
			if (v_mainPopupDivIDM.style.visibility != 'hidden') {
				v_mainPopupDivIDM.style.zIndex = '90';
			}
			var v_mainPopupDivIDM2 = commonFunc.getElementObj('mainPopupDivIDM2'); 
			if (v_mainPopupDivIDM2.style.visibility != 'hidden') {
				v_mainPopupDivIDM2.style.zIndex = '90';
			}
		}
		else if (param == '2') {
			if (mainPopupDiv.style.visibility == 'hidden') {
				overLayDiv_id = commonFunc.overLayDiv(false);
			} else {
				mainPopupDiv.style.zIndex = '100';
			}
			commonFunc.divPopUp('mainPopupDiv2',false);
			commonFunc.getElementObj("mainPopupBody2").innerHTML = " ";
			commonFunc.visibleElement("popCloseButton2", true);
			commonFunc.getElementObj("mainPopupButton2").innerHTML = " ";
		}
		if (IE6) {
			if (mainPopupDiv.style.visibility == 'hidden') {
				hideSelectOption(false);
			}
		}
	} catch(e) {
		// do nothing
	}
} // end of closePopup


function closeFormPopup() {
	overLayDiv_id = commonFunc.overLayDiv(false);
	commonFunc.divPopUp('formPopupDiv',false);
	hideSelectOption(false);
}


function showChannelLineUp() {
	try {
		var zip = gZip;
		var url = 'https://uma.att.com/uma/RetrieveChannelLineup?ZIP=' + zip + '&packgeList_select=0&channelList_select=&APPID=UMA&actionType=GETCHANNELSBYPACKAGE';
		var mainPopupBody = commonFunc.getElementObj('mainPopupBody');
		mainPopupBody.innerHTML = '<iframe src="' + url + '" id="ifm" frameborder="0" width="745" height="520" scrolling="no"></iframe>';
		var mainPopupDiv = commonFunc.getElementObj('mainPopupDiv');
		//mainPopupDiv.style.height = "600px";
		mainPopupDiv.style.width = "790px";
		commonFunc.getElementObj("mainPopUpTitle").innerHTML = "Channel Line-Up";
		overLayDiv_id = commonFunc.overLayDiv(true);
		commonFunc.divPopUp('mainPopupDiv',true);
	} catch(e) {
		// do nothing
	}
}  // end of showChannelLineUp


function showPopupByFullUrl(url,  title, pWidth, pHeight, scroll) {
	try {
		var url = url;
		var vWidth = 745;
		var vHeight = 520;
		var vScroll = 'no';
		if (pWidth != undefined) vWidth = pWidth;
		if (pHeight != undefined) vHeight = pHeight;
		if ((scroll != undefined) && (scroll == 'scroll')) vScroll = 'yes'
		var mainPopupBody = commonFunc.getElementObj('mainPopupBody2');
		mainPopupBody.innerHTML = '<iframe src="' + url + '" id="ifm2" frameborder="0" width="' + vWidth + '" height="' + vHeight + '" scrolling="' + vScroll + '" style="z-index:110"></iframe>';
		var mainPopupDiv = commonFunc.getElementObj('mainPopupDiv2');
		mainPopupDiv.style.width = (vWidth + 45) + 'px';
		mainPopupDiv.style.height = (vHeight + 80) + 'px'; 
		commonFunc.getElementObj("mainPopUpTitle2").innerHTML = title;
		overLayDiv_id = commonFunc.overLayDiv(true);
		commonFunc.divPopUp('mainPopupDiv2',true);
		var mainPopupDiv = commonFunc.getElementObj("mainPopupDiv");
		if (mainPopupDiv.style.visibility == 'visible') mainPopupDiv.style.zIndex = '';
		if (IE6) hideSelectOption(true);
	} catch(e) {
		// do nothing
	}
}  // end of showPopupByFullUrl


function disableAllFormElement(status) {
	try {
		if (status != undefined) {
			array_obj = document.getElementsByTagName("input");
			for (i=0; i<array_obj.length; i++) {
				if ((array_obj[i].name != 'q') && (array_obj[i].type != 'hidden')) {
					if ((array_obj[i].type == 'text') || (array_obj[i].type == 'checkbox') || (array_obj[i].type == 'radio'))
						commonFunc.disableTextInput(array_obj[i], status);
				}
			}
			array_obj = document.getElementsByTagName("select");
			for (i=0; i<array_obj.length; i++) {
				array_obj[i].disabled = status;
			}
			array_obj = document.getElementsByTagName("textarea");
			for (i=0; i<array_obj.length; i++) {
				array_obj[i].disabled = status;
			}
		}
	} catch(e) {
		// do nothing
	}
} // end of disableAllFormElement


function hideSelectOption(p) {
	try {
		// for IE6
		var version=navigator.appVersion;
		if (version.indexOf("MSIE 6.0") != -1){ 
			var select_array = document.getElementsByTagName("select");
			for (i=0; i<select_array.length; i++) {
				if (p) {
					commonFunc.visibleElement(select_array[i], false);
				} else {
					commonFunc.visibleElement(select_array[i], true);
				}
			}
		}
	} catch(e) {
		// do nothing
	}
}


function showProcessBar(param) {
	var v_status = true;
	if (param != undefined) v_status = false;
	var v_mainPopupDivIDM = commonFunc.getElementObj('mainPopupDivIDM');
	var v_mainPopupDivIDM2 = commonFunc.getElementObj('mainPopupDivIDM2');
	if (v_mainPopupDivIDM.style.visibility == 'hidden') {
		commonFunc.overLayDiv(v_status);
	}

	if (v_mainPopupDivIDM.style.visibility != 'hidden') {
		if (v_status) v_mainPopupDivIDM.style.zIndex = '0';
		else v_mainPopupDivIDM.style.zIndex = '90';
	}
	if (v_mainPopupDivIDM2.style.visibility != 'hidden') {
		if (v_status) v_mainPopupDivIDM2.style.zIndex = '0';
		else v_mainPopupDivIDM2.style.zIndex = '90';
	}

	commonFunc.centerDiv("checkoutprogressbar");
	commonFunc.visibleElement("checkoutprogressbar", v_status);

	if (IE6) hideSelectOption(v_status);
	if (IE) setTimeout("showAnimatedImageForIE(2)",300);
}

function showAnimatedImageForIE(p) { 
	if (p == 1)
		commonFunc.getElementObj("availabilityImage").src = v_mediaContextRoot + '/images/ani/ani_progress_Check-availability_AA0009X8.gif';
	if (p == 2)
		commonFunc.getElementObj("processImage").src = v_mediaContextRoot + '/images/ani/ani_progress_Checkout_AA0009Z5.gif';
}	


// added by darwin for cart and checkout js popups 8/21/08
function confirm_checkout_reset(p) {
	if (confirm(p)) {
		return true;
	} else {
		return false;
	}
}

function confirm_empty_cart(p) {
	if (confirm(p)) {
		return true;
	} else {
		return false;
	}
}

// this will display  progressesing bar for pages using iframes
function showOverLayCenterDiv() {
	commonFunc.overLayDiv(true);
	commonFunc.centerDiv("iframeprogressbar");
}
// this will display availability progress for pages using iframes
function hideProcessBar() {
	commonFunc.overLayDiv(false);
	commonFunc.visibleElement("iframeprogressbar", false);
}


function showWinPopupCenter(pageURL, title,w,h,scroll) {
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var vScroll = 'no';
	if ((scroll == true) && (scroll != undefined)) vScroll = 'yes';
	var targetWin = window.open (pageURL, 'title', 'toolbar=no, location=no, directories=no, status=no, menubar='+vScroll+', scrollbars='+vScroll+', resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}


function showIDMPopupByStr(str, divType, title, blockBG, pWidth, pHeight) {
	try {
		var overLayDiv_id, popupDiv, id, v_width = "934px", v_height = "519px"; 
		if (pWidth != undefined) v_width = pWidth + "px";
		if (pHeight != undefined) v_height = pHeight + "px";
		if (blockBG) overLayDiv_id = commonFunc.overLayDiv(true);
		if (str != undefined) {
			if (divType == 'cn') {
				commonFunc.getElementObj("mainPopUpTitleIDM2").innerHTML = title; 
				commonFunc.getElementObj('mainPopupBodyIDM2').innerHTML = str;
				popupDiv = commonFunc.getElementObj("mainPopupDivIDM2");
				commonFunc.divPopUp('mainPopupDivIDM2',true);
			} else {
				commonFunc.getElementObj("mainPopUpTitleIDM").innerHTML = title; 
				commonFunc.getElementObj('mainPopupBodyIDM').innerHTML = str;
				popupDiv = commonFunc.getElementObj("mainPopupDivIDM");
				//popupDiv.style.width = v_width;
				commonFunc.divPopUp('mainPopupDivIDM',true);
			}
		}
		 
	} catch(e) {
		// do nothing
	}
} // end of showIDMPopupByStr

function closeIDMPopup(param) {
	try {
		var mainPopupDiv = commonFunc.getElementObj("mainPopupDivIDM");
		var mainPopupDiv2 = commonFunc.getElementObj("mainPopupDivIDM2");
		if (param == undefined) {
			overLayDiv_id = commonFunc.overLayDiv(false);
			if (mainPopupDiv.style.visibility != 'hidden') {
				commonFunc.divPopUp('mainPopupDivIDM',false);
				commonFunc.getElementObj("mainPopupBodyIDM").innerHTML = " ";
				commonFunc.getElementObj("mainPopupDetailsIDM").innerHTML = " ";
				mainPopupDiv.style.zIndex = '90';
				togglePhoneLineTwo.index2 = null;
			}
			if (mainPopupDiv2.style.visibility != 'hidden') {
				commonFunc.divPopUp('mainPopupDivIDM2',false);
				commonFunc.getElementObj("mainPopupBodyIDM2").innerHTML = " ";
				mainPopupDiv.style.zIndex = '90';
			}
		}
		
		if (IE6) {
			if (mainPopupDiv.style.visibility == 'hidden') {
				hideSelectOption(false);
			}
		}
	} catch(e) {
		// do nothing
	}
} // end of closeIDMPopup

function cancelModal(serv, step, redir) {
	serv = serv||showModal.curServ;
	step = step||showModal.curSetep;	
	if (Modal && Modal[serv]) {
		Modal[serv].revert();
		if (Modal[serv].saved == 'reset') Modal[serv].saved = '';
	}
	closeIDMPopup();
	setTimeOutPopup();
	setTimeOutWarning();
	if (redir) {
		location.replace(redir);
	}
}

function resetModal(serv) {
	if (Modal && Modal[serv]) {
		Modal[serv].saved = '';
		Modal[serv].finished = [];
	}
}

function showModal(serv, step, mode) {
	serv = showModal.curServ = (serv||showModal.curServ||'iptv');
	step = showModal.curStep = (step == -2 ? (showModal.curStep||0) +1 : (step == -1 ? (showModal.curStep||2) -1 : (step||1)));	
	if (!showModal.curStep) cancelModal(serv, step);
	
	service = [];
	service['iptv'] = ['', 'iptvPackages', 'iptvReceivers'];
	service['hsia'] = ['', 'hsiaSelectInternetSpeed'];
	service['voip'] = ['', 'voipSelectPhoneLines', 'voipVoicePlan', 'voipDirectoryListing'];
	service['equipmentInstall'] = ['', 'equipmentOnly', 'installOnly'];
	service['equipmentOnly'] = ['', 'equipmentOnly'];
	service['installOnly'] = ['', 'installOnly'];
	
	for (var i=1; i < service[serv].length; ++i) {
		commonFunc.displayElement(service[serv][i], i == step ? true : false);
	}
	
	showModalFooter(serv, step);
	showModalDetails(serv);
	showModalButton(1, mode, serv);

	if (Modal) {
		var div = '';
		Modal.Details.init(serv);
		switch (serv) {
			case ('iptv') : 
				Modal[serv].requires = ['iptvPackage', 'Receivers'];
				break;
			case ('hsia') : 
				Modal[serv].requires = ['hsiaSelectInternetSpeed'];
				break;
			case ('voip') : 
				Modal[serv].requires = ['phoneLine1', 'voipPLine', 'voipDirectoryListingprimary'];
				break;
			case ('equipmentInstall') : case ('equipmentOnly') : case ('installOnly') : 
				div = serv;
				enableUpdateButton(serv);
				break;
		}
		
		//length of this array should be at least maximum number of steps in modals
		if (mode == 'e' || mode == 'edit') Modal[serv].finished = [true, true, true];
		else Modal[serv].finished[step-1] = true;
		
		Modal.Details(serv, div);
		if (mode == 'd' && !Modal[serv].saved) Modal[serv].saved = 'reset';
	}
}

function showModalDetails(serv) {
	var block;
	if (block = document.getElementsByClassName('modal header-iptv')[0])
		block.style.display = serv == 'iptv' ? 'block' : 'none';
	if (block = document.getElementsByClassName('modal header-hsia')[0])
		block.style.display = serv == 'hsia' ? 'block' : 'none';
	if (block = document.getElementsByClassName('modal header-voip')[0])
		block.style.display = serv == 'voip' ? 'block' : 'none';
	if (block = document.getElementsByClassName('modal details-title iptv')[0])
		block.style.display = serv == 'iptv' ? 'block' : 'none';
	if (block = document.getElementsByClassName('modal details-title hsia')[0])
		block.style.display = serv == 'hsia' ? 'block' : 'none';
	if (block = document.getElementsByClassName('modal details-title voip')[0])
		block.style.display = serv == 'voip' ? 'block' : 'none';
}

function showModalFooter(serv, step) {
	var buttons = [
		document.getElementById('modalFooterCancel'),
		document.getElementById('modalFooterNext'),
		document.getElementById('modalFooterBack')
	];
	for (var i=0; i < buttons.length; ++i) {
		buttons[i].origClassName = buttons[i].origClassName||buttons[i].className;
		buttons[i].className = buttons[i].origClassName.replace(/__step__/g, step)
			.replace(/__serv__/g, serv.slice(0,1).toUpperCase() + serv.slice(1));
		if (buttons[i].trigger) buttons[i].onclick = buttons[i].trigger;
	}
	captureWebTrendTags('wtx');

	if (serv == 'equipmentInstall' || serv == 'equipmentOnly' || serv == 'installOnly') {
		commonFunc.displayElement('modalFooterNext2', service[serv][step+1] ? true : false);
		commonFunc.displayElement('modalFooterBack2', service[serv][step-1] ? true : (service[serv][step+1] ? true : false));
	}
	else {
		commonFunc.displayElement('modalFooterNext', service[serv][step+1] ? true : false);
		commonFunc.displayElement('modalFooterBack', service[serv][step-1] ? true : true);
	}
}

function enableUpdateButton(thisModal) {
	try {
		if (!thisModal) thisModal = enableUpdateButton.modal;
		else enableUpdateButton.modal = thisModal;

		Modal[thisModal].finished = [];
		Modal[thisModal].requires = [];
		
		if (~thisModal.toLowerCase().indexOf('equipment')) {
			if (isEnableBYOEDropDown()) {
				Modal[thisModal].finished.push(true);
				Modal[thisModal].requires.push('byoeModem');
			}
			else {
				Modal[thisModal].finished.push(true);
				Modal[thisModal].requires.push('radModem');
			}
		}
		
		if (~thisModal.toLowerCase().indexOf('install')) {
			Modal[thisModal].finished.push(true);
			Modal[thisModal].requires.push('radInstallOption');
			if (isShowHomeAlarmBlock()) {
				Modal[thisModal].finished.push(true);
				Modal[thisModal].requires.push('chkHomeAlarm');
			}
		}

	} catch(e) {
		// do nothing	
	}

}

function submitUpdateButton(submit, cancel) {
	try {
		thisModal = enableUpdateButton.modal;

		if (thisModal == 'equipmentInstall') thisForm = 'formEquipmentInstall', thisString = '';
		else if (thisModal == 'equipmentOnly') thisForm = 'formEquipment', thisString = 'equipment';
		else if (thisModal == 'installOnly') thisForm = 'formInstallation';
		
		var valid = true;
		if (!cancel && ~thisModal.toLowerCase().indexOf('equipment')) {
			if (isEnableBYOEDropDown()) {
				if (!document.getElementById('byoeModem').selectedIndex) {
					valid *= validateRadioButtons(document[thisForm].byoeModem,'a modem','submit',showModal.curStep==1);
				}
			} else {
				valid *= validateRadioButtons(document[thisForm].radModem,'a modem','submit',showModal.curStep==1);
			}
		}
		
		if (!cancel && ~thisModal.toLowerCase().indexOf('install')) {
			valid *= validateRadioButtons(document[thisForm].radInstallOption,'an installation option','submit',showModal.curStep==2); 
			if (isShowHomeAlarmBlock() && !document.getElementById('chkHomeAlarm').checked) {
				if (showModal.curServ=='installOnly' || (showModal.curServ=='equipmentInstall' && showModal.curStep==2)) {
					valid *= false;
					alert('You must check the box indicating you either do not have a home alarm or will not connect it to the AT&T U-verse system to continue.');
				}
			}
		}
		
		if (valid && cancel) {
			valid = confirm('If you continue, your ' + (thisModal == 'installOnly' ? 'installation ' : '') + (thisModal == 'equipmentOnly' ? 'equipment ' : '') + 'selection won\'t be saved.');
		}

		if (submit && valid) {
			Modal.Details();
			Modal.Details.submitOptions();
			document[thisForm].submit();
		}
		
		return valid;
	} catch(e) {
		// do nothing	
	}

}
		
function isEnableBYOEDropDown () {
	var boolEnableBYOEDropDown = false;
	if (document.getElementById('NoThanks') != undefined) {
		boolEnableBYOEDropDown = document.getElementById('NoThanks').checked;
	}
	
	if (!boolEnableBYOEDropDown) {
		commonFunc.disableTextInput('byoeModem', true);
		document.getElementById('byoeModem').value='';
		document.getElementById('NoThanks').value='';
	} else {
		commonFunc.disableTextInput('byoeModem', false);
	}
	return boolEnableBYOEDropDown;
}

function isShowHomeAlarmBlock () {
	var boolShowHomeAlarmBlock = false;
	boolShowHomeAlarmBlock = document.getElementById('selfInstall').checked;
	if (boolShowHomeAlarmBlock) {
		commonFunc.displayElement('homeAlarmBlock', true);
		commonFunc.displayElement('noteBundleDiscountsBlock',false);
	} else {
		commonFunc.displayElement('homeAlarmBlock', false);
		commonFunc.displayElement('noteBundleDiscountsBlock',true);
	}
	return boolShowHomeAlarmBlock;
}

function validateRadioButtons(thisfield,friendlyName,thisaction,doMsg) {
	myOption = -1;
	if (thisfield.length) for (i=thisfield.length-1; i > -1; i--) {
		if (thisfield[i].checked) {
			myOption = i; i = -1;
		}
	}
	else myOption = -2;
	
	if ((myOption == -1) && (thisaction == 'submit')) {
		if (doMsg) alert("You must select "+friendlyName+" from those listed to continue.");
		return false;
	}
	return true;
}

function showModalButton(able, mode, serv) {
	var stndMode = ['addToCartDis','addToCartEna','addToCartDis'];
	var editMode = ['updateCartDis','updateCartEna','returnToCartEna'];

	if (!mode) mode = showModalButton.mode;
	else showModalButton.mode = mode;
	
	if (mode == 'e' || mode == 'edit') button = editMode;
	else button = stndMode;
	
	var en = 1, dis = 0;
	for (var i=0; i < button.length; ++i) commonFunc.displayElement(button[i], !!(dis*able));
	commonFunc.displayElement(button[dis+able], !!(en+able));

	//special cases below -- should rework logic to allow for these situations
	if (showModal.curServ == 'equipmentInstall' && showModal.curStep == 1) {
		//no "return to cart" button for first step of equipmentInstall modal
		commonFunc.displayElement(button[dis+able], !(en+able));
	}
	else if ($('updateSummaryEna')) {
		//need "update summary" button for equipmentOnly modal on summary page
		for (var i=0; i < button.length; ++i) commonFunc.displayElement(button[i].replace('Cart','Summary'), !!(dis*able));
		if (showModal.curServ == 'equipmentOnly') {
			commonFunc.displayElement(button[dis+able], !(en+able));
			commonFunc.displayElement(button[dis+able].replace('Cart','Summary'), !!(en+able));
		}
	}
}
