//function login_popup(){
//	var open = window.open("login_popup.html", "Login", "width=400, height=340, scrollbar=0, toolbar=0");
//}

function login_popup(){
	var urllp = '../Login_Popup.html';
  GB_showCenter(":: adimpo ::", urllp, 350, 410);
}


function validation(){
	client1=document.private_area.client1.value;
	Password=document.private_area.password.value;
	
	if((client1=="430")&&(Password=="ABC"))
	{
			window.location.href="login/index.html";
			return false;
	}
	else
	{
		alert("Please enter valid values of client and Password")
		return false;
	}
}
function validation2(){
	client1=document.login2.username.value;
	Password=document.login2.password2.value;
	if((client1=="mike")&&(Password=="mike"))
	{
			close();
			window.opener.location.href="login2/search_engine.html";
			return false;
	}
	else
	{
		alert("Please enter valid values of username and Password")
		return false;
	}
}

/*----------customer form validation-----------------*/
function customer_validation()
{
	  if (document.getElementById('ley').checked == false){
     	alert("Antes debe aceptar nuestros 'Términos y Condiciones'.");
     	return false;
      }	
      
		name1=document.getElementById('F02').value;
		telephone1=document.getElementById('F03').value;
		c_name1=document.getElementById('F07').value;
		vat_num1=document.getElementById('F08').value;
		invoice_add1=document.getElementById('F10').value;
		postcode1=document.getElementById('F11').value;
		town1=document.getElementById('F12').value;
		region1=document.getElementById('F13').value;
		country1=document.getElementById('F14').value;
		member_number=document.getElementById('F36').value;
		company_name=document.getElementById('F37').value;
		var buyingretail= document.getElementById('F99').checked;
		if(buyingretail)
		{
			if((name1!="")&&(telephone1!="")&&(c_name1!="")&&(vat_num1!="")&&(invoice_add1!="")&&(postcode1!="")&&(town1!="")&&(region1!="")&&(country1!="")&&(member_number!="")&&(company_name!=""))
				{	
					return true;
				}
				else
				{
				alert("Debe rellenar todos los campos obligatorios marcados con (*).");
				return false;
				}
			}
		else
		{
		if((name1!="")&&(telephone1!="")&&(c_name1!="")&&(vat_num1!="")&&(invoice_add1!="")&&(postcode1!="")&&(town1!="")&&(region1!="")&&(country1!=""))
		{	
				return true;
		}
		else
		{
			alert("Debe rellenar todos los campos obligatorios marcados con (*).");
			return false;
		}

		}

}

/*---------Access to the webshop------------*/
function acc_webshop_validation()
{
		customer_code=document.getElementById('customer_code').value;
		password1=document.getElementById('password1').value;
		your_name=document.getElementById('your_name').value;
		email=document.getElementById('email').value;
		if((customer_code!="")&&(password1!="")&&(your_name!="")&&(email!=""))
		{
			alert("All mandatory fields have been filled by user.");
			return true;
		}
		else
		{
			alert("Campos obrigatórios são marcados com um * e deve ser preenchido. ");
			return false;
		}

}