var ROOT_PATH = ""
var menu_izq_root = "";

function fMenusChg(obj,className) { obj.setAttribute("className",className); }
function OptsMenuClickFun(url) { location.replace(url); }
function botonChgImg(obj,imgP) { obj.setAttribute("src",imgP); }

function chgSubSecc(val) {
  document.mainform.frm_subsecc.value=val;
  document.mainform.action = "index.asp"
  SubmitForm();
}

function SubmitForm() {
   var o = document.mainform;
   if (checkTextChars(o)) { o.submit(); }
   else                   { alert("ERROR PRG: unknow"); }     
}

function checkTextChars(o) {
   for (var i=0; i<o.elements.length; i++) {
      if (o.elements[i].type == "text" || o.elements[i].type == "textarea" || o.elements[i].type == "hidden") {
	   rExpQuot = /\'|\"/gi;
	   o.elements[i].value = o.elements[i].value.replace(rExpQuot,"&quot;")
	   //alert(o.elements[i].name + " => " + o.elements[i].value);
	  } 
   }	   
   return true;
}

function chkPaisC(form,o) {
  form.frm_provincia.selectedIndex = (o.value != 62) ? (form.frm_provincia.options.length-1) : 27;  
  form.frm_provincia.disabled = (o.value != 62) ? true : false;
  form.frm_prov_c.value = "0";
  chkProvinciaC(form,form.frm_provincia)
}
function chkProvinciaC(form,o) {
  form.frm_prov_c.value = o.value;
}




/*


// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function showFoto(img,w,h) {
  features='scrollbars=no';
		
  if(screen.width){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
  } else{winl = 0;wint =0;}
		
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
      settings += 'width=' + w + ',';
	  settings += 'top=' + wint + ',';
	  settings += 'left=' + winl + ',';
	  settings += features;
  win = window.open(ROOT_PATH + "/includes/showFoto.asp?frm_img="+ img + "&frm_w=" + w + "&frm_h=" + h,"show",settings);
  win.window.focus();
}



*/
