function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function fontIncrease(){document.body.style.fontSize = "70%";}
function fontDiscrease(){document.body.style.fontSize = "50%";}


function getElementsByBaseTagClass(base, tag, className) { 
    var classPat = new RegExp('\\b'+className+'\\b'); 
    var nodes = base.getElementsByTagName(tag); 
    var matching = []; 
    for (var i = 0; i < nodes.length; i++) { 
        if (classPat.test(nodes[i].className)) { 
            matching.push(nodes[i]); 
        } 
    } 
	return matching; 
}

function activelink(id,cont) {
	for (i=0; i<cont.length; i++){
			if (i != id)
				cont[i].style.display = "none";
				cont[id].style.display="block";
		}
	}

function highlight(id,linkname) {
	for (i=0;i<linkname.length; i++) {
		if(i!=id)
			linkname[i].style.color = "#000000";
			linkname[i].style.textDecoration = "none";
			linkname[i].style.fontWeight = "bold";
			linkname[i].style.cursor = "pointer";
			
		}
	linkname[id].style.color = "#849219";
	linkname[id].style.textDecoration = "none";
	linkname[id].style.fontWeight = "bold";
	linkname[id].style.cursor = "text";
	radioGroup = MM_findObj('RadioGroup1');
	radioGroup[id].checked = true;

	
} 
		
function changebackground (id,namebg) {
		for (i=0; i<namebg.length; i++) {
			if(i!=id)
				namebg[i].style.backgroundColor = "#a3bf0a";				
			}
		namebg[id].style.backgroundColor = "#eef5ca";
		
}

function changeimage(image,index) {
	nameimage = MM_findObj('photoImg');
	if (index==0)
		nameimage.src = "images/pict_reserv02.jpg";
	else
		nameimage.src = "images/pict_reserv02_select.jpg";	
}



function highlight2(id,linkname) {
	for (i=0;i<linkname.length; i++) {
		if(i!=id)
			linkname[i].style.color = "#000000";
			linkname[i].style.textDecoration = "none";
			linkname[i].style.fontWeight = "bold";
			linkname[i].style.cursor = "pointer";
			
		}
	linkname[id].style.color = "#1a93b6";
	linkname[id].style.textDecoration = "none";
	linkname[id].style.fontWeight = "bold";
	linkname[id].style.cursor = "text";
	radioGroup = MM_findObj('RadioGroup1');
	radioGroup[id].checked = true;

	
} 
		
function changebackground2 (id,namebg) {
		for (i=0; i<namebg.length; i++) {
			if(i!=id)
				namebg[i].style.backgroundColor = "#8cc9da";				
		}
		namebg[id].style.backgroundColor = "#eef5f0";
		
}

function changeimage2(image,index) {
	nameimage = MM_findObj('photoImg');
	if (index==0)
		nameimage.src = "images/pict_reserv01.jpg";
	else
		nameimage.src = "images/pict_reserv01_select.jpg";	
}

function setDocHeight(id) {	
	divObj=document.getElementById(id);
	self.resizeTo(550,divObj.offsetHeight+30);
	self.moveTo(screen.width/4,screen.height/8);
}


function hiliSlide (id, num) {
	im1="url(../passagers/images/icon_close.gif) no-repeat right center";	//Blue
	im2="url(../passagers/images/icon_close2.gif) no-repeat right center"; //Pink
	if (!num || num==2) im=im2;
	else if (num==1)	im=im1;
	if (id.style.textDecoration=="underline" || id.style.textDecoration=="" ) {
		id.style.background=im;
		id.style.textDecoration="none";
	} else {
	
		id.style.backgroundImage="";
		id.style.textDecoration="";
	}
	

}

function switchSlide(Arr) {
	for (i=0;i<Arr.length; i++) {
			Arr[i].style.display = "none";
	}
}

