//function popup(imageId) {
//    FILE = document.getElementById(imageId).src;
    //FILE = "/details/"+ document.getElementById('bmcMotorImage').src;

//    FEATURES='width=432,height=325,toolbar=0,scrollbars=0,screenX=200,screenY=200,left=200,top=200';
//    CONTENT = "<HTML><HEAD><TITLE>Component</TITLE></HEAD>" + "<BODY><CENTER><FORM><INPUT TYPE='BUTTON' VALUE='Close'" + "onClick='window.close()'></FORM><P> <IMG SRC='" + FILE + "' BORDER=0>" + "</CENTER>"+ "</BODY></HTML>";
 //   pop = window.open("","",FEATURES);
 //   pop.document.open();
 //   pop.focus();
 //   pop.document.write(CONTENT);
 //   pop.document.close();

//} 

function popup(imageId) { 
//alert("In the popup");
var fullPath=document.getElementById(imageId).src;
//alert(fullPath);
partsL=fullPath.split('\/');


//var thumbPic=fullPath.substring(cartIndex,fullPath.length);
sPicURL="details\/cart\/"+partsL[partsL.length-1];
//sPicURL="cart\/"+partsL[partsL.length-1];

//alert(sPicURL);
//netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");

winHandle = window.open( "popup.html?"+sPicURL, "pippis", "resizable=1,HEIGHT=200,WIDTH=200" ); 

//winHandle = window.open("popup.html", ID, "modal,toolbar=false,location=false,directories=false,status=false,menubar=false,scrollbars=no,resizable=no,left="+left+",top="+top+",width="+width+",height="+height);
winHandle.focus();

} 

var state = 'none';

function showhideDiv(layer_ref) {
if (document.getElementsByName('AddItem107')[0].selectedIndex==0) {
state = 'none';

hideDiv(layer_ref);

}
else {
state = '';
bmcDefaults();
if (document.getElementsByName('AddItem200').length!=0) {updateFreewheel();}
showDiv(layer_ref);
}
}

function showDiv(layer_ref){
state='';
set_state(layer_ref);

updateDynamicContent ();
}

function hideDiv(layer_ref){
state='none';
set_state(layer_ref);

updateDynamicContent();
}



function set_state(layer_ref) {
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
} 

function addEvent( obj, type, fn ) {
  if ( obj.attachEvent ) {
    obj['e'+type+fn] = fn;
    obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
    obj.attachEvent( 'on'+type, obj[type+fn] );
  } else
    obj.addEventListener( type, fn, false );
}
function removeEvent( obj, type, fn ) {
  if ( obj.detachEvent ) {
    obj.detachEvent( 'on'+type, obj[type+fn] );
    obj[type+fn] = null;
  } else
    obj.removeEventListener( type, fn, false );
}
var load_once=true;
addEvent(window, 'load', function(event) {
    
	
	if (document.getElementsByName('AddItem107').length!=0) {
	hideDiv('R000'); showDiv('R001'); setTimeout ( "hideDiv('R111');", 4000 );  setTimeout ( "hideDiv('R222');", 7000 ); 
	if (document.getElementsByName('AddItem200').length!=0) { DXBike(); }
	document.getElementsByName('AddItem107')[0].selectedIndex=0;
	//if (load_once) {loopPictures();}
	load_once=false;
	
	}
	else
	{
	
	bmcDefaults();
	}
	updateDynamicContent();

});

addEvent(window, 'click', function(event) {
	clearTimeout(myTimeout);
});

if (document.attachEvent) {
document.attachEvent('onclick',
function () {
// handle event here e.g.
//alert(event.type + ' for ' + event.srcElement);
clearTimeout(myTimeout);
}
);
}





function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(ZZfutureuse);
addLoadEvent(function() {
  /* more code to run on page load */ 
});


var myColors = new Array(
    '#000000',
    '#FF0000',
    '#00FF00',
    '#0000FF',
    '#FFFFFF'
    );

function myFunx(index) {
    if(!index || index > myColors.length) {
        index = 0;
    }
    setTimeout('myFunx('+(index+1)+')', 2000);
    document.bgColor=myColors[index];
}




Date.ONE_SECOND = 1000000
Date.ONE_MINUTE = Date.ONE_SECOND * 60
Date.ONE_HOUR = Date.ONE_MINUTE * 60
Date.ONE_DAY = Date.ONE_HOUR * 24

function nap (m) {
var then = new Date(new Date().getTime() + m); while (new Date() < then) {}
}

var PicNum = 0;
function slideshow() { 
while (1)
{
PicNum++; 
if (PicNum == 6) { PicNum = 0; } 
nap(5 * Date.ONE_SECOND);
loopPictures(PicNum);
}

} 

   this.Sleep = function ZZ(naptime){
      naptime = naptime * 1000;
      var sleeping = true;
      var now = new Date();
      var alarm;
      var startingMSeconds = now.getTime();
      alert("starting nap at timestamp: " + startingMSeconds + "\nWill sleep for: " + naptime + " ms");
      while(sleeping){
         alarm = new Date();
         alarmMSeconds = alarm.getTime();
         if(alarmMSeconds - startingMSeconds > naptime){ sleeping = false; }
      }      
      alert("Wakeup!");
   }


var myTimeout;

function loopD6(index)
{

 if(!index || index > 3) {
        index = 0;
		
    }
    
	myTimeout=setTimeout('loopD6('+(index+1)+')', 1000);
	setTimeout ( "clearTimeout(myTimeout);", 4500 ); 
	//window.setTimeout('loopPictures('+(index+1)+')' {
  //clearTimeout(myTimeout);
//},10000);
switch(index)
{
case 0:
  document.getElementsByName('AddItem100')[0].selectedIndex=0;
  dream21_cobalt_blue();
  break;    
case 1:
  document.getElementsByName('AddItem100')[0].selectedIndex=1;
  dream21_burgundy();
  break;
case 2:
   document.getElementsByName('AddItem100')[0].selectedIndex=2;
  journey_black();
  break;
case 3:
   document.getElementsByName('AddItem100')[0].selectedIndex=3;
  journey_white();
  break;

}


}

function loopPictures(index)
{
 if(!index || index > 6) {
        index = 0;
		
    }
    
	myTimeout=setTimeout('loopPictures('+(index+1)+')', 1000);
	setTimeout ( "clearTimeout(myTimeout);", 7500 ); 
	
	
	//window.setTimeout('loopPictures('+(index+1)+')' {
  //clearTimeout(myTimeout);
//},10000);
switch(index)
{
case 0:
  DXBike();
  break;    
case 1:
  CXBike();
  break;
case 2:
  MXBike();
  break;
case 3:
  PARBike();
  break;
case 4:
  TXBike();
  break;
case 5:
  LXBike();
  break;
case 6:
  XOBike();
  break;
}


}


//addEvent(document.getElementById('bmcTd'), 'click', function(event) {
         //   alert('when');
          
//});

//addEvent(document.getElementById('myform'), 'change', function(event) {
//	updateDynamicContent();
//});

function format_number(pnumber,decimals)
{
	if (isNaN(pnumber)) { return 0};
	if (pnumber=='') { return 0};
	
	var snum = new String(pnumber);
	var sec = snum.split('.');
	var whole = parseFloat(sec[0]);
	var result = '';
	
	if(sec.length > 1){
		var dec = new String(sec[1]);
		dec = String(parseFloat(sec[1])/Math.pow(10,(dec.length - decimals)));
		dec = String(whole + Math.round(parseFloat(dec))/Math.pow(10,decimals));
		var dot = dec.indexOf('.');
		if(dot == -1){
			dec += '.'; 
			dot = dec.indexOf('.');
		}
		while(dec.length <= dot + decimals) { dec += '0'; }
		result = dec;
	} else{
		var dot;
		var dec = new String(whole);
		dec += '.';
		dot = dec.indexOf('.');		
		while(dec.length <= dot + decimals) { dec += '0'; }
		result = dec;
	}	
	return result;
}

function addlfs(object) 
{
var myStr = object.value;
var myStrL = myStr.split('\n');
var myNewStr = "";
var parts="";
for (i=0; i<myStrL.length; i++){
    parts=myStrL[i];
    while (parts.length>80){
    myNewStr += parts.substring(0,80) + "\n";
    parts = parts.substring(80,parts.length);
    }
    
    myNewStr += parts+"\n";
}
object.value = myNewStr;
}


function addKI(myName,myImage,myLabel,mySize) 
{
imageId=myName+"Image";
textId=imageId+"Text";
//hrefId=imageId+"Href";
myDir="cart/";
myDetailDir="cart/details/";
//var myHref=myDetailDir+myImage;
myImage=myDir+myImage;

//alert(textId);
document.getElementById(imageId).width=mySize;
document.getElementById(imageId).src=myImage;
document.getElementById(imageId).title=imageId;
document.getElementById(textId).innerHTML=myLabel;
//document.getElementById(hrefId).href=myHref;
//alert(document.getElementById(imageId).src);
}

function cleanList(specStr) {
var myStr = specStr;
var myStrL = myStr.split('\n');
var myNewStr = "";//
var parts="";
var BL=117;
var BI=" ";
var BS=" ";
var INDENT="";
for (i=0; i<myStrL.length; i++){
    parts=myStrL[i];
    INDENT="";
    if (parts.charAt(0)=='*') {
         INDENT=BI+'\u25CF'+BS;
       
         parts=parts.substring(1,parts.length);
         while (parts.length>BL){

         var myparts=parts.substring(0,BL);
         var lplength=0;
              if (myparts.indexOf(' ')!=-1){
                   var subL=myparts.split(' ');
              	 var lastPart="";
                   lastPart=subL[subL.length-1];
                   lplength=lastPart.length;
              }
         
         myNewStr += INDENT+parts.substring(0,BL-lplength) + "\n";
         parts = parts.substring(BL-lplength,parts.length);
         INDENT=BI+"  "+BS;
         } //end wile
      myNewStr += INDENT+parts+"\n";
    }  //end if
    else {
     myNewStr += parts+"\n";
    }
   
} //end for
return myNewStr;
}

function pickCharger()
{

if (document.getElementsByName('AddItem705')[0].selectedIndex==0) { document.getElementsByName('AddItem706')[0].selectedIndex=0; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==1) { document.getElementsByName('AddItem706')[0].selectedIndex=0; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==2) { document.getElementsByName('AddItem706')[0].selectedIndex=1; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==3) { document.getElementsByName('AddItem706')[0].selectedIndex=1; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==4) { document.getElementsByName('AddItem706')[0].selectedIndex=2;}
if (document.getElementsByName('AddItem705')[0].selectedIndex==5) { document.getElementsByName('AddItem706')[0].selectedIndex=3; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==6) { document.getElementsByName('AddItem706')[0].selectedIndex=3; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==7) { document.getElementsByName('AddItem706')[0].selectedIndex=4; }
if (document.getElementsByName('AddItem705')[0].selectedIndex==8) { document.getElementsByName('AddItem706')[0].selectedIndex=5;}
if (document.getElementsByName('AddItem705')[0].selectedIndex==9) { document.getElementsByName('AddItem706')[0].selectedIndex=6; }
updateDynamicContent();
}

function pickBatteryThrottle()
{
//alert("here");
if (document.getElementsByName('AddItem701')[0].selectedIndex==0) { 
document.getElementsByName('AddItem702')[0].selectedIndex=0; 
document.getElementsByName('AddItem705')[0].selectedIndex=0;
//alert(1);
}
if (document.getElementsByName('AddItem701')[0].selectedIndex==1) { 
document.getElementsByName('AddItem702')[0].selectedIndex=1; 
document.getElementsByName('AddItem705')[0].selectedIndex=2;
//alert(2);
}
//alert (3);
updateDynamicContent();
}

function bmcDefaults() {
var object = document.forms.MyForm;

for (i=0; i<object.elements.length; i++){
if (object.elements[i].type=="select-one"){
    if (object.elements[i].name.indexOf("AddItem7")!=-1)        {
   //if (object.elements[i].name.indexOf("AddItem704")==-1) {
   object.elements[i].selectedIndex=0;
   }
   }
   }
}

function bmcEmpty() {
var object = document.forms.MyForm;
bmcDefaults();
var opInd=document.getElementsByName('AddItem700')[0].options.length - 1;
var ind701=document.getElementsByName('AddItem701')[0].options.length - 1;
var ind702=document.getElementsByName('AddItem702')[0].options.length - 1;
var ind703=document.getElementsByName('AddItem703')[0].options.length - 1;
var ind704=document.getElementsByName('AddItem704')[0].options.length - 1;
var ind705=document.getElementsByName('AddItem705')[0].options.length - 1;
var ind706=document.getElementsByName('AddItem706')[0].options.length - 1;
var ind707=document.getElementsByName('AddItem707')[0].options.length - 1;
//alert(opInd);
document.getElementsByName('AddItem700')[0].selectedIndex=opInd; //No Motor
document.getElementsByName('AddItem701')[0].selectedIndex=ind701; //No Controller
document.getElementsByName('AddItem702')[0].selectedIndex=ind702; //No Throttle
document.getElementsByName('AddItem703')[0].selectedIndex=ind703; //No Wheel Build

document.getElementsByName('AddItem704')[0].selectedIndex=document.getElementsByName('AddItem704')[0].length-1; //No Free Wheel
document.getElementsByName('AddItem705')[0].selectedIndex=ind705; //No Battery
document.getElementsByName('AddItem706')[0].selectedIndex=ind706; //No Charger   
document.getElementsByName('AddItem707')[0].selectedIndex=ind707; //No Wire Harness     
document.getElementsByName('AddItem107')[0].selectedIndex=0; //No $50 off  
} 




function updateDynamicContent () 
{
 // alert("in updateDynamicContent");
if (document.getElementsByName('AddItem107').length!=0 ){
  if (document.getElementsByName('AddItem107')[0].selectedIndex==0) {  bmcEmpty(); }
}
var object = document.forms.MyForm;
//alert("in updateDynamicContent2");

var returnval=true //by default, allow form submission
var myString;
var myStringList;
var myVal=0;
var total=0;
var weight=0;
var weightstr="";
var indstart=-1;
var indend=-1;
var warnStr="";
var specStr="";
var specStr1="";

for (i=0; i<object.elements.length; i++){
if (object.elements[i].type=="select-one"){
   myString=object.elements[i].value;
   myStringList = myString.split('|'); // split on vertical bar
   myVal = parseFloat(myStringList[2]);
   total += myVal;
   myFirst=myStringList[1];
   indstart=-1;
   indend=-1;
   indend=myFirst.indexOf("lbs)");
  
   for (j=indend-1; j>-1; j--){if (myFirst.charAt(j)=='+') {indstart=j+1; break;}}
  
   if (indstart > -1 && indend > -1) { 
    weightstr=myFirst.substring(indstart,indend); 
    weight += parseFloat(weightstr);
    }
    
   // Error Checking
}
}
//total *= object.VARQuantity.value;
//weight *= object.VARQuantity.value;
var formatted_total = "$"+format_number(total,2);
var formatted_weight = format_number(weight,1)+ " lbs";


//Motor
var moR=object.AddItem700.value; var moL=moR.split('|'); var moS=moL[1]; 
 
//Controller
var coR=object.AddItem701.value; var coL=coR.split('|'); var coS=coL[1];
 
//Throttle
var thR=object.AddItem702.value; var thL=thR.split('|'); var thS=thL[1];
 
//Wheel Build
var wbR=object.AddItem703.value; var wbL=wbR.split('|'); var wbS=wbL[1];
 
//Freewheel
var frR=object.AddItem704.value; var frL=frR.split('|'); var frS=frL[1];
  
//Battery
var baR=object.AddItem705.value; var baL=baR.split('|'); var baS=baL[1];
 
//Charger
var chR=object.AddItem706.value; var chL=chR.split('|'); var chS=chL[1];
 
//Wireset
var wsR=object.AddItem707.value; var wsL=wsR.split('|'); var wsS=wsL[1];
 
//CycleAnalyst
var cyR=object.AddItem708.value; var cyL=cyR.split('|'); var cyS=cyL[1];
 
//Thorn Tube
var ttR=object.AddItem711.value; var ttL=ttR.split('|'); var ttS=ttL[1];
 
//Kevlar Tire
var kvR=object.AddItem712.value; var kvL=kvR.split('|'); var kvS=kvL[1]; 

//Cruise/Ebrake
var cbR=object.AddItem714.value; var cbL=cbR.split('|'); var cbS=cbL[1]; 


//Warn about incompatibilities
if (moS.indexOf("Rear")!= -1 ){if (frS.indexOf("No Freewheel") != -1){ 
warnStr += "warn: freewheel not selected for rear hub\n";}   }

if (moS.indexOf("Front")!= -1 ){ if (frS.indexOf("speed") != -1){ 
warnStr += "warn: front hubs don't need a freewheel\n";}  }


if (coS.indexOf("36V")!= -1 ){ if (baS.indexOf("48V") != -1){ 
warnStr += "warn: controller is 36V but battery selected is 48V\n"}  }

if (coS.indexOf("36V")!= -1 ){ if (thS.indexOf("Gauge 48V") != -1){ 
warnStr += "warn: controller is 36V but throttle selected with 48V Gauge\n"}  }

if (coS.indexOf("48V")!= -1 ){ if (thS.indexOf("Gauge 36V") != -1){ 
warnStr += "warn: controller is 36V but throttle selected with 48V Gauge\n"}  }

if (coS.indexOf("BMC")!= -1 ){ if (thS.indexOf("Clyte") != -1){ 
warnStr += "warn: use BMC throttles for BMC controller\n"}  }

if (coS.indexOf("BMC")!= -1 ){ if (cbS.indexOf("Ebrake") != -1){ 
warnStr += "warn: use Clyte Controller if you require Ebrake\n"}  }

if (coS.indexOf("BMC")!= -1 ){ if (cbS.indexOf("Cruise") != -1){ 
warnStr += "warn: use Clyte Controller if you require Cruise & Ebrake\n"}  }

if (coS.indexOf("Clyte")!= -1 ){ if (thS.indexOf("BMC") != -1){ 
warnStr += "warn: use Clyte throttles for Clyte controller\n"}  }

if (coS.indexOf("BMC 48V")!= -1 ){ if (baS.indexOf("36V") != -1){ 
warnStr += "warn: controller is 48V but battery selected is 36V\n";}  }

if (coS.indexOf("Clyte")!= -1 ){ if (cyS.indexOf("Stand") != -1){ 
warnStr += "warn: Clyte controller works with the Direct Plug-in\n";}  }

if (coS.indexOf("BMC")!= -1 ){ if (cyS.indexOf("Direct") != -1){ 
warnStr += "warn: for a BMC controller you want the Stand-Alone CycleAnalyst\n";}  }

if (!(baS.indexOf("No Battery")!= -1 )){ if (chS.indexOf("No Charger") != -1){ 
warnStr += "warn: battery was selected but no charger\n";}  }

if (baS.indexOf("48V")!= -1 ){if (chS.indexOf("36V") != -1){ 
warnStr += "warn: 36V charger selected for 48V battery\n";}  }

if (baS.indexOf("36V")!= -1 ){ if (chS.indexOf("48V") != -1){ 
warnStr += "warn: 48V charger selected for 36V battery\n";}  }

if (baS.indexOf("Lead")!= -1 ){ if (chS.indexOf("LiFePO4") != -1){ 
warnStr += "warn: LiFePO4 charger selected for Lead Acid battery\n";}  }

if (baS.indexOf("LiFePO4")!= -1 ){if (chS.indexOf("Lead") != -1){ 
warnStr += "warn: Lead Acid charger selected for LiFePO4 battery\n";}  }

if (!(baS.indexOf("No Battery")!= -1 )){ if (cyS.indexOf("No CycleAnalyst") != -1){ 
warnStr += "info: The CycleAnalyst measures volts, amps, and watts. It measures amp-hours, tracks charge-discharge cycles, maximizes range and optimizes battery cycle life. "
warnStr += "It also provides basic bicycle computer features including speed, trip range, total odometer distance, and time.\n";}  }

if (baS.indexOf("LiFePO4")!= -1 ){if (cyS.indexOf("No CycleAnalyst") != -1){ 
warnStr += "info: the CycleAnalyst is a great way to protect your LiFePO4 battery investment.\n";}  }


if (baS.indexOf("Dual")!= -1 ){if (!(chS.indexOf("Two") != -1)){ 
warnStr += "info: there is a two charger option for the dual battery offer\n";}  }

if (coS.indexOf("Clyte 36-72V 35A")!= -1 ){if (moS.indexOf("V1") != -1){ 
warnStr += "info: with Clyte controller 36-72V 35A should be used with BMC V2 for 72V operation.  Consider the efficient and lightweight Clyte 36-72V 20A which works for both BMC V1 and V2. \n"}  }

if (warnStr != "") { warnStr += "info:reducing warnings is suggested, but Add To Cart will work regardless\n"}  


// REPEATED MESSAGES
var PerformanceHeadingStr="Performance details of YOUR kit based on selections above\n---------------------------------------------------------\n";
var FreeWheelMessageStr1="Accepts up to a 9-speed freewheel (not a cassette).  For 8- and 9-speed freewheels, an extra washer may be required on the axle just inside the frame drop-out to prevent freewheel/frame contact.";
var TorqueArmMessageStr1="Front hub does not need a freewheel.  Instead, it comes with a torque arm and torque washers to secure it to the front fork.";
var TorqueArmMessageStr2="Torque arm is mandatory due to the powerful torque forces generated by this new motor.  Make sure your front fork is durable (not Aluminum).";


// ----------------------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------------------
if (moS.indexOf("V1") != -1){ 
    if (moS.indexOf("V1-S") != -1){ 
       specStr="Front BMC V1-S 400W Hub Motor Kit - Free Shipping\n";
    }
    if (moS.indexOf("V1-T") != -1){ 
        if (moS.indexOf("Rear") != -1){ 
            specStr="Rear BMC V1-T 400W Hub Motor Kit - Free Shipping\n";
        }
        if (moS.indexOf("Front") != -1){ 
           specStr="Front BMC V1-T 400W Hub Motor Kit - Free Shipping\n";
        }
    }
specStr+="\n";
specStr+="The BMC V1 is a geared, brushless rear hub motor.\n";
specStr+="The internally geared 4.8:1 drive system means the V1 gets more torque in a smaller, lighter package than the Crystalyte and Forsen motors.\n";
specStr+="Standard V1 Kit Specifications:\n"; 
specStr+="\n";
specStr+="*Brushless 400W continuous (800W-1200W peak) "
if (moS.indexOf("Rear") != -1){ specStr+="rear hub motor with freewheel threads\n";}
else {specStr+="front hub motor\n";}
specStr+="*Disc-brake compatible, 6-bolt disc mount on left side\n";
specStr+="*Hand-built wheel, built to high spoke tension, triple cross pattern with proper stress relief.\n"; 
specStr+="*Wheel uses a 26\" or 700c Sun Rhyno Lite rim using high-quality spokes. Other wheel sizes are available.\n";
specStr+="*Thumb throttle with 36V or 48V LED battery status and power-on indicators.\n";
specStr+="*36V 25A or 48V 30A water-proofed BMC controller with over-heating low voltage battery protection\n";
specStr+="*There is also light weight lower current Clyte 20A dual mode (both 36V and 72V) controller available for the V1 (and V2) motor.  ";
specStr+="This is perfect for those that mainly desire dual 36/72V for efficiency during high speed and high torque conditions for maximum range. \n";

if (moS.indexOf("V1-T") != -1){ 
  specStr+="*V1-T Motor speed with 36V battery and 26\" wheel is about 23 miles per hour (37 km/h) max. At 48V this will reach about 29 mph (45 km/h)\n";
}
if (moS.indexOf("V1-S") != -1){ 
specStr+="*With a high speed V1-S (available Front only) the maximum assist speed at 36V with 26\" wheel is about 34 mph and up to 28 mph actual speed on the flats.\n";
specStr+="*The V1-S motor is for flatter areas with the 26\" wheel, but not recommended for the hills unless used with a smaller wheel build (which improves torque.)\n";
specStr+="*A great application of this V1-S motor is for light weight foldables (or front wheel of a recumbent) with 20\" wheels.  This winding allows more speed with 20\" (about 22 mph) and you can consider climbing hills with the smaller wheel.\n"; 
}
    if (moS.indexOf("Rear") != -1){ 
        specStr+="*"+FreeWheelMessageStr1+"\n";
    }
    else {
        specStr+="*"+TorqueArmMessageStr1+"\n";
    }
specStr1 = specStr;
//---------------------------------------
specStr=PerformanceHeadingStr;
//----------------------------------------
if (coS.indexOf("36V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 36V 25A controller can produce 800W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than lead acid\n";
   }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with the Lead Acid battery chosen.\n"
  }
  if (baS.indexOf("No Battery")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with Lead Acid, 800W with LiFePO4.\n";
  }
  if (moS.indexOf("V1-T") != -1){ 
    specStr+="*With a high torque V1-T the maximum assist at 36V with 26\" wheel is 26mph and about 23mph actual speed on the flats.\n";
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  27.5 mph max assist.  About 24 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  26mph * 24\/26 = 24 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 22mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  26mph * 20/26 = 20 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 20mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying under 20mph, but if you want, you can later change to the 48V controller to get up to 26 mph like the 26\" wheel.\n";
     }
  } //end V1-T


if (moS.indexOf("V1-S") != -1){ 
    specStr+="*With a high speed V1-S the maximum assist speed at 36V with 26\" wheel is about 34 mph and up to 28 mph actual speed on the flats.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.\n";
    specStr+="*A great application of this motor is for light weight foldables with 20\" wheels and recumbent bike front wheels.  On recumbent, a front hub is a good choice since the weight is more balance front and back, and the spokes stress is less on the front hub than the back.  For upright bikes, or situations where you want high speed wheel on the back, consider the V2-S high speed which comes in a rear hub.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 28 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 28mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 24 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 24 mph, but if you want, you can later change to the 48V controller to get up to 30+ mph--more speed than for the 26\" wheel at 36V\n";
     }
  } //end V1-S




} //end BMC 36V controller

if (coS.indexOf("48V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1200W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1100W peak with the Lead Acid battery chosen.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 48V 30A controller can produce 1100W peak with Lead Acid, 1200W with LiFePO4.\n";
  }

   if (moS.indexOf("V1-T") != -1){ 
    specStr+="*With a high torque V1-T the maximum assist at 48V with 26\" wheel is 34mph and up to 29 mph actual speed on the flats due to wind drag.\n";
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  36 mph max assist.  Almost 30 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 27-28 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag at slower speeds. "
       specStr+="So you should still get close to 25-26 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  "
     }
  } //end V1-T

    if (moS.indexOf("V1-S") != -1){ 
    specStr+="*With a high speed V1-S the maximum assist speed at 48V with 26\" wheel is about 44 mph and up to 35 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  It is not recommended for hills.  Also condider the V2-S if you have a need for speed\n";  
    specStr+="*A great application of this motor is for high speed light weight foldables with 20\" wheels.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still around 35 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  44mph * 24\/26 = 40 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 33 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  44mph * 20/26 = 34 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 30+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }
  } //end V1-S



} // end 48V


}// end V1 stuff in general

//---------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------

if ((moS.indexOf("V2-S")) != -1){ 
    
    if (moS.indexOf("Rear") != -1) {
        specStr+="New! Rear BMC V2-S, high power, high speed 600W motor from Brushless Motor Corp.\n";
    }
    if (moS.indexOf("Front") != -1) {
        specStr+="New! Front BMC V2-S, high power, high speed 600W motor from Brushless Motor Corp.\n";
    }
specStr+="\n";
specStr+="The BMC V2-S High-Speed is a geared, brushless hub motor. The internally geared drive system means the V2-S gets more speed and torque in a smaller, lighter package than the Crystalyte and Forsen motors.\n";
specStr+="\n";
specStr+="BMC makes some of our favorite hub motors because they combine good power and torque into a relatively compact and light package. These are one of the few readily disc compatible, hub motors.\n";
specStr+="The V2-S takes speed and power in a compact hub motor to the next level\n";
specStr+="\n";
specStr+="*This motor is designed to maximize speed, using a special winding configuration\n"
specStr+="*At 36 volts, this has a freewheeling speed of about 28 miles per hour, and an on-bike speed of 25 miles per hour.\n"
specStr+="*Also great for high voltage setups, up to 72V, but this will generate insane speeds at 35+Amps with 26\" wheel (up to 50 mph! ) With smaller wheels like 20\" top speed is more reasonable but still fast.  With 20\" you will get similar performance to 26\" V2-T ( 36-40mph ).  \n"
specStr+="*The main difference between the V2 series and the V1 BMC motors is the capability to handle much more power. This is due to larger gauge windings, and more durable internal gear assembly. More power means faster climbing and higher top speed.\n";
specStr+="*Handles 600 watts or more continuously, and bursts of 1500 watts or so. We do not know the effective limit of the motor, but we're sure it has one. Warranted use is 600W continuous with short bursts up to 1,200 watts.\n";
specStr+="*6-bolt disc brake compatible\n";
if (moS.indexOf("Rear") != -1){ 
specStr+="*"+FreeWheelMessageStr1+"\n";
}
else 
{
specStr+="*"+TorqueArmMessageStr1+"  ";
specStr+="Torque arm is mandatory due to the powerful torque forces generated by this new motor.  Make sure your front fork is durable (not Aluminum).\n";
}

specStr+="*The included BMC 36V 25A controller does a fine job of powering this. However, it really shines with a higher power controller like the Crystalyte 35A/36-72V that we offer.  "
specStr+="Also there is a lighter weight lower current Clyte 20A/36-72V controller which also works for V1 as well as V2 motor.  "
specStr+="This is perfect for those that mainly desire dual 36/72V for efficiency during high speed and high torque conditions for maximum range. \n";

specStr1 = specStr;
//----------------------------------------
specStr=PerformanceHeadingStr;
//----------------------------------------

if (coS.indexOf("36V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 36V 25A controller can produce 800W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than lead acid\n";
   }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with the Lead Acid battery chosen.\n"
  }
  if (baS.indexOf("No Battery")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with Lead Acid, 800W with LiFePO4.\n";
  }


// if (moS.indexOf("V2-S") != -1){ 
    specStr+="*With a high speed V2-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  But it is also reasonably good on the hills compared to the V1-S due to the thicker gauge and improved heat tranfer.\n";
    specStr+="*A great application of this motor is for light weight foldables with 20\" wheels where you required a smaller rear wheel with higher rpms.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.  If you need a front wheel for " 
    specStr+="a recumbent, the hight speed V1-S is available.  For recumbents, front wheel is a good choice to keep stress off the spokes, since more of the weight is on the back.  Also, a front motor on a recumbent balances out the bike.  However for other upright bikes there are equal merits of front or back motors.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 28 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 28mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 24 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 24 mph, but if you want, you can later change to the 48V controller to get up to 30+ mph--more speed than for the 26\" wheel at 36V\n";
     }
//  } //end V2-S




} //end BMC 36V controller

if (coS.indexOf("48V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1200W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1100W peak with the Lead Acid battery chosen.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 48V 30A controller can produce 1100W peak with Lead Acid, 1200W with LiFePO4.\n";
  }

   

 //   if (moS.indexOf("V2-S") != -1){ 
    specStr+="*With a high speed V2-S the maximum assist speed at 48V with 26\" wheel is about 44 mph and up to 35 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  It is not recommended for hills.  Also condider the V2-S if you have a need for speed\n";  
    specStr+="*A great application of this motor is for high speed light weight foldables with 20\" wheels.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still around 35 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  44mph * 24\/26 = 40 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 33 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  44mph * 20/26 = 34 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 30+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }
 // } //end V2-S



} // end 48V
//=========================================================
if (coS.indexOf("Clyte 36-72V 20A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
        specStr+="*The 36V-72V 20A controller can produce 1500W peak with bursts up to 2500W with the dual LiFePO4 batteries.\n";
	  specStr+="It ramps up slowly from 20A at standstill to peak 35A at higher speeds allowing for efficiency.\n";
      specStr+="This controller can also be combined with the 36V/72V dual mode relay.\n";

     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high speed V2-S the maximum assist at 72V with 26\" wheel is 65 mph!  Actual speed is over 50 mph on the flats due to wind drag.\n";
          specStr+="*If you have a desire to race or and insane need to speed, this is probably your motor.   If you want to put more power into hill climbing consider V2-T option as well\n";
          specStr+="*This motor is best applied (for the sane) toward getting smaller wheels moving\n";
          specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  68 mph max assist.  Actual still over 50 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  65 mph * 24\/26 = 60 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 50 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  65 mph * 20/26 = 50 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get over 45 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This motor will get those small wheels moving with decent hill climbing as well.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 20A controller can produce 1200W peak at top speeds(36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
      specStr+="*With a high speed V2-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";

    specStr+="*For seriously insane speed/hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

        if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 28 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 28mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 24 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 24 mph, but if you want, you can later change to the 48V controller to get up to 30+ mph--more speed than for the 26\" wheel at 36V\n";
     }

  

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 20A controller can produce 1400W peak at top speeds (48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";
       specStr+="*With a high speed V2-S the maximum assist speed at 48V with 26\" wheel is about 44 mph and up to 35 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
      
       specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation";
      
       if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still around 35 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  44mph * 24\/26 = 40 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 33 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  44mph * 20/26 = 34 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 30+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }

     

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 20A

//=======================================================================
//=========================================================
if (coS.indexOf("Clyte 36-72V 35A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
      specStr+="*The 36V-72V 35A controller can produce 2500W peak with bursts up to 3000W with the dual LiFePO4 batteries.\n";

     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high speed V2-S the maximum assist at 72V with 26\" wheel is 65 mph!  Actual speed is over 50 mph on the flats due to wind drag.\n";
          specStr+="*If you have a desire to race or and insane need to speed, this is probably your motor.   If you want to put more power into hill climbing consider V2-T option as well\n";
          specStr+="*This motor is best applied (for the sane) toward getting smaller wheels moving\n";
          specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  68 mph max assist.  Actual still over 50 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  65 mph * 24\/26 = 60 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 50 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  65 mph * 20/26 = 50 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get over 45 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This motor will get those small wheels moving with decent hill climbing as well.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 35A controller can produce 1200W peak (36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
      specStr+="*With a high speed V2-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";

    specStr+="*For seriously insane speed/hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

        if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 28 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 28mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 24 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 24 mph, but if you want, you can later change to the 48V controller to get up to 30+ mph--more speed than for the 26\" wheel at 36V\n";
     }

  

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 35A controller can produce 1400W peak (48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";
       specStr+="*With a high speed V2-S the maximum assist speed at 48V with 26\" wheel is about 44 mph and up to 35 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
      
       specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation";
      
       if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still around 35 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  44mph * 24\/26 = 40 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 33 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  44mph * 20/26 = 34 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 30+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }

     

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 35A

//=======================================================================


  
} // end V2-S in general

//---------------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------------

if ((moS.indexOf("V3-S")) != -1){ 
    
    if (moS.indexOf("Rear") != -1) {
        specStr+="Just In! Rear BMC V3-S, ultra high power, ultra high speed 1000W motor from Brushless Motor Corp.\n";
		specStr+="Since this model is so new, we have to estimate performance numbers.  Basically, we looked at V2-S and then add more speed and power to those figures\n";
		specStr+="After testing and customer feedback, we will tweak the performance numbers for V3-S for better accuracy\n";
    }
    if (moS.indexOf("Front") != -1) {
        specStr+="Just In! Front BMC V3-S, ultra high power, ultra high speed 1000W motor from Brushless Motor Corp.\n";
    }
specStr+="\n";
specStr+="The BMC V3-S High-Speed is a geared, brushless hub motor. The internally geared drive system means the V3-S gets more speed and torque in a smaller, lighter package than the Crystalyte and Forsen motors.\n";
specStr+="\n";
specStr+="BMC makes some of our favorite hub motors because they combine good power and torque into a relatively compact and light package. These are one of the few readily disc compatible, hub motors.\n";
specStr+="The V3-S takes speed and power in a compact hub motor to the ultimate level\n";
specStr+="\n";
specStr+="*This motor is designed to maximize speed--event at lower voltages, using a special winding configuration\n"
specStr+="*This motor can also handle very high current controllers (60A+) for extra power at lower voltages (if necessary).\n"
specStr+="*At 36 volts, this has a freewheeling speed of about 35 miles per hour, and an on-bike speed of 30+ miles per hour (more with high current controller).\n"
specStr+="*Also great for high voltage setups, up to 72V, but this will generate insane speeds at 40-60 Amps with 26\" wheel (up to 60 mph?! ) With smaller wheels like 20\" top speed is more reasonable but still insane at 72V.  With 20\" you will get more speed than 26\" V2-T 72V ( 40-45mph? ).  \n"
specStr+="*The main difference between both the V2/V3 series and the V1 BMC motors is the capability to handle much more power. This is due to larger gauge windings, and more durable internal gear assembly. More power means faster climbing and higher top speed.\n";
specStr+="*Handles 1000 watts or more continuously, and bursts of 2500 watts (or more?). We do not know the effective limit of the motor, but we're sure it can handle very high current controllers. Warranted use is 1000W continuous with short bursts up to 2000 watts.\n";
specStr+="*6-bolt disc brake compatible\n";
if (moS.indexOf("Rear") != -1){ 
specStr+="*"+FreeWheelMessageStr1+"\n";
}
else 
{
specStr+="*"+TorqueArmMessageStr1+"  ";
specStr+="Torque arm is mandatory due to the powerful torque forces generated by this new motor.  Make sure your front fork is durable (not Aluminum).\n";
}

specStr+="*The included BMC 36V 25A controller does a fine job of powering this. However, it really shines with a higher power controller like the Crystalyte 35A/36-72V that we offer.  "
specStr+="Also there is a lighter weight lower current Clyte 20A/36-72V controller which also works for V1 as well as V2 motor.  "
specStr+="This is perfect for those that mainly desire dual 36/72V for efficiency during high speed and high torque conditions for maximum range. \n";

specStr1 = specStr;
//----------------------------------------
specStr=PerformanceHeadingStr;
//----------------------------------------

if (coS.indexOf("36V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 36V 25A controller can produce 800W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than lead acid\n";
   }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with the Lead Acid battery chosen.\n"
  }
  if (baS.indexOf("No Battery")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with Lead Acid, 800W with LiFePO4.\n";
  }


// if (moS.indexOf("V2-S") != -1){ 
    specStr+="*With a high speed V3-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  But it is also reasonably good on the hills compared to the V1-S due to the thicker gauge and improved heat tranfer.\n";
	specStr+="*Fore even more hill climbing, this motor can always be upgraded to some of the higher current controller (like 60A) if needed.\n";
    specStr+="*A great application of this motor is for light weight foldables or recumbents with smaller 20\" wheels where you required a smaller rear wheel with higher rpms.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.  If you need a front wheel for " 
    specStr+="a recumbent, the high speed V1-S is available.  For recumbents, front wheel is a good choice to keep stress off the spokes, since more of the weight is on the back.  Also, a front motor on a recumbent balances out the bike.  However for other upright bikes there are equal merits of front or back motors.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 30+ mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 30 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 28 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 28 mph, but if you want, you can later change to the 48V controller to get up to 35+ mph--more speed than for the 26\" wheel at 36V\n";
     }
//  } //end V2-S




} //end BMC 36V controller

if (coS.indexOf("48V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1200W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1100W peak with the Lead Acid battery chosen.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 48V 30A controller can produce 1100W peak with Lead Acid, 1200W with LiFePO4.\n";
  }

   

 //   if (moS.indexOf("V3-S") != -1){ 
    specStr+="*With a high speed V3-S the maximum assist speed at 48V with 26\" wheel is about 50 mph and nearly 40 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  And it can handle hills (even thought it is high speed)--especially if you get a high current controllers.  Consider the V3-S if you have a need for speed even at low voltages\n";  
    specStr+="*A great application of this motor is for high speed light weight foldables or recumbents with smaller 20\" wheels.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still up to 40 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  50mph * 24\/26 = 46 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 40 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  50mph * 20/26 = 38 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 35+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }
 // } //end V2-S



} // end 48V


//=========================================================
if (coS.indexOf("Clyte 36-72V 20A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
      specStr+="*The 36V-72V 20A controller can produce 1500W peak with bursts up to 2500W with the dual LiFePO4 batteries.\n";
	  specStr+=" It ramps up slowly from 20A at standstill to peak 35A at higher speeds allowing for efficiency.\n";
      specStr+=" This controller can also be combined with the 36V/72V dual mode relay.\n";

     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high speed V3-S the maximum assist at 72V with 26\" wheel is almost 70 mph!  Actual speed should be over 50 mph (need to test this) on the flats due to wind drag.\n";
          specStr+="*If you have a desire to race or have the ultimate need for speed, this is probably your motor.   If you want to put more power into hill climbing consider upgrading to a high current controller as well\n";
          specStr+="*This motor is best applied (for the sane) toward getting smaller wheels moving\n";
          //specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  ~70 mph max assist.  Actual still over 50 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  70 mph * 24\/26 = 64 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 50 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  70 mph * 20/26 = 53 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get 45-50 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This motor will get those small wheels moving with decent hill climbing as well.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 20A controller can produce 1200W peak at top speeds(36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
      specStr+="*With a high speed V3-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";

    specStr+="*For seriously insane speed/hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";
	
	 if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 30+ mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 30 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 28 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 28 mph, but if you want, you can later change to the 48V controller to get up to 35+ mph--more speed than for the 26\" wheel at 36V\n";
     }

     

  

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 20A controller can produce 1400W peak at top speeds(48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";
	  
	   specStr+="*With a high speed V3-S the maximum assist speed at 48V with 26\" wheel is about 50 mph and nearly 40 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  And it can handle hills (even thought it is high speed)--especially if you get a high current controllers.  Consider the V3-S if you have a need for speed even at low voltages\n";  
    specStr+="*A great application of this motor is for high speed light weight foldables or recumbents with smaller 20\" wheels.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still up to 40 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  50mph * 24\/26 = 46 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 40 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  50mph * 20/26 = 38 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 35+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }
      

     

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 20A

//=======================================================================
//=========================================================
if (coS.indexOf("Clyte 36-72V 35A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
      specStr+="*The 36V-72V 35A controller can produce 2500W peak with bursts up to 3000W with the dual LiFePO4 batteries.\n";

     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high speed V3-S the maximum assist at 72V with 26\" wheel is almost 70 mph!  Actual speed should be over 50 mph (need to test this) on the flats due to wind drag.\n";
          specStr+="*If you have a desire to race or have the ultimate need for speed, this is probably your motor.   If you want to put more power into hill climbing consider upgrading to a high current controller as well\n";
          specStr+="*This motor is best applied (for the sane) toward getting smaller wheels moving\n";
          //specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  ~70 mph max assist.  Actual still over 50 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  70 mph * 24\/26 = 64 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 50 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  70 mph * 20/26 = 53 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get 45-50 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This motor will get those small wheels moving with decent hill climbing as well.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 35A controller can produce 1200W peak (36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
      specStr+="*With a high speed V3-S the maximum assist speed at 36V with 26\" wheel is about 35 mph and up to 30 mph actual speed on the flats.\n";

    specStr+="*For seriously insane speed/hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";
	
	 if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  Still around 30+ mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 30 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get close to 28 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="Many are happy staying near 28 mph, but if you want, you can later change to the 48V controller to get up to 35+ mph--more speed than for the 26\" wheel at 36V\n";
     }

     

  

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 35A controller can produce 1400W peak (48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";
	  
	   specStr+="*With a high speed V3-S the maximum assist speed at 48V with 26\" wheel is about 50 mph and nearly 40 mph (need to confirm this) actual speed on the flats due to wind drag.\n";
    specStr+="*This motor is for flatter areas with the 26\" wheel.  And it can handle hills (even thought it is high speed)--especially if you get a high current controllers.  Consider the V3-S if you have a need for speed even at low voltages\n";  
    specStr+="*A great application of this motor is for high speed light weight foldables or recumbents with smaller 20\" wheels.  This winding allows more speed with 20\" and you can consider climbing hills with the smaller wheel.\n"; 
    
   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  But, still up to 40 mph max on the flats.\n";
     }
    if (wbS.indexOf("24 ") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  50mph * 24\/26 = 46 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 40 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  50mph * 20/26 = 38 mph max assist.  "
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. "
       specStr+="So you should still get 35+ mph top speed on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  "
       specStr+="If this seems to fast for your little 20\" foldable ebike, consider backing off to 36V--still gets up to 24-25 mph\n";
     }
      

     

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 35A

//=======================================================================

  
} // end V3-S in general

if (moS.indexOf("V2-T") != -1){ 

specStr+="New! Rear BMC V2-T, high power, high torque brushless hub motor kit, from Brushless Motor Corp.\n";
specStr+="\n";
specStr+="This is a brand new motor from BMC designed specifically for high power and high torque.\n";
specStr+="\n";
specStr+="BMC makes some of our favorite hub motors because they combine good power and torque into a relatively compact and light package. These are one of the few readily disc compatible, rear hub motors.\n";
specStr+="The V2-T takes hill climbing and acceleration to the next level. More details:\n";
specStr+="\n";
specStr+="*This motor is designed for torque rather than speed.\n";
specStr+="*Excellent for climbing, or heavily loaded bikes\n";
specStr+="*Also great for high voltage setups, up to 72V, without generating insane speeds (we estimate at 72 V its top speed will be around 36 miles per hour with 26\" wheel--still pretty fast)";
specStr+="With 20\" wheels the speed is still about 28-30 mph, but with extreme hillclimbing.   This configuration is the ultimate hillbuster.\n";
specStr+="*The main difference between the V2 series and the V1 BMC motors is the capability to handle much more power. This is due to larger gauge windings, and more durable internal gear assembly\n";
specStr+="*Handles 600 watts or more continuously, and bursts of 1500 Watts and more\n";
specStr+="*6-bolt disc brake compatible\n";
specStr+="*"+FreeWheelMessageStr1+"\n";
specStr+="*The included BMC 36V 25A controller does a fine job of powering this. However, it really shines with a higher power controller like the Crystalyte 35A/36-72V that we offer. ";
specStr+="Also there is a lighter weight lower current Clyte 20A/36-72V controller which also works for V1 as well as V2 motor.  ";
specStr+="This is perfect for those that mainly desire dual 36/72V for efficiency during high speed and high torque conditions for maximum range. \n";

specStr1=specStr;
//---------------------------------------------------------------
specStr=PerformanceHeadingStr;
//---------------------------------------------------------------

if (coS.indexOf("36V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 36V 25A controller can produce 800W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than lead acid\n";
   }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with the Lead Acid battery chosen.\n"
  }
  if (baS.indexOf("No Battery")!= -1 ){
    specStr+="*The 36V 25A controller can produce 720W peak with Lead Acid, 800W with LiFePO4.\n";
  }

//  if (moS.indexOf("V2-T") != -1){ 
    specStr+="*With a high torque V2-T the maximum assist at 36V with 26\" wheel is 26mph and about 24mph actual speed on the flats.\n";
    specStr+="*For seriously insane hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  27.5 mph max assist.  About 25 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  26mph * 24\/26 = 24 mph max assist.  "
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 23mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  26mph * 20/26 = 20 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. ";
       specStr+="So you should still get close to 20mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  ";
       specStr+="Many are happy staying under 20mph, but if you want, you can later change to the 48V controller to get up to 26 mph like the 26\" wheel.\n";
     }
//  } //end V2-T


} //end BMC 36V controller


if (coS.indexOf("48V")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1200W peak with the LiFePO4 battery chosen.\n";
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 48V 30A controller can produce 1100W peak with the Lead Acid battery chosen.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 48V 30A controller can produce 1100W peak with Lead Acid, 1200W with LiFePO4.\n";
  }

//   if (moS.indexOf("V2-T") != -1){ 
    specStr+="*With a high torque V2-T the maximum assist at 48V with 26\" wheel is 34mph but actual speed is 30 mph on the flats due to wind drag.\n";
    specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation";
    specStr+="*For seriously insane hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V and 48V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  36 mph max assist.  Almost 31 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  ";
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 27-28 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag at slower speeds. ";
       specStr+="So you should still get close to 25-26 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
     }
 // } //end V2-T

    

} // end 48V


//=========================================================
if (coS.indexOf("Clyte 36-72V 20A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
      specStr+="*The 36V-72V 20A controller can produce 1500W peak with bursts up to 2500W with the dual LiFePO4 batteries.\n";
	  specStr+=" It ramps up slowly from 20A at standstill to peak 35A at higher speeds allowing for efficiency.\n";
      specStr+=" This controller can also be combined with the 36V/72V dual mode relay.\n";
     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high torque V2-T the maximum assist at 72V with 26\" wheel is 50 mph but actual speed is 36-38 mph on the flats due to wind drag.\n";
          specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  52 mph max assist.  Actual 36-38 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  50mph * 24\/26 = 46 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 36 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  50mph * 20/26 = 38 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get over 35 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This will have extreme hillbusting capabilities.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 20A controller can produce 1200W peak at higher speeds (36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
           specStr+="*With a high torque V2-T the maximum assist at 36V with 26\" wheel is 26mph and about 24mph actual speed on the flats.\n";
    specStr+="*For seriously insane hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  27.5 mph max assist.  About 25 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  26mph * 24\/26 = 24 mph max assist.  ";
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 23mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  26mph * 20/26 = 20 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. ";
       specStr+="So you should still get close to 20mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  ";
       specStr+="Many are happy staying under 20mph, but if you want, you can later change to the 48V controller to get up to 26 mph like the 26\" wheel.\n";
     }

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 20A controller can produce 1400W peak at higher speeds(48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";

       specStr+="*With a high torque V2-T the maximum assist at 48V 35A with 26\" wheel is 34mph but actual speed is 31 mph on the flats due to wind drag.\n";
       specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation";
      

       if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  36 mph max assist.  Almost 32 mph on the flats.\n";
       }
       if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  ";
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 27-28 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
       }
       if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag at slower speeds. ";
       specStr+="So you should still get close to 25-26 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  \n";
       }

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 20A

//=======================================================================

//=========================================================
if (coS.indexOf("Clyte 36-72V 35A")!= -1 ){  

  if (baS.indexOf("LiFePO4")!= -1 ){
    
      specStr+="*The 36V-72V 35A controller can produce 2500W peak with bursts up to 3000W with the dual LiFePO4 batteries.\n";

     if (baS.indexOf("Dual 36V")!= -1 ){

          specStr+="*With a high torque V2-T the maximum assist at 72V with 26\" wheel is 50 mph but actual speed is 36-38 mph on the flats due to wind drag.\n";
          specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation\n";
    
          if (wbS.indexOf("700c") != -1) {
            specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  52 mph max assist.  Actual 36-38 mph on the flats.\n";
          }
         if (wbS.indexOf("24") != -1) {
             specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  50mph * 24\/26 = 46 mph max assist.  ";
             specStr+="However there will be more torque or accelleration with the smaller wheel. "
             specStr+="So you should still get close to 36 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
         }
         if (wbS.indexOf("20 ") != -1) {
            specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  50mph * 20/26 = 38 mph max assist.  ";
            specStr+="However there will be much more torque or accelleration with the smaller wheel and you will get closer to max assist speed fighting the wind resistance ";
            specStr+="So you should still get over 35 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  ";
            specStr+="This will have extreme hillbusting capabilities.\n";
          }
     } // End if dual mode selected.

   // }     // end if lithium battery


    if (baS.indexOf("LiFePO4 36V")!= -1 ){
      specStr+="*You have chosen just one 36V battery.  The 36V-72V 35A controller can produce 1200W peak (36V 35A). You can add another 36V battery now or later for dual 36V, 72V\n";
           specStr+="*With a high torque V2-T the maximum assist at 36V with 26\" wheel is 26mph and about 24mph actual speed on the flats.\n";
    specStr+="*For seriously insane hillclimbing this motor can be upgraded to the 36V-72V dual mode/dual battery option (requires 2 36V)\n";
    specStr+="*Most are happy with the 36V climbing, but if you want option to upgrade to 72V, you could start with 1 36V battery and add the second battery later when finances allow.\n";

   
     if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  27.5 mph max assist.  About 25 mph on the flats.\n";
     }
    if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  26mph * 24\/26 = 24 mph max assist.  ";
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 23mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
    }
     if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  26mph * 20/26 = 20 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag with the lower speed. ";
       specStr+="So you should still get close to 20mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build ofthis same motor.  ";
       specStr+="Many are happy staying under 20mph, but if you want, you can later change to the 48V controller to get up to 26 mph like the 26\" wheel.\n";
     }

    } // end choose one 36V


    if (baS.indexOf("LiFePO4 48V")!= -1 ){
      specStr+="*You have chosen a 48V battery.  The 36V-72V 35A controller can produce 1400W peak (48V 35A). If you prefer the 48V performance and don't need the dual 36-72V consider the BMC 48V 30A.  ";
      specStr+="If you really desire the 72V performance eventually, but can only finance one battery, consider starting with a single 36V LiFePO4 battery and add the other later.\n";

       specStr+="*With a high torque V2-T the maximum assist at 48V 35A with 26\" wheel is 34mph but actual speed is 31 mph on the flats due to wind drag.\n";
       specStr+="*Like the V1-T the V2-T can climb hills, but the V2-T can climb hills for an even longer duration due thicker gauge, bigger magnets, and therefore even more heat dissipation";
      

       if (wbS.indexOf("700c") != -1) {
       specStr+="*You have chosen a larger 700c (27.56\") wheel than the 26\" which means slightly more speed.  36 mph max assist.  Almost 32 mph on the flats.\n";
       }
       if (wbS.indexOf("24") != -1) {
        specStr+="*You have chosen a slightly smaller (24\") wheel than 26\" which means slightly less speed.  34mph * 24\/26 = 31 mph max assist.  ";
        specStr+="However there will be more torque or accelleration with the smaller wheel. "
        specStr+="So you should still get close to 27-28 mph on the flats, and you will have 8% improved hill climbing ability compared to the 26\".\n";
       }
       if (wbS.indexOf("20 ") != -1) {
       specStr+="*You have chosen a smaller (20\") wheel than 26\" which means less speed.  34mph * 20/26 = 26 mph max assist.  ";
       specStr+="However there will be much more torque or accelleration with the smaller wheel and less wind drag at slower speeds. ";
       specStr+="So you should still get close to 25-26 mph on the flats, and you will have 30% better hill climbing ability than with the 26\" build of this same motor.  \n";
       }

    }  // end choose one 48V

 
    specStr+="*The approximate weight of your kit is "+formatted_weight+"\n";
    specStr+="*With the lighter weight LFP battery this should have better accelleration and hillclimbing than with lead acid\n";
  }  // end Lithium battery
  if (baS.indexOf("Lead Acid")!= -1 ){
    specStr+="*The 72V 35A controller can produce 1400W peak with the Lead Acid.  You will need 6 12V batteries to get to 72V.  This may get heavy unless you get a smaller 12V lead acid format.\n"
  }
  
  if (baS.indexOf("No Battery")!= -1 ){
      specStr+="*The 72V 35A controller can produce 1400W peak with Lead Acid, 1500W (with bursts up to 2000W) with LiFePO4.\n";
  }



} // end Clyte 36-72V 35A

//=======================================================================


 
} // end V2-T in general

if (baS.indexOf("No Battery")==-1) {

num1 = baS.indexOf("V");
num2 = baS.indexOf("Ah");

my1 = baS.substring((num1 - 2), num1);
my2 = baS.substring((num2 - 2), num2);
mynum1=format_number(my1,0);
mynum2=format_number(my2,0);
watt_hours=mynum1*mynum2;

specStr+="\n";
specStr+="Range\n";
specStr+="-------------\n";


 if (baS.indexOf("LiFePO4")!= -1 ){
     watt_hours=watt_hours*1.05;
     if (baS.indexOf("Dual")!= -1 ){
	  watt_hours=watt_hours*2; 
	 }
 }

miles_range = format_number(watt_hours/26,1);
//alert(watt_hours);
//alert(miles_range); 
  specStr+="*The battery you selected has a capacity of up to "+watt_hours+" Watt-Hours.\n";
  specStr+="*This can give an approximate range of up to "+miles_range+" miles without pedal assist under ideal conditions--on the flats (no hills), under 26 mph, decent pavement, no wind, continuous velocity and steady throttle.\n";
  specStr+="*Pedal assist will increase your range, maybe even double it for low speeds.  Hills, start-stops, poorly inflated tires, and poor aerodynamics will decrease your range.\n";
  specStr+="*Excessive speed will decrease your range.  Wind drag goes up significantly above 30mph (a cubic relationship).  See Intro tab of Betterbikes for graph of wind drag.\n";
if (baS.indexOf("LiFePO4")!= -1 ){
    specStr+="*Since you seleced a LiFePO4 battery, your are going to be able to get more range in hilly conditions compared to lead acid.  On the flats you will be able to use less energy during acceleration\n";
 } 
    
else
{
    specStr+="*A lead acid battery is fine for the flats, however in the hills you will have less range than stated above.\n";
}
}
//-------------------------------------------------------------------------------------------------------------------------------------------------------------

var moName="bmcMotor";  		var moCap="Motor";  
var coName="controller"; 	var coCap="Controller"; 
var thName="throttle"; 		var thCap="Throttle"; 
var wbName="wheelBuild";	var wbCap="Wheel Build";
var frName="freewheel";   	var frCap="Freewheel";
var baName="battery";     	var baCap="Battery";
var chName="batteryCharger";  var chCap="Charger";
var wsName="batteryWireset";   	var wsCap="Wireset";
var cyName="cycleanalyst"; 	var cyCap="CycleAnalyst";
var ttName="thornTube";  	var ttCap="Thorn Tube";
var kvName="kevlarTire";  	var kvCap="Kevlar Tire";
var cbName1="ebrake";  	var cbCap1="Ebrake Pair";
var cbName2="cruise";  	var cbCap2="Cruise Control";

//moCap= moS.substring(83,moS.length-5);


var dSize="100";  //default image size

if (moS.indexOf("V1") != -1){ addKI(moName,"bmc_v1_26.jpg",moCap,dSize); }
if (moS.indexOf("V2") != -1){ addKI(moName,"bmc_v2_26.jpg",moCap,dSize); }

if (coS.indexOf("36V") != -1){ addKI(coName,"bmc_36V_25A.jpg",coCap,dSize); }
if (coS.indexOf("48V") != -1){ addKI(coName,"bmc_36-48V_30A.jpeg",coCap,dSize); }
if (coS.indexOf("Clyte 36-72V 20A") != -1){ addKI(coName,"ctpl-jny-R(36-72)20.jpg",coCap,dSize); }
if (coS.indexOf("Clyte 36-72V 35A") != -1){ addKI(coName,"Clyte36-72V35AController.jpg",coCap,dSize); }
if (coS.indexOf("Clyte 36-72V 40A") != -1){ addKI(coName,"Clyte36-72V40AController.jpg",coCap,dSize); }
if (coS.indexOf("Kelly") != -1){ addKI(coName,"KEB72450.png",coCap,dSize); }
if (coS.indexOf("Clyte Dual Motors") != -1){ addKI(coName,"ClyteDual36-72V20AController.jpg",coCap,dSize); }
if (coS.indexOf("No Controller") != -1){ addKI(coName,"","",0); }



if (thS.indexOf("Gauge 36V") != -1){ addKI(thName,"thumb_throttle_gauge.jpg",thCap,dSize); }
if (thS.indexOf("Gauge 48V") != -1){ addKI(thName,"thumb_throttle_gauge.jpg",thCap,dSize); }
if (thS.indexOf("Clyte Thumb") != -1){ addKI(thName,"Clyte_thumb_no_gauge.jpg",thCap,dSize); }
if (thS.indexOf("Half Twist") != -1){ addKI(thName,"half_twist_throttle.jpg",thCap,dSize); }
if (thS.indexOf("Full Twist") != -1){ addKI(thName,"full_twist_throttle.jpg",thCap,dSize); }
if (thS.indexOf("No Throttle") != -1){ addKI(thName,"","",0); }



if (frS.indexOf("6-speed") != -1){ addKI(frName,"pyramid_6sp_14-28_freewheel.jpg",frCap,dSize); }
if (frS.indexOf("7-speed") != -1){ addKI(frName,"sunrace_7_13-28_freewheel.jpg",frCap,dSize); }
if (frS.indexOf("8-speed") != -1){ addKI(frName,"pyramid_8sp_13-28_freewheel.jpg",frCap,dSize); }
if (frS.indexOf("9-speed") != -1){ addKI(frName,"sunrace_9_13-32_freewheel.jpg",frCap,dSize); }
if (frS.indexOf("No Freewheel") != -1){ addKI(frName,"","",0); }

if (baS.indexOf("Acid 36V10A") != -1){ addKI(baName,"dd10-12t2.jpg",baCap,dSize); }
if (baS.indexOf("Acid 36V12A") != -1){ addKI(baName,"dd12-12t2.jpg",baCap,dSize); }
if (baS.indexOf("Acid 48V10A") != -1){ addKI(baName,"dd10-12t2.jpg",baCap,dSize); }
if (baS.indexOf("Acid 48V12A") != -1){ addKI(baName,"dd12-12t2.jpg",baCap,dSize); }
if (baS.indexOf("PO4 36V10Ah") != -1){ addKI(baName,"LFP_36V_10A_3.5X3.5X13.5_8lbs.jpg",baCap,dSize); }
if (baS.indexOf("PO4 48V10Ah") != -1){ addKI(baName,"LFP_48V_10A_5.3X3.3X10.4_10lbs.jpg",baCap,dSize); }
if (baS.indexOf("PO4 48V15Ah") != -1){ addKI(baName,"nophoto.gif",baCap,dSize); }
if (baS.indexOf("Dual") != -1){ if (baS.indexOf("36V") != -1){ addKI(baName,"DUAL_LFP_36V_10A_3.5X3.5X13.5_8lbs.jpg",baCap,dSize); }}
if (baS.indexOf("Dual") != -1){ if (baS.indexOf("48V") != -1){ addKI(baName,"DUAL_LFP_48V_10A_5.3X3.3X10.4_10lbs.jpg",baCap,dSize); }}
if (baS.indexOf("No Battery") != -1){ addKI(baName,"","",0); }

if (chS.indexOf("Acid 36V 2A") != -1){ addKI(chName,"3605s.jpg",chCap,dSize); }
if (chS.indexOf("Acid 48V 2A") != -1){ addKI(chName,"jj48020.jpg",chCap,dSize); }
if (chS.indexOf("PO4 36V 2A") != -1){ addKI(chName,"LFP_charger_36V2A_12pin.jpg",chCap,dSize); }
if (chS.indexOf("PO4 48V 2A") != -1){ addKI(chName,"LFP_charger_48V2A_simple2pin.jpg",chCap,dSize); }
if (chS.indexOf("Two LiFePO4 36V 2A") != -1){ addKI(chName,"DUAL_LFP_charger_36V2A_12pin.jpg",chCap,dSize); }
if (chS.indexOf("Two LiFePO4 48V 2A") != -1){ addKI(chName,"DUAL_LFP_charger_48V2A_simple2pin.jpg",chCap,dSize); }
if (chS.indexOf("No Charger") != -1){ addKI(chName,"","",0); }

if (wsS.indexOf("switch") != -1){ addKI(wsName,"harness.jpg",wsCap,dSize); } else { addKI(wsName,"","",0); }




if (cyS.indexOf("Stand") != -1){ addKI(cyName,"cycleanalystSAParts.jpg",cyCap,dSize); }
if (cyS.indexOf("Direct") != -1){ addKI(cyName,"cycleanalystDPParts.jpg",cyCap,dSize); }
if (cyS.indexOf("No CycleAnalyst") != -1){ addKI(cyName,"","",0); }

if (ttS.indexOf("Thorn Tube") != -1){ addKI(ttName,"thorn_tube_26.jpg",ttCap,dSize); }
if (ttS.indexOf("No Tube") != -1){ addKI(ttName,"","",0); }

if (kvS.indexOf("Kevlar Tire") != -1){ addKI(kvName,"kevlar_tire.jpg",kvCap,dSize); }
if (kvS.indexOf("No Tire") != -1){ addKI(kvName,"","",0); }

if (cbS.indexOf("Ebrake") != -1){ addKI(cbName1,"ebrake.jpg",cbCap1,dSize); addKI(cbName2,"","",0); }
if (cbS.indexOf("Cruise") != -1){ addKI(cbName2,"cruisecontrol.jpg",cbCap2,dSize); }
if (cbS.indexOf("No Ebrake") != -1){ addKI(cbName1,"","",0); addKI(cbName2,"","",0);}


object.VARPricea.value=formatted_total;
object.VARWeighta.value=formatted_weight;
object.VARCompa.value=warnStr;
specStr1=cleanList(specStr1);
object.VARSpeca.value=specStr1;
specStr=cleanList(specStr);
object.VARSpec2a.value=specStr;

//alert("in updateDynamicContent3");

 }
