// Funções para Flash, copyright e creative commons licensed, cópia ilicitá terá repercursões judiciais.

function video (url, width, height, background) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="banner" align="middle" >');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="' + url + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="' + background + '" />');
	document.write('<param name="wmode" value="transparent" /></param>');
	document.write('<embed src="' + url + '" quality="high" bgcolor="' + background + '" width="' + width + '" height="' + height + '" name="banner" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/>');
	document.write('</object>');
		}

// Funções para Tracking Encomendas, copyright e creative commons licensed, cópia ilicitá terá repercursões judiciais.
function CTTpopupWindow() 
		{
  		window.open("http://www2.ctt.pt/feapl/jsp/pesqobjectos/public/pesqobjectosresult.jsf?lang=def&trackTrace=" + document.formctt.textfield.value,'popupWindow');
		}

function ChronopopupWindow() 
		{
  		window.open("http://www.pt.chronopost.com/web/pt/tracking/suivi_inter.jsp?listeNumeros=" + document.formchrono.textfield.value,'popupWindow');
		}
			
// Funções para desabilitar selecção de Texto, copyright e creative commons licensed, cópia ilicitá terá repercursões judiciais.	
function disableSelection(target){
		if (typeof target.onselectstart!="undefined") //IE route
			target.onselectstart=function(){return false}
		else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
			target.onmousedown=function(){return false}
			target.style.cursor = "default"
		}


function disableSelection2(target){
		if (typeof target.onselectstart!="undefined") //IE route
			target.onselectstart=function(){return false}
		else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
			target.onmousedown=function(){return false}
			target.style.cursor = "default"
		}
