function idioma(id){
	//var idio = '';
	//var loc = '';
	var idio = id;
	var loc = document.location;alert(loc);
	//document.location = loc+'&idioma='+idio;
	//document.location = loc;
	//document.location = loc+"?idioma="+idio;
	document.location = loc+"&idioma="+idio;

}



/*
<?php if ($idioma=='es'){?>
<div id="mbarra"><a class="abarra" href="?seccio=home">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href='?seccio=<?php $seccio;?>&idioma="en"' >English</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href="#">Noticias</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href="#">Documentos</a></div>
<?php }else{?>
<div id="mbarra"><a class="abarra" href="?seccio=home">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href='?seccio=<?php $seccio;?>&idioma="es"' >Espaņol</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href="#">News</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a class="abarra" href="#">Documents</a></div>
<?php }?>*/


///////////////////////////////// funcions comptador /////////////////////////////////
function mostraCompt(){
	$('#comptador').show();
}

function ocultaCompt(){
	$('#comptador').hide();
}
///////////////////////////////// funcions registre /////////////////////////////////
function mostraStudent() {
	$('#divPresenter').hide();
	$('#divStudent').show();
	$('#divSupporting').hide();
	$('#divAttendant').hide();
	$('#divKeynote').hide();
}

function mostraAttendant() {
	$('#divPresenter').hide();
	$('#divStudent').hide();
	$('#divSupporting').hide();
	$('#divAttendant').show();
	$('#divKeynote').hide();
}

function mostraPresenter() {
	$('#divPresenter').show();
	$('#divStudent').hide();
	$('#divSupporting').hide();
	$('#divAttendant').hide();
	$('#divKeynote').hide();
}

function mostraSupporting() {
	$('#divPresenter').hide();
	$('#divStudent').hide();
	$('#divSupporting').show();
	$('#divAttendant').hide();
	$('#divKeynote').hide();
}

function mostraKeynote() {
	$('#divPresenter').hide();
	$('#divStudent').hide();
	$('#divSupporting').hide();
	$('#divAttendant').hide();
	$('#divKeynote').show();
}

function person0() {
	$('#labelPersons').hide();
	$('#name1').hide();
	$('#name2').hide();
}

function person1() {
	$('#labelPersons').show();
	$('#name1').show();
	$('#name2').hide();
}

function person2() {
	$('#labelPersons').show();
	$('#name1').show();
	$('#name2').show();
}

function init(){
	$('#divPresenter').show();
	$('#divStudent').hide();
	$('#divSupporting').hide();
	$('#divAttendant').hide();
	$('#divKeynote').hide();

	$('#labelPersons').hide();
	$('#name1').hide();
	$('#name2').hide();
}



/*
function calcula_Vell(){

	var tipus='';
	var preu='';
	var variable='';
	var acompanyant='';
	
	
	tipus = $("input[name='tipus']:checked").val();

	if(tipus=='Presenter'){
		preu=200;
	}
	if (tipus=='Attendant'){
		variable = $("input[name='attendant']:checked").val();
		if(variable = 'AUntil'){
			preu=350;
		}else if(variable = 'AAfter'){
			preu=450;
		}
	}
	if (tipus=='Student'){
		preu=200;
	}
	if (tipus=='Supporting'){
		variable = $("input[name='supporting']:checked").val();
		if(variable = 'SUntil'){
			preu=300;
		}else if(variable = 'SAfter'){
			preu=400;
		}
	}
	if(tipus=='Keynote'){
		preu=0;
	}


	acompanyant = $("input[name='persons']:checked").val();

	if (acompanyant=='0'){
		preu = preu;
	}
	if (acompanyant=='1'){
		preu = preu+80;
	}
	if (acompanyant=='2'){
		preu = preu+160;
	}

	
	$('#preu').val(preu);
	
}*/

function calcula(){

	var tipus='';
	var preu='';
	var variable='';
	var acompanyant='';
	
	
	tipus = $("input[name='tipus']:checked").val();

	if(tipus=='Presenter'){
		preu=200;
	}
	if (tipus=='Attendant'){
		preu=450;
	}
	if (tipus=='Student'){
		preu=200;
	}
	if (tipus=='Supporting'){
		preu=400;
	}
	if(tipus=='Keynote'){
		preu=0;
	}


	acompanyant = $("input[name='persons']:checked").val();

	if (acompanyant=='0'){
		preu = preu;
	}
	if (acompanyant=='1'){
		preu = preu+80;
	}
	if (acompanyant=='2'){
		preu = preu+160;
	}

	
	$('#preu').val(preu);
	
}

function hoy()
{
    var fechaActual = new Date();
 
    dia = fechaActual.getDate();
    mes = fechaActual.getMonth() +1;
    anno = fechaActual.getFullYear();
   
 
    if (dia <10) dia = "0" + dia;
    if (mes <10) mes = "0" + mes;  
 
    fechaHoy = dia + "/" + mes + "/" + anno;

    alert(fechaHoy);
    //return fechaHoy;
}
///////////////////////////////// funcions payment /////////////////////////////////
function initPay(){
	$('#fact').hide();
	$('#cardPay').hide();
	$('#transferPay').show();
}

function mostraFact(){
	$('#fact').show();
}

function ocultaFact(){
	$('#fact').hide();
}

function mostraCard(){
	$('#transferPay').hide();
	$('#cardPay').show();
}

function mostraTransfer(){
	$('#cardPay').hide();
	$('#transferPay').show();
}

function isChecked(){
	var marcat='';
	
	marcat = $("input[name='factura']:checked").val();
	
	if (marcat=='on'){
		mostraFact();
	}else {
		ocultaFact();
	}
}

function initSub(){

	$('#divStatus').hide();
	$('#divAbstract').hide();
	$('#divPresentation').hide();
	$('#divPaper').hide();
}

function mostraStatus(){

	$('#divStatus').show();
	$('#divAbstract').hide();
	$('#divPresentation').hide();
	$('#divPaper').hide();
}

function mostraAbstract(){

	$('#divStatus').hide();
	$('#divAbstract').show();
	$('#divPresentation').hide();
	$('#divPaper').hide();
}

function mostraPresentation(){

	$('#divStatus').hide();
	$('#divAbstract').hide();
	$('#divPresentation').show();
	$('#divPaper').hide();
}

function mostraPaper(){

	$('#divStatus').hide();
	$('#divAbstract').hide();
	$('#divPresentation').hide();
	$('#divPaper').show();
}




