TEXT2='';
TECNOLOGIA='';
UTIL='';
NUESTRO='';
MEJORAR='';
TEXTB1='';
TEXTB2='';
TEXT3='';

total=0;
function canvifoto(pos,total){
	for(i=0;i<total;i++){
		document.getElementById('img_'+i).style.position='absolute';
		document.getElementById('img_'+i).style.visibility='hidden';
	}
	
	document.getElementById('img_'+pos).style.position='static';
	document.getElementById('img_'+pos).style.visibility='visible';
}

function comprovacio(camps,noms,eltexte,frase){
	camps=camps.split(',');
	noms=noms.split(',');
	correcte=1;

	for(i=0;i<(camps.length);i++){
		if(camps[i]=='email'){
			if ((document.getElementById('email').value =="") || !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById('email').value))){
      			alert(eltexte+noms[i]);
      			return (false);
    		}
		}else	if(!document.getElementById(camps[i]).value){
			alert(eltexte+noms[i]);
			document.getElementById(camps[i]).focus();
			correcte=0;
			return (false);
		}
	}
	
	if(correcte){
		return true
	}else return false;
}

function canvitd(num,actiu){
	if(actiu=="on"){
		document.getElementById("td_"+num).className='tdon';		
		document.getElementById("link_"+num).className='linkon';		
		document.getElementById("tdtxt_"+num).className='tdtxton';	
	}else{
		document.getElementById("td_"+num).className='tdoff';		
		document.getElementById("link_"+num).className='linkoff';
		document.getElementById("tdtxt_"+num).className='tdtxtoff';
	}
}

function canvitd2(num,actiu){
	if(actiu=="on"){
		document.getElementById("td_"+num).className='tdon';		
		document.getElementById("link_"+num).className='linkon';		
		document.getElementById("tdtxt_"+num).className='tdtxton';	
	}else{
		document.getElementById("td_"+num).className='tdoff2';		
		document.getElementById("link_"+num).className='linkoff';
		document.getElementById("tdtxt_"+num).className='tdtxtoff';
	}
}

function sumatotal(){
	var tot=0;
	for(i=0;i<total;i++){
		tot=tot+parseInt(document.getElementById('total_'+i).value);
	}
	
	document.getElementById('totalsiniva').value=tot+' €';
	document.getElementById('iva').value=Math.round((tot*0.16) * 100) / 100+' €';
	document.getElementById('totalcom').value=(tot+(tot*0.16))+' €';
	
}

//<![CDATA[
function load() {
	if (GBrowserIsCompatible()) {
		var icon = new GIcon();
		icon.image = 'http://www.solter.com/img/logomaps.png';
		icon.iconSize = new GSize(128, 30);
		icon.iconAnchor = new GPoint(50, 80);
		//icon.infoWindowAnchor = new GPoint(0,0);
		var direccion = "<span style='color:#000000'>\
		<b>SOLTER, SL</b><br />\
		Ctra. Nacional, 152, Km.112<br />\
		17530 Campdevànol (Girona)\
		</span>";
		var marcador = new GMarker(new GLatLng(42.232203,2.16907),icon); 
		GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(42.232203,2.16907), 15); 
		map.setMapType(G_NORMAL_MAP);
		map.addControl(new GSmallMapControl());
		map.addOverlay(marcador);
		marcador.openInfoWindowHtml(direccion);
	}
}
//]]>

/*function validar(){
var user = "" ;
var pass = "" ;
while ( user != "comercial" || pass != "pedidosolter" )
{
user = prompt ("Introduzca su login: " , "" )
pass = prompt ("Introduzca su password: " , "" )
}
//alert ("Acceso permitido.");
document.location.href='index.php?menu=pedido';
}*/