﻿// 
//-----------------------------------------------------------------
//  FileName            : vehicle.js
//-----------------------------------------------------------------
//  Project             : AIGM
//  Language            : Javascript
//  Author              :
//  Date of creation    :
//-----------------------------------------------------------------
//  Contains graphics functions
//
//-----------------------------------------------------------------



function featureClicked(a,b){
    var att=a.get_attributes();
    var arr=att.split("_");
    var id=arr[0];
    window.open("../DepremBilgi/Ozet.aspx?param="+id);
}


/*
function showCatalogWindow(id,il,ilce,md,date,x,y,mapid){
alert("b");
 
    var divMenu=document.getElementById("divCatalog");
   
    document.getElementById("tdContextHeader").innerHTML=il+"-"+ilce+" depremi";
   
    var detailHtml="";
    if(showDetailPage)
        detailHtml="<tr><td colspan='2'><a href='../DepremBilgi/Ozet.aspx?param="+id+"' target='_blank'>Detaylı Bilgi</a></td></tr>";
   
    document.getElementById("tdContextContent").innerHTML="<table><tr><td>Mg:</td><td>"+md+"</td>"+    
    "</tr><tr><td>Tarih:</td><td>"+date+"</td></tr>"+detailHtml+"</table>";
    
    var map=$find(mapid);
    var res= Sys.UI.DomElement.getLocation(map._controlDiv);
    var left=parseInt( x)+ parseInt( res.x);
    var top=parseInt( y)+ parseInt( res.y);
    divMenu.style.left=left+"px";
    divMenu.style.top=top+"px";
    divMenu.style.visibility="visible";  
  
   
}
  
    */

/*
function showCatalogWindow(id,il,ilce,md,date,x,y,mapid){
    lblMg.SetText(md);
    lblDate.SetText(date);
    hypCatDetail.SetNavigateUrl('../DepremBilgi/Ozet.aspx?param='+id);
    pcDetail.SetHeaderText(il+"-"+ilce+" Depremi");
    
    var map=$find(mapid);
    var res= Sys.UI.DomElement.getLocation(map._controlDiv);
    var left=parseInt( x)+ parseInt( res.x);
    var top=parseInt( y)+ parseInt( res.y);
    divMenu.style.left=left+"px";
    divMenu.style.top=top+"px";
    divMenu.style.visibility="visible";  
   
}
*/





/*
function showStationWindow(staId, staCode,il,ilce,netCode,staType,x,y,mapid){
   
    var divMenu=document.getElementById("divStation");
   
    document.getElementById("tdContextHeader").innerHTML=staCode+ " İstasyonu";
   
    var detailHtml="";
    if(showDetailPage)
        detailHtml="<tr><td colspan='2'><a href='../Ist_Bilgi/Detay.aspx?param="+staId+"' target='_blank'>Detaylı Bilgi</a></td></tr>";
   
    document.getElementById("tdContextContent").innerHTML="<table><tr><td>Network:</td><td>"+netCode+"</td>"+    
    "</tr><tr><td>Tür:</td><td>"+staType+"</td></tr>"+detailHtml+"</table>";
    
    var map=$find(mapid);
    var res= Sys.UI.DomElement.getLocation(map._controlDiv);
    var left=parseInt( x)+ parseInt( res.x);
    var top=parseInt( y)+ parseInt( res.y);
    divMenu.style.left=left+"px";
    divMenu.style.top=top+"px";
    divMenu.style.visibility="visible";  
   
}
*/




    
    
    
/*--------------- UI FUNCTIONS --------------------*/

function CloseCatalogWindow(){
    document.getElementById("divCatalog").style.visibility="hidden";
}



function CloseStationWindow(){
    document.getElementById("divStation").style.visibility="hidden";
}

function selectDDARow(s,e){
    CloseCatalogWindow();
    s.UnselectAllRowsOnPage();
    s.SelectRowOnPage(e.visibleIndex);
    s.GetRowValues(e.visibleIndex, "id" ,getResultCallback);
}

function getResultCallback(res){
    selectCatalog(res);
}

function selectCatalog(catid){
    var message="selectCatalog_"+catid;
    var context='Map1';
    WebForm_DoCallback('__Page',message,processCallbackResult,context,null,true);
}



///////////// CHART FUNCTIONS ////////////////////

function chartClicked(s,e){
    var hitObject=e.additionalHitObject;
    dumpProps(e,null);
}

function chartEndCallback(s,e){
    //dumpProps(e,null);
}




