window.onload = function(){
	setColumn();
	
	boletin = $('boletin');
	if(boletin) {
    Event.observe(boletin, 'mouseover', function(event) {
      boletin.style.backgroundImage = 'url(/images/box-boletin-over.jpg)';
    }); 
    Event.observe(boletin, 'mouseout', function(event) {
      boletin.style.backgroundImage = 'url(/images/box-boletin.jpg)';
    }); 
  }

	hu_boletin = $('boletin_hu');
	if(hu_boletin) {
    Event.observe(hu_boletin, 'mouseover', function(event) {
      hu_boletin.style.backgroundImage = 'url(/images/box-hirlevel-over.jpg)';
    }); 
    Event.observe(hu_boletin, 'mouseout', function(event) {
      hu_boletin.style.backgroundImage = 'url(/images/box-hirlevel.jpg)';
    }); 
  }
  
	en_boletin = $('boletin_en');
	if(en_boletin) {
    Event.observe(en_boletin, 'mouseover', function(event) {
      en_boletin.style.backgroundImage = 'url(/images/box-newsletter-over.jpg)';
    }); 
    Event.observe(en_boletin, 'mouseout', function(event) {
      en_boletin.style.backgroundImage = 'url(/images/box-newsletter.jpg)';
    }); 
  }
  
  contactus = $('contact_us');
	if(contactus) {
    Event.observe(contactus, 'mouseover', function(event) {
      contactus.style.backgroundImage = 'url(/images/box-contactus-over.jpg)';
    }); 
    Event.observe(contactus, 'mouseout', function(event) {
      contactus.style.backgroundImage = 'url(/images/box-contactus.jpg)';
    }); 
  }
  
  kapcsolat = $('kapcsolat');
	if(kapcsolat) {
    Event.observe(kapcsolat, 'mouseover', function(event) {
      kapcsolat.style.backgroundImage = 'url(/images/box-kapcsolat-over.jpg)';
    }); 
    Event.observe(kapcsolat, 'mouseout', function(event) {
      kapcsolat.style.backgroundImage = 'url(/images/box-kapcsolat.jpg)';
    }); 
  }

	tajekoztato = $('tajekoztato');
	if(tajekoztato) {
    Event.observe(tajekoztato, 'mouseover', function(event) {
      tajekoztato.style.backgroundImage = 'url(/images/box-tajekoztato-over.jpg)';
    }); 
    Event.observe(tajekoztato, 'mouseout', function(event) {
      tajekoztato.style.backgroundImage = 'url(/images/box-tajekoztato.jpg)';
    }); 
  }

	guide = $('guide');
	if(guide) {
    Event.observe(guide, 'mouseover', function(event) {
      guide.style.backgroundImage = 'url(/images/box-guide-over.jpg)';
    }); 
    Event.observe(guide, 'mouseout', function(event) {
      guide.style.backgroundImage = 'url(/images/box-guide.jpg)';
    }); 
  }
  
	guia = $('guia');
	if(guia) {
    Event.observe(guia, 'mouseover', function(event) {
      guia.style.backgroundImage = 'url(/images/box-guia-over.jpg)';
    }); 
    Event.observe(guia, 'mouseout', function(event) {
      guia.style.backgroundImage = 'url(/images/box-guia.jpg)';
    }); 
  }

	contacto = $('contacto');
	if(contacto) {
    Event.observe(contacto, 'mouseover', function(event) {
      contacto.style.backgroundImage = 'url(/images/box-contacto-over.jpg)';
    }); 
    Event.observe(contacto, 'mouseout', function(event) {
      contacto.style.backgroundImage = 'url(/images/box-contacto.jpg)';
    }); 
  }
  
  s_guia = $('guia-short');
  if(s_guia) {
	  Event.observe(s_guia, 'mouseover', function(event) {
		  s_guia.style.backgroundImage = 'url(/images/guia-es-over.jpg)';
	  }); 
	  Event.observe(s_guia, 'mouseout', function(event) {
		  s_guia.style.backgroundImage = 'url(/images/guia-es-out.jpg)';
	  }); 
  }
  
  s_boletin = $('boletin-short');
  if(s_boletin) {
	  Event.observe(s_boletin, 'mouseover', function(event) {
		  s_boletin.style.backgroundImage = 'url(/images/boletin-es-over.jpg)';
	  }); 
	  Event.observe(s_boletin, 'mouseout', function(event) {
		  s_boletin.style.backgroundImage = 'url(/images/boletin-es-out.jpg)';
	  }); 
  }

 e_boletin = $('boletin-en-short');
  if(e_boletin) {
	  Event.observe(e_boletin, 'mouseover', function(event) {
		  e_boletin.style.backgroundImage = 'url(/images/boletin-en-over.jpg)';
	  }); 
	  Event.observe(e_boletin, 'mouseout', function(event) {
		  e_boletin.style.backgroundImage = 'url(/images/boletin-en-out.jpg)';
	  }); 
  }
  
 hu_boletin_s = $('boletin-hu-short');
  if(hu_boletin_s) {
	  Event.observe(hu_boletin_s, 'mouseover', function(event) {
		  hu_boletin_s.style.backgroundImage = 'url(/images/nletter-hu-over.jpg)';
	  }); 
	  Event.observe(hu_boletin_s, 'mouseout', function(event) {
		  hu_boletin_s.style.backgroundImage = 'url(/images/nletter-hu-out.jpg)';
	  }); 
  }
  
  h_guia = $('guia-hu-short');
  if(h_guia) {
	  Event.observe(h_guia, 'mouseover', function(event) {
		h_guia.style.backgroundImage = 'url(/images/guia-hu-over.jpg)';
	  }); 
	  Event.observe(h_guia, 'mouseout', function(event) {
		h_guia.style.backgroundImage = 'url(/images/guia-hu-out.jpg)';
	  });
  }
  
  e_guia = $('guia-en-short');
  if(e_guia) {
	  Event.observe(e_guia, 'mouseover', function(event) {
		e_guia.style.backgroundImage = 'url(/images/guia-en-over.jpg)';
	  }); 
	  Event.observe(e_guia, 'mouseout', function(event) {
		e_guia.style.backgroundImage = 'url(/images/guia-en-out.jpg)';
	  });
  }
  
  callus = $('callus-short');
  if(callus) {
	  Event.observe(callus, 'mouseover', function(event) {
		callus.style.backgroundImage = 'url(/images/callus-hu-over.jpg)';
	  }); 
	  Event.observe(callus, 'mouseout', function(event) {
		callus.style.backgroundImage = 'url(/images/callus-hu-out.jpg)';
	  }); 
  }

  s_contacto = $('contacto-short');
  if(s_contacto) {
	  Event.observe(s_contacto, 'mouseover', function(event) {
		  s_contacto.style.backgroundImage = 'url(/images/contact-over.jpg)';
	  }); 
	  Event.observe(s_contacto, 'mouseout', function(event) {
		  s_contacto.style.backgroundImage = 'url(/images/contact-out.jpg)';
	  }); 
  }
  
  s_contacto_2 = $('contacto-short-2');
  if(s_contacto_2) {
	  Event.observe(s_contacto_2, 'mouseover', function(event) {
		  s_contacto_2.style.backgroundImage = 'url(/images/contact-over.jpg)';
	  }); 
	  Event.observe(s_contacto_2, 'mouseout', function(event) {
		  s_contacto_2.style.backgroundImage = 'url(/images/contact-out.jpg)';
	  }); 
  }
  
  e_contacto = $('contacto-en-short');
  if(e_contacto) {
	  Event.observe(e_contacto, 'mouseover', function(event) {
		  e_contacto.style.backgroundImage = 'url(/images/contact-en-over.jpg)';
	  }); 
	  Event.observe(e_contacto, 'mouseout', function(event) {
		  e_contacto.style.backgroundImage = 'url(/images/contact-en-out.jpg)';
	  }); 
  }
  
  e_contacto_2 = $('contacto-en-short-2');
  if(e_contacto_2) {
	  Event.observe(e_contacto_2, 'mouseover', function(event) {
		  e_contacto_2.style.backgroundImage = 'url(/images/contact-en-over.jpg)';
	  }); 
	  Event.observe(e_contacto_2, 'mouseout', function(event) {
		  e_contacto_2.style.backgroundImage = 'url(/images/contact-en-out.jpg)';
	  }); 
  }
  
  /*
  submit_guia = $('submit-guia-sp');
  if(submit_guia) {
	  Event.observe(submit_guia, 'mouseover', function(event) {
		  submit_guia.style.backgroundImage = 'url(/images/send-es-over.gif)';
	  }); 
	  Event.observe(submit_guia, 'mouseout', function(event) {
		  submit_guia.style.backgroundImage = 'url(/images/send-es-out.gif)';
	  }); 
  }
  
  submit_guia_hu = $('submit-guia-hu');
  if(submit_guia_hu) {
	  Event.observe(submit_guia_hu, 'mouseover', function(event) {
		  submit_guia_hu.style.backgroundImage = 'url(/images/send-hu-over.gif)';
	  }); 
	  Event.observe(submit_guia_hu, 'mouseout', function(event) {
		  submit_guia_hu.style.backgroundImage = 'url(/images/send-hu-out.gif)';
	  }); 
  }*/
  
}

function setColumn(){
	if ( Element.getHeight('c-right') < Element.getHeight('c-left') ){
		$('c-right').style.height = Element.getHeight('c-left') + 'px';	
	}
	else
	{
		$('c-left').style.height = Element.getHeight('c-right') + 'px';	
		}
}

function showContacto(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('contacto-layer').style.display = 'block';
}

function showTelefono(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('telefono-layer').style.display = 'block';
}

function showSituacion(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('situacion-layer').style.display = 'block';
}

function showGuia(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('guia-layer').style.display = 'block';
}

function showGuide(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('guide-layer').style.display = 'block';
}

function showTajekoztato(){
	$('overlay').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay', { duration: overlayDuration, from: 0.0, to: overlayOpacity });
	$('tajekoztato-layer').style.display = 'block';
}

function showEmail(){
	$('overlay2').style.height = document.body.clientHeight + 'px';
	hideFlash();
	new Effect.Appear('overlay2', { duration: 0.2, from: 0.0, to: 0.8 });
	$('confirm-email').style.display = 'block';
}

function hideEmail(){
		new Effect.Fade('overlay2', { duration: 0.2 });
		showFlash();
		$('confirm-email').style.display = 'none';
}

function hideAll(){
		if ( $('contacto-layer') ){ $('contacto-layer').style.display = 'none';}
		if ( $('telefono-layer') ){ $('telefono-layer').style.display = 'none';}
		if ( $('situacion-layer') ){ $('situacion-layer').style.display = 'none';}
		if ( $('guia-layer') ){ $('guia-layer').style.display = 'none'; }
		if ( $('guide-layer') ){ $('guide-layer').style.display = 'none'; }
		if ( $('tajekoztato-layer') ){$('tajekoztato-layer').style.display = 'none'; }
		if ( $('confirm-email') ){$('confirm-email').style.display = 'none'; }
		
		new Effect.Fade('overlay', { duration: overlayDuration});
		showSelectBoxes();
		showFlash();
}

