﻿
//    var map1;
// 
// var markers ;
//  var markersPS ;

// var markersHL ;

// var markersST ;
//  var markersSU ;


    function printing()
    {
        window.print();
        
    }

//    function load()
//     {
//  
//     try
//     {
//     
//      var propTool= document.getElementById("ctl00_cph_hfProptool").value;
//    var locPrimTool= document.getElementById("ctl00_cph_hfPrimtool").value;
//    var locStatTool= document.getElementById("ctl00_cph_hfStattool").value;
//    var locSupTool= document.getElementById("ctl00_cph_hfSuptool").value;
//    var locHospTool= document.getElementById("ctl00_cph_hfHosptool").value;
//   
//         var val1= document.getElementById("ctl00_cph_hLat").value;
//         var val2= document.getElementById("ctl00_cph_hLon").value;
//         var valPrimLat= document.getElementById("ctl00_cph_hPrimLat").value;
//         var valPrimLon= document.getElementById("ctl00_cph_hPrimLon").value;
//         var valStatLat= document.getElementById("ctl00_cph_hStationsLat").value;
//         var valStatLon= document.getElementById("ctl00_cph_hStationsLon").value;
//         var valSecLat= document.getElementById("ctl00_cph_hSecLat").value;
//         var valSecLon= document.getElementById("ctl00_cph_hSecLon").value;
//         var valHospLat= document.getElementById("ctl00_cph_hHospLat").value;
//         var valHospLon= document.getElementById("ctl00_cph_hHospLon").value;
////    alert('Primary'+valPrimLat);
////    alert('Station'+valStatLat);
////    alert('Secondary'+valSecLat);
////    alert('Hospital'+valHospLat);
////    
//       
//       var lsUrl=document.getElementById("ctl00_cph_HFapppath").value+ "/hm/img/property_img.gif";
////           
//             
//       if(map1==null)
//{

//             map1 = new GMap2(document.getElementById("map"));
//            map1.addControl(new GSmallMapControl());
//           
//         if(val1!="" && val2!="")
//         {
//      var arr1 = val1.split(',');
//      var arr2=val2.split(',');
//      
//      
//    
//      if(arr1.length!=0 && arr2.length!=0)
//      { map1.setCenter(new GLatLng(arr1[0],arr2[0]), 13);
//             
//              var icon1 = new GIcon();
//             //icon1.image = lsUrl;
//             icon1.image="/hm/img/big_property_img.png";
//            
//             var point = new GLatLng(arr1[0],arr2[0]);
//             icon1.iconAnchor = new GPoint(10,15);
//              markerOptions = { icon:icon1, title:propTool};
////             map1.addOverlay(new GMarker(point,icon1));
//          map1.addOverlay(new GMarker(point,markerOptions));
//              var i;
//             
////              for(i=1;i<arr1.length;i++)
////              {
////            
////              var point1 = new GLatLng(arr1[i],arr2[i]);
////              icon1.iconAnchor = new GPoint(10, 15);
////              
////              
////              map1.addOverlay(new GMarker(point1,icon));
////              }              
//           
//               
//          }
//          }
//          }
//          else
//                          {
//                          var cnt;
//                          cnt=0;
//                            if(markersPS!=null)
//                            {
//                          for(cnt=0;cnt<markersPS.length;cnt++)
//                          {
//                          var m=markersPS[cnt];
//                          map1.removeOverlay(m);
//                          
//                          }
//                          markersPS=null;
//                          }
//                            if(markersST!=null)
//                            {
//                          for(cnt=0;cnt<markersST.length;cnt++)
//                          {
//                          var m=markersST[cnt];
//                          map1.removeOverlay(m);
//                          }
//                          markersST=null;
//                          }
//                            if(markersHL!=null)
//                            {
//                          for(cnt=0;cnt<markersHL.length;cnt++)
//                          {var m=markersHL[cnt];
//                          map1.removeOverlay(m);
//                          }
//                          markersHL=null;
//                          }
//                            if(markersSU!=null)
//                            {
//                          for(cnt=0;cnt<markersSU.length;cnt++)
//                          {
//                          var m=markersSU[cnt];
//                          map1.removeOverlay(m);
//                          }
//                          markersSU=null;
//                          }
//                          
//                          

//                          
//                          }          
//       var arrloctool=locPrimTool.split('#|yyy|#');
//       
//          if(valPrimLat!="" && valPrimLon!="")
//          { markersPS=new Array();

//          var arrPrimLat=valPrimLat.split(',');
//          var arrPrimLon=valPrimLon.split(',');
//          var j;
//           
//           var lsUrlPrim="http://"+location.hostname+location.pathname ;
//           var liLenPrim= lsUrlPrim.lastIndexOf ('/');
//           var lsUrlPrim = lsUrlPrim.substring(0,liLenPrim );
//           lsUrlPrim += "/hm/img/bullet_check_box2.png";
//                
//              var iconPrim = new GIcon();
//             iconPrim.image ="/hm/img/bullet_check_box2.png";;// lsUrlPrim;
//          for(j=0;j<arrPrimLon.length;j++)
//          {
//          
//             var pointPrim = new GLatLng(arrPrimLat[j],arrPrimLon[j]);
//              iconPrim.iconAnchor = new GPoint(10, 15);
//              
//                     markerOptions = { icon:iconPrim, title:arrloctool[j]};
//                var MarkPS=new GMarker(pointPrim,markerOptions);
//              map1.addOverlay(MarkPS);
//              markersPS.push(MarkPS);
//          }
//          }
//          
//           arrloctool=locStatTool.split('#|yyy|#');
//          if(valStatLat!="" && valStatLon!="")
//          { markersST=new Array();
//          var ArrStatLat=valStatLat.split(',');
//          var ArrStatLon=valStatLon.split(',');
//          var j;
//           
//           var lsUrlStat="http://"+location.hostname+location.pathname ;
//           var liLenStat= lsUrlStat.lastIndexOf ('/');
//           var lsUrlStat = lsUrlStat.substring(0,liLenStat );
//           lsUrlStat += "/hm/img/bullet_check_box.png";
//                
//              var iconStat = new GIcon();
//             iconStat.image ="/hm/img/bullet_check_box.png";// lsUrlStat;
//          for(j=0;j<ArrStatLat.length;j++)
//          {
//          
//             var pointStat = new GLatLng(ArrStatLat[j],ArrStatLon[j]);
//              iconStat.iconAnchor = new GPoint(10, 15);
//                  markerOptions = { icon:iconStat, title:arrloctool[j]};
//              var MarkST=new GMarker(pointStat,markerOptions);
//              map1.addOverlay(MarkST);
//               markersST.push(MarkST);
//          }
//          }
//          
//           arrloctool=locSupTool.split('#|yyy|#');
//          if(valSecLat!="" && valSecLon!="")
//          {markersSU=new Array();
//          var ArrSecLat=valSecLat.split(',');
//          var ArrSecLon=valSecLon.split(',');
//          var j;
//           
//           var lsUrlSec="http://"+location.hostname+location.pathname ;
//           var liLenSec= lsUrlSec.lastIndexOf ('/');
//           var lsUrlSec = lsUrlSec.substring(0,liLenSec );
//           lsUrlSec += "/hm/img/bullet_check_box3.png";
//                
//              var iconSec = new GIcon();
//             iconSec.image ="/hm/img/bullet_check_box3.png";;// lsUrlSec;
//          for(j=0;j<ArrSecLat.length;j++)
//          {
//          
//             var pointSec = new GLatLng(ArrSecLat[j],ArrSecLon[j]);
//              iconSec.iconAnchor = new GPoint(10, 15);
//              
//              
//                  markerOptions = { icon:iconSec, title:arrloctool[j]};
//              var MarkSU=new GMarker(pointSec,markerOptions);
//              map1.addOverlay(MarkSU);
//        
//               markersSU.push(MarkSU);
//          }
//          }
//             arrloctool=locHospTool.split('#|yyy|#');
//          
//           if(valHospLat !="" && valHospLon !="")
//          {markersHL=new Array();
//          var ArrHospLat=valHospLat.split(',');
//          var ArrHospLon=valHospLon.split(',');
//          var j;
//           
//           var lsUrlHosp="http://"+location.hostname+location.pathname ;
//           var liLenHosp= lsUrlHosp.lastIndexOf ('/');
//           var lsUrlHosp = lsUrlHosp.substring(0,liLenHosp );
//           lsUrlHosp += "/hm/img/bullet_check_box4.png";
//                
//              var iconHosp = new GIcon();
//             iconHosp.image = "/hm/img/bullet_check_box4.png";//lsUrlHosp;
//          for(j=0;j<ArrHospLat.length;j++)
//          {
//             var pointHosp = new GLatLng(ArrHospLat[j],ArrHospLon[j]);
//              iconHosp.iconAnchor = new GPoint(10, 15);
//                  markerOptions = { icon:iconHosp, title:arrloctool[j]};
//              var MarkHL=new GMarker(pointHosp,markerOptions);
//              map1.addOverlay(MarkHL);
//        
//               markersHL.push(MarkHL);
//          }
//          }
//        
//     
//  
//         }
//         catch(exception)
//            {
//           
//            }
//}
////            
//           
//           
//           

//         
//     }
//    }
//    
  //Update ended

//added by chetan
function visit()
{

  //alert("in fun imgs");
   document.getElementById("room_img_pd1").style.visibility='hidden';
   document.getElementById("room_img_pd").style.visibility='visible';
//   
}
function Videos()
{
  // alert("in fun imgsss"); display:none
    document.getElementById("room_img_pd1").style.visibility='visible';
    document.getElementById("room_img_pd").style.visibility='hidden';  
    document.getElementById("room_img_pd1").style.display='block';
    document.getElementById("room_img_pd").style.display='none';  
    
    return false;
}
function Image1()
{

//    document.getElementById("room_img_pd1").style.visibility='hidden';
//    document.getElementById("room_img_pd").style.visibility='visible'

    document.getElementById("room_img_pd1").style.display='none';
    document.getElementById("room_img_pd").style.display='block';;
    var Srcs=document.getElementById("ctl00_cph_imageprop").src;
    
    //added by chetan For image workflow
    Srcs=Srcs.replace("Types=I","Types=P");
    //end added code______
    
    
  var str=Srcs.search("noimage-r.gif");
  if(str!=-1)
 {
 }
 else
 {
   
    document.getElementById("ctl00_cph_imgproperty").src=Srcs;
  }
 
}
//newly added function by chetan
function Images(num)
{

    document.getElementById("room_img_pd1").style.display='none';
    document.getElementById("room_img_pd").style.display='block';;
    var Srcs=document.getElementById("ctl00_cph_icon"+num).src;
    
    //added by chetan For image workflow
    Srcs=Srcs.replace("Types=I","Types=P");
    //end added code______
    
    
  var str=Srcs.search("noimage-r.gif");
  if(str!=-1)
 {
 }
 else
 {
   
    document.getElementById("ctl00_cph_imgproperty").src=Srcs;
  }
}
function Image2()
{
//     document.getElementById("room_img_pd1").style.visibility='hidden';
//     document.getElementById("room_img_pd").style.visibility='visible';
    document.getElementById("room_img_pd1").style.display='none';
    document.getElementById("room_img_pd").style.display='block';;
     Srcs=document.getElementById("ctl00_cph_imgprop").src; 
     
     //added by chetan For image workflow
    Srcs=Srcs.replace("Types=I","Types=P");
    //end added code______
    
    
      var str=Srcs.search("noimage-r.gif");
  if(str!=-1)
 {
 }
 else
 {
     document.getElementById("ctl00_cph_imgproperty").src=Srcs;
 }
 
}


// function EndRequestHandler(sender, args)

//                 {
//                 
//                 load();
//                 }