
var appName = navigator.appName.toLowerCase();
var appVer = parseInt(navigator.appVersion);
var userAgent=navigator.userAgent.toLowerCase();

/*
if ((appName=='microsoft internet explorer' || appName=='netscape')  &&  appVer < 4)
 alert('This site will not work with IE or Netscape browsers below version 4 \n'  + 
'Your current browser version is: ' + navigator.appVersion + '. \n'  +
'Please update your browser, free from Netscape or Microsoft sites.' )
*/

/*
if (!document.getElementById || !document.all)
{
	alert('This site may not work properly on your browser. The site uses \n'  +  
	'Dynamic HTML and your browser does not appear to support it. \n\n'  + 

	'If you are using Internet Explorer or Netscape, please note that \n'  + 
	'IE or Netscape browsers below version 4 do not support DHTML.')
}
*/

if (!document.getElementById || !document.all)
{
	alert('This site may not work properly on your browser. The site uses \nDynamic HTML and your browser does not appear to support it. \n\nIf you are using Internet Explorer or Netscape, please note that \nIE or Netscape browsers below version 4 do not support DHTML.');
}



showVAT = true;
var CurrFormat = "US";
var currDecimal = 2;

var theId;
var theQuantity;
var thePrice;
var theTotal;
var theProduct;

var theCurrSign = "Can\u0024";


function addToBasket(theID, theqty)
{
	theId = theID;
	theQuantity = theqty;
	thePrice = price[theId];
	theTotal = theQuantity * thePrice;
	theProduct = product[theId];


  if(isNaN(theqty))
  {
    alert(theqty + " is not a proper quantity. \nPlease enter a proper number.")
    return;
  }
  else if(theqty < 1)
  {
    alert("You cannot order a quantity less than 1.")
    return;
  }
  else if (document.cookie.indexOf('cookies') == -1) //cookies doesn't exist!
  {
		if (cookiesEnabled())
			getCookieInfo();
		else
			location.href = "no_cookies.html";
  }
  else
  	getCookieInfo();
}




function cookiesEnabled() 
{ 
	 //half and hour expiry.
	 setCookie("cookies", "cookies", 1); 

	 if (document.cookie.indexOf('cookies') == -1)
	   return false
	 else
		return true;
 }


  function setCookie(name, value, expires, path, domain, secure)
  { 
     var exp = new Date(); 
     exp.setTime(exp.getTime() + (3600000 * expires)); //hrs

    
    var ecommCookie = name + "=" + escape(value) + 
    //var ecommCookie = name + "=" + value + 
      "; expires=" + exp.toGMTString() + 
      ((path) ? "; path=" + path : "") + 
      ((domain) ? "; domain=" + domain : "") + 
      ((secure) ? "; secure" : ""); 
    document.cookie = ecommCookie; 
  }







showVAT = true;
vatNum =  "G.S.T. + PST";
VAT = 0.13;


price = new Array();
product = new Array();

price['rootWeirdo_Cult4'] = 15.00;
price['rootWeirdo_CultAlternative_3'] = 15.00;
price['rootWeirdo_CultThe_Banquet'] = 15.00;
price['rootWeirdo_CultBarbed_Wire_Dolls'] = 15.00;
price['rootWeirdo_CultBattle_Royale_HYPHEN2_disc_SpecPERIOD_Ed'] = 15.00;
price['rootWeirdo_CultBeaver_Trilogy'] = 15.00;
price['rootWeirdo_CultBeyond_Erotica'] = 15.00;
price['rootWeirdo_CultBlack_Devil_Doll_From_Hell'] = 15.00;
price['rootWeirdo_CultBread_and_Circuses'] = 15.00;
price['rootWeirdo_CultChatterbox_'] = 15.00;
price['rootWeirdo_CultConvent_Of_Sinners'] = 15.00;
price['rootWeirdo_CultDangerous_Sex_Date'] = 15.00;
price['rootWeirdo_CultDeath_Carries_A_Cane'] = 15.00;
price['rootWeirdo_CultDeath_Ship'] = 15.00;
price['rootWeirdo_CultDENTI'] = 15.00;
price['rootWeirdo_CultDrPERIOD_Caligari'] = 15.00;
price['rootWeirdo_CultFallo'] = 15.00;
price['rootWeirdo_CultThe_Girl_from_Trieste'] = 15.00;
price['rootWeirdo_CultGoddo_supiido_yuu_Burakku_emparaa'] = 15.00;
price['rootWeirdo_CultImmoral_Tales'] = 15.00;
price['rootWeirdo_CultKurotokage_aPERIODkPERIODaPERIOD_Black_Lizard_'] = 15.00;
price['rootWeirdo_CultThe_League_of_Gentlemen_s_Apocalypse_'] = 15.00;
price['rootWeirdo_CultMalabimba'] = 15.00;
price['rootWeirdo_CultMysteries_of_the_Gods'] = 15.00;
price['rootWeirdo_CultNight_of_the_Generals'] = 15.00;
price['rootWeirdo_CultThe_Reflecting_Skin'] = 15.00;
price['rootWeirdo_CultRolling_Thunder'] = 15.00;
price['rootWeirdo_CultSanta_Sangre'] = 15.00;
price['rootWeirdo_CultSister_Emanuelle'] = 15.00;
price['rootWeirdo_CultSnuff_Trap'] = 15.00;
price['rootWeirdo_CultSonny_Boy'] = 15.00;
price['rootHorror_HYPHENScience_Fiction3_on_a_Meathook'] = 15.00;
price['rootHorror_HYPHENScience_FictionAll_the_Boys_Love_Mandy_Lane'] = 15.00;
price['rootHorror_HYPHENScience_FictionAmityville_3D'] = 15.00;
price['rootHorror_HYPHENScience_FictionAtolladero'] = 15.00;
price['rootHorror_HYPHENScience_FictionAtomik_Circus_HYPHEN_Le_retour_de_James_Bataille'] = 15.00;
price['rootHorror_HYPHENScience_FictionAtomic_Cyborg'] = 15.00;
price['rootHorror_HYPHENScience_FictionBen'] = 15.00;
price['rootHorror_HYPHENScience_FictionBlack_Devil_Doll_from_Hell'] = 15.00;
price['rootHorror_HYPHENScience_FictionBLADE_RUNNER_HYPHEN_Original'] = 15.00;
price['rootHorror_HYPHENScience_FictionBoogens'] = 15.00;
price['rootHorror_HYPHENScience_FictionBlood_Beach'] = 15.00;
price['rootHorror_HYPHENScience_FictionBraindead_Uncut'] = 15.00;
price['rootHorror_HYPHENScience_FictionChange_of_Mind_'] = 15.00;
price['rootHorror_HYPHENScience_FictionColossus_Of_New_York'] = 15.00;
price['rootHorror_HYPHENScience_FictionDämonenbrut_'] = 15.00;
price['rootHorror_HYPHENScience_FictionThe_Day_of_the_Triffids'] = 20.00;
price['rootHorror_HYPHENScience_FictionDía_de_la_BestiaCOMMA_El_'] = 15.00;
price['rootHorror_HYPHENScience_FictionEvil_Aliens'] = 15.00;
price['rootHorror_HYPHENScience_FictionFilmgore'] = 15.00;
price['rootHorror_HYPHENScience_FictionForbidden_World'] = 15.00;
price['rootHorror_HYPHENScience_FictionFriday_The_13Th_HYPHEN_3D'] = 15.00;
price['rootHorror_HYPHENScience_FictionThe_Gate'] = 15.00;
price['rootHorror_HYPHENScience_FictionGhost_Son'] = 15.00;
price['rootHorror_HYPHENScience_FictionGhostwatch'] = 15.00;
price['rootHorror_HYPHENScience_FictionGlen_and_Randa_'] = 15.00;
price['rootHorror_HYPHENScience_FictionHaze'] = 15.00;
price['rootHorror_HYPHENScience_FictionHumanoid'] = 15.00;
price['rootHorror_HYPHENScience_FictionIt'] = 15.00;
price['rootHorror_HYPHENScience_FictionJunk'] = 15.00;
price['rootHorror_HYPHENScience_FictionMegaforce_'] = 15.00;
price['rootHorror_HYPHENScience_FictionMonster_aPERIODkPERIODaPERIOD_Uncut_Humanoids_from_the_Deep'] = 15.00;
price['rootHorror_HYPHENScience_FictionMutation_Directors_Cut'] = 15.00;
price['rootHorror_HYPHENScience_FictionThe_Mutilator'] = 15.00;
price['rootHorror_HYPHENScience_FictionNecronomicon'] = 15.00;
price['rootHorror_HYPHENScience_FictionPlanet_of_Storms'] = 15.00;
price['rootHorror_HYPHENScience_FictionRatman'] = 15.00;
price['rootHorror_HYPHENScience_FictionRawhead_Rex_'] = 15.00;
price['rootHorror_HYPHENScience_FictionRobinsons_Lost_In_Space'] = 15.00;
price['rootHorror_HYPHENScience_FictionRossa_Venezia'] = 15.00;
price['rootHorror_HYPHENScience_FictionSnuff_Movie'] = 15.00;
price['rootHorror_HYPHENScience_FictionSmoke_Em_If_You_Got_Em'] = 15.00;
price['rootHorror_HYPHENScience_FictionStarcrash'] = 15.00;
price['rootHorror_HYPHENScience_FictionStar_Wars_Holiday_Special'] = 15.00;
price['rootHorror_HYPHENScience_FictionSugar_Hill_'] = 15.00;
price['rootHorror_HYPHENScience_FictionTales_from_the_Crypt_'] = 15.00;
price['rootHorror_HYPHENScience_FictionThese_Are_The_Damned'] = 15.00;
price['rootHorror_HYPHENScience_FictionUnderworld_'] = 15.00;
price['rootHorror_HYPHENScience_FictionUna_de_Zombis'] = 15.00;
price['rootHorror_HYPHENScience_FictionThe_Vault_of_Horror_'] = 15.00;
price['rootHorror_HYPHENScience_FictionWillard'] = 15.00;
price['rootHorror_HYPHENScience_FictionZombie_Diaries'] = 15.00;
price['rootHorror_HYPHENScience_FictionDark_ComedyBraindead'] = 15.00;
price['rootHorror_HYPHENScience_FictionDark_ComedyCannibal_Girls'] = 15.00;
price['rootDrama9th_Company'] = 15.00;
price['rootDramaBaby_Of_Macon'] = 15.00;
price['rootDramaBest'] = 15.00;
price['rootDramaBlack_Belt_Jones'] = 15.00;
price['rootDramaBlindman'] = 15.00;
price['rootDramaBrian_DePalmaCOMMA_Early_Shorts'] = 15.00;
price['rootDramaChromophobia'] = 15.00;
price['rootDramaDALI'] = 15.00;
price['rootDramaDennis_Hoppers_Last_Movie'] = 15.00;
price['rootDramaEstorvo'] = 15.00;
price['rootDramaFear_And_Desire'] = 15.00;
price['rootDramaFear_City_'] = 15.00;
price['rootDramaHannie_Caulder'] = 15.00;
price['rootDramaThe_Incident'] = 15.00;
price['rootDramaIsolation'] = 15.00;
price['rootDramaJohnny_Got_His_Gun'] = 15.00;
price['rootDramaManslaughter'] = 15.00;
price['rootDramaMy_Best_Friends_Birthday'] = 15.00;
price['rootDramaRed_Desert'] = 15.00;
price['rootDramaShooters'] = 15.00;
price['rootDramaShooting_Dogs'] = 15.00;
price['rootDramaSoldier_Blue'] = 15.00;
price['rootFunny_StuffAli_GCOMMA_Aiii'] = 15.00;
price['rootFunny_StuffAli_GCOMMA_Bling_Bling_'] = 15.00;
price['rootFunny_StuffThe_Big_Crimewave'] = 15.00;
price['rootFunny_StuffBill_MurrayCOMMA_Live_at_Second_City'] = 15.00;
price['rootFunny_StuffBo_Selecta'] = 15.00;
price['rootFunny_StuffBrass_Eye'] = 20.00;
price['rootFunny_StuffChris_Elliot'] = 15.00;
price['rootFunny_StuffCruel_Tricks_for_Dear_Friends_'] = 15.00;
price['rootFunny_StuffCruise_Of_The_Gods'] = 15.00;
price['rootFunny_StuffDay_Today'] = 20.00;
price['rootFunny_StuffDoctor_Ducks_Super_Secret_AllHYPHENPurpose_Sauce'] = 15.00;
price['rootFunny_StuffFearCOMMA_Anxiety_and_Depression_'] = 15.00;
price['rootFunny_StuffGettin_Square_'] = 15.00;
price['rootFunny_StuffGuest_House_Paradiso_'] = 15.00;
price['rootFunny_StuffHellzapoppin_'] = 15.00;
price['rootFunny_StuffI_Woke_Up_Early_the_Day_I_Died'] = 15.00;
price['rootFunny_StuffIt_Came_from_Hollywood_'] = 15.00;
price['rootFunny_StuffMrPERIOD_Mikes_Mondo_Video'] = 15.00;
price['rootFunny_StuffMighty_Boosh'] = 15.00;
price['rootFunny_StuffMonster_Squad'] = 15.00;
price['rootFunny_StuffMrsPERIOD_Brown_Youve_Got_A_Lovely_Daughter'] = 15.00;
price['rootFunny_StuffMystery_Science_Theater_3000_Movie'] = 15.00;
price['rootFunny_StuffNick_Danger'] = 15.00;
price['rootFunny_StuffOn_The_Air'] = 15.00;
price['rootFunny_StuffOscarCOMMA_The'] = 15.00;
price['rootFunny_StuffPenn_and_Teller_Go_Public'] = 15.00;
price['rootFunny_StuffSkidoo'] = 15.00;
price['rootFunny_StuffTrigger_Happy'] = 15.00;
price['rootFunny_StuffTrigger_Happy_2'] = 15.00;
price['rootStrange_PeopleAffliction'] = 15.00;
price['rootStrange_PeopleAriseCOMMA_The_Subgenius_Video'] = 15.00;
price['rootStrange_PeopleBeing_Different'] = 15.00;
price['rootStrange_PeopleBig_Time'] = 15.00;
price['rootStrange_PeopleBraveCOMMA_The'] = 15.00;
price['rootStrange_PeopleBurroughs'] = 15.00;
price['rootStrange_PeopleFreaks_Uncensored'] = 15.00;
price['rootStrange_PeopleJabberwalk'] = 15.00;
price['rootStrange_PeopleSerge_Gainsbourg_D_autres_Nouvelles_Des_Etois_1958COMMA_1969'] = 25.00;
price['rootAnimation_2DTV'] = 15.00;
price['rootAnimation_Beatles_Cartoon_Show'] = 15.00;
price['rootAnimation_Best_Of_Marvel_Comics'] = 15.00;
price['rootAnimation_Duckman_HYPHEN_Private_DickCOMMA_Family_Man'] = 30.00;
price['rootAnimation_Chuck_Norris_Karate_Kommandos_HYPHEN_Complete_Animated_Series'] = 10.00;
price['rootAnimation_Yami_no_teio_kyuketsuki_Dracula_'] = 15.00;
price['rootAnimation_Kyofu_densetsu_HYPHEN_Kaiki_Furankenshutain'] = 15.00;
price['rootAnimation_HellsingCOMMA_Digest_For_Fleaks'] = 15.00;
price['rootAnimation_Hole'] = 15.00;
price['rootAnimation_Mighty_Heroes'] = 15.00;
price['rootAnimation_MrPERIOD_T_HYPHEN_Complete_Animated_Series'] = 15.00;
price['rootAnimation_Monster_TV_Special'] = 15.00;
price['rootAnimation_Pale_Cocoon'] = 15.00;
price['rootAnimation_The_Silver_SurferCOMMA_TV'] = 25.00;
price['rootMade_For_TVBad_Ronald'] = 15.00;
price['rootMade_For_TVBates_Motel'] = 15.00;
price['rootMade_For_TVBrass_Eye'] = 20.00;
price['rootMade_For_TVCliff_Hangers'] = 15.00;
price['rootMade_For_TVCruise_of_the_Gods_'] = 15.00;
price['rootMade_For_TVDay_Today'] = 20.00;
price['rootMade_For_TVDead_RingersCOMMA_Season_One'] = 20.00;
price['rootMade_For_TVDont_Be_Afraid_of_the_Dark_'] = 15.00;
price['rootMade_For_TVDrPERIOD_Terribles_House_of_Horrible'] = 15.00;
price['rootMade_For_TVFriday_the_13thCOMMA_Series'] = 45.00;
price['rootMade_For_TVGlobal_Frequency'] = 15.00;
price['rootMade_For_TVThe_Garry_Shandling_Show_HYPHEN_25th_Anniversary_Special'] = 15.00;
price['rootMade_For_TVThe_Green_Hornet'] = 30.00;
price['rootMade_For_TVHuman_Remains'] = 20.00;
price['rootMade_For_TVKilldozer_'] = 15.00;
price['rootMade_For_TVLand_of_the_GiantsCOMMA_Season_1'] = 50.00;
price['rootMade_For_TVLand_of_the_GiantsCOMMA_Season_2'] = 65.00;
price['rootMade_For_TVLogans_RunCOMMA_Series'] = 25.00;
price['rootMade_For_TVMrPERIOD_T_The_Animated_Show'] = 15.00;
price['rootMade_For_TVThe_Wonder_Years_VolPERIOD_1'] = 15.00;
price['rootMade_For_TVThe_Wonder_Years_VolPERIOD_2HYPHEN3'] = 15.00;
price['rootMade_For_TVThe_Wonder_Years_VolPERIOD_4HYPHEN5'] = 15.00;
price['rootMade_For_TVThe_Wonder_Years_VolPERIOD_6HYPHEN7'] = 15.00;
price['rootMade_For_TVThe_Wonder_Years_Set'] = 45.00;
price['rootMade_For_TVWonder_Woman_The_TV_movie'] = 15.00;
price['rootSuperheroesCaptain_America'] = 15.00;
price['rootSuperheroesReb_Brown_Set_HYPHEN_Captain_America_2_disc'] = 15.00;
price['rootSuperheroesCaptain_Scarlet'] = 20.00;
price['rootSuperheroesDARNA_the_Return'] = 15.00;
price['rootSuperheroesDoc_Savage_HYPHEN_The_Man_of_Bronze'] = 15.00;
price['rootSuperheroesThe_Fantastic_Four_uv'] = 15.00;
price['rootSuperheroesAlyas_Batman_en_Robin_Superhero_'] = 15.00;
price['rootSuperheroesCrying_Freeman'] = 15.00;
price['rootSuperheroesNick_Fury'] = 15.00;
price['rootSuperheroesShadowman'] = 15.00;
price['rootSuperheroesKISS_Meets_the_Phantom_of_the_Park'] = 15.00;
price['rootSuperheroesSix_Million_Dollar_Man'] = 15.00;
price['rootSuperheroesSpiderman_Live_Action'] = 15.00;
price['rootSuperheroesThe_Spirit'] = 15.00;
price['rootSuperheroesSwamp_Thing_Uncut'] = 15.00;
price['rootSuperheroesSuperhero_Fan_Shorts'] = 15.00;
price['rootSuperheroesCassern'] = 20.00;
price['rootSuperheroes_Aquaman_Pilot'] = 10.00;
price['rootSuperheroesMade_for_TVBirds_of_Prey'] = 15.00;
price['rootSuperheroesMade_for_TVThe_CrowCOMMA_Stairway_To_Heaven'] = 30.00;
price['rootSuperheroesMade_for_TVDrPERIOD_Strange'] = 15.00;
price['rootSuperheroesMade_for_TVGeneration_X_'] = 15.00;
price['rootSuperheroesMade_for_TVLegends_Of_The_Superheroes'] = 15.00;
price['rootDocumentaryChickenhawk_'] = 15.00;
price['rootDocumentaryDavid_Blaine_HYPHEN_Above_the_Below'] = 20.00;
price['rootDocumentaryDPERIODOPERIODAPERIOD_'] = 15.00;
price['rootDocumentaryHells_Angels_Forever_'] = 15.00;
price['rootDocumentaryRenaldo_and_Clara_'] = 25.00;
price['rootDocumentaryRolling_StonesCOMMA_Cocksucker_Blues'] = 15.00;
price['rootFar_Out_EastBasara'] = 15.00;
price['rootFar_Out_EastBehind_Flower_and_Snake'] = 15.00;
price['rootFar_Out_EastBlessing_Bell_'] = 15.00;
price['rootFar_Out_EastBloody_Aria'] = 15.00;
price['rootFar_Out_EastCassern'] = 20.00;
price['rootFar_Out_EastDead_End_Run_'] = 15.00;
price['rootFar_Out_EastDead_Run'] = 15.00;
price['rootFar_Out_EastDiary'] = 15.00;
price['rootFar_Out_EastDog_Bite_Dog'] = 15.00;
price['rootFar_Out_EastEighteen_Springs'] = 15.00;
price['rootFar_Out_EastGetting_Any'] = 15.00;
price['rootFar_Out_EastGPERIODIPERIOD_Samurai'] = 15.00;
price['rootFar_Out_EastHak_se_wui_yi_wo_wai_kwai'] = 15.00;
price['rootFar_Out_EastHaze'] = 15.00;
price['rootFar_Out_EastOne_Missed_Call'] = 15.00;
price['rootFar_Out_EastSamurai_Commando'] = 15.00;
price['rootFar_Out_EastSpacked_Out'] = 15.00;
price['rootFar_Out_EastStrange_Circus'] = 15.00;
price['rootFar_Out_EastStereo_Future'] = 15.00;
price['rootFar_Out_EastVibrator'] = 15.00;
price['rootFar_Out_EastWelcome_to_Dongmakgol_'] = 15.00;
price['rootFar_Out_EastCitizen_Dog'] = 15.00;
price['rootFar_Out_EastJohnny_Sokko_and_His_Flying_Robot_HYPHEN_Complete_Series_'] = 15.00;
price['rootShipping_Charges_HYPHEN_extraItemsCOMMA_2HYPHEN4_DvdHYPHENRs_HYPHEN_extra_charge'] = 2.00;
price['rootShipping_Charges_HYPHEN_extraItemsCOMMA_5HYPHEN9_DvdHYPHENRs_HYPHEN_extra_charge'] = 5.00;
price['rootShipping_Charges_HYPHEN_extraItemsCOMMA_10_plus_DvdHYPHENRs_HYPHEN_extra_charge'] = 7.00;

product['rootWeirdo_Cult4'] = '4';
product['rootWeirdo_CultAlternative_3'] = 'Alternative 3';
product['rootWeirdo_CultThe_Banquet'] = 'The Banquet';
product['rootWeirdo_CultBarbed_Wire_Dolls'] = 'Barbed Wire Dolls';
product['rootWeirdo_CultBattle_Royale_HYPHEN2_disc_SpecPERIOD_Ed'] = 'Battle Royale -2 disc Spec. Ed';
product['rootWeirdo_CultBeaver_Trilogy'] = 'Beaver Trilogy';
product['rootWeirdo_CultBeyond_Erotica'] = 'Beyond Erotica';
product['rootWeirdo_CultBlack_Devil_Doll_From_Hell'] = 'Black Devil Doll From Hell';
product['rootWeirdo_CultBread_and_Circuses'] = 'Bread and Circuses';
product['rootWeirdo_CultChatterbox_'] = 'Chatterbox ';
product['rootWeirdo_CultConvent_Of_Sinners'] = 'Convent Of Sinners';
product['rootWeirdo_CultDangerous_Sex_Date'] = 'Dangerous Sex Date';
product['rootWeirdo_CultDeath_Carries_A_Cane'] = 'Death Carries A Cane';
product['rootWeirdo_CultDeath_Ship'] = 'Death Ship';
product['rootWeirdo_CultDENTI'] = 'DENTI';
product['rootWeirdo_CultDrPERIOD_Caligari'] = 'Dr. Caligari';
product['rootWeirdo_CultFallo'] = 'Fallo';
product['rootWeirdo_CultThe_Girl_from_Trieste'] = 'The Girl from Trieste';
product['rootWeirdo_CultGoddo_supiido_yuu_Burakku_emparaa'] = 'Goddo supiido yuu Burakku emparaa';
product['rootWeirdo_CultImmoral_Tales'] = 'Immoral Tales';
product['rootWeirdo_CultKurotokage_aPERIODkPERIODaPERIOD_Black_Lizard_'] = 'Kurotokage a.k.a. Black Lizard ';
product['rootWeirdo_CultThe_League_of_Gentlemen_s_Apocalypse_'] = 'The League of Gentlemen s Apocalypse ';
product['rootWeirdo_CultMalabimba'] = 'Malabimba';
product['rootWeirdo_CultMysteries_of_the_Gods'] = 'Mysteries of the Gods';
product['rootWeirdo_CultNight_of_the_Generals'] = 'Night of the Generals';
product['rootWeirdo_CultThe_Reflecting_Skin'] = 'The Reflecting Skin';
product['rootWeirdo_CultRolling_Thunder'] = 'Rolling Thunder';
product['rootWeirdo_CultSanta_Sangre'] = 'Santa Sangre';
product['rootWeirdo_CultSister_Emanuelle'] = 'Sister Emanuelle';
product['rootWeirdo_CultSnuff_Trap'] = 'Snuff Trap';
product['rootWeirdo_CultSonny_Boy'] = 'Sonny Boy';
product['rootHorror_HYPHENScience_Fiction3_on_a_Meathook'] = '3 on a Meathook';
product['rootHorror_HYPHENScience_FictionAll_the_Boys_Love_Mandy_Lane'] = 'All the Boys Love Mandy Lane';
product['rootHorror_HYPHENScience_FictionAmityville_3D'] = 'Amityville 3D';
product['rootHorror_HYPHENScience_FictionAtolladero'] = 'Atolladero';
product['rootHorror_HYPHENScience_FictionAtomik_Circus_HYPHEN_Le_retour_de_James_Bataille'] = 'Atomik Circus - Le retour de James Bataille';
product['rootHorror_HYPHENScience_FictionAtomic_Cyborg'] = 'Atomic Cyborg';
product['rootHorror_HYPHENScience_FictionBen'] = 'Ben';
product['rootHorror_HYPHENScience_FictionBlack_Devil_Doll_from_Hell'] = 'Black Devil Doll from Hell';
product['rootHorror_HYPHENScience_FictionBLADE_RUNNER_HYPHEN_Original'] = 'BLADE RUNNER - Original';
product['rootHorror_HYPHENScience_FictionBoogens'] = 'Boogens';
product['rootHorror_HYPHENScience_FictionBlood_Beach'] = 'Blood Beach';
product['rootHorror_HYPHENScience_FictionBraindead_Uncut'] = 'Braindead Uncut';
product['rootHorror_HYPHENScience_FictionChange_of_Mind_'] = 'Change of Mind ';
product['rootHorror_HYPHENScience_FictionColossus_Of_New_York'] = 'Colossus Of New York';
product['rootHorror_HYPHENScience_FictionDämonenbrut_'] = 'Dämonenbrut ';
product['rootHorror_HYPHENScience_FictionThe_Day_of_the_Triffids'] = 'The Day of the Triffids';
product['rootHorror_HYPHENScience_FictionDía_de_la_BestiaCOMMA_El_'] = 'Día de la Bestia, El ';
product['rootHorror_HYPHENScience_FictionEvil_Aliens'] = 'Evil Aliens';
product['rootHorror_HYPHENScience_FictionFilmgore'] = 'Filmgore';
product['rootHorror_HYPHENScience_FictionForbidden_World'] = 'Forbidden World';
product['rootHorror_HYPHENScience_FictionFriday_The_13Th_HYPHEN_3D'] = 'Friday The 13Th - 3D';
product['rootHorror_HYPHENScience_FictionThe_Gate'] = 'The Gate';
product['rootHorror_HYPHENScience_FictionGhost_Son'] = 'Ghost Son';
product['rootHorror_HYPHENScience_FictionGhostwatch'] = 'Ghostwatch';
product['rootHorror_HYPHENScience_FictionGlen_and_Randa_'] = 'Glen and Randa ';
product['rootHorror_HYPHENScience_FictionHaze'] = 'Haze';
product['rootHorror_HYPHENScience_FictionHumanoid'] = 'Humanoid';
product['rootHorror_HYPHENScience_FictionIt'] = 'It';
product['rootHorror_HYPHENScience_FictionJunk'] = 'Junk';
product['rootHorror_HYPHENScience_FictionMegaforce_'] = 'Megaforce ';
product['rootHorror_HYPHENScience_FictionMonster_aPERIODkPERIODaPERIOD_Uncut_Humanoids_from_the_Deep'] = 'Monster a.k.a. Uncut Humanoids from the Deep';
product['rootHorror_HYPHENScience_FictionMutation_Directors_Cut'] = 'Mutation Directors Cut';
product['rootHorror_HYPHENScience_FictionThe_Mutilator'] = 'The Mutilator';
product['rootHorror_HYPHENScience_FictionNecronomicon'] = 'Necronomicon';
product['rootHorror_HYPHENScience_FictionPlanet_of_Storms'] = 'Planet of Storms';
product['rootHorror_HYPHENScience_FictionRatman'] = 'Ratman';
product['rootHorror_HYPHENScience_FictionRawhead_Rex_'] = 'Rawhead Rex ';
product['rootHorror_HYPHENScience_FictionRobinsons_Lost_In_Space'] = 'Robinsons Lost In Space';
product['rootHorror_HYPHENScience_FictionRossa_Venezia'] = 'Rossa Venezia';
product['rootHorror_HYPHENScience_FictionSnuff_Movie'] = 'Snuff Movie';
product['rootHorror_HYPHENScience_FictionSmoke_Em_If_You_Got_Em'] = 'Smoke Em If You Got Em';
product['rootHorror_HYPHENScience_FictionStarcrash'] = 'Starcrash';
product['rootHorror_HYPHENScience_FictionStar_Wars_Holiday_Special'] = 'Star Wars Holiday Special';
product['rootHorror_HYPHENScience_FictionSugar_Hill_'] = 'Sugar Hill ';
product['rootHorror_HYPHENScience_FictionTales_from_the_Crypt_'] = 'Tales from the Crypt ';
product['rootHorror_HYPHENScience_FictionThese_Are_The_Damned'] = 'These Are The Damned';
product['rootHorror_HYPHENScience_FictionUnderworld_'] = 'Underworld ';
product['rootHorror_HYPHENScience_FictionUna_de_Zombis'] = 'Una de Zombis';
product['rootHorror_HYPHENScience_FictionThe_Vault_of_Horror_'] = 'The Vault of Horror ';
product['rootHorror_HYPHENScience_FictionWillard'] = 'Willard';
product['rootHorror_HYPHENScience_FictionZombie_Diaries'] = 'Zombie Diaries';
product['rootHorror_HYPHENScience_FictionDark_ComedyBraindead'] = 'Braindead';
product['rootHorror_HYPHENScience_FictionDark_ComedyCannibal_Girls'] = 'Cannibal Girls';
product['rootDrama9th_Company'] = '9th Company';
product['rootDramaBaby_Of_Macon'] = 'Baby Of Macon';
product['rootDramaBest'] = 'Best';
product['rootDramaBlack_Belt_Jones'] = 'Black Belt Jones';
product['rootDramaBlindman'] = 'Blindman';
product['rootDramaBrian_DePalmaCOMMA_Early_Shorts'] = 'Brian DePalma, Early Shorts';
product['rootDramaChromophobia'] = 'Chromophobia';
product['rootDramaDALI'] = 'DALI';
product['rootDramaDennis_Hoppers_Last_Movie'] = 'Dennis Hoppers Last Movie';
product['rootDramaEstorvo'] = 'Estorvo';
product['rootDramaFear_And_Desire'] = 'Fear And Desire';
product['rootDramaFear_City_'] = 'Fear City ';
product['rootDramaHannie_Caulder'] = 'Hannie Caulder';
product['rootDramaThe_Incident'] = 'The Incident';
product['rootDramaIsolation'] = 'Isolation';
product['rootDramaJohnny_Got_His_Gun'] = 'Johnny Got His Gun';
product['rootDramaManslaughter'] = 'Manslaughter';
product['rootDramaMy_Best_Friends_Birthday'] = 'My Best Friends Birthday';
product['rootDramaRed_Desert'] = 'Red Desert';
product['rootDramaShooters'] = 'Shooters';
product['rootDramaShooting_Dogs'] = 'Shooting Dogs';
product['rootDramaSoldier_Blue'] = 'Soldier Blue';
product['rootFunny_StuffAli_GCOMMA_Aiii'] = 'Ali G, Aiii';
product['rootFunny_StuffAli_GCOMMA_Bling_Bling_'] = 'Ali G, Bling Bling ';
product['rootFunny_StuffThe_Big_Crimewave'] = 'The Big Crimewave';
product['rootFunny_StuffBill_MurrayCOMMA_Live_at_Second_City'] = 'Bill Murray, Live at Second City';
product['rootFunny_StuffBo_Selecta'] = 'Bo Selecta';
product['rootFunny_StuffBrass_Eye'] = 'Brass Eye';
product['rootFunny_StuffChris_Elliot'] = 'Chris Elliot';
product['rootFunny_StuffCruel_Tricks_for_Dear_Friends_'] = 'Cruel Tricks for Dear Friends ';
product['rootFunny_StuffCruise_Of_The_Gods'] = 'Cruise Of The Gods';
product['rootFunny_StuffDay_Today'] = 'Day Today';
product['rootFunny_StuffDoctor_Ducks_Super_Secret_AllHYPHENPurpose_Sauce'] = 'Doctor Ducks Super Secret All-Purpose Sauce';
product['rootFunny_StuffFearCOMMA_Anxiety_and_Depression_'] = 'Fear, Anxiety and Depression ';
product['rootFunny_StuffGettin_Square_'] = 'Gettin Square ';
product['rootFunny_StuffGuest_House_Paradiso_'] = 'Guest House Paradiso ';
product['rootFunny_StuffHellzapoppin_'] = 'Hellzapoppin ';
product['rootFunny_StuffI_Woke_Up_Early_the_Day_I_Died'] = 'I Woke Up Early the Day I Died';
product['rootFunny_StuffIt_Came_from_Hollywood_'] = 'It Came from Hollywood ';
product['rootFunny_StuffMrPERIOD_Mikes_Mondo_Video'] = 'Mr. Mikes Mondo Video';
product['rootFunny_StuffMighty_Boosh'] = 'Mighty Boosh';
product['rootFunny_StuffMonster_Squad'] = 'Monster Squad';
product['rootFunny_StuffMrsPERIOD_Brown_Youve_Got_A_Lovely_Daughter'] = 'Mrs. Brown Youve Got A Lovely Daughter';
product['rootFunny_StuffMystery_Science_Theater_3000_Movie'] = 'Mystery Science Theater 3000 Movie';
product['rootFunny_StuffNick_Danger'] = 'Nick Danger';
product['rootFunny_StuffOn_The_Air'] = 'On The Air';
product['rootFunny_StuffOscarCOMMA_The'] = 'Oscar, The';
product['rootFunny_StuffPenn_and_Teller_Go_Public'] = 'Penn and Teller Go Public';
product['rootFunny_StuffSkidoo'] = 'Skidoo';
product['rootFunny_StuffTrigger_Happy'] = 'Trigger Happy';
product['rootFunny_StuffTrigger_Happy_2'] = 'Trigger Happy 2';
product['rootStrange_PeopleAffliction'] = 'Affliction';
product['rootStrange_PeopleAriseCOMMA_The_Subgenius_Video'] = 'Arise, The Subgenius Video';
product['rootStrange_PeopleBeing_Different'] = 'Being Different';
product['rootStrange_PeopleBig_Time'] = 'Big Time';
product['rootStrange_PeopleBraveCOMMA_The'] = 'Brave, The';
product['rootStrange_PeopleBurroughs'] = 'Burroughs';
product['rootStrange_PeopleFreaks_Uncensored'] = 'Freaks Uncensored';
product['rootStrange_PeopleJabberwalk'] = 'Jabberwalk';
product['rootStrange_PeopleSerge_Gainsbourg_D_autres_Nouvelles_Des_Etois_1958COMMA_1969'] = 'Serge Gainsbourg D autres Nouvelles Des Etois 1958, 1969';
product['rootAnimation_2DTV'] = '2DTV';
product['rootAnimation_Beatles_Cartoon_Show'] = 'Beatles Cartoon Show';
product['rootAnimation_Best_Of_Marvel_Comics'] = 'Best Of Marvel Comics';
product['rootAnimation_Duckman_HYPHEN_Private_DickCOMMA_Family_Man'] = 'Duckman - Private Dick, Family Man';
product['rootAnimation_Chuck_Norris_Karate_Kommandos_HYPHEN_Complete_Animated_Series'] = 'Chuck Norris Karate Kommandos - Complete Animated Series';
product['rootAnimation_Yami_no_teio_kyuketsuki_Dracula_'] = 'Yami no teio kyuketsuki Dracula ';
product['rootAnimation_Kyofu_densetsu_HYPHEN_Kaiki_Furankenshutain'] = 'Kyofu densetsu - Kaiki Furankenshutain';
product['rootAnimation_HellsingCOMMA_Digest_For_Fleaks'] = 'Hellsing, Digest For Fleaks';
product['rootAnimation_Hole'] = 'Hole';
product['rootAnimation_Mighty_Heroes'] = 'Mighty Heroes';
product['rootAnimation_MrPERIOD_T_HYPHEN_Complete_Animated_Series'] = 'Mr. T - Complete Animated Series';
product['rootAnimation_Monster_TV_Special'] = 'Monster TV Special';
product['rootAnimation_Pale_Cocoon'] = 'Pale Cocoon';
product['rootAnimation_The_Silver_SurferCOMMA_TV'] = 'The Silver Surfer, TV';
product['rootMade_For_TVBad_Ronald'] = 'Bad Ronald';
product['rootMade_For_TVBates_Motel'] = 'Bates Motel';
product['rootMade_For_TVBrass_Eye'] = 'Brass Eye';
product['rootMade_For_TVCliff_Hangers'] = 'Cliff Hangers';
product['rootMade_For_TVCruise_of_the_Gods_'] = 'Cruise of the Gods ';
product['rootMade_For_TVDay_Today'] = 'Day Today';
product['rootMade_For_TVDead_RingersCOMMA_Season_One'] = 'Dead Ringers, Season One';
product['rootMade_For_TVDont_Be_Afraid_of_the_Dark_'] = 'Dont Be Afraid of the Dark ';
product['rootMade_For_TVDrPERIOD_Terribles_House_of_Horrible'] = 'Dr. Terribles House of Horrible';
product['rootMade_For_TVFriday_the_13thCOMMA_Series'] = 'Friday the 13th, Series';
product['rootMade_For_TVGlobal_Frequency'] = 'Global Frequency';
product['rootMade_For_TVThe_Garry_Shandling_Show_HYPHEN_25th_Anniversary_Special'] = 'The Garry Shandling Show - 25th Anniversary Special';
product['rootMade_For_TVThe_Green_Hornet'] = 'The Green Hornet';
product['rootMade_For_TVHuman_Remains'] = 'Human Remains';
product['rootMade_For_TVKilldozer_'] = 'Killdozer ';
product['rootMade_For_TVLand_of_the_GiantsCOMMA_Season_1'] = 'Land of the Giants, Season 1';
product['rootMade_For_TVLand_of_the_GiantsCOMMA_Season_2'] = 'Land of the Giants, Season 2';
product['rootMade_For_TVLogans_RunCOMMA_Series'] = 'Logans Run, Series';
product['rootMade_For_TVMrPERIOD_T_The_Animated_Show'] = 'Mr. T The Animated Show';
product['rootMade_For_TVThe_Wonder_Years_VolPERIOD_1'] = 'The Wonder Years Vol. 1';
product['rootMade_For_TVThe_Wonder_Years_VolPERIOD_2HYPHEN3'] = 'The Wonder Years Vol. 2-3';
product['rootMade_For_TVThe_Wonder_Years_VolPERIOD_4HYPHEN5'] = 'The Wonder Years Vol. 4-5';
product['rootMade_For_TVThe_Wonder_Years_VolPERIOD_6HYPHEN7'] = 'The Wonder Years Vol. 6-7';
product['rootMade_For_TVThe_Wonder_Years_Set'] = 'The Wonder Years Set';
product['rootMade_For_TVWonder_Woman_The_TV_movie'] = 'Wonder Woman The TV movie';
product['rootSuperheroesCaptain_America'] = 'Captain America';
product['rootSuperheroesReb_Brown_Set_HYPHEN_Captain_America_2_disc'] = 'Reb Brown Set - Captain America 2 disc';
product['rootSuperheroesCaptain_Scarlet'] = 'Captain Scarlet';
product['rootSuperheroesDARNA_the_Return'] = 'DARNA the Return';
product['rootSuperheroesDoc_Savage_HYPHEN_The_Man_of_Bronze'] = 'Doc Savage - The Man of Bronze';
product['rootSuperheroesThe_Fantastic_Four_uv'] = 'The Fantastic Four uv';
product['rootSuperheroesAlyas_Batman_en_Robin_Superhero_'] = 'Alyas Batman en Robin Superhero ';
product['rootSuperheroesCrying_Freeman'] = 'Crying Freeman';
product['rootSuperheroesNick_Fury'] = 'Nick Fury';
product['rootSuperheroesShadowman'] = 'Shadowman';
product['rootSuperheroesKISS_Meets_the_Phantom_of_the_Park'] = 'KISS Meets the Phantom of the Park';
product['rootSuperheroesSix_Million_Dollar_Man'] = 'Six Million Dollar Man';
product['rootSuperheroesSpiderman_Live_Action'] = 'Spiderman Live Action';
product['rootSuperheroesThe_Spirit'] = 'The Spirit';
product['rootSuperheroesSwamp_Thing_Uncut'] = 'Swamp Thing Uncut';
product['rootSuperheroesSuperhero_Fan_Shorts'] = 'Superhero Fan Shorts';
product['rootSuperheroesCassern'] = 'Cassern';
product['rootSuperheroes_Aquaman_Pilot'] = ' Aquaman Pilot';
product['rootSuperheroesMade_for_TVBirds_of_Prey'] = 'Birds of Prey';
product['rootSuperheroesMade_for_TVThe_CrowCOMMA_Stairway_To_Heaven'] = 'The Crow, Stairway To Heaven';
product['rootSuperheroesMade_for_TVDrPERIOD_Strange'] = 'Dr. Strange';
product['rootSuperheroesMade_for_TVGeneration_X_'] = 'Generation X ';
product['rootSuperheroesMade_for_TVLegends_Of_The_Superheroes'] = 'Legends Of The Superheroes';
product['rootDocumentaryChickenhawk_'] = 'Chickenhawk ';
product['rootDocumentaryDavid_Blaine_HYPHEN_Above_the_Below'] = 'David Blaine - Above the Below';
product['rootDocumentaryDPERIODOPERIODAPERIOD_'] = 'D.O.A. ';
product['rootDocumentaryHells_Angels_Forever_'] = 'Hells Angels Forever ';
product['rootDocumentaryRenaldo_and_Clara_'] = 'Renaldo and Clara ';
product['rootDocumentaryRolling_StonesCOMMA_Cocksucker_Blues'] = 'Rolling Stones, Cocksucker Blues';
product['rootFar_Out_EastBasara'] = 'Basara';
product['rootFar_Out_EastBehind_Flower_and_Snake'] = 'Behind Flower and Snake';
product['rootFar_Out_EastBlessing_Bell_'] = 'Blessing Bell ';
product['rootFar_Out_EastBloody_Aria'] = 'Bloody Aria';
product['rootFar_Out_EastCassern'] = 'Cassern';
product['rootFar_Out_EastDead_End_Run_'] = 'Dead End Run ';
product['rootFar_Out_EastDead_Run'] = 'Dead Run';
product['rootFar_Out_EastDiary'] = 'Diary';
product['rootFar_Out_EastDog_Bite_Dog'] = 'Dog Bite Dog';
product['rootFar_Out_EastEighteen_Springs'] = 'Eighteen Springs';
product['rootFar_Out_EastGetting_Any'] = 'Getting Any';
product['rootFar_Out_EastGPERIODIPERIOD_Samurai'] = 'G.I. Samurai';
product['rootFar_Out_EastHak_se_wui_yi_wo_wai_kwai'] = 'Hak se wui yi wo wai kwai';
product['rootFar_Out_EastHaze'] = 'Haze';
product['rootFar_Out_EastOne_Missed_Call'] = 'One Missed Call';
product['rootFar_Out_EastSamurai_Commando'] = 'Samurai Commando';
product['rootFar_Out_EastSpacked_Out'] = 'Spacked Out';
product['rootFar_Out_EastStrange_Circus'] = 'Strange Circus';
product['rootFar_Out_EastStereo_Future'] = 'Stereo Future';
product['rootFar_Out_EastVibrator'] = 'Vibrator';
product['rootFar_Out_EastWelcome_to_Dongmakgol_'] = 'Welcome to Dongmakgol ';
product['rootFar_Out_EastCitizen_Dog'] = 'Citizen Dog';
product['rootFar_Out_EastJohnny_Sokko_and_His_Flying_Robot_HYPHEN_Complete_Series_'] = 'Johnny Sokko and His Flying Robot - Complete Series ';
product['rootShipping_Charges_HYPHEN_extraItemsCOMMA_2HYPHEN4_DvdHYPHENRs_HYPHEN_extra_charge'] = 'Items, 2-4 Dvd-Rs - extra charge';
product['rootShipping_Charges_HYPHEN_extraItemsCOMMA_5HYPHEN9_DvdHYPHENRs_HYPHEN_extra_charge'] = 'Items, 5-9 Dvd-Rs - extra charge';
product['rootShipping_Charges_HYPHEN_extraItemsCOMMA_10_plus_DvdHYPHENRs_HYPHEN_extra_charge'] = 'Items, 10 plus Dvd-Rs - extra charge';



var VATPrice;
var VATTotal;



var cookieinfo;

function getCookieInfo()
{
	if(document.cookie.indexOf("tempbasket") == -1)
	{
	  cookieinfo = "";
	}
	else
	{
	  cInfoStart = document.cookie.indexOf("tempbasket=") + 11;
	  cInfoEnd = document.cookie.indexOf(";", cInfoStart);

	  if (cInfoEnd == -1)
	    cInfoEnd = document.cookie.length

	  cookieinfo = document.cookie.substring(cInfoStart, cInfoEnd);
	  cookieinfo = unescape(cookieinfo);
	}
	//alert("cookieinfo  = " + cookieinfo)	
	saveToBasket();
}



var theOldValue;

function saveToBasket()
{
	//if this product does not exist in the basket already, just append it directly to the list.
	if(cookieinfo.indexOf("#" + theId + "@") == -1 ) // have to put the # and @ to make it absolutely unique, otherwise if CameraB2 exists, it will erroneously say CameraB exists!!!!!
	{
	    //alert("PRODUCT DOES NOT exists!!!!")

	    theValue = theProduct + "#" + theQuantity + "#" + thePrice + "#" + theTotal + "#" + theId + "@";
	    theValue = theValue + cookieinfo;

	    //alert("theValue = " + theValue)
	    setCookie("tempbasket", theValue, 24, "/")  // expiry in 24hrs
	}
	else
	{
		theIdPos = cookieinfo.indexOf(theId)
		prodEnd = cookieinfo.indexOf("@", theIdPos)

		//prodEnd--; // remove the  "@"
		theExtract = cookieinfo.substring(0, prodEnd);

		prodStart = theExtract.lastIndexOf("@")
		if (prodStart != -1)
		{
		  theExtract = theExtract.substring(prodStart+1, theExtract.length);
		}
	
		//alert("theExtract = " + theExtract)
		theOldValue = theExtract;


        //theProduct
        cutOff = theExtract.indexOf("#")
        extrProd = theExtract.substring(0, cutOff)
        theExtract = theExtract.substring(cutOff+1, theExtract.length);

        //theQuantity
        cutOff = theExtract.indexOf("#")
        extrQty = theExtract.substring(0, cutOff)
        //alert("extrQty = " + extrQty)
        theExtract = theExtract.substring(cutOff+1, theExtract.length);

        //thePrice
        cutOff = theExtract.indexOf("#")
        extrPrice = theExtract.substring(0, cutOff)
        //alert("extrPrice = " + extrPrice)
        theExtract = theExtract.substring(cutOff+1, theExtract.length);

        //theTotal
        cutOff = theExtract.indexOf("#")
        extrTotal = theExtract.substring(0, cutOff)
        theExtract = theExtract.substring(cutOff+1, theExtract.length);
        
        extrQtyInt = formatCurrency(extrQty);
        extrQtyInt += formatCurrency(theQuantity);

        //extrPriceInt = formatCurrency(extrPrice);
        // In the case the price has changed in the middle of ordering????
        extrPriceInt =  thePrice

        extrTotalInt = extrQtyInt * extrPriceInt;

        NewValue = extrProd + "#" + extrQtyInt + "#" + extrPriceInt + "#" + extrTotalInt + "#" + theId //+ "@";

		// alert("NewValue = " + NewValue + "\n" + "theOldValue = " + theOldValue)

	    //replace old value with new value...
	    startReplaceint = cookieinfo.indexOf(theOldValue);
	    endReplaceint = startReplaceint + theOldValue.length;

	    cookieinfo = cookieinfo.substring(0, startReplaceint) + NewValue + cookieinfo.substring(endReplaceint, cookieinfo.length);

	    setCookie("tempbasket", cookieinfo, 24, "/") // exp in 24hrs

	   // alert("product 2 = " + extrProd)
	}
	
	showAdded()
}
          

  
  function showAdded()
  {
    theTotal = formatCurrency(theTotal);
    
    VATPrice = thePrice + (thePrice * VAT); 
    VATTotal = theQuantity * VATPrice; 
    VATTotal = formatCurrency(VATTotal);

    var theDisplay = 
    "The following product has been added to your shopping cart: \n\n" +
    "Product: " + theProduct + "\n" +
    "Quantity: " + theQuantity + "\n" +
    "Price: " + theCurrSign + doDecimalPos(thePrice) + "\n" +
    "Total: " + theCurrSign + doDecimalPos(theTotal) + "\n";

    var theDisplay2 = "";
    
    if (showVAT)
    {
    	theDisplay2 =
	    "\nTotal incl Tax: " + theCurrSign + doDecimalPos(VATTotal) + "\n" +
	    "(NOTE: Customers not required to pay sales tax may remove \n" +
	    "it from the shopping cart.)\n";
    }
    //alert(theDisplay + theDisplay2);
    
    //problems with Dollar sign.
    theDisplay = totalReplace(theDisplay, "&#36;", "$");
    theDisplay2 = totalReplace(theDisplay2, "&#36;", "$");
    
    var theDisplay3 =  
    "\nWould you like to checkout now? Press 'OK' to checkout \n" +
    "and 'Cancel' to continue shopping. \n "
    
    if (confirm(theDisplay + theDisplay2 + theDisplay3))
      location.href="cgi/basket_vat.html";
  }





	function totalReplace(mainStr, searchStr, resStr)
	{
		while (mainStr.indexOf(searchStr) > -1 )
		{
			mainStr = mainStr.replace(searchStr, resStr);
		}
		return mainStr;
	}



  function formatCurrency(oldValue)
  {
     //alert("oldValue = " + oldValue);
     oldValue = "" + oldValue + "";
     point = oldValue.indexOf(".")
     
     // if there is a decimal point and it is longer than 3 characters...
     if (point > -1 && point < oldValue.length-3) 
     {
		 wholeNo = oldValue.substring(0,point)
		 decNo = oldValue.substring(point+1, oldValue.length)
	 
     	    firstDec = decNo.substring(0,1);
     	    secondDec = decNo.substring(1,2);
     	    thirdDec = decNo.substring(2,3)
     	     if (thirdDec > 4 && secondDec < 9)
     	       secondDec++
     	    else if (thirdDec > 4 && secondDec == 9)
     	    {
     	      secondDec = 0
     	      if (firstDec < 9)
     	       firstDec++
     	      else if (firstDec == 9)
     	      {
     	        firstDec = 0;
     	        wholeNo++
     	      }
     	    }
     	     newValue = wholeNo + "." + firstDec + "" + secondDec;
	 
	 		return parseFloat(newValue)
	 }
     else
 		return parseFloat(oldValue)
  }




  function doDecimalPos(oldValue)
  {
     oldValue = "" + oldValue + "";
     point = oldValue.indexOf(".")
     if (point == -1)
       newValue = oldValue + ".00";
     else if (point == oldValue.length-2)
		newValue = oldValue + "0";
	else
		newValue = oldValue;
     
     	return displayFrFormat(newValue);
  }
  
  
  function displayFrFormat(theFrPrice)
  {
     if(CurrFormat == "FR")
     {
  		theFrPriceStr = theFrPrice + ""; //change to string.
  		theFrPriceStr = theFrPriceStr.replace(".", ",");
  		return theFrPriceStr;
  	}
  	else
  	 return theFrPrice;
  }

  