
function ecr_FormHeader(text) {
document.write('<div class="roundBox-tl"><div class="roundBox-tr"></div>');
document.write('<h5 class="headingFormTable">');
document.write(text);
document.write('</h5><div class="clearing"></div></div>');
}
function ecr_FormFooterWithActionAndLink(text, clickHandler, linkURL, linkText) {
document.write('<div class="roundBox-bl roundBox-Button"><div class="roundBox-br roundBox-Button">');
document.write('<div class="buttonPrimary"><div class="buttonPrimaryLeft formButtonLeft"></div>');
document.write('<div class="buttonPrimaryMid"><button name="button1" value="1" type="button" onClick="'+clickHandler+'" class="primaryRed">'+text+'</button></div>');
document.write('<div class="buttonPrimaryRight formButtonRight"></div></div>');
document.write('</div>');
if(linkURL!="" && linkText!="")
document.write('<a href="'+linkURL+'" class="arrowlink linkTableForm2">'+linkText+'</a>');
document.write('</div></form>');
}
function ecr_FormFooterWithAction(text, clickHandler) {
ecr_FormFooterWithActionAndLink(text, clickHandler, "", "");
}
function ecr_FormFooterActionSecondary(pLabel, pAction, sLabel, sAction) {
document.write('<div class="roundBox-bl roundBox-Button"><div class="roundBox-br roundBox-Button">');
document.write('<div class="buttonPrimary"><div class="buttonPrimaryLeft formButtonLeft"></div>');
document.write('<div class="buttonPrimaryMid">');
document.write('<button name="button1" value="1" type="button" onClick="'+pAction+'" class="primaryRed">'+pLabel+'</button>');
document.write('</div><div class="buttonPrimaryRight formButtonRight"></div></div></div>');
document.write('<div class="buttonSecondaryformLeft"><div class="buttonSecondaryLeft formButtonLeft"></div>');
document.write('<div class="buttonSecondaryMid">');
document.write('<button name="button1" value="1" type="button" onClick="'+sAction+'" class="secondaryGrey">'+sLabel+'</button>');
document.write('</div><div class="buttonSecondaryRight formButtonRight"></div>');
document.write('</div></div>');
}
function ecr_ClickButton(text, clickHandler) {
document.write('<div class="buttonPrimary"><div class="buttonPrimaryLeft formButtonLeft"></div>');
document.write('<div class="buttonPrimaryMid"><button name="button1" value="1" type="button" onClick="'+clickHandler+'" class="primaryRed">'+text+'</button></div>');
document.write('<div class="buttonPrimaryRight formButtonRight"></div></div>');
document.write('<div style="clear: both; height: 1px; font-size:1px;">&nbsp;</div>');
}
function ecr_FormFooter(text) {
document.write('<div class="roundBox-bl"><div class="roundBox-br"></div></div>');
}
function ecr_MoreInfoBoxHeader(text) {
document.write('<div id="moreInfoBox" class="roundBoxBlue3-tl"><div class="roundBoxBlue3-tr"></div><h5 class="headingFormTable">');
document.write(text);
document.write('</h5></div>');
document.write('<div id="blueBorderBox" class="blueBorderBox">');
}
function ecr_BoxFooter() {
document.write('</div><div class="roundBoxBlue3-bl"><div class="roundBoxBlue3-br"></div></div>');
}
function ecr_BoxHeader(text) {
document.write('<div class="roundBoxBlue1-tl"><div class="roundBoxBlue1-tr"></div><h5 class="headingFormTable">')
document.write(text);
document.write('</h5></div><div id="blueBorderBox" class="blueBorderBox">');
}
function ecr_BoxFooterFilled() {
document.write('</div><div class="roundBoxBlue2-bl"><div class="roundBoxBlue2-br"></div></div>');
}
function ecr_BoxFooterWithLink(text, url) {
document.write('</div><div class="roundBoxBlue2-bl"><div class="roundBoxBlue2-br"></div>');
document.write('<a title="'+text+'" href="'+url+'" class="arrowlink linkTableForm">'+text+'</a>');
document.write('</div>');
}
function ecr_ECPointsBar(sCurPoints, sTargetPoints, sCurTier) {
var curPoints = parseInt(sCurPoints.replace(',',''));
var targetPoints = parseInt(sTargetPoints.replace(',',''));
var curTier = sCurTier;
if(curPoints > targetPoints) curPoints = targetPoints;
var percentComplete = Math.floor((curPoints/targetPoints)*100);
if (curTier=="Executive_Blue")
{
document.write('<div class="currentPointsIndicator" style="width:'+percentComplete+'%; background-color:#9ACD32; border-color:#9ACD32;"><img src="/cms/s.gif" width="1" height="1" alt="" /></div>');
}
else if (curTier=="Executive_Silver")
{
document.write('<div class="currentPointsIndicator" style="width:'+percentComplete+'%; background-color:#9ACD32; border-color:#9ACD32;"><img src="/cms/s.gif" width="1" height="1" alt="" /></div>');
}
else if (curTier=="Executive_Gold")
{
document.write('<div class="currentPointsIndicator" style="width:'+percentComplete+'%; background-color:#D1B257; border-color:#D1B257;"><img src="/cms/s.gif" width="1" height="1" alt="" /></div>');
}
else
{
document.write('<div class="currentPointsIndicator" style="width:'+percentComplete+'%; background-color:red; border-color:red;"><img src="/cms/s.gif" width="1" height="1" alt="" /></div>');
}
}
function ecr_QualifyingFlightsBar(sFill, sCurTier){
var fill = parseInt(sFill);
var curTier = sCurTier;
var colorFill='#9ACD32';
if(fill==0)
{
colorFill='#FFF';
}
else
{
if(curTier=="Executive_Blue" || curTier=="Executive_Silver")
{
colorFill='#9ACD32';
}
if(curTier=="Executive_Gold")
{
colorFill='#D1B257';
}
}
document.write('<div class="currentPointsIndicator" style="width:98%; background-color:'+colorFill+'; border-color:'+colorFill+';"><img src="/cms/s.gif" width="1" height="1" alt="" /></div>');
}
function ecr_PointsToNextTier(sUpgradeThreshold, sCurPoints) {
var curPoints = parseInt(sCurPoints.replace(',',''));
var upgradeThreshold = parseInt(sUpgradeThreshold.replace(',',''));
var pointsNeeded = (upgradeThreshold - curPoints);
if(pointsNeeded < 0) document.write("0");
else document.write(pointsNeeded);
}
function ecr_FlightsToNextTier(sFlightsThreshold, sCurFlights) {
var curFlights = parseInt(sCurFlights);
var flightsThreshold = parseInt(sFlightsThreshold);
var flightsNeeded = (flightsThreshold - curFlights);
if(flightsNeeded < 0) document.write("0");
else document.write(flightsNeeded);
}
function ecr_displayAnd(sFlightsThreshold, sCurFlights, sUpgradeThreshold, sCurPoints, curTier,textAnd) {
var curPoints = parseInt(sCurPoints.replace(',',''));
var upgradeThreshold = parseInt(sUpgradeThreshold.replace(',',''));
var pointsNeeded = (upgradeThreshold - curPoints);
var curFlights = parseInt(sCurFlights);
var flightsThreshold = parseInt(sFlightsThreshold);
var flightsNeeded = (flightsThreshold - curFlights);
var lineColor="#DCEFFC";
if(curTier=="Executive_Blue")
{
lineColor="#DCEFFC";
}
else if(curTier=="Executive_Silver"){
lineColor="#D9DEE8";
}
else if(curTier=="Executive_Gold"){
lineColor="#F7F6CC";
}
if((pointsNeeded >0) && (flightsNeeded > 0))
{
document.write('<div id="top" style="left: 0px; top:10px; position:relative">');
document.write('<div class="hr" style="height:0px; margin:0px; border: 1px solid ' +lineColor+' ;"><hr /></div></div>');
document.write('<div id="bottom" style="left: 50px; top:0px; position:relative"><b>'+textAnd+'</b></div>');
}
}
function ecr_displayOr(sUpgradeThreshold, sCurPoints) {
var curPoints = parseInt(sCurPoints.replace(',',''));
var upgradeThreshold = parseInt(sUpgradeThreshold.replace(',',''));
var pointsNeeded = (upgradeThreshold - curPoints);
if(pointsNeeded > 0) return true;
else return false;
}
function ecr_FormFooterWithSecAction(sLabel, sAction) {
document.write('<div class="roundBox-bl roundBox-Button"><div class="buttonSecondaryformLeft">');
document.write('<div class="buttonSecondaryLeft formButtonLeft"></div>');
document.write('<div class="buttonSecondaryMid">');
document.write('<button onClick="',sAction,'" name="secondaryButton" value="1" type="button" class="secondaryGrey" title="',sLabel,'">',sLabel,'</button>');
document.write('</div><div class="buttonSecondaryRight formButtonRight"></div>');
document.write('</div><div class="roundBox-br roundBox-Button"></div>');
}
function ecr_FormFooterWithLink(linkText, linkURL) {
document.write('<div class="roundBox-bl roundBox-Button">');
document.write('<div class="roundBox-br roundBox-Button">');
document.write('</div>');
document.write('<a href="',linkURL,'" class="arrowlink linkTableForm2">',linkText,'</a>');
document.write('</div>');
}
function ecr_SecondaryClickButton(text, clickHandler) {
document.write('<div class="buttonSecondary"><div class="buttonSecondaryLeft formButtonLeft2"></div>');
document.write('<div class="buttonSecondaryMid"><button name="button1" value="1" type="button" onClick="'+clickHandler+'" class="secondaryGrey">'+text+'</button></div>');
document.write('<div class="buttonSecondaryRight formButtonRight2"></div></div>');
}
<!--Changes done for incident 080501-000000 (RW2206)- Start -->
function ecr_ClickHOHButton(text, clickHandler) {
document.write('<div class="buttonPrimary"><div class="buttonPrimaryLeft formButtonLeft"></div>');
document.write('<div class="buttonPrimaryMid"><button name="button2" input style="display: inline" class= "primaryRed" value = "1" id="continue" type="button" onClick="toggleProcessing(true);'+clickHandler+'">'+text+'</button><a style="display: none" class="plain" id="processing">Processing</a></div>');
document.write('<div class="buttonPrimaryRight formButtonRight"></div></div>');
document.write('<div style="clear: both; height: 1px; font-size:1px;">&nbsp;</div>');
}
function toggleProcessing(show){
if(show){
document.getElementById('continue').style.display='none';
document.getElementById('processing').style.display='inline';
}
else{
document.getElementById('processing').style.display='none';
document.getElementById('continue').style.display='inline';
}
}
<!--Changes done for incident 080501-000000 (RW2206)- End -->