<!--
function openTarget (form, windowName) {
  if (!windowName)
  windowName = 'formTarget' + (new Date().getTime());
  form.target = windowName;
  open ('', windowName, 'width=500,height=380,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no');
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function ss(w){window.status=w;return true;}

function showhide() {
var tr, i = 0, table = document.getElementById('campaigns');
var toggles = table.getElementsByTagName('tr');
while (tr = toggles.item(i++))
if (tr.className == 'sources') { if(tr.style.display == 'block') { tr.style.display = 'none'; } else { tr.style.display = 'block'; }  }
}

// JavaScript Document
function addBookmark (title, url) {
if (document.all) window.external.AddFavorite(url, title);
else if (window.sidebar) window.sidebar.addPanel(title, url, "")
 }

/// INI CONTACTOS

function submeterNewsletter (button) {
	
 // Processar dados : AJAX
	if($('ajaxmsg')!=null) { $('ajaxmsg').remove(); }
	new Insertion.After ($(button).id, '<div id="ajaxmsg" style="font-size:10px; clear:both"><img src="/images/waitstatus.gif" alt="Please wait..." width="16" height="16" style="vertical-align:middle" id="waitstatus" /></div>')
 
    var idnews    = 1;
	var idcountry = 0;
    var nome      = $F('nome_news');
	var email     = $F('email_news');
 
	var url  = '/includes/ajax_newsletter.inc.php';
	var pars = 'newsletter_action=subscribe&idnews='+idnews+'&nome='+nome+'&email='+email+'&idcountry='+idcountry;
	
	//urchinTracker('/novo_registo_newsletter');
	
	if ( (nome == 'Insira o seu nome')||(email == 'Insira o seu email') ) { $('ajaxmsg').update(''); return; };
	
	var myAjax = new Ajax.Updater(
			{success: 'ajaxmsg'},  
			url, 
			{
				method: 'post', 
				parameters: pars,
				onFailure: reportError
			});
 
}

function submeterContacto () {
	
 // Processar dados : AJAX
 Element.hide('cb_form'); 
 Element.show('cb_ajaxwait');
 
 var params = Form.serialize('form_contact');
 var url  = '/includes/ajax_sendform.inc.php';
 var action = 'send';
 var pars = 'action='+action+'&'+params;
	
 //urchinTracker('/formulario/' + action);
		
 var myAjax = new Ajax.Updater(
			{success: 'cb_ajaxwait'},  
			url, 
			{
				method: 'post', 
				parameters: pars,
				onFailure: reportError
 });
	
 return false;
}
function reportError () { alert('Sorry. There was an error.'); }

/// FIM CONTACTOS

// -->
