function r_getFormData() {
    if(document.forms[0] == undefined) {
        return;
    }
	
    for(i = 0 ; i < document.forms[0].elements.length ; i++) {
       	document.rup.jsAddTextField(document.forms[0].elements[i].name, document.forms[0].elements[i].value);
	}
}

function submit_(form,type) {
		
	if (type == 'save') {
		document.forms[form].menu_action_click.value='save';
	} else if (type == 'save_goback') {
		document.forms[form].menu_action_click.value='save_goback';
	} else if (type == 'delete') {
		document.forms[form].menu_action_click.value='delete';
	} else if (type == 'cancel') {
		document.forms[form].menu_action_click.value='cancel';
	} else if (type == 'new') {
		document.forms[form].menu_action_click.value='new';
	} else if (type == 'done') {
		document.forms[form].menu_action_click.value='done';
	} else if (type == 'redir') {
		document.forms[form].menu_action_click.value='redir';
	} else if (type == 'sort') {
		document.forms[form].menu_action_click.value='sort';
	} else if (type == 'btn_go') {
		document.forms[form].menu_action_click.value='btn_go';
	} else if (type == 'btn2_go') {
		document.forms[form].menu_action_click.value='btn2_go';
	} else if (type == 'btn3_go') {
		document.forms[form].menu_action_click.value='btn3_go';
	} else if (type == 'btn4_go') {
		document.forms[form].menu_action_click.value='btn4_go';
	} else if (type == 'btn5_go') {
		document.forms[form].menu_action_click.value='btn5_go';
	} else if (type == 'btn6_go') {
		document.forms[form].menu_action_click.value='btn6_go';
	} else if (type == 'btn7_go') {
		document.forms[form].menu_action_click.value='btn7_go';
	}
	
	document.forms[form].submit();
	
}

function PararTAB(quem) 
{ 
   VerifiqueTAB=false; 
} 
function ChecarTAB() 
{ 
   VerifiqueTAB=true; 
}
VerifiqueTAB=true;
function Mostra(quem, tammax) {
	if ( (quem.value.length == tammax) && (VerifiqueTAB) ) {
		var i=0,j=0, indice=-1;
		for (i=0; i<document.forms.length; i++) {
			for (j=0; j<document.forms[i].elements.length; j++) {
				if (document.forms[i].elements[j].name == quem.name) {
					indice=i;
					break;
				}
			}
			if (indice != -1)
		         break;
		}
		for (i=0; i<=document.forms[indice].elements.length; i++) {
			if (document.forms[indice].elements[i].name == quem.name) {
				while ( (document.forms[indice].elements[(i+1)].type == "hidden") &&
						(i < document.forms[indice].elements.length) ) {
							i++;
				}
				document.forms[indice].elements[(i+1)].focus();
				VerifiqueTAB=false;
				break;
			}
		}
	}
}

ok=false;
function CheckAll(form,obj) {
	if(!ok){
	  for (var i=0;i<document.forms[form].elements.length;i++) {
	    var x = document.forms[form].elements[i];
	    if (x.name == obj) {		
		    	x.checked = true;
				ok=true;
			}
	    }
	}
	else{
	for (var i=0;i<document.forms[form].elements.length;i++) {
	    var x = document.forms[form].elements[i];
	    if (x.name == obj) {		
		    	x.checked = false;
				ok=false;
			}
	    }	
	}
}

function ulf(){document.form_login.user_login.focus();}

function date_format_mask(src, mask) {
	var i = src.value.length;
  	var output = mask.substring(0,1);
  	var text = mask.substring(i)
	
	if (text.substring(0,1) != output) {
        src.value += text.substring(0,1);
  	}
}

var req;

function loadXMLDoc(url,valor)
{
    req = null;
    // Procura por um objeto nativo (Mozilla/Safari)
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url+'?estado='+valor, true);
        req.send(null);
		
    // Procura por uma versao ActiveX (IE)
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
		req2 = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url+'?estado='+valor, true);
            req.send();
        }
    }
}

var req2;
 
function loadXMLDocBairro(url,valor)
{
	req2 = null;
    // Procura por um objeto nativo (Mozilla/Safari)
    if (window.XMLHttpRequest) {		
		req2 = new XMLHttpRequest();
        req2.onreadystatechange = processReqChange2;
        req2.open("GET", url+'?cidade='+valor, true);
        req2.send(null);
		
    // Procura por uma versao ActiveX (IE)
    } else if (window.ActiveXObject) {
		req2 = new ActiveXObject("Microsoft.XMLHTTP");		
		if (req2) {
            req2.onreadystatechange = processReqChange2;
            req2.open("GET", url+'?cidade='+valor, true);
            req2.send();
        }
    }
}

function processReqChange()
{
    // apenas quando o estado for "completado"
    if (req.readyState == 4) {
        // apenas se o servidor retornar "OK"
        if (req.status == 200) {
            // procura pela div id="atualiza" e insere o conteudo
            // retornado nela, como texto HTML
            document.getElementById('cidades').innerHTML = req.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + req.statusText);
        }
    }
}

function processReqChange2()
{
    // apenas quando o estado for "completado"
    if (req2.readyState == 4) {
        // apenas se o servidor retornar "OK"
        if (req2.status == 200) {
            // procura pela div id="atualiza" e insere o conteudo
            // retornado nela, como texto HTML
            document.getElementById('bairros').innerHTML = req2.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + req2.statusText);
        }
    }
}

function Atualiza(valor)
{
    loadXMLDoc("cidades.php",valor);
	loadXMLDocBairro("bairros.php",valor);
}

function AtualizaBairro(valor)
{
	loadXMLDocBairro("bairros.php",valor);
}

// SCE_SpecificOrigination
var reqSCE_SpecificOrigination;
function loadXML_SCE_SpecificOrigination(url,value) {
    reqSCE_SpecificOrigination = null;
    if (window.XMLHttpRequest) {
        reqSCE_SpecificOrigination = new XMLHttpRequest();
        reqSCE_SpecificOrigination.onreadystatechange = processReqChangeSCE_SpecificOrigination;
        reqSCE_SpecificOrigination.open("GET", url+'?sce_specificorigination_idpk='+value, true);
        reqSCE_SpecificOrigination.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_SpecificOrigination = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_SpecificOrigination) {
            reqSCE_SpecificOrigination.onreadystatechange = processReqChangeSCE_SpecificOrigination;
            reqSCE_SpecificOrigination.open("GET", url+'?sce_specificorigination_idpk='+value, true);
            reqSCE_SpecificOrigination.send();
        }
    }
}

function processReqChangeSCE_SpecificOrigination() {
    if (reqSCE_SpecificOrigination.readyState == 4) {
        if (reqSCE_SpecificOrigination.status == 200) {
            document.getElementById('specificorigination').innerHTML = reqSCE_SpecificOrigination.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_SpecificOrigination.statusText);
        }
    }
}

function UpdateSCE_SpecificOrigination(value) {
    loadXML_SCE_SpecificOrigination("loadxml_sce_specificorigination.php",value);
}

// SCE_Event
var reqSCE_Event;
function loadXML_SCE_Event(url,value) {
    reqSCE_Event = null;
    if (window.XMLHttpRequest) {
        reqSCE_Event = new XMLHttpRequest();
        reqSCE_Event.onreadystatechange = processReqChangeSCE_Event;
        reqSCE_Event.open("GET", url+'?sce_eventcategory_idpk='+value, true);
        reqSCE_Event.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_Event = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_Event) {
            reqSCE_Event.onreadystatechange = processReqChangeSCE_Event;
            reqSCE_Event.open("GET", url+'?sce_eventcategory_idpk='+value, true);
            reqSCE_Event.send();
        }
    }
}

function processReqChangeSCE_Event() {
    if (reqSCE_Event.readyState == 4) {
        if (reqSCE_Event.status == 200) {
            document.getElementById('event').innerHTML = reqSCE_Event.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_Event.statusText);
        }
    }
}

function UpdateSCE_Event(value) {
    loadXML_SCE_Event("loadxml_sce_event.php",value);
}

// getCEP
var url = "getCep.php?param="; // The server-side script
function handleHttpResponse() {
  if (http.readyState == 4) {
    if (http.responseText.indexOf('invalid') == -1) {
      // Use the XML DOM to unpack the city and state data 
      var xmlDocument = http.responseXML;
	  var addresscategory_idfk = xmlDocument.getElementsByTagName('addresscategory_idfk').item(0).firstChild.data;
	  var sce_personal_address = xmlDocument.getElementsByTagName('sce_personal_address').item(0).firstChild.data; 
	  var burgh_idfk = xmlDocument.getElementsByTagName('burgh_idfk').item(0).firstChild.data; 
      var city_idfk = xmlDocument.getElementsByTagName('city_idfk').item(0).firstChild.data;
      var state_initials = xmlDocument.getElementsByTagName('state_initials').item(0).firstChild.data;
	  document.getElementById('addresscategory_idfk').value = addresscategory_idfk;
	  document.getElementById('sce_personal_address').value = sce_personal_address;
	  document.getElementById('burgh_idfk').value = burgh_idfk;
      document.getElementById('city_idfk').value = city_idfk;
	  
	  // State
	  var ic = 0;
	  var total_ic = document.getElementById('state_initials').length + 1;
	  while (ic < total_ic) {
	  	if (document.getElementById('state_initials').options[ic].value == state_initials) {
			document.getElementById('state_initials').options[ic].selected = true;
			loadXML_SCE_City("loadxml_sce_city.php",state_initials);
			loadXML_SCE_Burgh("loadxml_sce_burgh.php",city_idfk);
			break;
		}
	  ic++;
	  }

	  // AddressCateory	  
	  var ic2 = 0;
	  var total_ic2 = document.getElementById('addresscategory_idfk').length + 1;
	  while (ic2 < total_ic2) {
	  	if (document.getElementById('addresscategory_idfk').options[ic2].value == addresscategory_idfk) {
			document.getElementById('addresscategory_idfk').options[ic2].selected = true;
			break;
		}
	  ic2++;
	  }
	  
      isWorking = false;
    }
	else {
	  document.getElementById('addresscategory_idfk').value = "";	
	  document.getElementById('sce_personal_address').value = "";
	  document.getElementById('burgh_idfk').value = "";
      document.getElementById('city_idfk').value = "";
      document.getElementById('state_initials').value = "";
	}
  }
}

function getHTTPObject() {
    if(window.XMLHttpRequest)
    {
        return new XMLHttpRequest();
    } else
    if(window.ActiveXObject)
    {
        var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
        
        for(var i = 0; i < prefixes.length; i++)
        {
            try
            {
                return new ActiveXObject(prefixes[i] + ".XMLHTTP");
            } catch (e) {}
        }
    }
}

var http = getHTTPObject(); // We create the HTTP Object
var isWorking = false;

function updateCep() {
    var cepValue = String(document.getElementById("sce_personal_cep").value);
    http.open("GET", url + escape(cepValue), true);
    http.onreadystatechange = handleHttpResponse;
    http.send(null);
}

function auto_cep (){
	if (document.getElementById("sce_personal_cep").value.length == 8) {
		updateCep();
	}
}

// SCE_City
var reqSCE_City;
function loadXML_SCE_City(url,value) {
	
	if (http.readyState == 4) {
    	if (http.responseText.indexOf('invalid') == -1) {
			var xmlDocument = http.responseXML;
			var city_idfk = xmlDocument.getElementsByTagName('city_idfk').item(0).firstChild.data;
		}
	}
	
    reqSCE_City = null;
    if (window.XMLHttpRequest) {
        reqSCE_City = new XMLHttpRequest();
        reqSCE_City.onreadystatechange = processReqChangeSCE_City;
        reqSCE_City.open("GET", url+'?uf='+value+'&city='+city_idfk, true);
        reqSCE_City.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_City = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_City) {
            reqSCE_City.onreadystatechange = processReqChangeSCE_City;
            reqSCE_City.open("GET", url+'?uf='+value+'&city='+city_idfk, true);
            reqSCE_City.send();
        }
    }
}

function processReqChangeSCE_City() {
    if (reqSCE_City.readyState == 4) {
        if (reqSCE_City.status == 200) {
            document.getElementById('city').innerHTML = reqSCE_City.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_City.statusText);
        }
    }
}

function UpdateSCE_City(value) {
    loadXML_SCE_City("loadxml_sce_city.php",value);
}

function UpdateSCE_OnChange_City(value) {
    loadXML_SCE_City("loadxml_sce_city.php",value);
	UpdateSCE_Burgh(0);
}

// SCE_Burgh
var reqSCE_Burgh;
function loadXML_SCE_Burgh(url,value) {
	
	if (http.readyState == 4) {
    	if (http.responseText.indexOf('invalid') == -1) {
			var xmlDocument = http.responseXML;
			var burgh_idfk = xmlDocument.getElementsByTagName('burgh_idfk').item(0).firstChild.data;
			var city_idfk = xmlDocument.getElementsByTagName('city_idfk').item(0).firstChild.data;
		}
	}
	
    reqSCE_Burgh = null;
    if (window.XMLHttpRequest) {
        reqSCE_Burgh = new XMLHttpRequest();
        reqSCE_Burgh.onreadystatechange = processReqChangeSCE_Burgh;
        reqSCE_Burgh.open("GET", url+'?city='+value+'&burgh='+burgh_idfk, true);
        reqSCE_Burgh.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_Burgh = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_Burgh) {
            reqSCE_Burgh.onreadystatechange = processReqChangeSCE_Burgh;
            reqSCE_Burgh.open("GET", url+'?city='+value+'&burgh='+burgh_idfk, true);
            reqSCE_Burgh.send();
        }
    }
	
}

function processReqChangeSCE_Burgh() {
    if (reqSCE_Burgh.readyState == 4) {
        if (reqSCE_Burgh.status == 200) {
            document.getElementById('burgh').innerHTML = reqSCE_Burgh.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_Burgh.statusText);
        }
    }
}

function UpdateSCE_Burgh(value) {
    loadXML_SCE_Burgh("loadxml_sce_burgh.php",value);
}

function ShowHide(ddlCountry, BR){		
	var state_tr_br = document.getElementById('state_tr_br');
	var state_tr_no = document.getElementById('state_tr_no');
	
	var city_tr_br = document.getElementById('city_tr_br');
	var city_tr_no = document.getElementById('city_tr_no');
	
	var burgh_tr_br = document.getElementById('burgh_tr_br');
	var burgh_tr_no = document.getElementById('burgh_tr_no');
	
	state_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	state_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
	
	city_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	city_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
	
	burgh_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	burgh_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
}

// getCEP SCE Occupational
var url_occupational = "getCep_Occupational.php?param="; // The server-side script
function handleHttpResponse_Occupational() {
  if (http_occupational.readyState == 4) {
    if (http_occupational.responseText.indexOf('invalid') == -1) {
      // Use the XML DOM to unpack the city and state data 
      var xmlDocument = http_occupational.responseXML;
	  var occupational_addresscategory_idfk = xmlDocument.getElementsByTagName('occupational_addresscategory_idfk').item(0).firstChild.data;
	  var sce_occupational_address = xmlDocument.getElementsByTagName('sce_occupational_address').item(0).firstChild.data; 
	  var occupational_burgh_idfk = xmlDocument.getElementsByTagName('occupational_burgh_idfk').item(0).firstChild.data; 
      var occupational_city_idfk = xmlDocument.getElementsByTagName('occupational_city_idfk').item(0).firstChild.data;
      var occupational_state_initials = xmlDocument.getElementsByTagName('occupational_state_initials').item(0).firstChild.data;
	  document.getElementById('occupational_addresscategory_idfk').value = occupational_addresscategory_idfk;
	  document.getElementById('sce_occupational_address').value = sce_occupational_address;
	  document.getElementById('occupational_burgh_idfk').value = occupational_burgh_idfk;
      document.getElementById('occupational_city_idfk').value = occupational_city_idfk;
	  
	  // State
	  var ic = 0;
	  var total_ic = document.getElementById('occupational_state_initials').length + 1;
	  while (ic < total_ic) {
	  	if (document.getElementById('occupational_state_initials').options[ic].value == occupational_state_initials) {
			document.getElementById('occupational_state_initials').options[ic].selected = true;
			loadXML_SCE_Occupational_City("loadxml_sce_occupational_city.php",occupational_state_initials);
			loadXML_SCE_Occupational_Burgh("loadxml_sce_occupational_burgh.php",occupational_city_idfk);
			break;
		}
	  ic++;
	  }
	  
	  // AddressCateory	  
	  var ic2 = 0;
	  var total_ic2 = document.getElementById('occupational_addresscategory_idfk').length + 1;
	  while (ic2 < total_ic2) {
	  	if (document.getElementById('occupational_addresscategory_idfk').options[ic2].value == occupational_addresscategory_idfk) {
			document.getElementById('occupational_addresscategory_idfk').options[ic2].selected = true;
			break;
		}
	  ic2++;
	  }
	  
      isWorking = false;
    }
	else {
	  document.getElementById('occupational_addresscategory_idfk').value = "";	
	  document.getElementById('sce_occupational_address').value = "";
	  document.getElementById('occupational_burgh_idfk').value = "";
      document.getElementById('occupational_city_idfk').value = "";
      document.getElementById('occupational_state_initials').value = "";
	}
  }
}

function getHTTPObject_Occupational() {
    if(window.XMLHttpRequest)
    {
        return new XMLHttpRequest();
    } else
    if(window.ActiveXObject)
    {
        var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
        
        for(var i = 0; i < prefixes.length; i++)
        {
            try
            {
                return new ActiveXObject(prefixes[i] + ".XMLHTTP");
            } catch (e) {}
        }
    }
}

var http_occupational = getHTTPObject_Occupational(); // We create the HTTP Object
var isWorking = false;

function updateCep_Occupational() {
	var cepValue = String(document.getElementById("sce_occupational_cep").value);
    http_occupational.open("GET", url_occupational + escape(cepValue), true);
    http_occupational.onreadystatechange = handleHttpResponse_Occupational;
    http_occupational.send(null);
}

function occupational_auto_cep (){
	if (document.getElementById("sce_occupational_cep").value.length == 8) {
		updateCep_Occupational();
	}
}

// SCE_City SCE Occupational
var reqSCE_Occupational_City;
function loadXML_SCE_Occupational_City(url,value) {
	
	if (http_occupational.readyState == 4) {
    	if (http_occupational.responseText.indexOf('invalid') == -1) {
			var xmlDocument = http_occupational.responseXML;
			var occupational_city_idfk = xmlDocument.getElementsByTagName('occupational_city_idfk').item(0).firstChild.data;
		}
	}
	
    reqSCE_Occupational_City = null;
    if (window.XMLHttpRequest) {
        reqSCE_Occupational_City = new XMLHttpRequest();
        reqSCE_Occupational_City.onreadystatechange = processReqChangeSCE_Occupational_City;
        reqSCE_Occupational_City.open("GET", url+'?uf='+value+'&city='+occupational_city_idfk, true);
        reqSCE_Occupational_City.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_Occupational_City = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_Occupational_City) {
            reqSCE_Occupational_City.onreadystatechange = processReqChangeSCE_Occupational_City;
            reqSCE_Occupational_City.open("GET", url+'?uf='+value+'&city='+occupational_city_idfk, true);
            reqSCE_Occupational_City.send();
        }
    }
}

function processReqChangeSCE_Occupational_City() {
    if (reqSCE_Occupational_City.readyState == 4) {
        if (reqSCE_Occupational_City.status == 200) {
            document.getElementById('occupational_city').innerHTML = reqSCE_Occupational_City.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_Occupational_City.statusText);
        }
    }
}

function UpdateSCE_Occupational_City(value) {
    loadXML_SCE_Occupational_City("loadxml_sce_occupational_city.php",value);
}

function UpdateSCE_Occupational_OnChange_City(value) {
    loadXML_SCE_Occupational_City("loadxml_sce_occupational_city.php",value);
	UpdateSCE_Occupational_Burgh(0);
}

// SCE_Burgh SCE Occupational
var reqSCE_Occupational_Burgh;
function loadXML_SCE_Occupational_Burgh(url,value) {
	
	if (http_occupational.readyState == 4) {
    	if (http_occupational.responseText.indexOf('invalid') == -1) {
			var xmlDocument = http_occupational.responseXML;
			var occupational_burgh_idfk = xmlDocument.getElementsByTagName('occupational_burgh_idfk').item(0).firstChild.data;
			var occupational_city_idfk = xmlDocument.getElementsByTagName('occupational_city_idfk').item(0).firstChild.data;
		}
	}
	
    reqSCE_Occupational_Burgh = null;
    if (window.XMLHttpRequest) {
        reqSCE_Occupational_Burgh = new XMLHttpRequest();
        reqSCE_Occupational_Burgh.onreadystatechange = processReqChangeSCE_Occupational_Burgh;
        reqSCE_Occupational_Burgh.open("GET", url+'?city='+value+'&burgh='+occupational_burgh_idfk, true);
        reqSCE_Occupational_Burgh.send(null);
	
    } else if (window.ActiveXObject) {
        reqSCE_Occupational_Burgh = new ActiveXObject("Microsoft.XMLHTTP");
        if (reqSCE_Occupational_Burgh) {
            reqSCE_Occupational_Burgh.onreadystatechange = processReqChangeSCE_Occupational_Burgh;
            reqSCE_Occupational_Burgh.open("GET", url+'?city='+value+'&burgh='+occupational_burgh_idfk, true);
            reqSCE_Occupational_Burgh.send();
        }
    }
	
}

function processReqChangeSCE_Occupational_Burgh() {
    if (reqSCE_Occupational_Burgh.readyState == 4) {
        if (reqSCE_Occupational_Burgh.status == 200) {
            document.getElementById('occupational_burgh').innerHTML = reqSCE_Occupational_Burgh.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + reqSCE_Occupational_Burgh.statusText);
        }
    }
}

function UpdateSCE_Occupational_Burgh(value) {
    loadXML_SCE_Occupational_Burgh("loadxml_sce_occupational_burgh.php",value);
}

function ShowHide_Occupational(ddlCountry, BR){		
	var occupational_state_tr_br = document.getElementById('occupational_state_tr_br');
	var occupational_state_tr_no = document.getElementById('occupational_state_tr_no');
	
	var occupational_city_tr_br = document.getElementById('occupational_city_tr_br');
	var occupational_city_tr_no = document.getElementById('occupational_city_tr_no');
	
	var occupational_burgh_tr_br = document.getElementById('occupational_burgh_tr_br');
	var occupational_burgh_tr_no = document.getElementById('occupational_burgh_tr_no');
	
	occupational_state_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	occupational_state_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
	
	occupational_city_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	occupational_city_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
	
	occupational_burgh_tr_br.style.display = ddlCountry.options[ddlCountry.selectedIndex].value != '33' ? 'none' : '';
	occupational_burgh_tr_no.style.display = ddlCountry.options[ddlCountry.selectedIndex].value == '33' ? 'none' : '';
}

function selectmenu(form,field) {
    document.location = document.forms[form].elements[field].options[document.forms[form].elements[field].selectedIndex].value
}

