
function swapTabs(sel,tot,uniqueId) {
var id1, id2;
for(var i=1;i<=tot;i++){
	var id1 = 'tab'+i+'_'+uniqueId;
	var id2 = 'tab_cont_'+i+'_'+uniqueId;
	document.getElementById(id1).className = '';
	document.getElementById(id2).className = 'tab_contingut_hidden';
		if(i == sel){
		document.getElementById(id1).className = 'selected';
		document.getElementById(id2).className = 'tab_contingut';
		}
}
}

function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

function imprimirEntrada(Id) {
	openWin('entradasimprimir.asp?key='+Id,'Imprimir','toolbar=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(340))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=680,height=400')
}

function imprimirProducto(Id) {
	openWin('productosimprimir.asp?key='+Id,'Imprimir','toolbar=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(340))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=680,height=400')
}

function enviaramigo(titulo,url,texto) {
	openWin('enviaramigo.asp?titulo='+titulo+'&url='+url+'&texto='+texto,'Enviar','toolbar=0,top='+((screen.height/2)-(130))+',left='+((screen.width/2)-(235))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=470,height=200')
}

function privacidad() {
  	openWin('html/politicaprivacidad.htm','zoom','toolbar=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(340))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=680,height=400')
}

function condiciones() {
  	openWin('html/condicionesgeneralesdeuso.htm','zoom','toolbar=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(340))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=680,height=400')
}

function avisolegal() {
  	openWin('html/politicaprivacidad.htm','zoom','toolbar=0,top='+((screen.height/2)-(200))+',left='+((screen.width/2)-(340))+',location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=680,height=400')
}

function AgregarFavoritos(Titulo,URL) {
if (navigator.appName=="Netscape") {
	window.sidebar.addPanel(Titulo,URL,""); 
}

if (navigator.appName=="Microsoft Internet Explorer"){
	window.external.AddFavorite(URL,Titulo);
}

}



