
function initMaps() {
	if (document.getElementById) {
		var mapIds = initMaps.arguments;			// pass string IDs of containing map elements
		var i, j, area, areas;
		for (i = 0; i < mapIds.length; i++) {
			areas = document.getElementById(mapIds[i]).getElementsByTagName("area");
	
			for (j = 0; j < areas.length; j++) {	// loop thru img elements
				area = areas[j];
							// set event handlers
				area.onmouseout = imgSwap;
				area.onmouseover = imgSwap;
				
			}
		}
	}
}


// image swapping event handling
function imgSwap(evt) {
	evt = (evt) ? evt : event;
	var elem = (evt.target) ? evt.target : evt.srcElement;
	var imgClass = elem.parentNode.name;
	var coords = elem.coords.split(",");
	var clipVal = "rect(" + coords[1] + "px " +
							coords[2] + "px " +
							coords[3] + "px " +
							coords[0] + "px)";
	var imgStyle;
	
	switch (evt.type) {
		case "mousedown" :
			imgStyle = document.getElementById(imgClass + "Down").style;
			imgStyle.clip = clipVal;
			imgStyle.visibility = "visible";
			break;
		case "mouseout" :
			document.getElementById(imgClass + "Over").style.visibility = "hidden";
			break;
		case "mouseover" :
			imgStyle = document.getElementById(imgClass + "Over").style;
			imgStyle.clip = clipVal;
			imgStyle.visibility = "visible";
			break
		case "mouseup" :
			// guarantee click in IE
			if (elem.click) {
				elem.click();
			}
			break;
	}
	evt.cancelBubble = true;
	return false;
}


function popup()
{
	window.open('/how_it_works/','how','status=no,location=no,width=760,height=645,left=20,top=70');
}


function openWindow(url, name, width, height, scroll) {
		  popupWin = window.open(url, name, ',width=' + width + ',height=' + height +  ',scrollbars=' + scroll + ',status=no,location=no,resizable=no,left=25,right=25');
		  popupWin.focus();
		  }

		  

function changeImage (indexNum) {
   if (indexNum == 1) document.images.image01.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 2) document.images.image02.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 3) document.images.image03.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 4) document.images.image04.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 5) document.images.image05.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 6) document.images.image06.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 7) document.images.image07.src="../images/sub_nav_arrow_on.gif";
   if (indexNum == 8) document.images.image08.src="../images/sub_nav_arrow_on.gif";
   }		  
	
	
		  
		  


var array_map=new Array();
array_map[0]='RPT1';
array_map[1]='RPT2';
array_map[2]='RPT3';
array_map[3]='RPT4';
array_map[4]='RPT5';

function showhide(){

var array_key=document.menu.RPT_TYPE.options.selectedIndex;

var id_selectat=array_map[array_key];//obtine id-ul div-ului in functie de index

document.getElementById(id_selectat).style.visibility='visible';

//ascunde toate divurile mai putin cel selectat din index
 for(var i=0;i<document.menu.RPT_TYPE.length;i++){
   
   var id_menu=array_map[i];
   
   if(id_menu==id_selectat) continue;//sari peste div-ul selectat
   document.getElementById(id_menu).style.visibility='hidden';
   
 }

}