// JavaScript to interpolate random images into a page.
 
	
		var redwine = new String("Red Wine Audio is the brainchild of Vinnie Rossi, a talented young designer whose new Signature 30.2 Amplifier has just won the coveted Lunar Eclipse award from the editor of 6Moons.\n In <a href='http://www.6moons.com/audioreviews/redwine8/302.html'>his review</a> Srajan uses the Rethm Saadhana's extensively. You can also read <a href='http://www.6moons.com/audioreviews/redwine8/302_3.html'>my positive experiences</a> of using the Signature 30.2 with Podium Speakers there. The name Red Wine Audio is obviously derived from Vinnie's own name. It also reflects how music flows effortlessly through Red Wine electronics.\n Vinnie was amongst the first to spot the potential of Class T amplifiers and the only designer who has managed to realise their full potential. Class T is a form of digital amplification and the performance of digital components in particular tend to suffer from mains impurities, requiring the use of mains filters and expensive power cables to sound their best. What though if you could avoid the mains altogether?\n Vinnie achieved this by powering all his devices from batteries. The Signature 30.2 and 70.2 amplifiers are powered from two sealed (SLA) batteries within their chassis.\n The result is a sound beautifully balanced between the warm liquidity of valve amplifiers and the control and authority of solid state amps, without any of the stridency and dryness often associated with other digital amplifiers.\n The amplifiers will allow for between 12 and 24 hours of continuous listening. Whenever they're not in use, you should remember to put them into instant charge mode by a simple push of a button. However, even if you forget to do this the Signature 30.2 and 70.2 amps will detect when the voltage is too low and automatically switch themselves to charge mode.\n Vinnie also modifies digital source components such as the famous iPod to bring them to true High-End status. All powered by batteries of course, so even if you have a power failure, the music will play on. Perfect for those romantic evenings!");
		
		var redwineFR = new String("Red Wine Audio est l'invention de Vinnie Rossi, un jeune concepteur dou\u00e9 dont l'amplificateur de la signature 30 a gagn\u00e9 la r\u00e9compense convoit\u00e9e de lune bleue du r\u00e9dacteur de 6Moons.\n Le nom de la compagnie est \u00e9videmment d\u00e9riv\u00e9 de son propre nom. Il se refl\u00e8te \u00e9galement comment la musique passe effortlessly par l'\u00e9lectronique de Red Wine.\n Vinnie \u00e9tait parmi le premier pour rep\u00e8rer le potentiel des amplificateurs de la classe T et le seul concepteur qui a contr\u00d4l\u00e9s r\u00e9alise leur pleine capacit\u00e9. La classe T est une forme d'amplification num\u00e9rique et l'ex\u00e9cution des composants num\u00e9riques tendent en particulier \u00e0 souffrir des impuret\u00e9s de forces, exigeant l'utilisation des filtres de forces et des cables \u00e9lectriques chers de retentir leur meilleur. Ce qui cependant si vous pourriez \u00e9viter les forces tout a  r\u00e9alis\u00e9 fait?\n Vinnie a r\u00e9alis\u00e9 ceci en actionnant tous ses dispositifs \u00e0 partir des batteries. Les amplificateurs de la signature 30.2 et 70.2 sont actionn\u00e9s \u00e0 partir de deux batteries (SLA) scell\u00e9es dans leurs ch\u00e2ssis.\n Le r\u00e9sultat est un son admirablement \u00e9quilibr\u00e9 entre la liquidit\u00e9 chaude des amplificateurs de valve et de la commande et l'autorit\u00e9 des amplificateurs a  r\u00e9alis\u00e9 semi-conducteurs, sans stridence l'une des et s\u00e9cheresse souvent li\u00e9es \u00e0 d'autres amplificateurs num\u00e9riques.\n Les amplificateurs tiendront compte jusqu'\u00e0 de 20 environ d'heures de l'\u00e9coute continue. Toutes les fois qu'ils sont non utilisables, vous devriez se rappeler de les mettre dans le mode de charge par une chiquenaude simple d'un commutateur. Cependant, m\u00EAme si vous oubliez de le faire \u00E0 la signature 30,2 et 70,2 les amplis va d\u00e9tecter quand la tension est trop basse et automatiquement Commutateur de mode de charge.\n Eux-m\u00EAmes Vinnie modifie \u00e9galement les composants num\u00e9riques de source tels que l'iPod c\u00e9l\u00e8bre pour les apporter v\u00e9ritable le statut a  'High-End'. Tous actionn\u00e9s par des batteries naturellement, ainsi m\u00EAme si vous avez une panne de courant, la musique joueront dessus. Perfectionner pendant ces soir\u00e9es romantiques!");
		
		
	var ancient = new String("The name Ancient Audio is partially inspired by Christopher Hogwood's Academy of Ancient music and also from an interest and love of classical art. Jarek Waszczyszyn collects original instruments and his wife Elizabeth is an architectural historian advising on modern architecture within the classically beautiful city of Krakow. This blend of the classical and the modern is perfectly reflected in Jarek's designs.\n Krakow itself is a cultural centre with very strong traditional musical roots, so it isn't surprising that people there tend to be highly critical listeners. Jarek together with his friends and associates has listened very critically to a number of established High-End audio brands and identified what each of them do well and equally what they are lacking.\n Despite Jarek's interest in baroque classical music, his aim with Ancient Audio is to produce components that satisfy on all types of music including the most demanding full symphony orchestras and heavy rock.\n His latest Wing Speakers with their ultra wide bandwidth ribbon drivers for example, can fill a room of 100 square metres with full range sound of the highest quality.\n Ancient Audio products are painstakingly designed right down to the smallest detail for the highest possible sound quality as well as the most elegant looks and can only be described as ultra High-End audio.\n When it comes to looks as well, despite the name Ancient Audio, Jarek can design whatever look a customer may request. The photo pictured above shows a Porsche red, decidedly modern version of the Lektor Prime CD player as well as the standard version in beautiful galaxy granite.\n Jarek works with local artisans such as his cabinet maker and stonemason to achieve these fabulous finishes.\n Although the fit and finish are luxurious the Lektor Prime has been favourably compared with the much more costly Zanden products in 6 Moons and the Lektor Grand digital system has also been favorably compared to pricier systems from DCS by HiFi news in the UK. So if you are in the market for an ultra High-End system you owe it to yourself to audition Ancient Audio.");
		
		var ear = new String("Legendary designer Tim de Paravacini has an exemplary track record which is far too long to do justice to here. His perfectionist recordings with Kavi Alexander, using all tube electronics designed by Tim, have understandably become collectors items. Tim has designed and built every component in the record-making chain, from tape machines to mixing consoles to mastering decks and when Paul McCartney needs something new for either his studio or his home HiFi system, he gets in touch with Tim.\n Tim is justly proud of his noble Italian ancestry, which he can recount with the same meticulous accuracy that he applies to his designs. His work has been equally balanced between the recording studio and home audio. Tim's valve electronics for the home have won so many accolades that they are also too numerous to mention here.\n EAR Yoshino valve amplifiers provide fully extended highs and the bass goes down deep and with authority. They are also tonally neutral allowing for the full range of instrumental colours to be accurately portrayed.\n These are qualities that are difficult to find in valve amplifiers. At the same time the qualities that cause many people to prefer valve amplifiers are also present in abundance with Tim's designs.\n His amplifiers have a magical way of luring the listener into the music. Liquid and neutral at the same time with a wonderful sense of drama and scale. They make you want to listen on and on as you re-discover the music on your favourite disks.");
		
		
	
		var opera = new String("Opera Audio is a true High-End audio company producing beautifully made stylish, sturdy and reliable equipment.\n High-End audio is a 'cottage industry' and Opera is a small outfit based in Beijing China. However, 'small' in Chinese terms isn't quite the same concept as 'small' in Europe and Opera manage to produce a very wide range of highly regarded equipment, covering Turntables, Amplifiers both Tube and Solid state, CD Players, Speakers as well as their own cables and stands.\n All of the reviews we've read on Opera equipment have been highly positive. Their CD players  from both the middle of the range and the top of the range have been particularly praised in 6Moons and compared favourably to digital systems costing twenty times more!\n Opera enables us at Sound Galleries to offer starter systems for as low as \u20ac3000.00 for a complete system that satisfies the most important criteria for reproducing music.\n With so many products in their range we've decided for the moment to concentrate on their top of the range CD players as well as the complete starter system featuring all Opera components and cabling.");
		
		
		var tead = new String("'Linear' could easily be designer Tom Evan's middle name. The word already hints at what his amplifier designs are all about. So what does 'Linear' mean in the context of an amplifier?\n Well to put it in the simplest possible terms an amplifier and loudspeaker have to work together as a team. The end result of what you hear will have a lot to do with how well they work together. One specification you will always see quoted for Loudspeakers is their 'nominal' impedance. Impedance, again put very simply, is the speakers resistance to the current the amplifier is attempting to drive it with. The key to understanding the advantage of Tom's amplifiers is that other word 'Nominal'.\n The reason speaker designers quote a 'Nominal' impedance is that, in reality, the impedance varies with different frequencies. A typical amplifier will have an easier task driving the speaker at some frequencies than others, so some frequencies may be reproduced slightly louder than others. In other words the result will be 'non-linear'.\n Recognising that although a speaker may be quoted as having a 'nominal' impedance of 8ohms, it may dip to 6ohms or below at some frequencies or rise to 10ohms or more for others, Tom went about designing an amplifier that would behave exactly the same regardless of these changes of impedance with frequency. In other words it would be 'Linear'!\n  Leaving the technicalities aside for a moment, this results in a coherent sound throughout the entire frequency range so that no particular instrument's or part of an instrument's sound will be exaggerated at the expense of others.\n The Linear A and B amplifiers as well as Tom's equally excellent Vibe pre-amplifier all fit in perfectly with our philosophy at Sound Galleries of creating systems with the most coherently natural sound possible.");
		
		var fortysevenlabs = new String("'Only the simplest can accommodate the most complex'!\n This is the motto of talented japanese designer Junji Kimura, Having designed many key components for Pioneer, Kenwood (known as Trio at the time), Luxman and Kyocera, from the early 1960's through to the beginning of the 90's, in 1992 he decided to free himself from corporate constraints and found his own company, 47 Laboratory.\n Junji's approach is concerned with the sheer pleasure and emotion that listening to music can convey.\n This fit's in perfectly with our approach at Sound Galleries. At the same time Junji's singular approach has lead to products which are completely unique. The Shigaraki components are so small and unobtrusive they can be accommodated easily within any domestic environment.\n They take their name from a type of Japanese ceramic used to make daily home utensils. These exquisitely designed petite components can work well on quality home furniture and may not require dedicated audio stands to sound their best. They are domestically acceptable and musically satisfying to a very high degree.\n The first product Junji designed for 47 Labs was his legendary Pi-Tracer CD transport.\n The Pi-Tracer is the only CD transport which is able to maintain a strict 90 degree laser to CD reading angle. It also automatically corrects for the manufacturing fault of CDs whose spindle holes are punched off-center. All this adds up to a transport which can extract the maximum musical information from the Compact Disc.\n The Pi-Tracer stands as an ultimate statement of what can be achieved in CD playback and understandably a precision instrument such as this is expensive. Nevertheless I was pleasantly surprised when I encountered it at the Top Audio Show in Milan to discover it is also relatively small and neat looking.\n While designing the Pi-Tracer Junji needed a simple amplifier with a completely predictable sound that he could use as a reference. Having nothing suitable to hand, like a master chef who can whip up a tasty meal in minutes, he pieced an amplifier together from a few simple parts. Surprised himself at how good the result was, he tweaked it to perfection. The result is the equally legendary Gaincard amplifier.\n Holding a record for the smallest number of parts and shortest signal paths, it has had a major influence on other designers and resulted in a number of clones.\n With two separate 'Power Dumpty' power supplies it becomes a true 'Dual Mono' design.\n Returning to the subject of CD payback, for those who find the Pi-Tracer too expensive, 47 Labs offer the also highly innovative 'Flatfish' CD transport and the still more affordable Shigaraki transport. Whilst neither can quite scale to the heights of performance offered by the Pi-Tracer, they produce highly musically satisfying results, coupled with the 'Progression' DAC or 'Shigaraki' DAC respectively.\n For Vinyl enthusiasts there is now a 47Labs Turntable.  One of my favorite toys as a child was a Gyroscope. I was fascinated by its ability to stay spinning absolutely upright on the end of my finger for an amazingly long time, considering it only needed my initial energy in pulling the string to start it in motion. The 47Labs Turntable is the first to use a Gyroscopic principle to cancel the tendency for the turntable platter to by pulled in one direction by the drive belt.\n Other designers have employed different approaches such as additional motors around the platter in an attempt to cancel this tendency which is detrimental to the ability of the stylus to perfectly trace a record groove; but  additional motors can introduce problems of their own in the form of unwanted vibration and noise.\n Instead Junji makes use of a second platter which rotates in the opposite counter clockwise direction underneath the main platter. As with the Gyroscope, this keeps the platters absolutely stable, maintaining the same relationship with the turntable spindle at all times.\n It is typical of the 'out of the box' Japanese zen approach to design applied to all 47Labs products.\n I was reminded of my childhood years as I watched with fascination the one platter turning contra clockwise direction to the other via their Red drive belts and wish I'd have taken a video camera to the show. More importantly, the sound from records was sublime.\n The tonearm is equally innovative in its ability to cancel noise from less than perfectly flat records.\n A complete 47Labs vinyl playback system would include a 47Labs Phono-Stage and either the high value for money McBee cartridge or one of the top of the line Miyabi cartridges.\n Whether you choose a CD or Vinyl system (or both) from 47Labs, you can complete the system with the neat little, beautiful sounding stand mounted 'Lens' or 'AMM' speakers designed by Takanori Ohmura or go all the way up to Junji's personal reference Essence Speaker, designed by 47Labs head of European operations Sead Lejlic.\n 47Labs certainly take novel and unique approaches to design, though all for sound reasons.\n If your are a music lover and you want your system to blend in with your living environment, we recommend you take a trip to Sound Galleries and audition 47Labs.");
		
		var Goldenote = new String("From the historic capital of Renaissance Italy, Florence, we bring you Goldenote. A company which proves that the great heritage of Italian design and craftsmanship is still very much alive today. The Goldenote Stibbert tube CD player won the coveted Golden Ear award from the Absolute Sound in 2005.\n In that journal it was favorably compared to previous reference CD players costing at least eight times as much. In fact the Stibbert has been further improved since winning that award.\n So what makes it so special? Well it employs two 6922 tubes in its output stage; but that is also true of a number of the most 'musical' sounding CD players. What really sets the Stibbert apart is its innovative use of a suspended sub-chassis.\n This allows the CD transport to 'float' on precision engineered springs in the same manner as most of the finest turntables in the world. Suspended sub-chassis's have long been recognised as the best method for extracting those micro-vibrations from record grooves which is how the music is derived from Vinyl discs. Goldenote are the first to apply this method to a CD transport and to very good effect. It has long been recognised that CD players are prone to the problems caused by unwanted vibrations and the importance of isolating them from these by being careful about the kind of support they are placed on. However, it turns out that when a CD player utilises a similar spring suspended sub-chassis as a turntable, the performance is considerably enhanced.\n The Stibbert Tube CD player is the proof of this and not surprisingly it actually sounds quite similar to a top class Turntable. The same smooth relaxed natural sound is heard from the Stibbert as many of us are used to enjoying from analogue.\n I know of one analogue devotee who owns at least 8,000 LP's that has found it to be the only CD player he can live with and enjoy.\n I was privileged recently to visit their impressive, modern and well run factory just outside of Florence in the beautiful Tuscan countryside where Maurizio Arterini of Goldenote demonstrated to us the Stibbert CD player together with some of their other excellent products.\n It isn't surprising that Goldenote also make fine Turntables and this demonstration included one of these.\n We will be featuring more of these products alongside the Stibbert CD player at Sound Galleries and invite you to join us in sharing the experience of these highly cultivated designs.");
		
	//var companyChoice = 0;
	
	var language = "";

     function pickRandom(range) {
        if (Math.random)
            return Math.round(Math.random() * (range-1));
        else {
            var now = new Date();
            return (now.getTime() / 1000) % range;
        }
    }

	function picklang(choice) {
        language = choice;
		//alert(companyChoice);
		setCookie('language',choice,365);
		loadMainImage(companyChoice);
    }
    
    function loadMainImage(optional) {
    	MM_preloadImages('admin/images/navigation/home_hover.jpg', 'admin/images/navigation/about_hover.png','admin/images/navigation/products_hover.png','admin/images/navigation/companies_hover.png','admin/images/navigation/contact_hover.png', 'admin/images/navigation/home_active.jpg', 'admin/images/navigation/about_active.png','admin/images/navigation/products_active.png','admin/images/navigation/companies_active.png','admin/images/navigation/contact_active.png');
		
   		var ic = 7;                     // Number of alternative images
   		var i = new Array(ic);          // Array to hold imagenames
		i[0] = "admin/images/47labs1.jpg";
		i[1] = "admin/images/ancient1.jpg";
		i[2] = "admin/images/Goldenote1.jpg";
		i[3] = "admin/images/ear1.jpg";
		i[4] = "admin/images/opera1.jpg";
		i[5] = "admin/images/redwine1.jpg";
		i[6] = "admin/images/evans1.jpg";
		
		
   		
		
		
		var h = new Array(ic);          // Array to hold company header names
		h[0] = "47Labs";
		h[1] = "Ancient Audio";
		h[2] = "Goldenote";
		h[3] = "E.A.R. Yoshino";
		h[4] = "Opera";
		h[5] = "Red Wine Audio";
		h[6] = "Tom Evans Audio Design";
		
   		
	
		
		
		var c = new Array(14);          // Array to hold company blurbs
		c[0] = fortysevenlabs;
		c[1] = ancient;
		c[2] = Goldenote;
		c[3] = ear;
		c[4] = opera;
		c[5] = redwine;
		c[6] = tead;
		c[7] = fortysevenlabs + " french";
		c[8] = "Ancient Audio ultra High-End French";
		c[9] = Goldenote + "French";
		c[10] = "E.A.R. Yoshino from Legendary Designer Tim De Paravacini French";
		c[11] = opera + " french";
		c[12] = redwineFR;
		c[13] = tead + " french";
		
   			
   		if ( optional === undefined ) {	
			var theCell = document.getElementById('tdMainimage');
			theCell.removeChild(theCell.firstChild);
   			var ic = pickRandom(ic);
			companyChoice = ic;
		}else{
			var theCell = document.getElementById('tdMainimage');
			theCell.removeChild(theCell.firstChild);
			var ic = optional;
		}
		
	
   		var choice = i[ic];
		
    	var theCell = document.getElementById('tdMainimage');
    	var image_tag = document.createElement("img");
    	image_tag.setAttribute("src", choice);
		image_tag.setAttribute("id", "mainImage");
		image_tag.setAttribute("alt", "Main Image");
		image_tag.setAttribute("width", "751");
		image_tag.setAttribute("height", "354");
		theCell.appendChild(image_tag);
		choice = h[ic];
		var companyHeader = document.getElementById('h2Company');
		companyHeader.removeChild(companyHeader.firstChild);
		var header = document.createTextNode(choice);
		companyHeader.appendChild(header);
		language = getCookie('language');
		if (language=='french'){
			choice = c[ic+7];
		}else{
			choice = c[ic];
		}
			var maintext = new Array(100);
		var anAnchor = new Array(4);
		maintext = stringSegment(choice, '\n');
		var contentPara = document.getElementById('pMaintext');
		while(contentPara.childNodes.length > 0){	
			contentPara.removeChild(contentPara.childNodes[0]);
		}
		var anchorCount = 0;
		for(i=0;i<maintext.length;i++){
			//process this para within maintext
			anAnchor = findAnchor(maintext[i],0);
			if(anAnchor[0]==-1){
				var content = document.createTextNode(maintext[i]);
				contentPara.appendChild(content);
				contentPara.appendChild(document.createElement('br'));
				contentPara.appendChild(document.createElement('br'));
			}else{
				while(anAnchor[0]!=-1){
					var preAnchor = maintext[i].substring(anchorCount,anAnchor[0]);
					var content = document.createTextNode(preAnchor);
					contentPara.appendChild(content);
					var theAnchor = document.createElement("a");
					theAnchor.setAttribute('href', anAnchor[2]);
					theAnchor.appendChild(document.createTextNode(anAnchor[3]));
					contentPara.appendChild(theAnchor);
					anchorCount = anAnchor[1];
					//alert(anchorCount);
					anAnchor = findAnchor(maintext[i],anchorCount);
				}
				var postAnchor = maintext[i].substring(anchorCount);
				content = document.createTextNode(postAnchor);
				contentPara.appendChild(content);
				contentPara.appendChild(document.createElement('br'));
				contentPara.appendChild(document.createElement('br'));
			}
		anchorCount = 0;
		}
		
   	}
	
	
	
	
	
   	
   	function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	function MM_swapImgRestore() { //v3.0
  	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}	

function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}


function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}

function findAnchor(theString,theIndex){
	var temp = new Array(4);
	var start = theString.indexOf('<a href',theIndex);
	var linkEnd = theString.indexOf('>',theIndex);
	var anchorEnd = theString.indexOf('</a>',theIndex);
	temp[0]=start;
	temp[1]=anchorEnd+4;
	temp[2] = theString.substring(start+9,linkEnd-1);
	temp[3] = theString.substring(linkEnd+1,anchorEnd);
	return temp;
}


function stringSegment(theString,theChar){ 
			var temp = new Array();
			temp = theString.split('\n');
			
	return temp;
}

