function menu(id){
	for(i=1;i<6;i++){
		modif = document.getElementById('calc'+i);
		if(id == i){
			modif.style.visibility = 'visible';
		}else{
			modif.style.visibility = 'hidden';
		}
	}
}

function contact(id){
	if(document.formmail.message.value == ''){
		alert('Merci de remplir le champ message.');
		return false;
	}else if(document.formmail.email.value == ''){
		alert('Merci de laisser votre adresse email.');
		return false;
	}
	document.getElementById('formmail').submit();
	return true;
}

function opinion(id){
	if(document.formavis.note.value == 99){
		alert('Merci de mettre une note entre 0 et 10 pour ce téléphone.');
		return false;
	}else if(document.formavis.commentaire.value == ''){
		alert('Merci de laisser un avis pour ce téléphone.');
		return false;
	}else if(document.formavis.email.value == ''){
		alert('Merci de saisir votre email pour valider votre avis.');
		return false;
	}
	document.getElementById(id).target = 'oppinion';
	window.open('', "oppinion", "width=349,height=505,top=120,left=360");
	document.getElementById('formavis').submit();
	return true;
}

function mailling(email){		
p="height=230,width=300,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no";hWnd=window.open("http://www.mobiles-actus.com/pages/newsletter.php?site=graphmobile&email="+email,"Hwnd",p);hWnd.focus();}

function ajouter_opinion(id){ window.open("http://www.mobiles-actus.com/pages/test_opinion.php?source=graphmobile&id="+id, "conttact", "width=349,height=505,top=120,left=360"); }

function imagec(url){ if(navigator.appName=="Netscape" && document.getElementById) { document.getElementById("imgch").src="/photos/mobiles/205x268/"+url; } else document.images.imgch.src="/photos/mobiles/205x268/"+url; }

function gourl(from,modele){
	page = from.url.options.selectedIndex;
	valeur = from.url.options[page].value;
	if(valeur != 'avis' && valeur != 'fiche' && valeur != 'prix'){
		if(valeur == 1){ location.href = '/test/'+modele+'.htm'; }
		else{ location.href = '/test/'+modele+'-'+valeur+'.htm'; }
	}else{
		if(valeur == 'fiche'){
			location.href = '/fiche/'+modele+'.htm';
		}
		if(valeur == 'avis'){
			location.href = '/avis/'+modele+'.htm';
		}
		if(valeur == 'prix'){
			location.href = '/prix/'+modele+'.htm';
		}
	}
}
function gourl1(from){
	page = from.url.options.selectedIndex;
	valeur = from.url.options[page].value;
	location.href = '/dossier/'+valeur+'.htm';
}
function openphoto(id,modele){
	window.open("http://www.topmobile.org/pages/view_photo.php?modele="+modele+"&id="+id, "photo", "width=830,height=685,top=0,left=0,scrollbars=1");
}

function submitConstructeur(){
	valeur = document.getElementById("constructeur").value;
	if(valeur != ''){
		location.href = '/mobiles-'+valeur+'.htm';
	}
}