/************************************************************************************
   Freedom Rider's Javascript functions
*************************************************************************************/

//
//  Blurt out all the shipping info, in a standard manner
//
function FR_blurt_shipping_info() {
   document.write( "<BR>" );
   document.write( "Freedom Rider is committed to your complete satisfaction. If you are not completely satisfied with any item for any reason*, return it to us for exchange or a full refund. We will refund your purchase price and all shipping charges if there was an error in your order, or the merchandise you received was defective." );
   document.write( "<BR>" );
   document.write( "<BR>" );
   document.write( "<B>SHIPPING and HANDLING</B>" );
   document.write( "<BR>" );
   document.write( "<BR>" );
   document.write( "The following shipping and handling charges will be added to your order when it is processed:" );
   document.write( "<BR>" );
   document.write( "<BR>" );
   document.write( "<TABLE BORDER='0' CELLSPACING='2' CELLPADDING='1'>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $19.99 and under  </TD> <TD ALIGN='right'>$7.50 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $20.00 - $49.99   </TD> <TD ALIGN='right'>$9.50 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $50.00 - $74.99   </TD> <TD ALIGN='right'>$12.50 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $75.00 - $99.99   </TD> <TD ALIGN='right'>$15.00 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $100.00 - $199.99 </TD> <TD ALIGN='right'>$18.00 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $200.00 - $299.99 </TD> <TD ALIGN='right'>$21.00 </TD>" );
   document.write( "</TR>" );
   document.write( "<TR>" );
   document.write( "<TD>Orders $300.00 and up    </TD> <TD ALIGN='right'>7% of total order </TD>" );
   document.write( "</TR>" );
   document.write( "</TABLE>" );
   document.write( "<BR>" );
   document.write( "The following apply to all orders:" );
   document.write( "<UL>" );
   document.write( "<LI>Orders shipped to any non-USA destination will be shipped US Mail Global Priority and actual shipping costs will be charged.</LI>" );
   document.write( "<LI>There is no shipping and handling charge for gift certificate purchases.</LI>" );
   document.write( "<LI>All prices are in US dollars.</LI>" );
   document.write( "<LI>Please allow 7-10 working days for most deliveries.</LI>" );
   document.write( "<LI>If the color requested isn't available, we reserve the right to substitute another color unless you specify 'no color substitutions' in the Comments/Special Instructions box.</LI>" );
   document.write( "<LI>*Merchandise which has been used, worn, soiled or damaged may not be returned.</LI>" );
   document.write( "<LI>*Books, videos, bits and custom made merchandise may only be returned due to a manufacturer's defect or error. Specials and clearance items may only be returned due to a manufacturer's defect or error.</LI>" );
   document.write( "<LI>When testing saddles and saddle pads for fit, style and comfort, please place a clean sheet between the horse and the merchandise to ensure <B>'like new'</B> condition in case of return.</LI>" );
   document.write( "<LI>Shipping charges are not refundable.</LI>" );
   document.write( "</UL>" );
   document.write( "<BR>" );
}

//
//  Determine the handling and shipping price, based on the purchase amount
//  (via Vic's formula, as described above in FR_blurt_shipping_info() :
//
function FR_Calc_US_Shipping( Amount ) {

   var DefaultUSShippingPct = 7.00;

   var Shipping =   0.00;
   if      ( Amount <=   0.00 )  { Shipping =   0.00; }
   else if ( Amount <   20.00 )  { Shipping =   7.50; }
   else if ( Amount <   50.00 )  { Shipping =   9.50; }
   else if ( Amount <   75.00 )  { Shipping =  12.50; }
   else if ( Amount <  100.00 )  { Shipping =  15.00; }
   else if ( Amount <  200.00 )  { Shipping =  18.00; }
   else if ( Amount <  300.00 )  { Shipping =  21.00; }
   else { 
      Shipping = Amount * ( DefaultUSShippingPct / 100.0 );
   }

   return( Shipping.toFixed(2) );
}

//
//  Put the Freedom Rider/BE/EM info at the top of a printed page
//  
function FR_TopPrintPage()  {
   document.write( "<B>Freedom Rider Tack Shop<BR>888-253-8811<BR>www.freedomrider.com</B>\n" );
}


//
//  Put the Freedom Rider/BE/EM link to home page at the bottom of a printed page
//  
function FR_BottomPrintPage()  {
	document.write( "<DIV STYLE='text-align: center; text-decoration: none;'>" );
	document.write( "<a href=index.html>" );
	document.write( "<input type=submit value='Go to Freedom Rider Home Page'>" );
	document.write( "</A></DIV>" );
}


//
//  Put the Freedom Rider/BE/EM logo with a link to home page
//
function FR_ShowLogo()  {
   document.write("<A HREF=\"index.html\"><IMG ALT=\"Freedom Rider\" BORDER=\"0\" SRC=\"Logo-Freedom-Rider.gif\" WIDTH=\"229\"></A>")
}

//
//  Puts the Name of the company (or companies i.e. Freedom Rider and Britain Equestrian) into a sentance.
//
function FR_ShowCompanyName()  {
   document.write( "Freedom Rider, Inc." );
}

//
//  A dummy process you can use for simple syntax-integrity testing
//
function FR_HelloWorld()  {
   document.write( "<BR>[[ Hello World, as said by the Javascript function! ]]<BR>\n" );
}
