var idDivMessage="";function SetIdDivMessage(id){idDivMessage=id;}
function SetMessage(message){if(idDivMessage != ""){document.getElementById(idDivMessage).innerHTML = message;}}
function OnComCheckUs(args) {
if (args == "0"){
HiddenUs();}}
function OnTimeOutCheckUs(args){}
function OnErrorCheckUs(args){}
var dw = null;
var dlt = null;
var dl = null;
var txtSearchBox = "";
var estado = false;
var idUrlRedirectSearch = "";
function ChangeImageUrl(image, url) {
image.src = url;}
function ChangeImageUrlByID(imageID, url) {
document.getElementById(imageID).src = url;}
function LoadMenu(){
men = document.getElementById("divMenu");
menu = document.getElementById("Menu");
menu.innerHTML = men.innerHTML;
men.innerHTML = "";
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
if ((browser=="Microsoft Internet Explorer") && (version>=4)){
document.getElementById("MainContainer").style.backgroundPosition = "0 76px";
document.getElementById("SearchForm").style.marginTop = "1px";
menu.style.top = "70px";
document.getElementById("divImageHome").style.marginTop = "20px";}else{
document.getElementById("Top").style.backgroundPosition = "960px-1px";}
men.style.display = "none";}
function LoadPageCrv(urlAction, welcomeDiv, loginDiv, logoutDiv, adminDiv){
document.forms['aspnetForm'].action = urlAction;
var c = document.cookie;
dw = document.getElementById(welcomeDiv);
dlt=document.getElementById(logoutDiv);
dl=document.getElementById(loginDiv);
if (c.indexOf("isLogin=True") >-1 && top.location == self.location) {
dw.style.display='';
dlt.style.display='';
dl.style.display='none';
var cok=c.split(";");
if(c.indexOf("IsAdmin=True") >-1){
document.getElementById(adminDiv).style.display='';
UICRVacations.Session.CheckUser("True", OnComCheckUs, OnTimeOutCheckUs, OnErrorCheckUs);}else{
UICRVacations.Session.CheckUser("False", OnComCheckUs, OnTimeOutCheckUs, OnErrorCheckUs);}
for(var i=0; i < cok.length; i++){
if(cok[i].indexOf("logName") >-1){
document.getElementById(welcomeDiv).innerHTML="Welcome "+cok[i].replace("logName=","");}}}else{
HiddenUs();}}
function HiddenUs(){
dw.style.display='none';dlt.style.display='none';dl.style.display='';}
function ShowEditItem(url, x, y){
var oWindow = window.radopen(url, "Edit");
oWindow.add_pageLoad(onRadWindowLoad);
oWindow.setSize(x, y);
oWindow.center();}
function ShowPopUp(url, name, h, w){
var newwindow = window.open(url,"popUp",'height='+h+',width='+w+',toolbar=no');
if (window.focus) {newwindow.focus()}}
function onRadWindowLoad(sender, eventArgs){
var cl = sender.get_contentFrame().contentWindow.document.getElementById("close");
if (cl != null){
cl.onclick = function() { parent.window.close(); }}}
function ShowPopUpLiveChat(){
ShowPopUp('http://server.iad.liveperson.net/hc/53376821/?cmd=file&file=visitorWantsToChat&site=53376821&byhref=1%11!Url=http://server.iad.liveperson.net/hcp/Gallery/ChatButton-Gallery/English/General/1a','Live Chat',600, 400);}
function signUp(){
var f = document.getElementById("aspnetForm");
f.target = "_new";
f.action="http://visitor.constantcontact.com/d.jsp";
f.submit();
return false;}
function GoSearch(){
text = document.getElementById(txtSearchBox);
if(text != null){
text = text.value;
if( text != null){
if(idUrlRedirectSearch != null){
document.location.href = idUrlRedirectSearch+'search.aspx?q='+text;}else{
document.location = 'search.aspx?q='+text ;}}}}
function validarSearchBoxEnter(e,strUrlToSearch, strIdSearch){
tecla = (document.all) ? e.keyCode : e.which;
txtSearchBox =  strIdSearch;
idUrlRedirectSearch = strUrlToSearch;
if (tecla == 13) {
if (document.getElementById(strIdSearch).value != ""){
GoSearch();}
return false;} else {
return true;}}
function validarEventToSearch(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 13){
return true;}else {
return false;}}
function validarNewsletterBoxEnter(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 13) {
signUp();
return false;} else {
return true;}}
