function jumpMenu(targ,selObj,restore){ //v3.0
  eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");
  if (restore) selObj.selectedIndex=0;
}

function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = findObj(selName); if (selObj) jumpMenu(targ,selObj,restore);
}

function changeImages() {

  if (document.images && (preloadFlag == true)) {

    for (var i=0; i<changeImages.arguments.length; i+=2) {

      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];

    }

  }

}



function DoConfirm(message, url) {

  if(confirm(message)) location.href = url;

}



function openPopup(URL, width, height){

	window.open(URL,"my_window","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height)

}



function checkForm(form_id){

	//alert(form_id);

	switch(form_id){

		case "form_search_deceased":

			if(document.getElementById("name").value=="" &&

			document.getElementById("date_from_day").value=="" &&

			document.getElementById("date_from_month").value=="" &&

			document.getElementById("date_from_year").value=="" &&

			document.getElementById("date_to_day").value=="" &&

			document.getElementById("date_to_month").value=="" &&

			document.getElementById("date_to_year").value==""){

				alert("Por fabor yena e nomber of fecha.");

				return false;

			}

		break;

	}

	return true;

}


