function detectBrowser()
{
	var brow = ""; var vers='';
	if( navigator.userAgent.indexOf('Opera') != -1 ){
		brow='op'; 
	}else{	
		if( navigator.appName != "Netscape" ){ 
			if( navigator.appName == "Microsoft Internet Explorer" ){ 
				brow = "ie"; vers=detectVers();  
			}
		}else{
		//navigator.appname este Netscape 
			if( navigator.userAgent.indexOf('Gecko') != -1 ){ 
				if( navigator.userAgent.indexOf('Firefox') != -1 ){ 
					brow='moz'; 
				}else{ 
					if( navigator.userAgent.indexOf('Chrome') != -1 ){ 
						brow='chr';
					}else{
						if( navigator.userAgent.indexOf('Safari') != -1 ){ 
							brow='saf';
						}else{
							brow='ns';
						}
					} 
				} 
			}else{ 
				brow='ns';	
			} 
		} 
	}
	return brow;
}

function detectVers()
{
	var vers = '';
	var appV = navigator.appVersion;
	poz = appV.indexOf("MSIE ")
	if( poz != -1 ) {
		versiune = parseInt(navigator.appVersion.substr(poz+5,3),10);
		//alert(versiune + '--' + typeof(vers));
		if( versiune < 7 && versiune > 5 ) {
			vers = '6';
		} else {
			//vers = '6';
		}
	}
	return vers;
}

function doLinks(param,selected)
{
	switch(param){
		case '1':
			//parent.window.location.href = '/index.php';
			self.document.location.href='/index.php';
			break;
		case '2':
			//parent.window.location.href = 'http://www.anvelopecraiova.ro';
			self.document.location.href = 'http://www.anvelopecraiova.ro';
			break;
		default:
			if( selected == "radio" ) {
				url='/info.php?selectedMenu=altep&aSelectedType='+selected;
			}else{
				url='/info.php?selectedMenu='+selected;
			}
			self.document.location.href=url;
			break;
	}
}

function invert( oSpan1, oSpan2 )
{
	var sp1Obj = document.getElementById(oSpan1);
	var sp2Obj = document.getElementById(oSpan2);
	
	if( sp1Obj.style.display == "" ){
		sp1Obj.style.display = "none";
		sp2Obj.style.display = "";
	}else{
		sp1Obj.style.display= "";
		sp2Obj.style.display = "none";
	}
}

function lscap(oSpan)
{
	var spObj = document.getElementById(oSpan)
	if( spObj.style.display == "" ){
		spObj.style.display = "none";
	}else{
		spObj.style.display= "";
	}
}

function afis(oSpan1, oSpan2)
{
	if( oSpan1.style.display == "" ){
		oSpan1.style.display = "none"
		oSpan2.style.display = "";
	}else{
		oSpan1.style.display = ""
		oSpan2.style.display = "none";
	}
}

function ascunde( oSpan )
{
	var allJ = new Array( 'bucur','dragomir','dumitrescu','lokodi','makaritis','margineanu','mitra','molnar','papp','schill','szabo');
	for( i=0; i< allJ.length; i++ ) {
		if( 'cap' + allJ[i] != oSpan ){
			crtO = document.getElementById('cap' + allJ[i]);
			crtO.style.display = 'none';
		}
	}
}

function hideReport( oSpan, opSpan, cloSpan )
{
	var expo = new Array( 'cac','cacib');
	for( i=0; i< expo.length; i++ ) {
		var ids = 'cap' + expo[i];
		//alert(ids);
		if( ids != oSpan ){
			crtObj = document.getElementById(ids);
			//alert(crtObj)
			crtObj.style.display = 'none';
			//invert( cloSpan, opSpan);
		}
	}
}
//////////////////////////////////
function doDetailsLink(param)
{
	var selectedMenu='products';
	var music = document.forms["topMnu"].aMusic.value;
	var oURL = parent.frames["fraInfo"].location;
	//alert(oURL + ' ' + 'prodetails.php?aMusic=' + music + '&param=' + param);
	parent.frames["fraInfo"].location.href = 'prodetails.php?aMusic=' + music + '&param=' + param;
}
function menuSMover(item)
{
	id1 = 'i'+item;
	var imgObj=document.getElementById(id1);
	id2='s'+item;
	var spanObj=document.getElementById(id2);
	id3='li'+item;
	var liObj=document.getElementById(id3);
	
	imgObj.setAttribute('src','i/menu/'+item+'_on.png');
	//imgObj.className='menuItemSM';
	spanObj.className='explAlert';
	liObj.setAttribute('src','i/li1.png');
}

function menuSMout(item)
{
	id1 = 'i'+item;
	var imgObj=document.getElementById(id1);
	id2='s'+item;
	var spanObj=document.getElementById(id2);
	id3='li'+item;
	var liObj=document.getElementById(id3);
	
	imgObj.setAttribute('src','i/menu/'+item+'.gif');
	spanObj.className='explSM';
	liObj.setAttribute('src','i/li.png');
}
function menuSMover6(item)
{
	id1 = 'i'+item;
	var imgObj=document.getElementById(id1);
	id2='s'+item;
	var spanObj=document.getElementById(id2);
	id3='li'+item;
	var liObj=document.getElementById(id3);
	
	imgObj.setAttribute('src','i/menu/'+item+'_on.gif');
	spanObj.className='explAlert';
	liObj.setAttribute('src','i/li1.png');
}


