// JavaScript Document

/*
	GDM plevel 4 -> rol developer opcion 1
*/

function f_ajax_gdm_opcion_1_a()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_1_a=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_1_a_envio_form(form)
{
	
	var php_id_asignada = document.getElementById('id_asignada').value;
	var php_nombre_asignado = document.getElementById('nombre_asignado').value;
	var php_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
    var php_espanol = document.getElementById('espanol').value;
	var php_idioma1;
	if (document.getElementById ('idioma1').checked == true){
		php_idioma1 = 'true';
	} else {
		php_idioma1 = 'false';
	}
    var php_catala = document.getElementById('catala').value;
	var php_idioma2;
	if (document.getElementById ('idioma2').checked == true){
		php_idioma2 = 'true';
	} else {
		php_idioma2 = 'false';
	}
	var php_english = document.getElementById('english').value;
	var php_idioma3;
	if (document.getElementById ('idioma3').checked == true){
		php_idioma3 = 'true';
	} else {
		php_idioma3 = 'false';
	}
	var php_deutsche = document.getElementById('deutsche').value;
	var php_idioma4;
	if (document.getElementById ('idioma4').checked == true){
		php_idioma4 = 'true';
	} else {
		php_idioma4 = 'false';
	}
	var ano = document.getElementById('ano_maquinaria').value;
	var mes = document.getElementById('mes_maquinaria').value;
	var dia = document.getElementById('dia_maquinaria').value;
	var php_fecha = ano + mes + dia;
	var php_precio_compra = document.getElementById('precio_compra').value;
	var php_precio_venta = document.getElementById('precio_venta').value;
	var php_proveedor = document.getElementById('proveedor_maquinaria').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_1_a_enviado=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
         }
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id_asignada="+php_id_asignada+"&php_nombre_asignado="+php_nombre_asignado+"&php_tipo_maquinaria="+php_tipo_maquinaria+"&php_espanol="+php_espanol+"&php_idioma1="+php_idioma1+"&php_catala="+php_catala+"&php_idioma2="+php_idioma2+"&php_english="+php_english+"&php_idioma3="+php_idioma3+"&php_deutsche="+php_deutsche+"&php_idioma4="+php_idioma4+"&php_fecha="+php_fecha+"&php_precio_compra="+php_precio_compra+"&php_precio_venta="+php_precio_venta+"&php_proveedor="+php_proveedor)
}

// generador de referencias

// manual

function cargacontenido_gdm_ref_1()
{
	var control_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_ref_1=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_1').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&control_tipo_maquinaria="+control_tipo_maquinaria)
}

// automatico

function cargacontenido_gdm_ref_2()
{
	var control_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_ref_2=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_1').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&control_tipo_maquinaria="+control_tipo_maquinaria)
}

// comprueba referencia

function cargacontenido_gdm_ref_3(php_id_asignada_1,php_id_asignada_2)
{
	var control_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_ref_3=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_1').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id_asignada_1="+php_id_asignada_1+"&php_id_asignada_2="+php_id_asignada_2)
}

function cargacontenido_gdm_ref_4()
{
	var control_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_ref_4=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_1').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send()
}


/*
	GDM plevel 4 -> rol developer opcion 2
*/


function f_ajax_gdm_opcion_2_a()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_2_a=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_2_a_formulario(php_id_seleccionada)
{
	//alert('entro en f ajax');
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_2_a_enviado=1",true);
	//ajax.open("POST", "index.php",true);
    ajax.onreadystatechange=function()
    {
		if (ajax.readyState==1)
        {
 			document.getElementById('contenido_principal').innerHTML = '<img src="http://www.mrbinder.com/images/loading.gif" />';
		} else if (ajax.readyState==4)
        {
			//alert('voy a pintar el php');
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
			//alert('he acabado');
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id_seleccionada="+php_id_seleccionada)
}

function f_ajax_gdm_opcion_2_a_envio_form()
{
	var php_id_asignada = document.getElementById('id_asignada').value;
	var php_nombre_asignado = document.getElementById('nombre_asignado').value;
	if  (document.getElementById ('cambiar_categoria').checked == true) {
		var php_tipo_maquinaria = document.getElementById('tipo_maquinaria').value;
	} else {
		var php_tipo_maquinaria = document.getElementById('cat_vieja').value;
	}
	var php_espanol = document.getElementById('espanol').value;
	var php_idioma1;
	if (document.getElementById ('idioma1').checked == true){
		php_idioma1 = 'true';
	} else {
		php_idioma1 = 'false';
	}
    var php_catala = document.getElementById('catala').value;
	var php_idioma2;
	if (document.getElementById ('idioma2').checked == true){
		php_idioma2 = 'true';
	} else {
		php_idioma2 = 'false';
	}
	var php_english = document.getElementById('english').value;
	var php_idioma3;
	if (document.getElementById ('idioma3').checked == true){
		php_idioma3 = 'true';
	} else {
		php_idioma3 = 'false';
	}
	var php_deutsche = document.getElementById('deutsche').value;
	var php_idioma4;
	if (document.getElementById ('idioma4').checked == true){
		php_idioma4 = 'true';
	} else {
		php_idioma4 = 'false';
	}
	if  (document.getElementById ('cambiar_fecha').checked == true) {
		var ano = document.getElementById('ano_maquinaria').value;
		var mes = document.getElementById('mes_maquinaria').value;
		var dia = document.getElementById('dia_maquinaria').value;
		var php_fecha = ano + mes + dia;
	} else {
		var php_fecha = document.getElementById('ano_viejo').value;
	}

	var php_precio_compra = document.getElementById('precio_compra').value;
	var php_precio_venta = document.getElementById('precio_venta').value;
	if  (document.getElementById ('cambiar_proveedor').checked == true) {
		var php_proveedor = document.getElementById('proveedor_maquinaria').value;
	} else {
		var php_proveedor = document.getElementById('pro_viejo').value;
	}
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_2_b_enviado=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = '<h1>Estado del contenido</h1><br /><br /><ul>Modificado satisfactoriamente</ul>';
         }
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id_asignada="+php_id_asignada+"&php_nombre_asignado="+php_nombre_asignado+"&php_tipo_maquinaria="+php_tipo_maquinaria+"&php_espanol="+php_espanol+"&php_idioma1="+php_idioma1+"&php_catala="+php_catala+"&php_idioma2="+php_idioma2+"&php_english="+php_english+"&php_idioma3="+php_idioma3+"&php_deutsche="+php_deutsche+"&php_idioma4="+php_idioma4+"&php_fecha="+php_fecha+"&php_precio_compra="+php_precio_compra+"&php_precio_venta="+php_precio_venta+"&php_proveedor="+php_proveedor)
}

/*
	GDM plevel 4 -> rol developer opcion 3
*/

function f_ajax_gdm_opcion_3()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_3=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_3_POST(php_id_seleccionada) 
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_3_enviado=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML =  ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id_seleccionada="+php_id_seleccionada)	
}

/*
	GDM plevel 4 -> rol developer opcion 4
*/


function f_ajax_gdm_opcion_4()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_4=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

// pintar cantidad & opciones

function cargacontenido_gdm_img_1()
{
	var php_cantidad_imagenes = document.getElementById('cantidad_imagenes').value;
	var php_ref = document.getElementById('id_seleccionada').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_img_1=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_2').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_cantidad_imagenes="+php_cantidad_imagenes+"&php_ref="+php_ref)
}


/*
	GDM plevel 4 -> rol developer opcion 5
*/

function f_ajax_gdm_opcion_5()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_5=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

// pintar imagenes & opciones

function f_ajax_gdm_opcion_5_a(id)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?gdm_5_a=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('cp_2').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id="+id)
}


/*
	GDM plevel 4 -> rol developer opcion 6
*/


function f_ajax_gdm_opcion_6()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

// insert

function f_ajax_gdm_opcion_6_insert()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_insert=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_6_insert_ok()
{
	var php_referencia = document.getElementById('referencia').value;
	var php_espanol = document.getElementById('espanol').value;
	var php_idioma1;
	if (document.getElementById ('idioma1').checked == true){
		php_idioma1 = 'true';
	} else {
		php_idioma1 = 'false';
	}
    var php_catala = document.getElementById('catala').value;
	var php_idioma2;
	if (document.getElementById ('idioma2').checked == true){
		php_idioma2 = 'true';
	} else {
		php_idioma2 = 'false';
	}
	var php_english = document.getElementById('english').value;
	var php_idioma3;
	if (document.getElementById ('idioma3').checked == true){
		php_idioma3 = 'true';
	} else {
		php_idioma3 = 'false';
	}
	var php_deutsche = document.getElementById('deutsche').value;
	var php_idioma4;
	if (document.getElementById ('idioma4').checked == true){
		php_idioma4 = 'true';
	} else {
		php_idioma4 = 'false';
	}
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_insert_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_referencia="+php_referencia+"&php_espanol="+php_espanol+"&php_idioma1="+php_idioma1+"&php_catala="+php_catala+"&php_idioma2="+php_idioma2+"&php_english="+php_english+"&php_idioma3="+php_idioma3+"&php_deutsche="+php_deutsche+"&php_idioma4="+php_idioma4)	
}

// modify

function f_ajax_gdm_opcion_6_see()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_see=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_6_modify(php_nombre_maquinaria)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_modify=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_maquinaria="+php_nombre_maquinaria)	
}

function f_ajax_gdm_opcion_6_modify_ok()
{
	var php_campo_original = document.getElementById('campo_original').value;
	var php_espanol = document.getElementById('espanol').value;
	var php_idioma1;
	if (document.getElementById ('idioma1').checked == true){
		php_idioma1 = 'true';
	} else {
		php_idioma1 = 'false';
	}
    var php_catala = document.getElementById('catala').value;
	var php_idioma2;
	if (document.getElementById ('idioma2').checked == true){
		php_idioma2 = 'true';
	} else {
		php_idioma2 = 'false';
	}
	var php_english = document.getElementById('english').value;
	var php_idioma3;
	if (document.getElementById ('idioma3').checked == true){
		php_idioma3 = 'true';
	} else {
		php_idioma3 = 'false';
	}
	var php_deutsche = document.getElementById('deutsche').value;
	var php_idioma4;
	if (document.getElementById ('idioma4').checked == true){
		php_idioma4 = 'true';
	} else {
		php_idioma4 = 'false';
	}
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_modify_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_espanol="+php_espanol+"&php_idioma1="+php_idioma1+"&php_catala="+php_catala+"&php_idioma2="+php_idioma2+"&php_english="+php_english+"&php_idioma3="+php_idioma3+"&php_deutsche="+php_deutsche+"&php_idioma4="+php_idioma4+"&php_campo_original="+php_campo_original)
}

// delete

function f_ajax_gdm_opcion_6_delete_ok(php_nombre_maquinaria)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_modify=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_maquinaria="+php_nombre_maquinaria)	
}

function f_ajax_gdm_opcion_6_delete()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_delete=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_6_delete_ok(php_nombre_maquinaria)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_delete_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_maquinaria="+php_nombre_maquinaria)	
}

// saw

function f_ajax_gdm_opcion_6_saw()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_6_saw=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}


/*
	GDM plevel 4 -> rol developer opcion 7
*/

// muestra seccion

function f_ajax_gdm_opcion_7()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

// insert

function f_ajax_gdm_opcion_7_insert()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_insert=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_7_insert_ok()
{
	var php_nombre = document.getElementById('nombre_asignado').value;
	var php_email = document.getElementById('email').value;
	var php_web = document.getElementById('web').value;
	var php_telf1 = document.getElementById('telf1').value;
	var php_telf2 = document.getElementById('telf2').value;
	var php_fax = document.getElementById('fax').value;
	var php_pais = document.getElementById('pais').value;
	var php_dir = document.getElementById('dir').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_insert_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre="+php_nombre+"&php_email="+php_email+"&php_web="+php_web+"&php_telf1="+php_telf1+"&php_telf2="+php_telf2+"&php_fax="+php_fax+"&php_pais="+php_pais+"&php_dir="+php_dir)
}

// modify

function f_ajax_gdm_opcion_7_modify()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_modify=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_7_modify_form(php_nombre_proveedor)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_modify_form=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_proveedor="+php_nombre_proveedor)
}

function f_ajax_gdm_opcion_7_modify_ok()
{
	var php_id = document.getElementById('id_original').value;
	var php_nombre = document.getElementById('nombre_asignado').value;
	var php_email = document.getElementById('email').value;
	var php_web = document.getElementById('web').value;
	var php_telf1 = document.getElementById('telf1').value;
	var php_telf2 = document.getElementById('telf2').value;
	var php_fax = document.getElementById('fax').value;
	var php_pais = document.getElementById('pais').value;
	var php_dir = document.getElementById('dir').value;
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_modify_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_id="+php_id+"&php_nombre="+php_nombre+"&php_email="+php_email+"&php_web="+php_web+"&php_telf1="+php_telf1+"&php_telf2="+php_telf2+"&php_fax="+php_fax+"&php_pais="+php_pais+"&php_dir="+php_dir)
}

// delete


function f_ajax_gdm_opcion_7_delete()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_delete=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_7_delete_ok(php_nombre_proveedor)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_delete_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_proveedor="+php_nombre_proveedor)
}

// saw


function f_ajax_gdm_opcion_7_saw()
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_saw=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send(null)
}

function f_ajax_gdm_opcion_7_saw_show(php_nombre_proveedor)
{
    ajax=AJAX_Crea();
    ajax.open("POST", "index.php?form_gdm_opcion_7_saw_ok=1",true);
    ajax.onreadystatechange=function()
    {
        if (ajax.readyState==4)
        {
 			document.getElementById('contenido_principal').innerHTML = ajax.responseText;
        }
		
    }
    ajax.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("&php_nombre_proveedor="+php_nombre_proveedor)
}

