﻿
function startsearch()
     {
       var mobilenumber=document.getElementById("phoneCodeSearch").value;
       
       if(mobilenumber.length != 11)
       {
         alert('输入的手机号码不是11位,请重新输入!');
         return false;
       }
       else
       {
         location="/CD-"+mobilenumber+".html";
       }
}

function NotQQAlert(Cid)
     {
       var code=document.getElementById(Cid).value;
       
       if(code.length == 0)
       {
         alert('请输入QQ号码！');
         return false;
       }
       return true;
}


function selectCommentInfo(info,commentid){
  var comment = document.getElementById(commentid);  
  comment.value = info;
}




  function showQQAdsense(){
      var publisherID = 'ca-pub-3733840410015753';
      var adsManagerOptions = {
        maxAdsOnMap : 2,
        style: G_ADSMANAGER_STYLE_ADUNIT,      
        channel: '5637075764' 
      };
      adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
      adsManager.enable();
     }
     
       function showIPAdsense(){
      var publisherID = 'ca-pub-3733840410015753';
      var adsManagerOptions = {
        maxAdsOnMap : 2,
        style: G_ADSMANAGER_STYLE_ADUNIT,      
        channel: '6676310468' 
      };
      adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
      adsManager.enable();
     }
     
     
     
  function showPhoneAdsense(){
      var publisherID = 'ca-pub-3733840410015753';
      var adsManagerOptions = {
        maxAdsOnMap : 2,
        style: G_ADSMANAGER_STYLE_ADUNIT,      
        channel: '9586584412' 
      };
      adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
      adsManager.enable();
     }


     
    function shoAddress()
    {    
      var txt = "<div style=\"font-family:Arial,Helvetica,Sans Serif;font-size:11px;text-align:center\">"+
       '<b>latitude :</b>' + ipLocation.latitude + '<br>'+
        '<b>longitude  :</b>' + ipLocation.longitude  + '<br>'+
        '<b>city  :</b>' + ipLocation.address.city + ';'+
        '<b>country  :</b>' + ipLocation.address.country + '<br>'+
        '<b>country_code :</b>' + ipLocation.address.country_code + ';'+
        '<b>region  :</b>' +ipLocation.address.region + '<br></div>'; 
        map.clearOverlays();
        point = new GLatLng(google.loader.ClientLocation.latitude,
                           google.loader.ClientLocation.longitude);
        marker = new GMarker(point);        
        GEvent.addListener(marker, "click", function(){marker.openInfoWindowHtml(txt);});
        map.addOverlay(marker);        
        marker.openInfoWindowHtml(txt);
    }
    
    
    
      function showAddress()
    {    
      var txt = "<div style=\"font-family:Arial,Helvetica,Sans Serif;font-size:11px;text-align:center\">"+
       '<b>latitude :</b>' + ipLocation.latitude + '<br>'+
        '<b>longitude  :</b>' + ipLocation.longitude  + '<br>'+
        '<b>city  :</b>' + ipLocation.address.city + ';'+
        '<b>country  :</b>' + ipLocation.address.country + '<br>'+
        '<b>country_code :</b>' + ipLocation.address.country_code + ';'+
        '<b>region  :</b>' +ipLocation.address.region + '<br></div>'; 
        map.clearOverlays();
        point = new GLatLng(ipLocation.latitude,
                           ipLocation.longitude);
        marker = new GMarker(point);        
        GEvent.addListener(marker, "click", function(){marker.openInfoWindowHtml(txt);});
        map.addOverlay(marker);        
        marker.openInfoWindowHtml(txt);
    }
    
