	var cU = {
  init: function() {

    if (!document.getElementById) return;
    if (!Sarissa) return;
	cU.priceRange = 0;cU.minPrice = 0;cU.maxPrice = 1000; cU.numProducts = 1000;
	
	cU.imageType = document.getElementById('imageType');
	if (!cU.imageType)
	{
		cU.imageTypeValue = 1
	}
	else
	{
		
		cU.imageTypeValue = cU.imageType.value;
	}
	
	cU.prodSet = document.getElementById('productSet');
	if (!cU.prodSet)
	{
		cU.productSet = 1;
	}
	else
	{
		cU.productSet = cU.prodSet.value;
	}
	cU.catID = document.getElementById('catID');
	cU.itemStr = document.getElementById('item');
	cU.serverIP  = document.getElementById("serverIP");
	cU.sortBar = document.getElementById('sortBar');
	
	/********
	********* NEW BIT 
	*********
	********/
	cU.priceSelect = document.getElementById('priceSelect');
	if (!cU.priceSelect)
	{
	}
	else
	{
		// add event
		cU.addEvent(cU.priceSelect, 'change', cU.setPriceSelect, false);
	}
	cU.sortBySelect = document.getElementById('sortBySelect');
	if (!cU.sortBySelect)
	{
	}
	else
	{
		// add event
		cU.addEvent(cU.sortBySelect, 'change', cU.setSortBySelect, false);
	}
	cU.showProductsSelect = document.getElementById('showProductsSelect');
	if (!cU.showProductsSelect)
	{
	}
	else
	{
		// add event
		cU.addEvent(cU.showProductsSelect, 'change', cU.setShowProductsSelect, false);
	}
	cU.currencyID = document.getElementById('currencyid')
	if (!cU.currencyID)
	{
		cU.currencyIDValue = "1";
	}
	else
	{
		cU.currencyIDValue = cU.currencyID.value;
	}
	cU.minPriceElement = document.getElementById('minPrice');
	
	if (!cU.minPriceElement)
	{
		cU.minPrice = 0;
	}
	else
	{
		cU.minPrice = cU.minPriceElement.value;
	}
	cU.maxPriceElement = document.getElementById('maxPrice'); 
	if (!cU.maxPriceElement)
	{
		cU.maxPrice = 0;
	}
	else
	{
		cU.maxPrice = cU.maxPriceElement.value;
	}
	cU.sortByElement = document.getElementById('sortBy');
	if (!cU.sortByElement)
	{
		cU.sortbyValue = 0;
	}
	else
	{
		cU.sortbyValue = cU.sortByElement.value;
	}
	
	cU.maxPriceElement = document.getElementById('maxPrice');
	cU.sortByElement = document.getElementById('sortBy');
	
	cU.image1 = document.getElementById('image1');
	//cU.sortbyValue = 1;
	// the two smaller images
	cU.small1 = document.getElementById('small1');
	cU.small2 = document.getElementById('small2');
	
	cU.imageArray = new Array();
	
	//check that the images all exist
    if (!cU.image1)
	{
	}
	else
	{
		cU.imageArray["high_image1"] = new Image(300, 350);
		cU.imageArray["high_image1"].src = cU.lowToHigh(cU.image1.src);
		cU.image1.src = cU.imageArray["high_image1"].src;
	}
    if (!cU.small1)
	{
	}
	else
	{
		cU.imageArray["high_small1"] = new Image(300, 350);
		cU.imageArray["high_small1"].src = cU.lowToHigh(cU.small1.src);
		cU.imageArray["big_small1"] = new Image(300, 350);		
		cU.imageArray["big_small1"].src = cU.smallToBig(cU.small1.src);
		cU.small1.src = cU.imageArray["high_small1"].src;
		cU.addEvent(cU.small1, 'click', cU.showLarge1, false);
	}
    if (!cU.small2)
	{
	}
	else
	{
		cU.imageArray["high_small2"] = new Image(300, 350);
		cU.imageArray["big_small2"] = new Image(300, 350);
		
		cU.imageArray["high_small2"].src = cU.lowToHigh(cU.small2.src);
		cU.imageArray["big_small2"].src = cU.smallToBig(cU.small2.src); 
		
		cU.small2.src = cU.imageArray["high_small2"].src;
		cU.addEvent(cU.small2, 'click', cU.showLarge2, false);
	}
	
	if (!cU.sortBar)
	{
		cU.swapImages();
		//cU.swapImages2();
	}
	//cU.searchresults = document.getElementById('searchresults');

	//if (!cU.searchresults) return;

	cU.num4 = document.getElementById('num4');
	if (!cU.num4)
	{
	}
	else
	{
		cU.num8 = document.getElementById('num8');
		cU.num12 = document.getElementById('num12');
		cU.num16 = document.getElementById('num16');
		cU.num20 = document.getElementById('num20');
		cU.num1000 = document.getElementById('num1000');
		cU.addEvent(cU.num4, 'click', cU.setNum4, false);
		cU.addEvent(cU.num8, 'click', cU.setNum8, false);
		cU.addEvent(cU.num12, 'click', cU.setNum12, false);
		cU.addEvent(cU.num16, 'click', cU.setNum16, false);
		cU.addEvent(cU.num20, 'click', cU.setNum20, false);
		cU.addEvent(cU.num1000, 'click', cU.setNum1000, false);
	}
	cU.sortby = document.getElementById('sortby');

	cU.sortBy1 = document.getElementById('sortBy1');
	if (!cU.sortBy1)
	{
	}
	else
	{
		cU.sortBy2 = document.getElementById('sortBy2');
		cU.sortBy3 = document.getElementById('sortBy3');
		cU.addEvent(cU.sortBy1, 'click', cU.setSortBy1, false);
		cU.addEvent(cU.sortBy2, 'click', cU.setSortBy2, false);
		cU.addEvent(cU.sortBy3, 'click', cU.setSortBy3, false);
	}
	cU.price1 = document.getElementById('price1');
	if (!cU.price1)
	{
	}
	else
	{		
		cU.price2 = document.getElementById('price2');
		cU.price3 = document.getElementById('price3');
		cU.price4 = document.getElementById('price4');
		cU.price5 = document.getElementById('price5');
		//alert("Here7");
		cU.addEvent(cU.price1, 'click', cU.setPrice1, false);
		cU.addEvent(cU.price2, 'click', cU.setPrice2, false);
		cU.addEvent(cU.price3, 'click', cU.setPrice3, false);
		cU.addEvent(cU.price4, 'click', cU.setPrice4, false);
		cU.addEvent(cU.price5, 'click', cU.setPrice5, false);

		cU.addEvent(cU.price5, 'click', cU.setPrice5, false);

	}
	cU.delsearchbox = document.getElementById('delsearchbox');	
	if (cU.delsearchbox)
	{
		//alert("delsearchbox exists");
		cU.delsearchbutton = document.getElementById('delsearchbutton');
		cU.delsearch2 = document.getElementById('delsearch2');	
		cU.addEvent(cU.delsearchbutton, 'click', cU.doDelSearch, false);
	}
	else
	{
		//alert("delsearchbox does not exist");
	}
	// track my order bit
	
	cU.trackBtn = document.getElementById('trackBtn');
	
	if (cU.trackBtn)
	{
		//alert("delsearchbox exists");
		cU.oidorder = document.getElementById('oidorder');	
		cU.trackResults = document.getElementById('trackResults');
		
		cU.addEvent(cU.trackBtn, 'click', cU.doTrackOrder, false);
	}
	else
	{
		//alert("delsearchbox does not exist");
	}

	},
	swapImages: function() {
	cU.productImages = new Array();
	cU.imageArray = new Array();
	cU.quickLookButtons = new Array();
	cU.productImages = cU.getElementsByClass('img','prodImage'); // for images

			// for each product image
	for (var i = 0; i < cU.productImages.length; i++)
	{
		cU.imageArray[i] = new Image(150, 175);		
		cU.imageArray[i].src = cU.lowToHigh(cU.productImages[i].src);
		cU.productImages[i].src = cU.imageArray[i].src;
	} 
	},
	swapImages2: function() {
		cU.staticImages = new Array();
		cU.imageArray = new Array();
		
		cU.staticImages = cU.getElementsByClass('img','optimisedImage'); // for images

		// for each static image
		for (var i = 0; i < cU.staticImages.length; i++)
		{
			cU.imageArray[i] = new Image(150, 175);		
			cU.imageArray[i].src = cU.lowToHigh2(cU.staticImages[i].src);
			cU.staticImages[i].src = cU.imageArray[i].src;
		} 
	},
  addEvent: function(elm, evType, fn, useCapture) {
    // cross-browser event handling for IE5+, NS6 and Mozilla
    // By Scott Andrew
    if (elm.addEventListener) {
      elm.addEventListener(evType, fn, useCapture);
      return true;
    } else if (elm.attachEvent) {
      var r = elm.attachEvent('on' + evType, fn);
      return r;
    } else {
      elm['on' + evType] = fn;
    }
  },
  clearSortBy:function() {
		var idArray = ['sortBy1', 'sortBy2', 'sortBy3'];

	for (i = 0; i < idArray.length; i++)
	{
		//alert(sectionArray[i]);
		element = document.getElementById(idArray[i]);
		if (element) element.className = '';
	}  
  },
  clearPrice:function() {
		var idArray = ['price1', 'price2', 'price3', 'price4', 'price5' ];

	for (i = 0; i < idArray.length; i++)
	{
		//alert(sectionArray[i]);
		element = document.getElementById(idArray[i]);
		if (element) element.className = '';
	}  
  },
   clearNum:function() {
		var idArray = ['num4', 'num8', 'num12', 'num16', 'num20', 'num1000'  ];

	for (i = 0; i < idArray.length; i++)
	{
		//alert(sectionArray[i]);
		element = document.getElementById(idArray[i]);
		if (element) element.className = '';
	}  
  },
  setSortBy1:function() {
	  cU.clearSortBy();
	  cU.sortbyValue = 3;
	  cU.sortByElement.value = 3;
	  
	  element = document.getElementById('sortBy1');
	  if (element) element.className = 'active';
	  cU.getContent();
	  
  },
   setSortBy2:function() {
	  cU.clearSortBy();
	  cU.sortbyValue = 4;
	  cU.sortByElement.value = 4;
	  cU.getContent();
	  element = document.getElementById('sortBy2');
	  if (element) element.className = 'active';
	  
  },
   setSortBy3:function() {
	  cU.clearSortBy();
	  cU.sortbyValue = 6;
	  cU.sortByElement.value = 6;
	  element = document.getElementById('sortBy3');
	  if (element) element.className = 'active';
	  cU.getContent();
	  
  },
   setNum4:function() {
	cU.clearNum();
	cU.numProducts = 5;
	element = document.getElementById('num4');
	if (element) element.className = 'active';
	  
	  cU.getContent();
	  
  },
   setNum8:function() {
	  cU.clearNum();
	  cU.numProducts = 9;
	  element = document.getElementById('num8');
	if (element) element.className = 'active';
	
	cU.getContent();
	  
  },
   setNum12:function() {
	  cU.clearNum();
	  cU.numProducts = 13;
	  element = document.getElementById('num12');
	if (element) element.className = 'active';
	
	  cU.getContent();
	  
  },
  setNum16:function() {
	 cU.clearNum();
	  cU.numProducts = 17;
	  element = document.getElementById('num16');
	if (element) element.className = 'active';
	
	  cU.getContent();
	  
  },
  setNum20:function() {
	  	cU.clearNum();
		cU.numProducts = 21;
		element = document.getElementById('num20');
	if (element) element.className = 'active';
	
	  cU.getContent();
	  
  },
  setNum1000:function() {
	  	cU.clearNum();
		cU.numProducts = 1000;
		element = document.getElementById('num1000');
	if (element) element.className = 'active';
	
	  cU.getContent();
	  
  },
  setShowProductsSelect:function() {
	  	numProducts=cU.showProductsSelect.value;
		cU.numProducts = numProducts;
		
		cU.getContent();
  },
  setSortBySelect:function() {
	  cU.sortbyValue = cU.sortBySelect.value;
	  cU.sortByElement.value = cU.sortBySelect.value;
	  cU.getContent();
  },
  setPriceSelect:function() {
	  switch(cU.priceSelect.value)
		{
			case 'priceSelect0':
				switch(cU.currencyIDValue)
				{
					case "1":
						cU.minPrice =0; cU.maxPrice = 1000;//cU.sortbyValue =  3;
						break;
					case "2":
						cU.minPrice = 0; cU.maxPrice = 1000;//cU.sortbyValue =  3;
						break;
					case "3":
						cU.minPrice = 0; cU.maxPrice = 1000;//cU.sortbyValue =  3;
						break;
					default:
						cU.minPrice = 0; cU.maxPrice = 1000;//cU.sortbyValue =  3;
						break;
				}
				break;
			case 'priceSelect1':
				switch(cU.currencyIDValue)
				{
					case "1":
						cU.minPrice =0; cU.maxPrice = 25;//cU.sortbyValue =  3;
						break;
					case "2":
						cU.minPrice = 0; cU.maxPrice = 50;//cU.sortbyValue =  3;
						break;
					case "3":
						cU.minPrice = 0; cU.maxPrice = 30;//cU.sortbyValue =  3;
						break;
					default:
						cU.minPrice = 0; cU.maxPrice = 25;//cU.sortbyValue =  3;
						break;
				}
				break;
			case 'priceSelect2':
				switch(cU.currencyIDValue)
				{
					case "1":
						cU.minPrice = 25;cU.maxPrice = 30;//cU.sortbyValue =  3;
						break;
					case "2":
						cU.minPrice = 50;cU.maxPrice = 60;//cU.sortbyValue =  3;
						break;
					case "3":
						cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
						break;
					default:
						cU.minPrice = 25;cU.maxPrice = 30;//cU.sortbyValue =  3;
						break;
				}
				break;
			case 'priceSelect3':
				switch(cU.currencyIDValue)
				{
					case "1":
						cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
						break;
					case "2":
						cU.minPrice = 60;cU.maxPrice = 80;//cU.sortbyValue =  3;
						break;
					case "3":
						cU.minPrice = 40;cU.maxPrice = 50;//cU.sortbyValue =  3;
						break;
					default:
						cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
						break;
				}
				break;
			case 'priceSelect4':
				switch(cU.currencyIDValue)
				{
					case "1":
						cU.minPrice = 40;cU.maxPrice = 200;//cU.sortbyValue =  3;
						break;
					case "2":
						cU.minPrice = 80;cU.maxPrice = 400;//cU.sortbyValue =  3;
						break;
					case "3":
						cU.minPrice = 50;cU.maxPrice = 250;//cU.sortbyValue =  3;
						break;
					default:
						cU.minPrice = 40;cU.maxPrice = 200;//cU.sortbyValue =  3;
						break;
				}
				break;
		}

		cU.minPriceElement.value = cU.minPrice;
		cU.maxPriceElement.value = cU.maxPrice;
		cU.sortByElement.value = cU.sortbyValue;
		cU.minPriceElement.value = cU.minPrice;
		cU.maxPriceElement.value = cU.maxPrice;
		cU.sortByElement.value = cU.sortbyValue;
		
		cU.getContent();
  },
  setPrice1:function() {
	  cU.clearPrice();
	  cU.priceRange = 1; 
	  
	  switch(cU.currencyIDValue)
	  {
		case "1":
			cU.minPrice =0; cU.maxPrice = 25;//cU.sortbyValue =  3;
			break;
		case "2":
			cU.minPrice = 0; cU.maxPrice = 50;//cU.sortbyValue =  3;
			break;
		case "3":
			cU.minPrice = 0; cU.maxPrice = 30;//cU.sortbyValue =  3;
			break;
		default:
			cU.minPrice = 0; cU.maxPrice = 25;//cU.sortbyValue =  3;
			break;
	  }
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	 // alert(cU.currencyID.value + ' ' + cU.maxPrice);
	 // s=s_gi('serenataflowersdotcom');s.linkTrackVars="eVar9,prop9"; s.linkTrackEvents="";s.eVar9='under25';s.prop9='under25';s.tl(this,'o','PriceRangeSelected');
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	  element = document.getElementById('price1');
	if (element) element.className = 'active';
	
	  cU.getContent();
	
  },
  setPrice2:function() {
	  cU.clearPrice();
	  cU.priceRange = 2;
	  switch(cU.currencyIDValue)
	  {
		case "1":
			cU.minPrice = 25;cU.maxPrice = 30;//cU.sortbyValue =  3;
			break;
		case "2":
			cU.minPrice = 50;cU.maxPrice = 60;//cU.sortbyValue =  3;
			break;
		case "3":
			cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
			break;
		default:
			cU.minPrice = 25;cU.maxPrice = 30;//cU.sortbyValue =  3;
			break;
	  }
	  
	 // s=s_gi('serenataflowersdotcom');s.linkTrackVars="eVar9,prop9"; s.linkTrackEvents="";s.eVar9='25-30';s.prop9='25-30';s.tl(this,'o','PriceRangeSelected');
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	  	  element = document.getElementById('price2');
	if (element) element.className = 'active';
	  cU.getContent();
  },
  setPrice3:function() {
	  cU.clearPrice();
	  cU.priceRange = 3;
	  switch(cU.currencyIDValue)
	  {
		case "1":
			cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
			break;
		case "2":
			cU.minPrice = 60;cU.maxPrice = 80;//cU.sortbyValue =  3;
			break;
		case "3":
			cU.minPrice = 40;cU.maxPrice = 50;//cU.sortbyValue =  3;
			break;
		default:
			cU.minPrice = 30;cU.maxPrice = 40;//cU.sortbyValue =  3;
			break;
	  }
	  
		//s=s_gi('serenataflowersdotcom');s.linkTrackVars="eVar9,prop9"; s.linkTrackEvents="";s.eVar9='30-40';s.prop9='30-40';s.tl(this,'o','PriceRangeSelected');
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	  	  element = document.getElementById('price3');
	if (element) element.className = 'active';
	  cU.getContent();
  },
  setPrice4:function() {
	  cU.clearPrice();
	  cU.priceRange = 4;
	  
	  switch(cU.currencyIDValue)
	  {
		case "1":
			cU.minPrice = 40;cU.maxPrice = 200;//cU.sortbyValue =  3;
			break;
		case "2":
			cU.minPrice = 80;cU.maxPrice = 400;//cU.sortbyValue =  3;
			break;
		case "3":
			cU.minPrice = 50;cU.maxPrice = 250;//cU.sortbyValue =  3;
			break;
		default:
			cU.minPrice = 40;cU.maxPrice = 200;//cU.sortbyValue =  3;
			break;
	  }
	  //s=s_gi('serenataflowersdotcom');s.linkTrackVars="eVar9,prop9"; s.linkTrackEvents="";s.eVar9='over40';s.prop9='over40';s.tl(this,'o','PriceRangeSelected');	  
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	  	  element = document.getElementById('price4');
	if (element) element.className = 'active';
	  cU.getContent();
  },
   setPrice5:function() {
	  cU.clearPrice();
	  switch(cU.currencyIDValue)
	  {
		case "1":
			cU.minPrice = 0;cU.maxPrice = 200;//cU.sortbyValue =  3;
			break;
		case "2":
			cU.minPrice = 0;cU.maxPrice = 400;//cU.sortbyValue =  3;
			break;
		case "3":
			cU.minPrice = 0;cU.maxPrice = 250;//cU.sortbyValue =  3;
			break;
		default:
			cU.minPrice = 0;cU.maxPrice = 200;//cU.sortbyValue =  3;
			break;
	  }
	  cU.priceRange = 5;
	  cU.minPriceElement.value = cU.minPrice;
	  cU.maxPriceElement.value = cU.maxPrice;
	  cU.sortByElement.value = cU.sortbyValue;
	  	  element = document.getElementById('price5');
	if (element) element.className = 'active';
	  cU.getContent();
  },
  getContent:function() {
	//netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

	var xmlhttp = GetXmlHttpObject(null);
	
	var qsNumProducts = cU.numProducts; var catID = cU.catID.value;var qsMinPrice = cU.minPrice;var qsMaxPrice = cU.maxPrice;
	var qsSortBy = cU.sortbyValue;
	var qsProductSet = cU.productSet;
	var qsCurrencyID = cU.currencyIDValue;
	
	
	var prefix  = 'http://' + cU.serverIP.value + '/';
	var str = prefix + 'catProductsNew.asp?minPrice=' + qsMinPrice + '&maxPrice=' + qsMaxPrice  + '&numProds=' + qsNumProducts  +'&sortby=' + qsSortBy + "&prodlistID=" + qsProductSet + "&productSet=" + qsProductSet + "&currencyID=" + qsCurrencyID + "&amp;num1=" + Math.random() + '&amp;num2=' + Math.random();
	//alert(str);
	xmlhttp.open('GET', str, true);
	xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4) {
		 ///alert(xmlhttp.responseText);
        cU.updateContent(xmlhttp.responseText);
      }
    };
	xmlhttp.send(null);
	},
	quicklook: function() {
		cU.quickLookButtons = cU.getElementsByClass('img','popupbtn'); // for images

		// for each product image
		for (var i = 0; i < cU.quickLookButtons.length; i++)
		{
			cU.quickLookButtons[i].style.visibility = "visible";
		} 
	},
  updateContent: function($html) {
	 //cU.searchresults.innerHTML = $html;
	 cU.swapImages();
  },
	lowToHigh: function(lowImg) {
			highImg = lowImg.replace('_low_', '_high_');
			return highImg;
	  },
	  lowToHigh2: function(lowImg) {
			highImg = lowImg.replace('_low', '');
			return highImg;
	  },
		smallToBig: function(smallImg) {
		  bigImg = smallImg.replace('small', 'big');
		  return bigImg;
	  },
	  getElementsByClass: function(el, _class)
	  {
		var els = document.getElementsByTagName( ( el ) ? el : "*" );
		var returnArr = new Array( );
		
		for( var i = 0; i < els.length; i++ )
		{
			if( els[i].className == _class ) returnArr[returnArr.length] = els[i];
		} return returnArr;
	  },
	  doDelSearch:function() {
			var delsearchboxValue = cU.delsearchbox.value;
			cU.serverIP = document.getElementById("serverIP");
		
			cU.serverIPValue  = cU.serverIP.value;
			var xmlhttp = GetXmlHttpObject(null);
			
			var prefix  = 'http://' + cU.serverIPValue;
			var str = prefix + '/delsearch.asp?iSize=1&str=' + delsearchboxValue + "&amp;num1=" + Math.random() + '&amp;num2=' + Math.random();
			//alert(str);
			xmlhttp.open('GET', str, true);
			
			xmlhttp.onreadystatechange = function() {
			  if (xmlhttp.readyState == 4) {
				cU.updateDelSearchContent(xmlhttp.responseText);
			  }
			};
		
			xmlhttp.send(null);		
		},
		updateDelSearchContent: function($html) {
		cU.delsearch2.innerHTML = $html;
	  },
	   doTrackOrder:function() {

			var oidordervalue = cU.oidorder.value;
			cU.serverIP = document.getElementById("serverIP");

			cU.serverIPValue  = cU.serverIP.value;
			var xmlhttp = GetXmlHttpObject(null);

			var prefix  = 'http://' + cU.serverIPValue;
			var str = prefix + '/trackOrder.asp?orderID=' + oidordervalue + '&amp;num1=' + Math.random() + '&amp;num2=' + Math.random();

			xmlhttp.open('GET', str, true);

			xmlhttp.onreadystatechange = function() {
			  if (xmlhttp.readyState == 4) {

				cU.updateTrackOrderContent(xmlhttp.responseText);

			  }
			};
		
			xmlhttp.send(null);		
		},
		updateTrackOrderContent: function($html) {
			//alert($html);
			element = document.getElementById('hideRow');
			element.style.display = 'none';
			cU.trackResults.innerHTML = $html;
	  },
	  showLarge1: function() {
            var temp1 = cU.image1.src;
            var temp2 = cU.small1.src;
            cU.small1.src = cU.bigToSmall(temp1);
            cU.image1.src = cU.smallToBig(temp2);
	},

  showLarge2: function() {
            var temp1 = cU.image1.src;
            var temp2 = cU.small2.src;

            cU.small2.src = cU.bigToSmall(temp1);
            cU.image1.src = cU.smallToBig(temp2);
	},

	 // this function finds the name of a big image based on the name of the small image
  smallToBig: function(smallImg) {
	  bigImg = smallImg.replace('small', 'big');
	  return bigImg;
  },
  bigToSmall: function(bigImg) {
	  smallImg = bigImg.replace('big', 'small');
	  return smallImg;
  }
}
function GetXmlHttpObject(handler) 
{ 
	var isIE = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0; 
	var isIE5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0; 
	var isOpera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0; 
	//netscape, safari, mozilla behave the same??? 
	var isNetscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0; 
	var localXmlHttp = null;

	// Depending on the browser, try to create the xmlHttp object 
	if (isIE)
	{ 
		// The object to create depends on version of IE 
		// If it isn't ie5, then default to the Msxml2.XMLHTTP object 
		var strObjName = (isIE5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP'; 
		 
		//Attempt to create the object 
		try
		{ 
			localXmlHttp = new ActiveXObject(strObjName); 

			if (handler != null)
			{
				localXmlHttp.onreadystatechange = handler; 
			}
		} 
		catch(e)
		{ 
			// Object creation error 
			alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled'); 
			return; 
		} 
	} 
	else if (isOpera)
	{ 
		// Opera has some issues with xmlHttp object functionality 
		//alert('Opera detected. The page may not behave as expected.'); 
		//return; 
		return Sarissa.getXmlHttpRequest();
	} 
	else
	{ 
		// Mozilla | Netscape | Safari 
		localXmlHttp = new XMLHttpRequest(); 

		if (handler != null)
		{
			localXmlHttp.onload = handler; 
			localXmlHttp.onerror = handler; 
		}
	} 
	 
	// Return the instantiated object 
	return localXmlHttp; 
}
cU.addEvent(window, 'load', cU.init, false);

