function Go()
{
	var R;
	R = document.getElementById("Ref").value;
	if(R != ''){
		UL = "/views/ficha/ref:"+R;
		window.location = UL;
	} else {
		alert("Has olvidado la Referencia");
	}
	
}
function f1()
		{
			var v1;
			v1 = document.getElementById("Poblacion").value;
			
			if(v1 == "144" || v1 == "177" || v1 == "243"){
				document.getElementById("Sit").style.visibility ="visible";
				document.getElementById("Sit").style.height ="60px";
			} else {
				document.getElementById("Sit").style.visibility ="hidden";
				document.getElementById("Sit").style.height ="0px";
				
			}
		}
		
function addIm(punto)
{
	K = punto;
	K1 = punto+1;
	K2 = punto-1;
	//SetCookieEz("A"+K2, document.getElementById("Image"+K2+"Name").value);
	document.getElementById("Im"+K).innerHTML = "<label for=\'Image"+K+"Name\'><span style=\'color: #083E15\'><b>Imagen"+K+"<b></span></label><br><input type=\'file\' name=\'data[Image]["+K+"][Name]\' id=\'Image"+K+"Name\' onChange = \'addIm("+K1+")\' size = \'58\' style = \'width: 460px\'/><div id = \"Im"+K1+"\"></div>";
}

function addIm_Uni(punto, Im, Nm)
{
	
	K = punto;
	K1 = punto+1;
	K2 = punto-1;
	//SetCookieEz("A"+K2, document.getElementById("Image"+K2+"Name").value);
	document.getElementById("Im"+K).innerHTML = "<label for=\'"+Im+K+Nm+"\'><span style=\'color: #083E15\'><b>Imagen"+K+"<b></span></label><br><input type=\'file\' name=\'data["+Im+"]["+K+"]["+Nm+"]\' id=\'"+Im+K+Nm+"\' onChange = \'addIm_Uni("+K1+",\""+Im+"\",\""+Nm+"\")\' size = \'58\' style = \'width: 460px\'/><div id = \"Im"+K1+"\"></div>";
}

function set()
{

	Ob1 = document.getElementById("Im1");
	Ob2 = document.getElementById("Admin");
	Ob2.appendChild(Ob1);
}

function chengeDin()
{
		document.getElementById("PrecioVPts").value = document.getElementById("PrecioVE").value * 166.386;
}

function prop()
{
	if(document.getElementById("Prop").value == "1"){
		document.getElementById("T2").innerHTML = "<table border = \'0\' width = \'100%\'><tr><td width = \'15%\' align = \'left\'><label for=\'Nombre\'><span class = \'text2\'><b>Nombre<b></span></label><br><input type=\'text\' name=\'data[Particular][Nombre]\' id=\'ParticularNombre\' size = \'58\' style = \'width: 100px; height: 16px\'/></td><td width = \'15%\' align = \'left\'><label for=\'Apellido\'><span class = \'text2\'><b>Apellido<b></span></label><br><input type=\'text\' name=\'data[Particular][Apellido]\' id=\'ParticularApellido\' size = \'58\' style = \'width: 100px; height: 16px\'/></td><td width = \'25%\' align = \'left\'><label for=\'Domicilio\'><span class = \'text2\'><b>Domicilio<b></span></label><br><input type=\'text\' name=\'data[Particular][Domicilio]\' id=\'ParticularDomicilio\' size = \'58\' style = \'width: 200px; height: 16px\'/></td><td width = \'15%\' align = \'left\'><label for=\'E-Mail\'><span class = \'text2\'><b>E-Mail<b></span></label><br><input type=\'text\' name=\'data[Particular][Coreo]\' id=\'ParticularCoreo\' size = \'58\' style = \'width: 100px; height: 16px\'/></td><td width = \'15%\' align = \'left\'><label for=\'Tel-1.\'><span class = \'text2\'><b>Tel-1.<b></span></label><br><input type=\'text\' name=\'data[Particular][Tel1]\' id=\'ParticularTel1\' size = \'58\' style = \'width: 100px; height: 16px\'/></td><td width = \'15%\' align = \'left\'><label for=\'Tel-2.\'><span class = \'text2\'><b>Tel-2.<b></span></label><br><input type=\'text\' name=\'data[Particular][Tel2]\' id=\'ParticularTel2\' size = \'58\' style = \'width: 100px; height: 16px\'/></td></tr><tr><td colspan = \'6\' align = \'left\'><label for=\'Observación\'><span class = \'text2\'><b>Observación<b></span></label><br><textarea name=\'data[Particular][Observacion]\' id=\'ParticularObservacion\'  cols=\'150\' rows=\'10\' style=\'width: 910px; height: 50px;\'></textarea></td></tr></table>";
	} else if(document.getElementById("Prop").value == "2"){
		document.getElementById("T2").innerHTML = '';
	}
}
