//Switching between links functions

var ids=new Array('im1-l', 'ims1-s');
var text_ids=new Array('text1', 'text2', 'text3');
var imgs=new Array('images/kleoclub.png', 'images/voyance4ever.png', 'images/buygoldfishonline.png');
	

function TextandImgs(index, id){
	hidetextids();
	showdiv(id);
	switchImages(index);	
}

/*function switchImages(index){
	document.main_im.src=imgs[index];
}*/

function switchImages(index){
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])

   if ((version >= 5.5))
   {  
     id ='png0' 
     elem = document.getElementById(id)
     elem.outerHTML= "<img src=\""+imgs[index]+"\" alt=\"project\" id=\""+id+"\"/>";
   
   }
   else{
      document.main_im.src=imgs[index];
    }
}

function switchid_mult(id1, id2){	
	hideallids();
	showdiv(id1);
	showdiv(id2);
		if (id1=='im2-l'){
		hidetextids();
		showdiv('text4');
		}
}

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0; i<ids.length; i++){
		hidediv(ids[i]);
	}		  
}

function hidetextids(){
	//loop through the array and hide each element by id - for text ids only
	for (var i=0; i<text_ids.length; i++){
		hidediv(text_ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


