 function mapping(lat,lon,name) {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById('gmap2'));
        map.setMapType(G_SATELLITE_MAP);
        map.removeMapType(G_HYBRID_MAP);
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(lat, lon), 16);
        // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        // Creates a marker whose info window displays the letter corresponding
        // to the given index.
        function createMarker(point,index,name) {  
        // Create a lettered icon for this point using our icon class  
        var letter = String.fromCharCode("A".charCodeAt(0) + index);
        var letteredIcon = new GIcon(baseIcon);
        letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
        // Set up our GMarkerOptions object  
        markerOptions = { icon:letteredIcon };
        var marker = new GMarker(point, markerOptions);
        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<b>"+name+"</b>");
              });  return marker;}

               var point = new GLatLng(lat,lon);
               map.addOverlay(createMarker(point,7,name));}
    }

function flights(n,link,sor,tt) { 
  
       	var fhttpRequest=null;
        if (window.XMLHttpRequest) {
            fhttpRequest = new XMLHttpRequest();
            if (fhttpRequest.overrideMimeType) {
                fhttpRequest.overrideMimeType('text/xml');
               
            }
        } 
        else if (window.ActiveXObject) { 
            try {
                fhttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                fhttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }
									         if (!fhttpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            
        }
        if (n==1){
        var locat='flights.htm';}
        if (n==2){
        var locat='cars.htm';}	
        if (n==3){
        var locat='about.htm';}
        if (n==4){
        var locat='guest.asp';}  
        if (n==5){
        var locat='featured.asp';} 
        if (n==6){
        var locat='destinations.asp';}  
        if (n==7){
        var locat='news.asp';} 
        if (n==8){
        var locat='termscond.htm';} 
        if (n==9){
        var locat='search_result.asp?cou='+link+'&res='+sor;}
        if (n==10){
        var locat='privacy.htm';}
        if (n==11){
        var locat='destsearch.asp?searchstr='+link+'&sor='+sor;}
        if (n==12){
        var locat='details.asp?hid='+link;}  
        if (n==13){
        var locat='dest.asp'}
        if (n==14){
        var locat='contact.asp?name='+escape(link)+'&mail='+escape(sor)+'&com='+escape(tt);}
        if (n==15){
        var locat='belgradesearch.asp';}
        if (n==16){
        var locat='athensearch.asp';}
        if (n==17){
        var locat='corfusearch.asp';}
                 
        fhttpRequest.onreadystatechange = function() { alertf(fhttpRequest,n,tt); };
        fhttpRequest.open('GET', locat, true);
        fhttpRequest.send('');        
    }
    function alertf(fhttpRequest,n,tt) {
        if (fhttpRequest.readyState == 4) {
            if (fhttpRequest.status == 200) {            
                var fxmlDocument = fhttpRequest.responseText; 
             if (n==1){                
		     document.getElementById('content').innerHTML =fxmlDocument;
		     flights(4);flights(7);}   
             if (n==2){                
		     document.getElementById('content').innerHTML =fxmlDocument;}
		     if (n==3){
             document.getElementById('central_console').innerHTML =fxmlDocument;}   
             if (n==4){
             document.getElementById('updates').innerHTML =fxmlDocument;}
             if (n==5) {
             document.getElementById('featured').innerHTML =fxmlDocument;}             
             if (n==6){                
		     document.getElementById('top_destinations').innerHTML =fxmlDocument;}	
		     if (n==7){                
		     document.getElementById('updates2').innerHTML =fxmlDocument;}	
		     if (n==8){
             document.getElementById('central_console').innerHTML =fxmlDocument;}  
             if (n==9){
             document.getElementById('central').innerHTML =fxmlDocument;
             wait(tt);               
             }
             if (n==10){
             document.getElementById('central_console').innerHTML =fxmlDocument;} 
             if (n==11){
             document.getElementById('hotels').innerHTML =fxmlDocument;}
             if (n==12){
             document.getElementById('hotels').innerHTML =fxmlDocument;}
             if (n==13){
             document.getElementById('central_console').innerHTML =fxmlDocument;}
             if (n==14){
             document.getElementById('sent').innerHTML ='Your message has been sent. Thank you.';}
             if (n==15){
             document.getElementById('hotels').innerHTML =fxmlDocument;}
             if (n==16){
             document.getElementById('hotels').innerHTML = fxmlDocument;}
             if (n==17){
             document.getElementById('hotels').innerHTML = fxmlDocument;}
             }else {
                alert('There was a problem with the requested query.');
            }
            
        }

    }

function wait(tt){
    var hht='<br /><div align="center"><p><img src="logo.gif" alt="ionianhotels" width="152" height="124" /></p>'
             hht=hht+'<p>&nbsp;</p><p><strong><font color="#27457B" size="3" face="Arial, Helvetica, sans-serif">'
             hht=hht+tt+'</font> </strong></p><p>&nbsp;</p><p>'
             hht=hht+'<img src="images/loading.gif" width="128" height="15" /></p><p>&nbsp;</p><br /><br /><p></p>'
             document.getElementById('hotels').innerHTML =hht;
    }

function GetHotel(ourl) { 
        
    	var ghhttpRequest=null;
        if (window.XMLHttpRequest) {
            ghhttpRequest = new XMLHttpRequest();
            if (ghhttpRequest.overrideMimeType) {
                ghhttpRequest.overrideMimeType('text/xml');
               
            }
        } 
        else if (window.ActiveXObject) { 
            try {
                ghhttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                ghhttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }
									         if (!ghhttpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            
        }		
        ghhttpRequest.onreadystatechange = function() { alertgh(ghhttpRequest); };
        ghhttpRequest.open('GET', ourl, true);
        ghhttpRequest.send('');     
           
    }
    function alertgh(ghhttpRequest) {
        if (ghhttpRequest.readyState == 4) {
            if (ghhttpRequest.status == 200) {            
                var ghxmlDocument = ghhttpRequest.responseText; 
                                        
                var resp=ghxmlDocument /*+"<div id='costbreak' style='border: 1px solid #C0C0C0; position: absolute; visibility: hidden; background-color:#FFFFE6; width: 105px; height: 30px; font-family: Arial, Helvetica, sans-serif; font-size: x-small; color: #000000; text-align: center;'></div>"*/

		     document.getElementById('hotels').innerHTML =resp;
		     /*}*/		     
		    }else {
                alert('There was a problem with the request.');
            }            
        }
    }
function locations(n,nn) { 
    dd.Clear('selRes')
    /*show('divResort')*/
    	var ohttpRequest=null;
        if (window.XMLHttpRequest) {
            ohttpRequest = new XMLHttpRequest();
            if (ohttpRequest.overrideMimeType) {
                ohttpRequest.overrideMimeType('text/xml');
               
            }
        } 
        else if (window.ActiveXObject) { 
            try {
                ohttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                ohttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }
		if (!ohttpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
        }
        var locat='locations.asp?cid='+n+'&size='+nn;
        ohttpRequest.onreadystatechange = function() { alertlocation(ohttpRequest); };
        ohttpRequest.open('GET', locat, true);
        ohttpRequest.send('');        
    }
    function alertlocation(ohttpRequest) {
        if (ohttpRequest.readyState == 4) {
            if (ohttpRequest.status == 200) {            
                var oxmlDocument = ohttpRequest.responseText;                 
		     document.getElementById('valResort').innerHTML =oxmlDocument;
		    }else {
                alert('There was a problem with the request.');
            }            
        }
    }

function start(nn){
/*if (nn!==2){
  hide('divR1C');
  hide('divACId')    
  hide('divACIt')    
  hide('divACIc')   
 hide('divR2C')
 hide('divR3C')
 hide('divR4C')
 }*/

     
    	var ophttpRequest=null;
        if (window.XMLHttpRequest) {
            ophttpRequest = new XMLHttpRequest();
            if (ophttpRequest.overrideMimeType) {
                ophttpRequest.overrideMimeType('text/xml');
               
            }
        } 
        else if (window.ActiveXObject) { 
            try {
                ophttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e) {
                           try {
                                ophttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
                               } 
                             catch (e) {}
                          }
                                       }
									         if (!ophttpRequest) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            
        }		
        
        ophttpRequest.onreadystatechange = function() { alertHotel(ophttpRequest,nn); };
        ophttpRequest.open('GET', 'countries.asp?lan=en', true);        
        ophttpRequest.send('');        
    }
    function alertHotel(ophttpRequest,nn) {
        if (ophttpRequest.readyState == 4) {
            if (ophttpRequest.status == 200) {            
                var opxmlDocument = ophttpRequest.responseText;                 
             if (nn==1){var sty='style6A';var siz=1}else{var sty='style21';var siz=2};
             var ss2="<select id='selCou' class='"+sty+"' name='selCou' onchange='locations(this.value,"+siz+");'>" + opxmlDocument + "</select>";
		     document.getElementById('valCountry').innerHTML = ss2; 
		     
		    }else {
                alert('There was a problem with the request.');
            }
            
        }
 }

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_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_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 mapp(lat,lon,zoo,chk,cou) {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("gmap"));
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(lat, lon), zoo);
        map.setMapType(G_NORMAL_MAP);
        var tinyIcon = new GIcon();
        tinyIcon.image = "http://www.medestino.com/images/mm_orange.png";
        tinyIcon.shadow = "http://www.medestino.com/images/mm_shadow.png";
        tinyIcon.iconSize = new GSize(20, 17);
        tinyIcon.shadowSize = new GSize(33, 18);
        tinyIcon.iconAnchor = new GPoint(13, 20);
        tinyIcon.infoWindowAnchor = new GPoint(10, 1);
        // Creates a marker whose info window displays the letter corresponding
        // to the given index.
        function createMarker(point,country,la,lo,zu,n,cou) {  
        // Create a lettered icon for this point using our icon class  
        // Set up our GMarkerOptions object  
        markerOptions = { icon:tinyIcon };
        var marker = new GMarker(point,markerOptions);
        
        GEvent.addListener(marker, "click", function() {mapp(la,lo,zu,n,cou);});
        GEvent.addListener(marker, "mouseover", function() {marker.openInfoWindowHtml("<b>"+country+"</b>", { maxWidth:100});});
        GEvent.addListener(marker, "mouseout", function() {marker.closeInfoWindow();});
        return marker;}
        
        if (chk=="0"){
        var point1 = new GLatLng(37.7880,23.7304);
        map.addOverlay(createMarker(point1,'Greece',38.1863,24.1918,6,1,1));
        var point2 = new GLatLng(39.909736,32.860107);
        map.addOverlay(createMarker(point2,'Turkey',39.909736,32.860107,6,1,2));
        var point3 = new GLatLng(46.01985,14.4909);
        map.addOverlay(createMarker(point3,'Slovenia',46.157,14.8535,8,1,3));
        var point4 = new GLatLng(44.7779,20.4785);
        map.addOverlay(createMarker(point4,'Serbia',44.1033,20.6982,7,1,4));
        var point5 = new GLatLng(44.4102,26.0925);
        map.addOverlay(createMarker(point5,'Romania',45.7215,24.9169,6,1,5));
        var point6 = new GLatLng(52.2008,21.0058);
        map.addOverlay(createMarker(point6,'Poland',52.1065,18.9404,5,1,6));
        var point7 = new GLatLng(42.4477,19.2535);
        map.addOverlay(createMarker(point7,'Montenegro',42.6824,19.226,7,1,7));
        var point8 = new GLatLng(47.0064,28.8446);
        map.addOverlay(createMarker(point8,'Moldova',46.9952,28.4106,6,1,8));
        var point9 = new GLatLng(42.0023,21.4288);
        map.addOverlay(createMarker(point9,'FYRMacedonia',41.6318,21.621,7,1,9));
        var point10 = new GLatLng(35.1614,33.3696);
        map.addOverlay(createMarker(point10,'Cyprus',35.1468,33.3105,8,1,10));
        var point11 = new GLatLng(45.7809,15.9741);
        map.addOverlay(createMarker(point11,'Croatia',44.7623,16.2377,6,1,11));
        var point12 = new GLatLng(42.6864,23.3129);
        map.addOverlay(createMarker(point12,'Bulgaria',42.6501,25.4003,6,1,12));
        var point13 = new GLatLng(43.8424,18.4131);
        map.addOverlay(createMarker(point13,'Bosnia and Hercegovina',43.8662,17.5231,7,1,13));
        var point14 = new GLatLng(40.1536,44.5001);
        map.addOverlay(createMarker(point14,'Armenia',40.0781,44.7253,7,1,14));
        }
        if (chk=="1" && cou=="1"){
        var point1 = new GLatLng(37.9572,23.7139);
        map.addOverlay(createMarker(point1,'Athens',37.9572,23.7139,10,2,1));
        var point2 = new GLatLng(39.0959,22.0495);
        map.addOverlay(createMarker(point2,'Central Greece',39.0959,22.0495,10,2,1));  
        var point3 = new GLatLng(39.5781,19.8839);
        map.addOverlay(createMarker(point3,'Corfu',39.5781,19.8839,10,2,1)); 
        var point4 = new GLatLng(35.1873,24.9225);
        map.addOverlay(createMarker(point4,'Crete',35.1873,24.9225,8,2,1));
        var point5 = new GLatLng(37.064,25.4883);
        map.addOverlay(createMarker(point5,'Cyclades',37.064,25.4883,8,2,1)); 
        var point6 = new GLatLng(36.1778,27.8558);
        map.addOverlay(createMarker(point6,'Dodecanesse',36.1778,27.8558,8,2,1)); 
        var point7 = new GLatLng(38.221,20.5993);
        map.addOverlay(createMarker(point7,'Ionian Islands',38.221,20.5993,8,2,1)); 
        var point8 = new GLatLng(39.576,20.885);
        map.addOverlay(createMarker(point8,'Ipirus',39.576,20.885,8,2,1)); 
        var point9 = new GLatLng(40.6264,23.0823);
        map.addOverlay(createMarker(point9,'Macedonia',40.6264,23.0823,8,2,1)); 
        var point10 = new GLatLng(39.2024,25.958);
        map.addOverlay(createMarker(point10,'North Aegean',39.2024,25.958,8,2,1));
        var point11 = new GLatLng(37.4923,22.2803);
        map.addOverlay(createMarker(point11,'Peloponesse',37.4923,22.2803,8,2,1));
        var point12 = new GLatLng(38.0913,23.9776);
        map.addOverlay(createMarker(point12,'Rest of Attica',38.0913,23.9776,8,2,1));
        var point13 = new GLatLng(37.495563,23.361053);
        map.addOverlay(createMarker(point13,'Saronic Islands',37.495563,23.361053,10,2,1));
        var point14 = new GLatLng(39.3173,24.0765);
        map.addOverlay(createMarker(point14,'Sporades Islands',39.3173,24.0765,8,2,1));
        var point15 = new GLatLng(39.576,22.0935);
        map.addOverlay(createMarker(point15,'Thessaly',39.576,22.0935,8,2,1));        
        }
        if (chk=="1" && cou=="2"){
        var point1 = new GLatLng(41.005812,28.97644);
        map.addOverlay(createMarker(point1,'Istanbul',41.005812,28.97644,11,2,1));
        }
        if (chk=="1" && cou=="3"){
        var point1 = new GLatLng(46.051016,14.504142);
        map.addOverlay(createMarker(point1,'Ljubljana',46.051016,14.504142,13,2,1));
        }
        
        if (chk=="1" && cou=="10"){
        var point1 = new GLatLng(35.1603,33.3613);
        map.addOverlay(createMarker(point1,'Nicosia',35.1603,33.3613,15,1,10));
        var point2 = new GLatLng(34.9894,33.9978);
        map.addOverlay(createMarker(point2,'Ayia Napa',34.9894,33.9978,15,1,10));
        var point3 = new GLatLng(34.9884,32.9037);
        map.addOverlay(createMarker(point3,'Kakopetria',34.9884,32.9037,15,1,10));
        var point4 = new GLatLng(34.922,33.6235);
        map.addOverlay(createMarker(point4,'Larnaca',34.922,33.6235,15,1,10));
        var point5 = new GLatLng(34.6858,33.0357);
        map.addOverlay(createMarker(point5,'Limassol',34.6858,33.0357,15,1,10));
        var point6 = new GLatLng(35.1817,32.6844);
        map.addOverlay(createMarker(point6,'Kato Pyrgos',35.1817,32.6844,15,1,10));
        var point7 = new GLatLng(35.0344,32.4259);
        map.addOverlay(createMarker(point7,'Polis',35.0344,32.4259,15,1,10));
        }
        
        }        
    }

var datum=new Date();
var year=datum.getFullYear();
var month=datum.getMonth()+1;
if (month<10){month='0'+month}; 
var day=datum.getDate();
if (day<10){day='0'+day}; 
var dat=month+'/'+day+'/'+year;
datum1=d.AddDays(datum,1)
var year1=datum1.getFullYear();
var month1=datum1.getMonth()+1;
if (month1<10){month1='0'+month1}; 
var day1=datum1.getDate();
if (day1<10){day1='0'+day1}; 
var dat1=month1+'/'+day1+'/'+year1;
var cal11 = new CalendarPopup('from');
cal11.setCssPrefix("TEST");
cal11.setWeekStartDay(1);
cal11.addDisabledDates(null, dat);
cal11.setReturnFunction("setMultipleValues3");
var cal11a = new CalendarPopup('tood');
cal11a.setCssPrefix("TEST");
cal11a.setWeekStartDay(1);
cal11a.addDisabledDates(null, dat1);
cal11a.setReturnFunction("setMultipleValues3a");
var cal11c = new CalendarPopup('from');
cal11c.setCssPrefix("TEST");
cal11c.setWeekStartDay(1);
cal11c.addDisabledDates(null, dat);
cal11c.setReturnFunction("setMultipleValues3c");
var cal11d = new CalendarPopup('tood');
cal11d.setCssPrefix("TEST");
cal11d.setWeekStartDay(1);
cal11d.addDisabledDates(null, dat);
cal11d.setReturnFunction("setMultipleValues3d");

function setMultipleValues3(y,m,d) {
if (m<10){
    m='0'+m};
if (d<10){
    d='0'+d};    
	f.GetObject('optymArrival').value=y+'-'+m;
	calcDan('optymArrival',y+'-'+m);
	f.GetObject('optdArrival').value=d;	
	calcDan('optdArrival',d);
	}
function setMultipleValues3a(y,m,d) {
if (m<10){
    m='0'+m};
if (d<10){
    d='0'+d};    
	f.GetObject('optmyDepart').value=y+'-'+m;
	calcDan('optmyDepart',y+'-'+m);
	f.GetObject('optdDepart').value=d;	
	calcDan('optdDepart',d);
	}
function setMultipleValues3c(y,m,d) {
if (m<10){
    m='0'+m};
if (d<10){
    d='0'+d};    
	f.GetObject('optymArrival2').value=y+'-'+m;
	calcDan2('optymArrival2',y+'-'+m);
	f.GetObject('optdArrival2').value=d;	
	calcDan2('optdArrival2',d);
	}
function setMultipleValues3d(y,m,d) {
if (m<10){
    m='0'+m};
if (d<10){
    d='0'+d};    
	f.GetObject('optmyDepart2').value=y+'-'+m;
	calcDan2('optmyDepart2',y+'-'+m);
	f.GetObject('optdDepart2').value=d;	
	calcDan2('optdDepart2',d);
	}
	
	function child(idm,idv) {
    
    if (idm=="valR1Child") {
        if (idv==0) {
        document.frm.txtR1C1.value='';document.frm.txtR1C2.value='';document.frm.txtR1C3.value='';hide('divR1C');}
        if (idv==1) {
        show('divR1C');document.frm.txtR1C2.value='';document.frm.txtR1C3.value='';show('txtR1C1');hide('txtR1C2');hide('txtR1C3');}
        if (idv==2) {
        show('divR1C');document.frm.txtR1C3.value='';show('txtR1C1');show('txtR1C2');hide('txtR1C3');}
        if (idv==3) {
        show('divR1C');show('txtR1C1');show('txtR1C2');show('txtR1C3');}}    
     if (idm=="valR2Child") {
        if (idv=="0") {
        hide('divR2C');document.frm.txtR2C1.value='';document.frm.txtR2C2.value='';document.frm.txtR2C3.value='';}
        if (idv=="1") {
        show('divR2C');show('txtR2C1');document.frm.txtR2C2.value='';document.frm.txtR2C3.value='';hide('txtR2C2');hide('txtR2C3');}
        if (idv=="2") {
        show('divR2C');show('txtR2C1');show('txtR2C2');document.frm.txtR2C3.value='';hide('txtR2C3');}
        if (idv=="3") {
        show('divR2C');show('txtR2C1');show('txtR2C2');show('txtR2C3');}}   
     if (idm=="valR3Child") {
        if (idv=="0") {
        hide('divR3C');document.frm.txtR3C1.value='';document.frm.txtR3C2.value='';document.frm.txtR3C3.value='';}
        if (idv=="1") {
        show('divR3C');show('txtR3C1');hide('txtR3C2');document.frm.txtR3C2.value='';hide('txtR3C3');document.frm.txtR3C3.value='';}
        if (idv=="2") {
        show('divR3C');show('txtR3C1');show('txtR3C2');hide('txtR3C3');document.frm.txtR3C3.value='';}
        if (idv=="3") {
        show('divR3C');show('txtR3C1');show('txtR3C2');show('txtR3C3');}} 
      if (idm=="valR4Child") {
        if (idv=="0") {
        hide('divR4C');document.frm.txtR4C1.value='';document.frm.txtR4C2.value='';document.frm.txtR4C3.value='';}
        if (idv=="1") {
        show('divR4C');show('txtR4C1');hide('txtR4C2');document.frm.txtR4C2.value='';hide('txtR4C3');document.frm.txtR4C3.value='';}
        if (idv=="2") {
        show('divR4C');show('txtR4C1');show('txtR4C2');hide('txtR4C3');document.frm.txtR4C3.value='';}
        if (idv=="3") {
        show('divR4C');show('txtR4C1');show('txtR4C2');show('txtR4C3');}} 
      if (idm=="optRooms") {
        if (idv==1) {
        hide('divACId');hide('divACIt');hide('divACIc');}
        if (idv==2) {
        show('divACId');hide('divACIt');hide('divACIc');}
        if (idv==3) {
        show('divACId');show('divACIt');hide('divACIc');}
        if (idv==4) {
        show('divACId');show('divACIt');show('divACIc');}}  
        }	