// ActionScript Document

function panel(URL)
{ 
  window.open(URL,"ventana1","width=510, height=430, scrollbars=yes, menubar=no, location=no, resizable=no")   
} 


var currentBoxNum = 1; 
  	var layerPreffix = "promo_box_";
  	var tabImgPreffix = "promo_tab_";
  	var imgDir = "images/";
 
 function getEl (id) {
	var obj = null;
	if (!document.getElementById) return false;
	if (!(obj =document.getElementById(id))) return false;
	return obj;
}
 
function swapBox (num) {
	if (num == currentBoxNum) return;
	var currentBox, newBox, tabImg;
	if ((currentBox = getEl(layerPreffix + currentBoxNum)))  currentBox.style.display = "none";
	if ((newBox = getEl(layerPreffix + num)))  newBox.style.display = "block";
	currentBoxNum = num;
	
}

var imgPreloadString = '';
for (var i=1; i<=3; i++) {
	for (var j=1; j<=3; j++) {
		if (imgPreloadString != '') imgPreloadString += ',';
		imgPreloadString += '\'' + imgDir + 'pro_' + i + '_' + j+ '.gif';
	}
} 


