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;
		 	}
		}
	 
	 
	 } 
} 


function columnHeight(){
	if (document.getElementById) {
		// the divs array contains references to each column's div element.  
		// Replace 'center' 'right' and 'left' with your own.  
		// Or remove the last one entirely if you've got 2 columns.  Or add another if you've got 4!
		var divs = new Array(document.getElementById('subNavigationArea'), document.getElementById('primaryContentArea'), document.getElementById('secondaryContentArea'));
		
		// Let's determine the maximum height out of all columns specified
		var maxHeight = 0;
		for (var i = 0; i < divs.length; i++) {
			if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;
		}
		
		// Let's set all columns to that maximum height
		for (var i = 0; i < divs.length; i++) {
			divs[i].style.height = maxHeight + 'px';

			// Now, if the browser's in standards-compliant mode, the height property
			// sets the height excluding padding, so we figure the padding out by subtracting the
			// old maxHeight from the new offsetHeight, and compensate!  So it works in Safari AND in IE 5.x
			if (divs[i].offsetHeight > maxHeight) {
				divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';
			}
		}
			document.getElementById('footerArea').style.display='block';
			
			maxHeight = maxHeight + 235;
			
			document.getElementById('footerArea').style.top=parseInt(maxHeight)+"px"; 
		
		
	}
}

function columnHeightTwo(){
	if (document.getElementById) {
		// the divs array contains references to each column's div element.  
		// Replace 'center' 'right' and 'left' with your own.  
		// Or remove the last one entirely if you've got 2 columns.  Or add another if you've got 4!
		var divs = new Array(document.getElementById('productText'), document.getElementById('productImageBox'));
		
		// Let's determine the maximum height out of all columns specified
		var maxHeight = 0;
		for (var i = 0; i < divs.length; i++) {
			if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;
		}
		
		// Let's set all columns to that maximum height
		for (var i = 0; i < divs.length; i++) {
			divs[i].style.height = maxHeight + 'px';

			// Now, if the browser's in standards-compliant mode, the height property
			// sets the height excluding padding, so we figure the padding out by subtracting the
			// old maxHeight from the new offsetHeight, and compensate!  So it works in Safari AND in IE 5.x
			if (divs[i].offsetHeight > maxHeight) {
				divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';
			}
		}		
	}
}




_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(columnHeight);
//appendLoader(columnHeightTwo);
// appendLoader(writelettersize);
// appendLoader(externalLinks);


