<!--
	var iCurrentImage 
	function changeMainPhoto(sTarget) 
	{
		sTarget = sTarget.replace(' ','%20');
		//if (iCount) {
				//iCurrentImage = iCount;
		//}
		if (document.getElementById) {
			if (document.getElementById('imgMainPhoto')) {
				document.getElementById('imgMainPhoto').src = sTarget;
			}
		} else if (document.layers) {
			//Netscape 4 and Opera
			document['imgMainPhoto'].src = sTarget;
		} else if (document.all) {	//IE5
			document.all['imgMainPhoto'].src = sTarget;
		}
	}
	
	function emailSignup() 
	{
		var sEmail = '';
		if (document.getElementById) 
		{
			if (document.getElementById('inpNewsEmail')) 
				sEmail = document.getElementById('inpNewsEmail').value;
			
		} else if (document.layers) {
			//Netscape 4 and Opera
			if (document['inpNewsEmail']) 
				sEmail = document['inpNewsEmail'].value;
		} else if (document.all) {	//IE5
			if (document.all['inpNewsEmail'])
				sEmail = document.all['inpNewsEmail'].value;
		}
		
		window.location = '/login/?sEmail=' + sEmail;
	}
	
	// diasble highlight and copy
	
	// diasble highlight and copy
	// Glyn's point to stop right click
	// #rightClick
	
	var returnFalse = new Function ("return false");
	var returnTrue = new Function("return true");
	function checkImage(e) {
	if (document.all) {
		if ("IMG" == event.srcElement.tagName) return false;
	  } else if (document.getElementById) {
		if ("IMG" == e.target.tagName) return false;
	  }
	}
	
	
	function pedroCheck() {
		if (event.srcElement.tagName != "INPUT" && event.srcElement.tagName != "TEXTAREA") return false;
	}
	
	if(document.layers) {
	   window.captureEvents(Event.MOUSEDOWN);
	  window.onmousedown = function(e) {
		if(e.target==document || e.which == 3) return false;
	  }
	} else if (document.all) {
	  document.oncontextmenu = checkImage;
	  document.onselectstart = pedroCheck;//returnFalse;
	}
	
	/* This is the end point to allow right click*/
	
	function emptyBasket()
	{
		if (confirm('Are you sure you wish to empty your shopping bag?'))
			window.location = '/shoppingbag/?sMode=reset';
	}
	
	function usepoints()
	{
		if (confirm('Are you sure you wish to use your points on your basket?'))
			window.location = '/shoppingbag/?sMode=usepoints';
	}
	
	function changeDeliveryCountry(iCountryId)
	{
		window.location = '/shoppingbag/?country_id=' + iCountryId;
	}
	
	//Function definition for lauching Secure page popup informatoin
	function launchPopup(s) {
		if (s) {
			window.open(s,'secure','top=50,left=50,width=500,height=310,scrollbars=no,location=no,toolbar=no,menubar=no,status=no');
		}
	}
	//Tracking Launch Popup
	function launchTracking(i, sTrackingNumber) 
	{
		if (i) {
			sTemp = '/common/popups/tracking.php?iCourier=' + i + '&sTracking=' + sTrackingNumber;
			window.open(sTemp,'tracking','top=50,left=50,width=500,height=175,scrollbars=no,location=no,toolbar=no,menubar=no,status=no');
		}
	}
	
	//Handles home page manufacturing dropdown selection
	function getCategoryFromHomepageDropdown(sLink) 
	{
		if (sLink != 0) {
			window.location = sLink;
		}
	}
	
	//Top header search code
	var sText = '';
	function performSearch() 
	{
		if (sText.length > 0) 
		{
			window.location='/search/index.php?searchTerm=' + sText;
		}
	}
	function showCantFind() 
	{
		window.location = '/common/contact.php';
	}
	
	//POP UP WINDOW
	var wWinZoom, wWin3D;
	function showDetailPopup(sPage) 
	{
		wWinZoom = window.open(sPage, 'wZoom', 'top=100,left=100,width=367,height=530,scrollbars=yes,location=no,toolbars=no,directories=no,resizable=no');
	}
	
	function show3DPopup(sPage) 
	{
		wWin3D = window.open(sPage, 'wWin3D', 'top=100,left=100,width=615,height=615,scrollbars=yes,location=no,toolbars=no,directories=no,resizable=no');
	}
	
	//Change the price dynamically of the item
	function showVariationPrice(iProductId, sVarData, bDetail, bExVat)
	{
		var oPriceContainer = _getLayerObj('price_' + iProductId);
		var oPriceContainer2 = _getLayerObj('points_' + iProductId);
		var oPriceContainer3 = _getLayerObj('was_price_' + iProductId);
		var aVarData = new Array();
		aVarData = sVarData.split('|');
		if (aVarData.length == 0) return;	//Ooops
		if (oPriceContainer)
		{
			//oPriceContainer.innerHTML = '<span>Our price</span><br/>' + aVarData[1];
			//oPriceContainer.innerHTML = '<span>Our price</span><br/>&pound; ' + aVarData[1];
			if (bDetail) { // this is being shown on the detail page
				if (bExVat) { // we need to show the 'ex vat' text (i.e. it's trade section
					oPriceContainer.innerHTML = '<span>Price</span><br/>&pound; ' + aVarData[1] + '<br /><span>(ex VAT)</span>';
				} else {
					oPriceContainer.innerHTML = '<span>Our<br />Price</span><br/>&pound; ' + aVarData[1];
				}
			} else {
	
				oPriceContainer.innerHTML = '&pound; ' + aVarData[1];
			}
		}
		if (oPriceContainer2)
		{
			oPriceContainer2.innerHTML = aVarData[2];	
		}
		if (oPriceContainer3)
		{
			if (aVarData[3] != '0.00'){
				oPriceContainer3.innerHTML = 'RRP <strike>&pound; ' + aVarData[3] + '</strike>';	
			} else {
				oPriceContainer3.innerHTML = '';	
			}
		}
	}
	
	function setFocus(sForm, sField) 
	{
		var oForm = document.getElementById(sForm);
		if (oForm) 
		{
			var oField = eval('oForm.' + sField);
			if (oField) oField.focus();
		}
	}
	
	
	//Displays large image from thumbnail click
	function showImage(sImage)
	{
		var oImage = _getLayerObj("mainImage");
		if (oImage)
		{
			oImage.src = sImage;		
		}
	}
	
	function _getLayerObj(whichLayer) 
	{
		if (document.getElementById)
		{
			// this is the way the standards work
			if (document.getElementById(whichLayer))
				return document.getElementById(whichLayer);
		}
		else if (document.all)
		{
			// this is the way old msie versions work
			if (document.all[whichLayer])
				return document.all[whichLayer];
		}
		else if (document.layers)
		{
			// this is the way nn4 works
			if (document.layers[whichLayer])
				return document.layers[whichLayer];
		}
	}
	
	//Check card removal code
	function chkChangeConfirmation(sText, sUrl) 
	{
		if (confirm(sText))
			window.location = sUrl;
		
	}

	// submit url to translation service
	function translatePage(url) {
		if (document.frmLangCurr.language.value != '') {
			newurl = 'http://babelfish.altavista.com/babelfish/urltrurl?lp=en_'; // Babel Fish (sucks)
			//newurl = 'http://66.249.93.104/translate_c?hl=en&langpair=en|'; // Google Translate
			newurl = newurl + document.frmLangCurr.language.value;
			newurl = newurl + '&url=' + url; // Babel Fish (sucks)
			//newurl = newurl + '&u=http://' + url; // Google Translate

			//newurl = 'http://66.249.93.104/translate_c?hl=en&langpair=en|fr&u=http://www.salonlines.co.uk';
			//newurl = 'http://66.249.93.104/translate_c?hl=en&langpair=en|fr&u=http://www.salonlines.co.uk/';
			//newurl = 'http://www.google.com/translate_c?hl=en&langpair=en|es&u=http://www.salonlines.co.uk/';
			
			window.open(newurl);
		}
	}
	
	
	// DISABLE RIGHT CLICK
	function clickIE4(){
	if (event.button==2){
	return false;
	}
	}
	
	function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
	if (e.which==2||e.which==3){
	return false;
	}
	}
	}
	
	if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
	}
	
	document.oncontextmenu=new Function("return false");
	
	///////////////////////////////////


//-->