

function externalLinks() { 
	 if (!document.getElementsByTagName) return; 
	 var anchors = document.getElementsByTagName("a"); 
	 for (var i=0; i<anchors.length; i++) { 
	  
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && 
			anchor.getAttribute("rel") == "external") {
		  	anchor.target = "_blank";
		}
	 
	 	if (anchor.getAttribute("rel") == "popup") {
			anchor.onclick = function () {
				window.open(this.href,'newWindow','width=50,height=50');return false;
		 	}
		}
	 	
		if (!document.getElementsByTagName) return; 
		var anchors = document.getElementsByTagName("input"); 
		for (var i=0; i<anchors.length; i++) { 
			var anchor = anchors[i]; 
			
			if ( anchor.getAttribute("id") == "field_search") {
					anchor.onfocus = function(){
					//this.select();
					this.value='';
				}
			}
		} 
	 
	 } 
} 





	
	



_LOADERSRisico = Array();

function callAllLoaders() {
	var i, loaderFunc;
	for(i=0;i<_LOADERSRisico.length;i++) {
		loaderFunc = _LOADERSRisico[i];
		if(loaderFunc != callAllLoaders) loaderFunc();
	}
}


function appendLoader(loaderFunc) {
	if(window.onload && window.onload != callAllLoaders)
		_LOADERSRisico[_LOADERSRisico.length] = window.onload;

	window.onload = callAllLoaders;

	_LOADERSRisico[_LOADERSRisico.length] = loaderFunc;
}






//appendLoader(writelettersize);
appendLoader(externalLinks);

