
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  
}
function doIt()
              {//var height=window.outerHeight;
			   //var width=window.outerWidth;
                   window.resizeTo(1024,850);
                   window.moveTo(0, 0);
				  // window.locationbar.visible = false;
//<body onload="window.resizeTo(w,h);window.moveTo(0,0);">

				   //window.menubar.visible = false;
                   //window.location.href = "http://www.google.com/";
				   //window.self.close();
              }
      
//-->



function MonthTxt (MonthNumber) {
   var Month=new Array();
   Month[1]="January";
   Month[2]="February";
   Month[3]="March";
   Month[4]="April";
   Month[5]="May";
   Month[6]="June";
   Month[7]="July";
   Month[8]="August";
   Month[9]="September";
   Month[10]="October";
   Month[11]="November";
   Month[12]="December";
return Month[MonthNumber];
}

function status_message(i) {
  var max = 5; // number of strings
  var a = new Array();
  a[1] = "ELectric bike can change your life ."
  a[2] = "Check Out,Find information for you."
  a[3] = "Join our Hiking Group, to Exercise good for you."
  a[4] = "Save the Earth, feel the sun, enjoy the fresh air."
  a[5] = "Get rid of the suffering of oil, bike hybrid bicycle."
  defaultStatus=a[i];
  i= i+1;
  if (i > max) {
    i=1;
  }
  ii=i; //using i directly in setTimeout 
        //I got the error message: "i is not defined"
setTimeout("status_message(ii)",5000); //5 seconds

} /*end function debug*/

// global variables to form MY addresses
var at1 = "@";
var dot = ".";
var typ = "com";
var id1 = "sale";    // rl id1
var id2 = "s";    // rl id2
var url = "hjhandy";       // rl URL
var fid1 = "ron";      // fa id1
var fid2 = "853211"    // fa id2
var furl = "yahoo";    // fa URL

function FixShp (obj1) {
var ship= eval(obj1.shipping.value);
obj1.os0.value=ship+".00";
  return true;             // make it work...
}

function FixBusi (obj1) {  // PayPal FORM business value
var tmp;
  if (obj1.business) {     // see what is in this form 
   // tmp = obj1.business.value;
    obj1.business.value = id1 + id2 + at1 + url + dot + typ;
	obj1.cmd.value = "_cart";
	obj1.no_note.value =0;
	obj1.currency_code.value = "USD";
	obj1.lc.value = "US";
	if(obj1.display!=1)
	obj1.add.value = 1;
 }
  return true;             // make it work...
}

function FixLink (obj1) {  // fix any PayPal link in calling FORM
var tmp,org,ary=new Array();
  for (i=0; i<obj1.length; i++) {  // run whole FORM
    obj = obj1.elements[i];        // address an element
//alert(obj.name);
    org = obj.value;
    tmp = org;  // place holder
    ary = tmp.split (furl);  // do we have a fake
    if (ary.length > 1) {    // still a fake
      tmp = ary.join ("members." + url);
      obj.value = tmp;
//alert("Fix URL... \n\n" +
  //    obj.name + " value was ... \n   " + org + "\n\n\n" +
  //    "New value IS  ... \n   " + tmp);
    }
    org = tmp;  // any more stuff to fix?
    ary = tmp.split (fid1 + fid2);  // have a fake ID here?
    if (ary.length > 1) {    // still a fake
      tmp = ary.join (id1 + id2);
      obj.value = tmp;
//alert("Fix ID... \n\n" +
   //   obj.name + " value was ... \n   " + org + "\n\n\n" +
  //    "New value IS  ... \n   " + tmp);
    }
  }
}

function FixMail (obj1) {  // fix a hyperlink mail addr
var tmp;
  tmp = obj1.href;
  obj1.href = "mailto:" + id1 + id2 + at1 + url + dot + typ;
//  alert ("old E-mail address was ... \n   " + tmp + "\n\n\n" +
  //       "new E-mail address is  ... \n   " + obj1.href);
  return true;             // make it work...
}


function Fixos0 (obj1) {    
var shp=eval(obj1.shipping.value); 
  if(shp==0){obj1.os0.value=" pick up.";}
   if(shp>0&&shp<30){obj1.os0.value=" local Delivery.";}
   if(shp>=60){obj1.os0.value=" Regular Shipping.";}
obj1.shipping2.value=shp;

  return true;             // make it work...
}
function Fixamountx (obj1) {  // submit,
var extend=eval(obj1.extend.value); 
obj1.os0.value=extend;
var amt=eval(obj1.amo.value);
var tot=(amt*100+extend*100)/100;
obj1.amount.value=(tot);
  // obj1.target = 'paypal';
   //	obj1.submit();
	//obj1.reset();
	
  //return false;
}

function Fixamount (obj1) {  // submit,
var extend=eval(obj1.extend.value); 
obj1.os1.value=extend;
var amt=eval(obj1.amo.value);
var tot=(amt*100+extend*100)/100;
obj1.amount.value=(tot);
  // obj1.target = 'paypal';
   //	obj1.submit();
	//obj1.reset();
	
  //return false;
}

function FixShpold (obj1) {
var sel;
var sprice=6;
var mprice=8;
var lprice=10;
var time=1;
var price=0,price1=0;
sel= obj1.quantity.value;
if (sel!=0){
if (sel<=4){ price=sprice;}
 else{if (sel<=6){ price=mprice;}
       else {if (sel<=10){ price=lprice;}
	         else{dis=sel/10;
                  time=Math.floor(dis); 
			      price=time*lprice;
				  sel=sel-10*time;
				  if (sel<=4){ price1=sprice;}
                             else{if (sel<=6){ price1=mprice;}
                                 else { price1=lprice;}
				                 }
			     }
            }
	 }
	} 
	 		
obj1.shipping.value=price+price1;
obj1.os1.value=price+price1;
  
  return true;             // make it work...
}



					  
