function createBoxOther(obj)
{
	if (obj.value == 'Otro')
	{
		document.getElementById('box_otro').style.display='block';
	}
	else
	{
		document.getElementById('box_otro').style.display='none';		
	}
}


function saveForm01(pUrl)
{
	if(trim(document.getElementById('PDAV_First_Name').value)=='')
	{
		window.alert('Ingrese su Primer Nombre Nombre');
		document.getElementById('PDAV_First_Name').focus();
		return;
	}
/*
	if(trim(document.getElementById('PDAV_Second_Name').value)=='')
	{
		window.alert('Ingrese su Segundo Nombre');
		document.getElementById('PDAV_Second_Name').focus();
		return;
	}
*/
	if(trim(document.getElementById('PDAV_First_Surname').value)=='')
	{
		window.alert('Ingrese su Primer Apellido');
		document.getElementById('PDAV_First_Surname').focus();
		return;
	}

	if(trim(document.getElementById('PDAV_Second_Surname').value)=='')
	{
		window.alert('Ingrese su Segundo Apellido');
		document.getElementById('PDAV_Second_Surname').focus();
		return;
	}
	
	if(trim(document.getElementById('PDAV_Dni').value)=='')
	{
		window.alert('Ingrese su DNI');
		document.getElementById('PDAV_Dni').focus();
		return;
	}

	if (document.getElementById('PDAV_Password_Ok')!=null)
	{
		if(trim(document.getElementById('PDAV_Password').value)=='')
		{
			window.alert('Ingrese su password');
			document.getElementById('PDAV_Password').focus();
			return;
		}
	}

	if(document.getElementById('PDAV_Password_Ok')!=null) {
		if (trim(document.getElementById('PDAV_Password').value)!=trim(document.getElementById('PDAV_Password_Ok').value))
		{
			window.alert('La confirmacion del password es incorrecta');
			document.getElementById('PDAV_Password_Ok').focus();
			return;
		}
	}

	if(trim(document.getElementById('PDAV_Email').value)=='')
	{
		window.alert('Ingrese su E-mail');
		document.getElementById('PDAV_Email').focus();
		return;
	}
	else
	{
		if(!checkEmail(trim(document.getElementById('PDAV_Email').value)))
		{
			window.alert('Ingrese un E-mail valido');
			document.getElementById('PDAV_Email').focus();
			return;
		}
	}
	
	if(document.getElementById('PDAV_Email_Ok')!=null) {
		if (trim(document.getElementById('PDAV_Email').value)!=trim(document.getElementById('PDAV_Email_Ok').value))
		{
			window.alert('La confirmacion del correo es incorrecta');
			document.getElementById('PDAV_Email_Ok').focus();
			return;
		}
	}
	
	if(document.getElementById('PDAV_Birthday_Day').selectedIndex==0)
	{
		window.alert('Ingrese su dia de Cumple');
		document.getElementById('PDAV_Birthday_Day').focus();
		return;
	}

	if(document.getElementById('PDAV_Birthday_Month').selectedIndex==0)
	{
		window.alert('Ingrese su mes de Cumple');
		document.getElementById('PDAV_Birthday_Month').focus();
		return;
	}

	if(document.getElementById('PDAV_Birthday_Year').selectedIndex==0)
	{
		window.alert('Ingrese su ano de Cumple');
		document.getElementById('PDAV_Birthday_Year').focus();
		return;
	}

	if(document.getElementById('cmbDepartamento').selectedIndex==0)
	{
		window.alert('Seleccione su Departamento');
		document.getElementById('cmbDepartamento').focus();
		return;
	}

	if(document.getElementById('cmbProvincia').selectedIndex==0)
	{
		window.alert('Seleccione su Provincia');
		document.getElementById('cmbProvincia').focus();
		return;
	}
	
	if(document.getElementById('cmbDistrito').selectedIndex==0)
	{
		window.alert('Seleccione su Distrito');
		document.getElementById('cmbDistrito').focus();
		return;
	}

	if(trim(document.getElementById('PDAV_Address').value)=='')
	{
		window.alert('Ingrese su Direccion');
		document.getElementById('PDAV_Address').focus();
		return;
	}

//	alert(document.getElementById('PDAV_Track').selectedIndex);
/*	if (document.getElementById('PDAV_Track').selectedIndex == 0)
	{
		window.alert('Seleccione un Track');
		document.getElementById('PDAV_Track').focus();
		return;
	}

	if (document.getElementById('PDAV_Track').selectedIndex == 2)
	{
		if(document.getElementById('PDAV_Pais').value=='Otro')
		{
			if (document.getElementById('PDAV_Pais_Otro').value=='')
			{
				window.alert('Ingrese el pais');
				document.getElementById('PDAV_Pais_Otro').focus();
				return;
			}
		}
	}
*/
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm02(pUrl)
{
	
	if(trim(document.getElementById('ENPV_Name').value)=='')
	{
		window.alert('Ingrese el nombre del Proyecto');
		document.getElementById('ENPV_Name').focus();
		return;
	}
	
	if(trim(document.getElementById('ENPV_Q1').value)==0)
	{
		window.alert('Seleccione una opcion para la pregunta 2');
		document.getElementById('ENPV_Q1').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q2_1').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 3 - A');
		document.getElementById('ENPV_Q2_1').focus();
		return;
	}
	
	if(trim(document.getElementById('ENPV_Q2_2').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 3 - B');
		document.getElementById('ENPV_Q2_2').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q2_3').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 3 - C');
		document.getElementById('ENPV_Q2_3').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q3_1').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 4 - A');
		document.getElementById('ENPV_Q3_1').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q3_2').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 4 - B');
		document.getElementById('ENPV_Q3_2').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q4').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 5');
		document.getElementById('ENPV_Q4').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q5').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 6');
		document.getElementById('ENPV_Q5').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q6').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 7');
		document.getElementById('ENPV_Q6').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q7').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 8');
		document.getElementById('ENPV_Q7').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q8').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 9');
		document.getElementById('ENPV_Q8').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q9').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 10');
		document.getElementById('ENPV_Q9').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q10').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 11');
		document.getElementById('ENPV_Q10').focus();
		return;
	}

	if(trim(document.getElementById('ENPV_Q11').value)==0)
	{
		window.alert('Seleccione opcion para la pregunta 12');
		document.getElementById('ENPV_Q11').focus();
		return;
	}

	document.getElementById('general').action = pUrl;
	document.getElementById('general').submit();
}

function saveForm03(pUrl)
{	
	if (document.getElementById('cmbDepartamento').selectedIndex==0)
	{
		window.alert('Seleccione el Departamento');
		document.getElementById('cmbDepartamento').focus();
		swf=0;
		return;
	}
	
	if (document.getElementById('cmbProvincia').selectedIndex==0)
	{
		window.alert('Seleccione la Provincia');
		document.getElementById('cmbProvincia').focus();
		swf=0;
		return;
	}
	
	// SI ELIJE LIA Y LIMA ...
	if (document.getElementById('cmbDepartamento').value=='15' && document.getElementById('cmbProvincia').value=='01')
	{
		if (validateFkc('data[FormProyect][BUST_Q3]'))
		{
			window.alert('Ingrese el Contenido de Ubicacion del Emprendimiento');
			document.getElementById('data[FormProyect][BUST_Q3]').focus();
			swf=0;
			return;
		}
	}

	if (validateFkc('data[FormProyect][BUST_Q4]'))
	{
		window.alert('Ingrese el Contenido de Concepto de Negocio');
		document.getElementById('data[FormProyect][BUST_Q4]').focus();
		swf=0;
		return;
	}
	
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm04(pUrl)
{	
	if (validateFkc('data[FormProyect][CAMT_Q1]'))
	{
		window.alert('Ingrese el Contenido de Clientes y Mercado');
		document.getElementById('data[FormProyect][CAMT_Q1]').focus();
		swf=0;
		return;
	}
	
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm05(pUrl)
{	
	if (validateFkc('data[FormProyect][COAT_Q1]'))
	{
		window.alert('Ingrese el Contenido Cuales son sus principales competidores?');
		document.getElementById('data[FormProyect][COAT_Q1]').focus();
		swf=0;
		return;
	}
	
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm06(pUrl)
{	
	if (validateFkc('data[FormProyect][MOBT_Q1]'))
	{
		window.alert('Ingrese el Contenido Modelo de Negocio');
		document.getElementById('data[FormProyect][MOBT_Q1]').focus();
		swf=0;
		return;
	}
	
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm07(pUrl)
{	
	if (validateFkc('data[FormProyect][IOBT_Q2]'))
	{
		window.alert('Ingrese el Contenido Inclusividad de Negocio en la base de la piramide');
		document.getElementById('data[FormProyect][IOBT_Q2]').focus();
		swf=0;
		return;
	}
	
	if(trim(document.getElementById('IOBV_Q3').value)=='')
	{
		window.alert('Ingrese el Numero de Desposito');
		document.getElementById('IOBV_Q3').focus();
		return;
	}
	
	if(document.getElementById('IOBV_Day').selectedIndex==0)
	{
		window.alert('Seleccione el dia de la fecha del deposito');
		document.getElementById('IOBV_Day').focus();
		return;
	}

	if(document.getElementById('IOBV_Month').selectedIndex==0)
	{
		window.alert('Seleccione el mes de la fecha del deposito');
		document.getElementById('IOBV_Month').focus();
		return;
	}
	
	
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm08(pUrl)
{	
	/*
	if (validateFkc('data[FormProyect][IOBT_Q2]'))
	{
		window.alert('Ingrese el Contenido Inclusividad de Negocio en la base de la piramide');
		document.getElementById('data[FormProyect][IOBT_Q2]').focus();
		swf=0;
		return;
	}
	
	if(trim(document.getElementById('IOBV_Q3').value)=='')
	{
		window.alert('Ingrese el Numero de Desposito');
		document.getElementById('IOBV_Q3').focus();
		return;
	}
	
	if(document.getElementById('IOBV_Day').selectedIndex==0)
	{
		window.alert('Seleccione el dia de la fecha del deposito');
		document.getElementById('IOBV_Day').focus();
		return;
	}

	if(document.getElementById('IOBV_Month').selectedIndex==0)
	{
		window.alert('Seleccione el mes de la fecha del deposito');
		document.getElementById('IOBV_Month').focus();
		return;
	}
	
	*/
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm09(pUrl)
{	
	/*
	if (validateFkc('data[FormProyect][IOBT_Q2]'))
	{
		window.alert('Ingrese el Contenido Inclusividad de Negocio en la base de la piramide');
		document.getElementById('data[FormProyect][IOBT_Q2]').focus();
		swf=0;
		return;
	}
	
	if(trim(document.getElementById('IOBV_Q3').value)=='')
	{
		window.alert('Ingrese el Numero de Desposito');
		document.getElementById('IOBV_Q3').focus();
		return;
	}
	
	if(document.getElementById('IOBV_Day').selectedIndex==0)
	{
		window.alert('Seleccione el dia de la fecha del deposito');
		document.getElementById('IOBV_Day').focus();
		return;
	}

	if(document.getElementById('IOBV_Month').selectedIndex==0)
	{
		window.alert('Seleccione el mes de la fecha del deposito');
		document.getElementById('IOBV_Month').focus();
		return;
	}
	
	*/
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function saveForm10(pUrl)
{	
	/*
	if (validateFkc('data[FormProyect][IOBT_Q2]'))
	{
		window.alert('Ingrese el Contenido Inclusividad de Negocio en la base de la piramide');
		document.getElementById('data[FormProyect][IOBT_Q2]').focus();
		swf=0;
		return;
	}
	
	if(trim(document.getElementById('IOBV_Q3').value)=='')
	{
		window.alert('Ingrese el Numero de Desposito');
		document.getElementById('IOBV_Q3').focus();
		return;
	}
	
	if(document.getElementById('IOBV_Day').selectedIndex==0)
	{
		window.alert('Seleccione el dia de la fecha del deposito');
		document.getElementById('IOBV_Day').focus();
		return;
	}

	if(document.getElementById('IOBV_Month').selectedIndex==0)
	{
		window.alert('Seleccione el mes de la fecha del deposito');
		document.getElementById('IOBV_Month').focus();
		return;
	}
	
	*/
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function cleanRegister()
{
	document.getElementById('REGV_Name').value='';
	document.getElementById('REGV_Lastname').value='';
	document.getElementById('REGV_Dni').value='';
	document.getElementById('REGV_Email').value='';
	document.getElementById('REGV_Telephone').value='';
	document.getElementById('REGV_Password').value='';
	document.getElementById('REGV_Password_Ok').value='';
	document.getElementById('cmbDepartamento').selectedIndex=0;
	document.getElementById('cmbProvincia').selectedIndex=0;
	document.getElementById('cmbDistrito').selectedIndex=0;
	document.getElementById('REGV_Address').value='';
	document.getElementById('REGV_Name').focus();
}

function loginRegister(pUrl)
{
	if(trim(document.getElementById('REGV_Login').value)=='')
	{
		window.alert('Ingrese su Usuario');
		document.getElementById('REGV_Login').focus();
		return;
	}

	if(trim(document.getElementById('REGV_Password').value)=='')
	{
		window.alert('Ingrese su Password');
		document.getElementById('REGV_Password').focus();
		return;
	}
	
	document.getElementById('general').action = pUrl;
	document.getElementById('general').submit();
}

function loginClearRegister()
{
	document.getElementById('REGV_Login').value='';
	document.getElementById('REGV_Password').value='';
	document.getElementById('REGV_Login').focus();	
}

function forgetYourPass(pUrl)
{
	if(trim(document.getElementById('REGV_Email').value)=='')
	{
		window.alert('Ingrese su E-mail');
		document.getElementById('REGV_Email').focus();
		return;
	}
	else
	{
		if(!checkEmail(trim(document.getElementById('REGV_Email').value)))
		{
			window.alert('Ingrese un E-mail valido');
			document.getElementById('REGV_Email').focus();
			return;
		}
	}

	document.getElementById('general').action = pUrl;
	document.getElementById('general').submit();
}

function saveForm(pUrl)
{
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function add_proyect(pUrl)
{
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

function goForm(pUrl)
{
	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}

	function Set_Cookie(name,value,expires,path,domain,secure) {
		expires = expires * 60*60*24*1000;
		var today = new Date();
		var expires_date = new Date( today.getTime() + (expires) );
	    var cookieString = name + "=" +escape(value) + 
	       ( (expires) ? ";expires=" + expires_date.toGMTString() : "") + 
	       ( (path) ? ";path=" + path : "") + 
	       ( (domain) ? ";domain=" + domain : "") + 
	       ( (secure) ? ";secure" : "");
	    document.cookie = cookieString; 
	} 



/* */

function selectTrack(pos)
{
	document.getElementById("track_selected").value = pos;

	document.forms[0].action=pUrl;
	document.forms[0].method='post';
	document.forms[0].target='_self';
	document.forms[0].submit();
}