function twofish_paypal_buy(product,amount)


{ 

//ebay variables for buy now text

vinylt = 1 ;
colourprice = eval("document.itemsform.colourCtext.value");
     if (colourprice == "Chrome") { vinylt = 1.6 }
else if (colourprice == "Chrome Gold") { vinylt = 1.6 }
else if (colourprice == "Etched Glass") { vinylt = 1.6 }
else if (colourprice == "Reflect White") { vinylt = 1.8 }
else if (colourprice == "Reflect Black") { vinylt = 1.8 }
else if (colourprice == "Reflect Red") { vinylt = 1.8 }
else if (colourprice == "Reflect Orange") { vinylt = 1.8 }
else if (colourprice == "Reflect Yellow") { vinylt = 1.8 }
else if (colourprice == "Reflect Blue") { vinylt = 1.8 };

vinyla = 1 ;
colprice2 = eval("document.itemsform.thescolour.value");
     if (colprice2 == "Chrome") { vinyla = 1.6 }
else if (colprice2 == "Chrome Gold") { vinyla = 1.6 }
else if (colprice2 == "Etched Glass") { vinyla = 1.6 }
else if (colprice2 == "Reflect White") { vinyla = 1.8 }
else if (colprice2 == "Reflect Black") { vinyla = 1.8 }
else if (colprice2 == "Reflect Red") {  vinyla = 1.8 }
else if (colprice2 == "Reflect Orange") { vinyla = 1.8 }
else if (colprice2 == "Reflect Yellow") { vinyla = 1.8 }
else if (colprice2 == "Reflect Blue") { vinyla = 1.8 };


lengthprice = 10;
letterheight = eval("document.itemsform.inchheight2.value");
     if (letterheight <=1) (lengthprice = ((letterheight * amount) * 0.7) * .6)
else if (letterheight >1) (lengthprice = ((letterheight * amount) * 0.7) * .4)
     if (letterheight >8) (lengthprice = ((letterheight * amount) * 0.7) * .5);

ppadd = eval("document.itemsform.youradd.value") ;
	   if (ppadd == "Plain") { lengthprice = lengthprice}
  else if (ppadd == "Drop Shadow") { lengthprice = lengthprice * 1.8}
  else if (ppadd == "Detached Shadow") { lengthprice = lengthprice * 1.8}
  else if (ppadd == "Outline") { lengthprice = lengthprice * 1.8};

ppcolour = eval("document.itemsform.colourCtext.value");
ppqty =  eval("document.itemsform.qty.value") ;
vatamount= eval(((ppqty * lengthprice) * vinylt) * vinyla);
ppdirection = eval("document.itemsform.revCtextd.value") ;
ppheight = eval("document.itemsform.inchheight2.value") ;
ppfont = eval("document.itemsform.yourfont.value") ;

			vamount=(vatamount*1.15);
				var ppamount, vamount;
				ppamount = Math.round( vamount * 100) / 100 ;

ppscolour = eval("document.itemsform.thescolour.value") ;				
	   if (ppadd == "Plain") { ppaddtext = " No Effects"}
  else if (ppadd == "Drop Shadow") { ppaddtext = ppscolour+" Shadow"}
  else if (ppadd == "Detached Shadow") { ppaddtext = ppscolour + " Detached Shadow"}
  else if (ppadd == "Outline") { ppaddtext = ppscolour + " Outline"};


new_win = window.open('https://www.paypal.com/xclick/business=paypal%402fi.sh&item_name='+ppqty+'x['+product+'] '+ppheight+'in '+ppcolour+' Letters. FONT:'+ppfont+'. '+ppdirection+'. Options:'+ppaddtext+'.&item_number=Textsale&amount='+ppamount+'&no_note=1&currency_code=GBP&lc=GB&tax=0.00','', 'width=800,height=640,scrollbars=yes,status=yes,location=yes') ;

//document.writeln(vatamount);
}

function twofish_showme_price(height,amount) { 

//verify a letter height
   var str = document.itemsform.inchheight2.value
   if(str.length == 0){
alert("You MUST choose a letter height\rbefore we can quote you a price.");
return;
} else {


//show me the prices for your TEXT ==========================================================================
vinylt = 1 ;
colourprice = eval("document.itemsform.colourCtext.value");
     if (colourprice == "Chrome") { vinylt = 1.6 }
else if (colourprice == "Chrome Gold") { vinylt = 1.6 }
else if (colourprice == "Etched Glass") { vinylt = 1.6 }
else if (colourprice == "Reflect White") { vinylt = 1.8 }
else if (colourprice == "Reflect Black") { vinylt = 1.8 }
else if (colourprice == "Reflect Red") { vinylt = 1.8 }
else if (colourprice == "Reflect Orange") { vinylt = 1.8 }
else if (colourprice == "Reflect Yellow") { vinylt = 1.8 }
else if (colourprice == "Reflect Blue") { vinylt = 1.8 };

vinyla = 1 ;
colprice2 = eval("document.itemsform.thescolour.value");
     if (colprice2 == "Chrome") { vinyla = 1.6 }
else if (colprice2 == "Chrome Gold") { vinyla = 1.6 }
else if (colprice2 == "Etched Glass") { vinyla = 1.6 }
else if (colprice2 == "Reflect White") { vinyla = 1.8 }
else if (colprice2 == "Reflect Black") { vinyla = 1.8 }
else if (colprice2 == "Reflect Red") {  vinyla = 1.8 }
else if (colprice2 == "Reflect Orange") { vinyla = 1.8 }
else if (colprice2 == "Reflect Yellow") { vinyla = 1.8 }
else if (colprice2 == "Reflect Blue") { vinyla = 1.8 };


lengthprice = 10;
letterheight = eval("document.itemsform.inchheight2.value");
     if (letterheight <=1) (lengthprice = ((letterheight * amount) * 0.7) * .6)
else if (letterheight >1) (lengthprice = ((letterheight * amount) * 0.7) * .4)
     if (letterheight >8) (lengthprice = ((letterheight * amount) * 0.7) * .5);

ppadd = eval("document.itemsform.youradd.value") ;
	   if (ppadd == "Plain") { lengthprice = lengthprice}
  else if (ppadd == "Drop Shadow") { lengthprice = lengthprice * 1.8}
  else if (ppadd == "Detached Shadow") { lengthprice = lengthprice * 1.8}
  else if (ppadd == "Outline") { lengthprice = lengthprice * 1.8};

ppcolour = eval("document.itemsform.colourCtext.value");
ppqty =  eval("document.itemsform.qty.value") ;
vatamount= eval(((ppqty * lengthprice) * vinylt) * vinyla);
ppdirection = eval("document.itemsform.revCtextd.value") ;

			vamount=(vatamount*1.15);
				var ppamount, vamount;
				ppamount = Math.round( vamount * 100) / 100 ;
				
if (ppamount <=20) {delivery = '3.50'}
else if (ppamount >20) {delivery = '4.99'}; 

//format a number into specified number of decimal places
digits = 2
num = ppamount
        //if no decimal places needed, we're done
        if (digits <= 0) {
                return Math.round(num); 
        } 
        //round the number to specified decimal places
        //e.g. 12.3456 to 3 digits (12.346) -> mult. by 1000, round, div. by 1000
        var tenToPower = Math.pow(10, digits);
        var cropped = String(Math.round(num * tenToPower) / tenToPower);

        //add decimal point if missing
        if (cropped.indexOf(".") == -1) {
                cropped += ".0";  //e.g. 5 -> 5.0 (at least one zero is needed)
        }

        //finally, force correct number of zeroes; add some if necessary
        var halves = cropped.split("."); //grab numbers to the right of the decimal
        //compare digits in right half of string to digits wanted
        var zerosNeeded = digits - halves[1].length; //number of zeros to add
        for (var i=1; i <= zerosNeeded; i++) {
                cropped += "0"; }

ppamount = cropped



HTMLstring='<HTML>\n';
HTMLstring+='<HEAD>\n';
HTMLstring+='<TITLE>Show me the Price</TITLE>\n';
HTMLstring+='<SCRIPT> setTimeout("self.close()", 5000 ) // after 5 seconds </SCRIPT>\n';
HTMLstring+='</HEAD>\n';
HTMLstring+='<BODY bgColor="#FF6600">\n';
HTMLstring+='<P align="center"> <font color="#FFFF33" size="2" face="Arial" ><strong>Quote for TEXT Only. This is NOT a Basket total</strong></font></P>\n';
HTMLstring+='<P align="center"> <font color="#FFFFFF" size="5" face="Arial" ><strong>£'+ppamount+' <BR>Including VAT</strong></font></P>\n';
HTMLstring+='<P align="center"> <em><font color="#FFFFFF" size="3" face="Arial" ><strong> Delivery £'+delivery+' is extra</strong></font></em></P>\n';
HTMLstring+='<div align="right"><font color="#FFFF33" size="1" face="Verdana"><strong><em>Window will CLOSE in 5 Secs</em></strong></font></div>\n';

HTMLstring+='</BODY>\n';
HTMLstring+='</HTML>';
//alert(HTMLstring);

newwindow=window.open('','', 'width=200,height=200')
newdocument=newwindow.document;
//newdocument.write('£'+ppamount+' Including VAT - Delivery '+delivery+' is extra');
newdocument.write(HTMLstring);
newdocument.close();



}}

<!-- Copyright 2003, Sandeep Gangadharan -->
<!-- For more free scripts go to http://sivamdesign.com/scripts/ -->
<!--
var maxCount = 50;             // change the number 100 at left which is the maximum characters allowed
function countIt(texter) {
 words = document.theForm.wording;
 if (words.value.length > maxCount) { words.value = words.value.substring(0,maxCount); alert('You have reached the maximum \n' + maxCount + ' characters allowed!') }
 else texter.value = words.value.length;
 if ((navigator.appName.indexOf("Netscape")!= -1) && (texter.value == maxCount)) { alert('You have reached the maximum \n' + maxCount + ' characters allowed!'); return; } }



function linelength(heigher) {
 myheight = eval("document.theForm.inchheight.value");
 myletters = eval("document.theForm.count2.value");

heightin = (myheight * myletters) *0.7 ;
heigher = Math.round( heightin * 1) / 1 ;
heightmm = heigher *25.4
heighmm = Math.round( heightmm * 1) / 1 ;
document.getElementById('yourlength').value = (heigher+" inches or approx "+heighmm+" mm");
//eval(itemsform.yourlength2.value = heigher+" inches or approx "+heighmm+" mm");
//document.write('£'+myheight+' hey');
//document.write('£'+myletters+' hey');

}


function linelength2(heigher) {
 myheight = eval("document.itemsform.inchheight2.value");
 myletters = eval("document.itemsform.count3.value");

heightin = (myheight * myletters) *0.7 ;
heigher = Math.round( heightin * 1) / 1 ;
heightmm = heigher *25.4
heighmm = Math.round( heightmm * 1) / 1 ;
document.getElementById('yourlength2').value = (heigher+" inches or approx "+heighmm+" mm");

}



function SetSize(form1,form2,orgvar,newvar)
{
eval(form2 + "." + newvar + ".value = " + form1 + "." + orgvar + ".options.value");
}


// -->



