//global vars
	var sound='0';
	var lights='0';
	var fx='0';
	var soundc= '';
	var lightsc= '';
	var fxc= '';
//functions
function isNum(passedVal)
{
	if (passedVal == "")
	{
	return false 
	}
	for (i=0; i<passedVal.length; i++) 
	{
		if (passedVal.charAt(i) == ".") 
			{
				return true
			}
		if (passedVal.charAt(i) < "0")
		{
			return false 
		}
		if (passedVal.charAt(i) > "9")
		{
			return false
		}
	}
	return true
};


function switchsl(myArray, id)
{
showdiv(id);
var i=0;
for (i=0;i<myArray.length;i++)
{
	if (myArray[i] != id)
		{
			hidediv(myArray[i]);
		}
	}
};

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
};
function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
};



function showMeCk(id, box)
{
	if(box.checked==true)
	{
		showdiv(id);
	}
	else
	  hidediv(id);
};



function showMeSl(id, box)
{
	if(box=='true')
	{
		showdiv(id);
	}
	else
	  hidediv(id);
};
function setrez(s)
{
var hiddenField = document.getElementById("myHiddenField");
hiddenField.value = '<span style="font-size:18px"><strong>Serviciile alese:</strong></span><br>'+s;
}
function sum(t,a,v) 
{
	if (t =='sound')
	{
	  sound = a;
		soundc= 'Sonorizare:<br><br>'+document.getElementById(t+v).innerHTML+'<br>La pretul de '+sound+' &euro;<br><hr/>';
	}
	else if (t =='lights')
	{
	  lights = a;
		lightsc= 'Lumini:<br><br>'+document.getElementById(t+v).innerHTML+'<br>La pretul de '+lights+' &euro;<br><hr/>';
	}
	else	if (t =='fx')
	{
	  fx = a;
		fxc= 'Efecte:<br>'+document.getElementById(t+v).innerHTML+'<br>La pretul de '+fx+' &euro;<br><hr/>';
	}
	
	var sum = (sound -0)+(lights-0)+(fx-0)+(depla -0);
	
	if ((depla=='')||(depla=='0'))
	{
		choice = '<br>'+soundc+lightsc+fxc+'<span style="font-size:22px"><strong>TOTAL (cu TVA) '+sum+' &euro;</strong></span><br>';
		setrez(choice);
	}
	else
	{
		choice = '<br>'+soundc+lightsc+fxc+'Costuri deplasare: '+ depla+' &euro;<br><br><br><hr/><span style="font-size:22px"><strong>TOTAL (cu TVA) '+sum+' &euro;</strong></span><br>';

		setrez(choice);
	}
document.getElementById("total").firstChild.nodeValue=sum;
};

function validate_contact()
{
    if (document.getElementById('nume').value.length < 3 )
    {
 			alert ( "Introduceti numele dvs." );
			return false;
	}
	if (document.getElementById('email').value.length < 4 )
    {
 			alert ( "Introduceti adresa de email" );
			return false;
	}
	if (document.getElementById('continut').value.length < 2 )
    {
 			alert ( "Introduceti un mesaj" );
			return false;
	}
	return true;
}
