var pos=0;function getLblID(s_id){var fLbls=document.getElementsByTagName("label");for(var i=0;i<fLbls.length;i++){if(fLbls[i].attributes["for"].value==s_id){return fLbls[i];}}return null;}function getValID(idStr){var fld=document.getElementById(idStr);if(fld!=null){return fld.value;}return null;}function hasE(sText){var VlChrs="@.";var test=true;var c;for(var i=0;i<VlChrs.length;i++){c=VlChrs.charAt(i);if(sText.indexOf(c)==-1){test=false;break;}}return test;}function externalLinks(){if(!document.getElementsByTagName){return;}var els=document.getElementsByTagName("a");for(var i=0;i<els.length;i++){var el=els[i];if(el.getAttribute("href")&&el.getAttribute("rel")=="ext"){el.target="_blank";}}}function vldEmailID(idStr){var fld=document.getElementById(idStr);var ok=(fld.value!=null&&fld.value.length>0&&hasE(fld.value));var lbl=getLblID(idStr);if(lbl!=null){if(!ok){fld.focus();lbl.className="nvld";}else{lbl.className="j";}}return ok;}function vldF1(idStr){var ok=(vldID("V0")&&vldID("V3")&&vldID("V4")&&vldEmailID("V6")&&vldID("V10"));if(!ok){alert(idStr);}document.rtVal=(ok==true);}function vldF2(){var s="mailto:recrutamento@triangulu.pt?subject=";s=s.concat(UTFescape("Oferta de Emprego"));s=s.concat("&body=");var b="Exmos Senhores,\n\ndesejo candidatar-me à vossa oferta de emprego: ";b=b.concat("Categoria: ",getValID("V1"),"\n");b=b.concat("Local de Trabalho: ",getValID("V2"),"\n");b=b.concat("Horário:",getValID("V4"),"\n\nJunto envio o meu C.V. \n\nCom os meus cumprimentos,\n\n");s=s.concat(UTFescape(b));window.location=s;}function vldF3(idStr){var ok=(vldID("V0")&&vldID("V1")&&vldID("V2")&&vldID("V5")&&vldID("V6")&&vldEmailID("V8")&&vldID("V10")&&vldID("V12"));if(!ok){alert(idStr);}document.rtVal=(ok==true);}function vldF4(idStr){var ok=(vldID("V0")&&vldID("V1")&&vldID("V2")&&vldID("V5")&&vldID("V6")&&vldEmailID("V8"));if(!ok){alert(idStr);}document.rtVal=(ok==true);}function vldF5(idStr){var ok=(vldID("V0")&&vldID("V1"));if(!ok){alert(idStr);}else{var s="mailto:joao.vieira@triangulu.pt?subject=";s=s.concat(UTFescape("Pedido Informações Curso "),getValID("I"));s=s.concat("&body=");var b="Exmos Senhores,\n\ndesejo receber mais informações relativas ao curso Refª: ";b=b.concat(getValID("I")," ",getValID("T"),"\n\n");b=b.concat("Junto envio já alguns dos meus dados pessoais: \n");b=b.concat("Empresa: ",getValID("V0"),"\n");b=b.concat("Nome: ",getValID("V1"),"\n");b=b.concat("Morada: ",getValID("V2"),"\n");b=b.concat("Código Postal: ",getValID("V3"),"-",getValID("V3P")," ",getValID("V4"),"\n");b=b.concat("Telefone: ",getValID("V5"),"\n");b=b.concat("Telemóvel: ",getValID("V6"),"\n");b=b.concat("Observações: ",getValID("V7"),"\n");b=b.concat("\n\nCom os meus cumprimentos,\n\n");s=s.concat(UTFescape(b));window.location=s;}}function vldF6(idStr){var ok=(vldID("V0")&&vldID("V1")&&vldID("V2")&&vldID("V3")&&vldID("V4")&&vldID("V5D")&&vldID("V5M")&&vldID("V5Y"));if(!ok){alert(idStr);}else{var s="mailto:joao.vieira@triangulu.pt?subject=";s=s.concat(UTFescape("Candidatura a Formador"));s=s.concat("&body=");var b="Exmos Senhores,\n\ndesejo candidatar-me a formador da vossa empresa.\n\n";b=b.concat("Junto envio os meus dados pessoais: \n");b=b.concat("Nome: ",getValID("V0"),"\n");b=b.concat("Morada: ",getValID("V1"),"\n");b=b.concat("Código Postal: ",getValID("V2"),"-",getValID("V2P")," ",getValID("V3"),"\n");b=b.concat("Telefone: ",getValID("V4"),"\n");b=b.concat("Data Nascimento: ",getValID("V5D"),"/",getValID("V5M"),"/",getValID("V5Y"),"\n");b=b.concat("Disponibilidades: ",getValID("V6"),"\n");b=b.concat("Possui CAP: ");if(isValIDChecked("V7Y")){b=b.concat("Sim\n");}else{b=b.concat("Não\n");}b=b.concat("Observações: ",getValID("V8"),"\n");b=b.concat("Habilitações Académicas: ",getValID("V9"),"\n");b=b.concat("Formação Complementar: ",getValID("V10"),"\n");b=b.concat("Área Profissional: ",getValID("V11"),"\n");b=b.concat("Anos Experiência: ",getValID("V12"),"\n");b=b.concat("Candidatura - Area 1: ",getValID("V13"),"\n");b=b.concat("Candidatura - Area 2: ",getValID("V14"),"\n");b=b.concat("Candidatura - Area 3: ",getValID("V15"),"\n");b=b.concat("Candidatura Motivada por: ");if(isValIDChecked("V16A")){b=b.concat("Espontânea");}else{if(isValIDChecked("V16B")){b=b.concat("Anuncio na Imprensa");}else{if(isValIDChecked("V16C")){b=b.concat("Site Triangulu");}else{b=b.concat("Outros - ",getValID("V16T"));}}}b=b.concat("\n\nEm anexo junto o meu CV.\n\nCom os meus cumprimentos,\n\n\n\n\n\nPor favor não apagar a partir desta linha\n\n");b=b.concat(getValID("V0"),";");b=b.concat(getValID("V1"),";");b=b.concat(getValID("V2"),"-",getValID("V2P"),";");b=b.concat(getValID("V3"),";");b=b.concat(getValID("V4"),";");b=b.concat(getValID("V5D"),"/",getValID("V5M"),"/",getValID("V5Y"),";");b=b.concat(getValID("V6"),";");if(isValIDChecked("V7Y")){b=b.concat("Sim",";");}else{b=b.concat("Não",";");}b=b.concat(getValID("V8"),";");b=b.concat(getValID("V9"),";");b=b.concat(getValID("V10"),";");b=b.concat(getValID("V11"),";");b=b.concat(getValID("V12"),";");b=b.concat(getValID("V13"),";");b=b.concat(getValID("V14"),";");b=b.concat(getValID("V15"),";");if(isValIDChecked("V16A")){b=b.concat("Espontânea");}else{if(isValIDChecked("V16B")){b=b.concat("Anuncio na Imprensa");}else{if(isValIDChecked("V16C")){b=b.concat("Site Triangulu");}else{b=b.concat("Outros - ",getValID("V16T"));}}}s=s.concat(UTFescape(b));window.location=s;}}function vldF7(){var s="mailto:triangulu@triangulu.pt?subject=";s=s.concat(UTFescape("Subscrever NEWSLETTER"));s=s.concat("&body=");var b="Exmos Senhores,\n\ndesejo subscrver a vossa newsletter.\n\n Com os meus cumprimentos,\n\n";s=s.concat(UTFescape(b));window.location=s;}function vldID(idStr){var fld=document.getElementById(idStr);var ok=(fld.value!=null&&fld.value.length>0);var lbl=getLblID(idStr);if(lbl!=null){if(!ok){fld.focus();lbl.className="nvld";}else{lbl.className="j";}}return ok;}function UTFescape(string){if(navigator.appVersion.indexOf("Win")!=-1){return escape(string);}else{string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else{if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}}return escape(utftext);}}function hidePopup(id){if(!document.getElementsByTagName){return;}var el=document.getElementById(id);if(el){el.style.visibility="hidden";}}function hidePopups(){hidePopup("Group");hidePopup("Mission");hidePopup("Vision");var el=document.getElementById("Nav");if(el){for(var i=0;i<el.children.length;i++){if(el.children[i].className=="sel"){el.children[i].className="";}}}el=document.getElementById("NavT");if(el){el.style.visibility="hidden";}}function showPopup(id){hidePopups();if(!document.getElementsByTagName){return;}var el=document.getElementById(id);if(el){el.style.visibility="visible";}el=document.getElementById("NavT");if(el){el.style.visibility="visible";}el=document.getElementById("Nav");if(el){for(var i=0;i<el.children.length;i++){if(el.children[i].children.length>0&&el.children[i].children[0].href.indexOf(id,0)>-1){el.children[i].className="sel";}else{if(el.children[i].className=="sel"){el.children[i].className="";}}}}}function isValIDChecked(idStr){var fld=document.getElementById(idStr);if(fld!=null){return fld.checked;}return null;}function loadNews(){if(!document.getElementsByTagName){return;}if(NHList.length>0){var el=document.getElementById("NewsH");if(el){el.innerHTML=NHList[pos];}el=document.getElementById("NewsP");if(el){el.innerHTML=NPList[pos];}if(NHList.length>1){pos++;el=document.getElementById("NewsC");if(el){el.innerHTML=pos+"/"+NHList.length;}if(pos==NHList.length){pos=0;}setTimeout("loadNews()",10000);}}}function setFooter(){if(!document.getElementsByTagName){return;}var el=document.getElementById("A0");if(el){var ieoffset=0;
if(navigator.userAgent.indexOf("IE")!=-1){if(checkVersion()){ieoffset=-17;}else{ieoffset=2;}}el.style.right=((getWindowWidth()-913-ieoffset)/2)+"px";}el=document.getElementsByTagName("article")[0];var elf=document.getElementsByTagName("footer")[0];if(el&&elf){if((el.offsetTop+el.offsetHeight)>getWindowHeight()){if(navigator.userAgent.indexOf("IE")!=-1){elf.style.bottom="10px";}elf.style.position="relative";}else{elf.style.bottom="-10px";elf.style.position="fixed";}}}function getInternetExplorerVersion(){var rv=-1;if(navigator.appName=="Microsoft Internet Explorer"){var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(navigator.userAgent)!=null){rv=parseFloat(RegExp.$1);}}return rv;}function checkVersion(){var ver=getInternetExplorerVersion();if(ver>-1&&ver<=8){return true;}else{return false;}}function getWindowHeight(){var windowHeight=0;if(typeof(window.innerHeight)=="number"){windowHeight=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight;}}}return windowHeight;}function getWindowWidth(){var windowWidth=0;if(typeof(window.innerWidth)=="number"){windowWidth=window.innerWidth;}else{if(document.documentElement&&document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{if(document.body&&document.body.clientWidth){windowWidth=document.body.clientWidth;}}}return windowWidth;}
