	//Saves the Menu State
	var list;

	function IsNumeric(sText)
	{
	var ValidChars = "0123456789.";
	var IsNumber=true;
	var Char;

	for (i = 0; i < sText.length && IsNumber == true; i++) 
		{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) 
			{
			IsNumber = false;
			}
		}
	return IsNumber;  
	}

	function Print(){
		window.print();
	}
	     
	function BeforePrint() {
		//after printing is done, set the close button
		document.all.divHide.style.visibility = 'hidden';
	}

	// View product
	function viewProduct(thisElement) {
	  var itemId = new String(thisElement.id);
	  var url = "product.asp?qId=";
	  var target = url + itemId;
	  window.navigate(target);
	}


    // Empty validation
	function emptyvalidation(entered, alertbox) {
	  with (entered) {
	    if (value==null || value=="") {
	      if (alertbox!="") {alert(alertbox);} return false;}
	else {return true;}
	}
	}


	// Flip image
	function flipImage(filespec) {
	  if (window.event.srcElement.tagName == "IMG" ) {
	  window.event.srcElement.src = filespec;
	}
	}


	// Phone validation
	function phoneCheck (entered) {
	  var re = /\d/
	  var newstring = ""
	  var errStr = ""
	  with (entered) {
	    for (var i = 0; i < value.length; i ++) {
	      var character = value.charAt(i);
	      if (!(i==0 && (character=="1" || character=="0")) && character.match(re)) {
	        newstring=newstring+character;
	      }
	    }
	  }
	  if (newstring.length!=10) {errStr = "Please enter the phone number,\n including an area code."};
	  if (errStr !="") {alert(errStr); return false;}
	}


    // Valid credit card number
	function valCreditCard(cardnum, alertbox) {
	with(cardnum){
	if (isNaN(value)) {
	alert(alertbox);
	return 0;
	}
	if (CheckLUHN(value))
	return 1;
	else
	alert("this is not a valid card number");
	return 0;
	}
	}

	// returns 1 or 0 indicating whether number is valid
	function CheckLUHN(cardnum) { 
	if (cardnum == "") return 0;
	var RevNum = new String(cardnum);
	RevNum = Reverse(RevNum);
	var total = new Number(0);
	for ( var i = 0; i < RevNum.length; i += 1 ) {
	var temp = 0;
	if (i % 2) {
	temp = RevNum.substr(i, 1) * 2;
	if (temp >= 10) {
	var splitstring = new String(temp);
	temp = parseInt(splitstring.substr(0, 1)) + parseInt(splitstring.substr(1, 1));
	   }
	}
	else temp = RevNum.substr(i, 1);
	total += parseInt(temp); 
	}
	// if there's no remainder, we return 1 (true)
	return (total % 10) ? 0 : 1;
	}
	function Reverse(strToReverse) {
	var strRev = new String;
	var i = strToReverse.length;
	while (i--)
	strRev += strToReverse.charAt(i);
	return strRev;
	}


	// Jump to the product page from item rows
	function viewProduct(thisElement) {
	  window.event.returnValue = false;
	  var itemId =  new String(thisElement.id);
	  var url = "product.asp?qId=";
	  var target = url + itemId;
	  window.navigate(target);
	}


  // Postal code validation
  function postalCheck(oCode) {

    oCode.value = LRTrim(oCode.value);
    
    var strCode = oCode.value;
    
	if (strCode.length < 6) return false; //Postal code must be at least 6 characters long
		
	//declarations
	var strValidChars; //will hold valid first characters
	var cTemp; //holding var for current character being tested, needed for NS bug
	var strAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";  //valid chars
	var str0to9 = "0123456789"; //valid numbers
	var cSpace = " "; //space
		
	//Valid first characters for provincial postal codes
	var cdCA = "ABCEGHJKLMNPRSTVXY"; //all of Canada
	var cdAB = "T";
	var cdBC = "V";
	var cdMB = "R";
	var cdNB = "E";
	var cdNF = "A";
	var cdNS = "B";
	var cdON = "KLMNP";
	var cdPE = "C";
	var cdQC = "E";
	var cdSK = "S";
	var cdYK = "Y";
	var cdNT = "X";

	strCode = strCode.toUpperCase();
	
	if (! postalCheck.arguments) //if version of JS does not support optional parameters
		strValidChars = cdCA;
	else if(postalCheck.arguments.length < 2)
		strValidChars = cdCA;
	else
	{
		strValidChars = eval("cd" + postalCheck.arguments[1]);
		if (strValidChars.length == 0) 
		{
			alert("Error: Invalid provincial abbreviation passed to postalCheck().");
			return false;
		}
	}

    //check validity of individual postal code characters
	cTemp = strCode.charAt(0);
	if (strValidChars.indexOf(cTemp) == -1) return false; //first character of strCode not a valid first character
	cTemp = strCode.charAt(1);
	if (str0to9.indexOf(cTemp) == -1) return false;
	cTemp = strCode.charAt(2);
	if (strAlpha.indexOf(cTemp) == -1) return false;
	cTemp = strCode.charAt(3);
	if (cSpace.indexOf(cTemp) == -1 && strCode.length == 7 || str0to9.indexOf(cTemp) == -1 && strCode.length == 6) return false;
	cTemp = strCode.charAt(4);
	if (str0to9.indexOf(cTemp) == -1 && strCode.length == 7 || strAlpha.indexOf(cTemp) == -1 && strCode.length == 6) return false;
	cTemp = strCode.charAt(5);
	if (strAlpha.indexOf(cTemp) == -1 && strCode.length == 7 || str0to9.indexOf(cTemp) == -1 && strCode.length == 6) return false;
	cTemp = strCode.charAt(6);
	if (str0to9.indexOf(cTemp) == -1 && strCode.length == 7 || strAlpha.indexOf(cTemp) == -1  && strCode.length == 6) return false;
	if (strCode.length == 6) // If we made it here, check to see if there's only 6 chars
	{
		// put a space in the 4th position
		oCode.value = strCode.substring(0,3) + " " + strCode.substring(3,6);
		return true;
	}
	return true; //if we made it this far, it must be valid!
  }


  function LRTrim(str) {
	var strTrim = "";
	len = str.length;

	// Find non white space at start
	for (i=0; i < len; i++)	{
	  strChar = str.charAt(i);
	  if (strChar != " " && strChar != "\t")
	  break;
	}

	//Find non white space at end
	for (j=(len - 1); j > i; j--) {
	  strChar = str.charAt(j);
	  if (strChar != " " && strChar != "\t")
		break;
	}

	// Loop through and copy the remaining data
	for (k=i; k <= j; k++)
		strTrim += str.charAt(k);

	return strTrim;
  }

	// Digit-Validation (c) Henrik Petersen / NetKontoret
	// Explained at www.echoecho.com/jsforms.htm
	function digitvalidation(entered, min, max, alertbox, datatype){
	with (entered)
	{
	checkvalue=parseFloat(value);
	if (datatype)
	  {smalldatatype=datatype.toLowerCase();
	   if (smalldatatype.charAt(0)=="i") {checkvalue=parseInt(value); if (value.indexOf(".")!=-1) {checkvalue=checkvalue+1}};
	  }
	if ((parseFloat(min)==min && value.length<min) || (parseFloat(max)==max && value.length>max) || value!=checkvalue)
	{if (alertbox!="") {alert(alertbox);} return false;}
	else {return true;}
	}
	}

	<!-- Version 1.1:  Sandeep V. Tamhankar (stamhankar@hotmail.com) -->

	<!-- This script and many more are available free online at -->
	<!-- The JavaScript Source!! http://javascript.internet.com -->

	function emailCheck (entered) {
	var emailStr=entered.value
	/* The following pattern is used to check if the entered e-mail address
	   fits the user@domain format.  It also is used to separate the username
	   from the domain. */
	var emailPat=/^(.+)@(.+)$/
	/* The following string represents the pattern for matching all special
	   characters.  We don't want to allow special characters in the address. 
	   These characters include ( ) < > @ , ; : \ " . [ ]    */
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	/* The following string represents the range of characters allowed in a 
	   username or domainname.  It really states which chars aren't allowed. */
	var validChars="\[^\\s" + specialChars + "\]"
	/* The following pattern represents the range of characters allowed as
	   the first character in a valid username or domain.  I just made it
	   the same as above, but if you want to add a different constraint,
	   you would change it here. */
	var firstChars=validChars
	/* The following pattern applies if the "user" is a quoted string (in
	   which case, there are no rules about which characters are allowed
	   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
	   is a legal e-mail address. */
	var quotedUser="(\"[^\"]*\")"
	/* The following pattern applies for domains that are IP addresses,
	   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
	   e-mail address. NOTE: The square brackets are required. */
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	/* The following string represents at atom (basically a series of
	   non-special characters.) */
	var atom="(" + firstChars + validChars + "*" + ")"
	/* The following string represents one word in the typical username.
	   For example, in john.doe@somewhere.com, john and doe are words.
	   Basically, a word is either an atom or quoted string. */
	var word="(" + atom + "|" + quotedUser + ")"
	// The following pattern describes the structure of the user
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	/* The following pattern describes the structure of a normal symbolic
	   domain, as opposed to ipDomainPat, shown above. */
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")


	/* Finally, let's start trying to figure out if the supplied address is
	   valid. */

	/* Begin with the course pattern to simply break up user@domain into
	   different pieces that are easy to analyze. */
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
	  /* Too many/few @'s or something; basically, this address doesn't
	     even fit the general mould of a valid e-mail address. */
		alert("Email address seems incorrect (check @ and .'s)")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]

	// See if "user" is valid 
	if (user.match(userPat)==null) {
	    // user is not valid
	    alert("The username doesn't seem to be valid.")
	    return false
	}
	/* if the e-mail address is at an IP address (as opposed to a symbolic
	   host name) make sure the IP address is valid. */
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
	    // this is an IP address
		  for (var i=1;i<=4;i++) {
		    if (IPArray[i]>255) {
		        alert("Destination IP address is invalid!")
			return false
		    }
	    }
	    return true
	}

	// Domain is symbolic name
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		alert("The domain name doesn't seem to be valid.")
	    return false
	}
	/* domain name seems valid, but now make sure that it ends in a
	   three-letter word (like com, edu, gov) or a two-letter word,
	   representing country (uk, nl).
	   If there's a country code at the end of the address, the full domain
	   must include a hostname and category (e.g. host.co.uk or host.pub.nl).
	   If it ends in a .com or something, make sure there's a hostname.*/

	/* Now we need to break up the domain to get a count of how many atoms
	   it consists of. */
	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
	    domArr[domArr.length-1].length>3) {
	   // the address must end in a two letter or three letter word.
	   alert("The address must end in a three-letter domain, or two letter country.")
	   return false
	}

	/* If it just ends in .com, .gov, etc., make sure there's a host name.
	   This case can never actually happen because earlier checks take
	   care of this implicitly, but we'll do it anyway. */
	if (domArr[domArr.length-1].length==3 && len<2) {
	   var errStr="This address is missing a hostname!"
	   alert(errStr)
	   return false
	}
	// If we've gotten this far, everything's valid!
	return true;
	}
	
	var popupwin = null;
	
	
	//POPUP Includes ***************************************************
	function dopopup(wx, wy, url, name) {
	var nwidth = (window.screen.width / 2) - ((wx / 2) + 10);
	var nheight = (window.screen.height / 2) - ((wy / 2) + 50);
	popupwin = window.open(url, name, "location=no,directories=no,status=no,menubar=no,toolbar=no,scrollbars=1,resizable=yes,height=" + wy + ",width=" + wx + ",left=" + nwidth + ",top=" + nheight + ",screenX=" + nwidth + ",screenY=" + nheight);
	popupwin.focus();
	}

	function donewpopup(wx, wy, url, name) {
	var nwidth = (window.screen.width / 2) - ((wx / 2) + 10);
	var nheight = (window.screen.height / 2) - ((wy / 2) + 50);
	popupwin = window.open( url,name,"toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=1,resizable=yes,height=" + wy + ",width=" + wx + ",left=" + nwidth + ",top=" + nheight + ",screenX=" + nwidth + ",screenY=" + nheight )
	popupwin.focus();
	}
	
	//LOGON INCLUDES *************************************************
	function ChangePassword()
	{
		dopopup(380, 330, 'changepass.asp', 'changepass');
	}

	function ForgotPassword()
	{
		dopopup(380, 450, 'help.asp', 'help');
	}

	function AddUser()
	{
		dopopup(360, 360, 'NewUser.asp', 'help');
	}
			
	function onCheckKey(sAction, sFormName)
	{
		var key = event.keyCode;
		if (key == 13)
			{
			document.forms(sFormName).item("sAction").value = sAction;
			event.returnValue=false;
			document.Report.submit();
			}
	}
	function onProcessLogon(sAction)
	{
		//document.Logon.action = "Logon.asp";
		document.Logon.setAttribute('action',"Logon.asp");
		//document.Logon.sAction.value = sAction;
		document.Logon.sAction.setAttribute('value',sAction);
		document.Logon.submit();
	}
		function onProcessLogonDist(sAction)
	{
		//document.Logon.action = "Logon.asp";
		document.Logon.setAttribute('action',"LogonDist.asp");
		//document.Logon.sAction.value = sAction;
		document.Logon.sAction.setAttribute('value',sAction);
		document.Logon.submit();
	}
		function onProcessLogon2(sAction)
	{
		//document.Logon.action = "Logon.asp";
		document.Logon.setAttribute('action',"Logonisa.asp");
		//document.Logon.sAction.value = sAction;
		document.Logon.sAction.setAttribute('value',sAction);
		document.Logon.submit();
	}
	function onProcessLogonCL(sAction)
	{
		//document.Logon.action = "Logon.asp";
		document.Logon.setAttribute('action',"LogonCL.asp");
		//document.Logon.sAction.value = sAction;
		document.Logon.sAction.setAttribute('value',sAction);
		document.Logon.submit();
	}
	function onProcessCart(sAction)
	{
		document.SaveCart.sAction.setAttribute('value',sAction);
		document.SaveCart.submit();
	}


	function onJump(sURL)
	{
		document.forms("Report").action = sURL;
		document.Report.submit();
	}
	
	//ISA Includes ****************************************************
	function onProcess(sAction)
	{
		document.ChangeShippingMethod.item("Action").value = sAction;
		//document.ChangeShippingMethod.Self.setAttribute('Action',sAction);
		document.ChangeShippingMethod.submit();
	}
		
	function showmenu(elmnt)
	{
	//alert("showmenu");
	//document.all(elmnt).style.visibility="visible"	// this works with IE ..dep.
	document.getElementById(elmnt).style.visibility="visible"
	}

	function hidemenu(elmnt)
	{
	//alert("hidemenu")
	//document.all(elmnt).style.visibility="hidden"		// this works with IE..dep.
	document.getElementById(elmnt).style.visibility="hidden"
	}

	function onProcessGeneric(sForm, sAction)
	{
		document.forms(sForm).item("Action").value = sAction;
		document.forms(sForm).submit();
	}
	
	//Main Includes *************************************************
	 function removeContact(e) {
      window.event.returnValue = false;

      var contactName = e.name;
      var qId = e.id
      var url = "contacts.asp?Action=RemoveContact&qId=";

      var removeButton='"OK"', keepButton='"Cancel"';
      var confirmOK = '\nSelect '+ removeButton + ' to remove contact ' + contactName + ' from this Branch.'
      var confirmCancel = '\n\nSelect '+ keepButton +' to keep contact ' + contactName + ' with no changes.'

      if (contactName!="") {
        var alertbox = confirmOK + confirmCancel;
        if(confirm(alertbox)){window.navigate(url + qId)};
      }
    }
    
    function removeContact_f(e) {
      window.event.returnValue = false;

      var contactName = e.name;
      var qId = e.id
      var url = "contacts.asp?Action=RemoveContact&qId=";

      var removeButton='"OK"', keepButton='"Cancel"';
      var confirmOK = '\nCliquer OK pour éliminer' + contactName + ' de cette succursale.'
      var confirmCancel = '\n\nCliquer Annuler pour conserver ' + contactName + ' sans changement.'

      if (contactName!="") {
        var alertbox = confirmOK + confirmCancel;
        if(confirm(alertbox)){window.navigate(url + qId)};
      }
    }
  
	function createCookie(name,value,days)
	{
		if (days)
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toUTCString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}

	function readCookie(name)
	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++)
		{
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	
	
	function AddEntry(name)
	{
		var list;
		var temp;
		
		//Read old entries
		list = readCookie('Menu');
		
		if (list != null) {
			temp = list + name + ',' ;
		}else{
			temp =  name + ',';
		}
				
		//Create New Cookie
		createCookie('Menu',temp,'1');
	}
	
	function RemoveEntry(name)
	{
		var Found = false;
		var i = 0;
		var last = 0;
		var Entry;
		var j=0;
		var list;
		var start;
		var end;
		var endLength;
		
		list = readCookie('Menu');
		
		//Check to see if there is any data in the list
		if (list != null) {
			while (Found == false && i < list.length) {
				if (list.charAt(i) == ',') {
					Entry = list.substr(last,i-last);
					if (Entry == name) {
						Diff = i-last;
						Found == true
						start = list.substr(0,last);	
						endLength = list.length - Diff - start.length;
						end = list.substr(i+1,endLength);
						list = start + end;
					}
					last = i + 1;
				}
				i++;
			}	
		createCookie('Menu',list,'1');
		}
	}	
	
	function AddEntryHiLite(name)
	{
		var list;
		var temp;
		
		//Read old entries
		list = readCookie('HiLite');
		
		if (list != null) {
			temp = list + name + ',' ;
		}else{
			temp =  name + ',';
		}
				
		//Create New Cookie
		createCookie('HiLite',temp,'1');
	}
	
	function RemoveEntryHiLite(name)
	{
		var Found = false;
		var i = 0;
		var last = 0;
		var Entry;
		var j=0;
		var list;
		var start;
		var end;
		var endLength;
		
		list = readCookie('HiLite');
		
		//Check to see if there is any data in the list
		if (list != null) {
			while (Found == false && i < list.length) {
				if (list.charAt(i) == ',') {
					Entry = list.substr(last,i-last);
					if (Entry == name) {
						Diff = i-last;
						Found == true
						start = list.substr(0,last);	
						endLength = list.length - Diff - start.length;
						end = list.substr(i+1,endLength);
						list = start + end;
					}
					last = i + 1;
				}
				i++;
			}	
		createCookie('HiLite',list,'1');
		}
	}	
	
   
    function doCatOutline(e) {

	  var hit = false;
	  var i = 1;
	  var srcId, srcElement, targetElement;

		if (!e) var srcElement = window.event.srcElement;
		else var srcElement = e.target;
    
      list = readCookie('Menu');
      if (srcElement.className.length > 2) {

			if (srcElement.className.toUpperCase() == "GROUP") {
				srcID = srcElement.id;
				targetElement = document.getElementById(srcID + "T");
				srcElement = document.getElementById(srcID);

  				if (targetElement.style.display == "none") {
		  	      
  				//Add to list of open branches
  				AddEntry(srcID);
  				AddEntryHiLite(srcID);
		  	    CloseOtherGroups(srcID);
		  	      		
				//targetElement.style.display = "";
				targetElement.style.cssText = "display:";
				
				} 
				else {

				//Remove From list of open branches
  				RemoveEntry(srcID);
  				RemoveEntryHiLite(srcID);
				//targetElement.style.display = "none";
				targetElement.style.cssText = "display:none";
				}
			}
		      
			if (srcElement.className.toUpperCase() == "CAT") {

				srcID = srcElement.id;
				targetElement = document.getElementById(srcID + "T");
				srcElement = document.getElementById(srcID);
  				if (targetElement.style.display == "none") {
  				//Add to list of open branches
  				AddEntry(srcID);
				
				//targetElement.style.display = "";
				targetElement.style.cssText = "display:";
				} 
				else {

				//Remove From list of open branches
  				RemoveEntry(srcID);
				//targetElement.style.display = "none";
				targetElement.style.cssText = "display:none";
				}
			}

			if (srcElement.className.toUpperCase() == "FAQ") {
				srcID = srcElement.id;
				srcID = srcID.substring(0, srcID.length-1);
				targetElement = document.getElementById(srcID + "a");
				srcElement = document.getElementById(srcID + "q");

  				if (targetElement.style.display == "none") {		
				targetElement.style.cssText = "display:";
				} 
				else {
				targetElement.style.cssText = "display:none";
				}
			}
			
			if (srcElement.className.toUpperCase() == "ORDER") {
				srcID = srcElement.id;
				srcID = srcID.substring(0, srcID.length-1);
				targetElement = document.getElementById(srcID + "a");
				srcElement = document.getElementById(srcID + "q");
			
  				if (targetElement.style.display == "none") {		
				targetElement.style.cssText = "display:";
				} 
				else {
				targetElement.style.cssText = "display:none";
				}
			}
			
			
		}	
            
    }
    
    //Close all other main groups that are not selected
    function CloseOtherGroups(srcID)  {
	  var eElem, aDivs = document.getElementsByTagName("DIV");
      var iDivsLength = aDivs.length;
      var Group;
      var Cat;
	  var targetElement;
	  
		for(i=0; i<iDivsLength; i++) {
			eElem = aDivs[i];
			//Make sure we process GROUPS only
			if (eElem.className.toUpperCase() == "GROUP") {
				
				//Make sure we check groups other than was was selected to be opened
				if (eElem.id != srcID+'T') {
					targetElement = document.getElementById(eElem.id);
  					if (targetElement.style.display != "none") {
						//Debug
						//alert('Removed: ' + srcID + '   eElem:' + eElem.id.substr(0,eElem.id.length-1));
  						RemoveEntry(eElem.id.substr(0,eElem.id.length-1));
  					}
  					eElem.style.display = "none";	
				}
			}		
		}	
    }
    
    
    
	function collapseCats() {
      var eElem, aDivs = document.getElementsByTagName("DIV");
      var iDivsLength = aDivs.length;
      var Group;
      var Cat;
      var HiLiteGroup;
      
      //Read Cookie information about menu
      Group = readCookie('Menu')
	  if (Group == null) {
		Group='';
	  }
	  
	  //Read Cookie information about menu
      HiLiteGroup = readCookie('HiLite')
	  if (HiLiteGroup == null) {
		HiLiteGroup='';
	  }
			
      for(i=0; i<iDivsLength; i++) {
			eElem = aDivs[i];
			// If group name s found
			if ((eElem.id != 'di1') &  (eElem.id != 'Branding')) {
				if (Group.indexOf(eElem.id.substr(0,eElem.id.length-1)) != -1) {
					eElem.style.display = "";
				}else{
					eElem.style.display = "none";	
				}
			}	
		}	
		
		for(i=0; i<iDivsLength; i++) {
			eElem = aDivs[i];
			// If group name s found
			if ((eElem.id != 'di1')) {
				if (HiLiteGroup.indexOf(eElem.id.substr(0,eElem.id.length-1)) != -1) {
					eElem.style.color='#FFCC66';
				}else{
					eElem.style.color='#FFFFFF';	
				}
			}	
		}
    }
    
     function expandBlurbs() {
      var eElem, aDivs = document.getElementsByTagName("DIV");
      var iDivsLength = aDivs.length;
      for(i=0; i<iDivsLength; i++) {
        eDiv = aDivs[i];
        if (eDiv.id.indexOf('FAQ') != -1) eDiv.style.display = "";
    }
    }
    function removeItem(e,tag,lang) {
      //window.event.returnValue = false;

      var itemNumber = e.name;
      var itemId = e.id
      var url = "scart.asp?Action=RemoveItem&product=";
	  var nav_url	
      var removeButton='"OK"', keepButton='"Cancel"';
      
      if( navigator.appVersion.indexOf("Mac") != -1) {


        removeButton='"Yes"'; remainButton='"No"';
       
      }
      if (lang == 'true') {
          var confirmOK = '\nCliquez sur '+ removeButton + ' pour enlever le produit ' + itemNumber + ' de votre panier. '
          var confirmCancel = '\n\nCliquez sur '+ keepButton +' pour conserver le produit ' + itemNumber + ' tel quel.'
        }else{
          var confirmOK = '\nSelect '+ removeButton + ' to remove product ' + itemNumber + ' from your Shopping Cart.'
          var confirmCancel = '\n\nSelect '+ keepButton +' to keep product ' + itemNumber + ' with no changes.'
        
        }
      if (itemNumber!="") {
        var alertbox = confirmOK + confirmCancel;
        if(confirm(alertbox))
        nav_url = url + itemId + '&Tag=' + tag
        {window.location.href = nav_url};
      }
    }
    
	function viewProduct(e) {
	  window.event.returnValue = false;
	  var ItemGroupId = e.id;
	  var url = "product.asp?product=";
	  window.navigate(url + ItemGroupId);
	}

	function isEmail(str) {
		// are regular expressions supported?
		var supported = 0;
		if (window.RegExp) {
			var tempStr = "a";
			var tempReg = new RegExp(tempStr);
			if (tempReg.test(tempStr)) supported = 1;
		}
		if (!supported) 
			return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
		var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
		var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
		return (!r1.test(str) && r2.test(str));
	}
function CleanDots()
	{
	    document.getElementById('GreenDot_26').src = 'images/main/greendot.jpg';
	    document.getElementById('GreenDot_27').src = 'images/main/greendot.jpg';
	    document.getElementById('GreenDot_28').src = 'images/main/greendot.jpg';
	    document.getElementById('GreenDot_29').src = 'images/main/greendot.jpg';
	    document.getElementById('GreenDot_30').src = 'images/main/greendot.jpg';
	    document.getElementById('GreenDot_35').src = 'images/main/greendot.jpg';
	}
