var _SURFPOINT=function(argKey){this.key=argKey;}
_SURFPOINT.prototype={
IP:'',
DomainName:'',
DomainType:'',
LineCode:'',
LineJName:'',
LineCF:'',
ProxyFlag:'',
TimeZone:'',
ContinentCode:'',
CountryCode:'',
CountryAName:'',
CountryJName:'',
RegionCode:'',
PrefCode:'',
PrefAName:'',
PrefJName:'',
PrefLatitude:'',
PrefLongitude:'',
PrefCF:'',
CityCode:'',
CityAName:'',
CityJName:'',
CityLatitude:'',
CityLongitude:'',
CityCF:'',
BCFlag:'',
OrgCode:'',
OrgOfficeCode:'',
OrgIndependentCode:'',
OrgName:'',
OrgEnglishName:'',
OrgPrefCode:'',
OrgCityCode:'',
OrgLatitude:'',
OrgLongitude:'',
OrgZipCode:'',
OrgAddress:'',
OrgEnglishAddress:'',
OrgTel:'',
OrgFax:'',
OrgIpoType:'',
StockTickerNumber:'',
OrgDate:'',
OrgCapitalCode:'',
OrgEmployeesCode:'',
OrgGrossCode:'',
OrgPresident:'',
OrgIndustrialCategoryL:'',
OrgIndustrialCategoryM:'',
OrgIndustrialCategoryS:'',
OrgIndustrialCategoryT:'',
TelCode:'',
OrgUrl:'',
OrgDomainName:'',
OrgDomainType:'',
EncryptedIP:'',
getIP:function(){return decodeURIComponent(this.IP);},
getDomainName:function(){return decodeURIComponent(this.DomainName);},
getDomainType:function(){return decodeURIComponent(this.DomainType);},
getLineCode:function(){return decodeURIComponent(this.LineCode);},
getLineJName:function(){return decodeURIComponent(this.LineJName);},
getLineCF:function(){return decodeURIComponent(this.LineCF);},
getProxyFlag:function(){return decodeURIComponent(this.ProxyFlag);},
getTimeZone:function(){return decodeURIComponent(this.TimeZone);},
getContinentCode:function(){return decodeURIComponent(this.ContinentCode);},
getCountryCode:function(){return decodeURIComponent(this.CountryCode);},
getCountryAName:function(){return decodeURIComponent(this.CountryAName);},
getCountryJName:function(){return decodeURIComponent(this.CountryJName);},
getRegionCode:function(){return decodeURIComponent(this.RegionCode);},
getPrefCode:function(){return decodeURIComponent(this.PrefCode);},
getPrefAName:function(){return decodeURIComponent(this.PrefAName);},
getPrefJName:function(){return decodeURIComponent(this.PrefJName);},
getPrefLatitude:function(){return decodeURIComponent(this.PrefLatitude);},
getPrefLat:function(){return decodeURIComponent(this.PrefLatitude);},
getPrefLongitude:function(){return decodeURIComponent(this.PrefLongitude);},
getPrefLng:function(){return decodeURIComponent(this.PrefLongitude);},
getPrefCF:function(){return decodeURIComponent(this.PrefCF);},
getCityCode:function(){return decodeURIComponent(this.CityCode);},
getCityAName:function(){return decodeURIComponent(this.CityAName);},
getCityJName:function(){return decodeURIComponent(this.CityJName);},
getCityLatitude:function(){return decodeURIComponent(this.CityLatitude);},
getCityLat:function(){return decodeURIComponent(this.CityLatitude);},
getCityLongitude:function(){return decodeURIComponent(this.CityLongitude);},
getCityLng:function(){return decodeURIComponent(this.CityLongitude);},
getCityCF:function(){return decodeURIComponent(this.CityCF);},
getBCFlag:function(){return decodeURIComponent(this.BCFlag);},
getOrgCode:function(){return decodeURIComponent(this.OrgCode);},
getOrgOfficeCode:function(){return decodeURIComponent(this.OrgOfficeCode);},
getOrgIndependentCode:function(){return decodeURIComponent(this.OrgIndependentCode);},
getOrgName:function(){return decodeURIComponent(this.OrgName);},
getOrgEnglishName:function(){return decodeURIComponent(this.OrgEnglishName);},
getOrgPrefCode:function(){return decodeURIComponent(this.OrgPrefCode);},
getOrgCityCode:function(){return decodeURIComponent(this.OrgCityCode);},
getOrgLatitude:function(){return decodeURIComponent(this.OrgLatitude);},
getOrgLongitude:function(){return decodeURIComponent(this.OrgLongitude);},
getOrgZipCode:function(){return decodeURIComponent(this.OrgZipCode);},
getOrgAddress:function(){return decodeURIComponent(this.OrgAddress);},
getOrgEnglishAddress:function(){return decodeURIComponent(this.OrgEnglishAddress);},
getOrgTel:function(){return decodeURIComponent(this.OrgTel);},
getOrgFax:function(){return decodeURIComponent(this.OrgFax);},
getOrgIpoType:function(){return decodeURIComponent(this.OrgIpoType);},
getStockTickerNumber:function(){return decodeURIComponent(this.StockTickerNumber);},
getOrgDate:function(){return decodeURIComponent(this.OrgDate);},
getOrgCapitalCode:function(){return decodeURIComponent(this.OrgCapitalCode);},
getOrgEmployeesCode:function(){return decodeURIComponent(this.OrgEmployeesCode);},
getOrgGrossCode:function(){return decodeURIComponent(this.OrgGrossCode);},
getOrgPresident:function(){return decodeURIComponent(this.OrgPresident);},
getOrgIndustrialCategoryL:function(){return decodeURIComponent(this.OrgIndustrialCategoryL);},
getOrgIndustrialCategoryM:function(){return decodeURIComponent(this.OrgIndustrialCategoryM);},
getOrgIndustrialCategoryS:function(){return decodeURIComponent(this.OrgIndustrialCategoryS);},
getOrgIndustrialCategoryT:function(){return decodeURIComponent(this.OrgIndustrialCategoryT);},
getTelCode:function(){return decodeURIComponent(this.TelCode);},
getOrgUrl:function(){return decodeURIComponent(this.OrgUrl);},
getOrgDomainName:function(){return decodeURIComponent(this.OrgDomainName);},
getOrgDomainType:function(){return decodeURIComponent(this.OrgDomainType);},
getEncryptedIP:function(){return decodeURIComponent(this.EncryptedIP);},

getPrefLocation: function (pref, value) {
    var date = new Date();
    var s = document.createElement('script');
    var callback = (value == ""?"&":"&callback=" + value);
    s.src = 'http://api.docodoco.jp/v3/docodoco?_surfpoint=' + pref + '&mode=load' + callback + '&key=' + this.key + '&t='+(new Date()).getTime();
    document.body.appendChild(s);
},
getIPGeoLocation: function (ip, value) {
    var date = new Date();
    var s = document.createElement('script');
    var callback = (value == ""?"?":"?callback=" + value);
    s.src = 'http://api.docodoco.jp/v3/docodoco' + callback + '&mode=load&ipadr=' + ip  + '&key=' + this.key + '&t='+(new Date()).getTime();
    document.body.appendChild(s);
},
changeContents: function(argId, arghtml) {
    if (document.getElementById) {
        document.getElementById(argId).innerHTML= arghtml;
    }
    else if (document.all) {
        document.all(argId).innerHTML= arghtml;
    }
    else if (document.layers) {
        with(document.layers[argId].document) {
            open();
            write(arghtml);
            close();
        }
    }
},
getContents: function (argId, argPath) {
    var sp = this;
    var xmlReq = sendRequest(onloadedBridge, '', 'GET', argPath,true,true);
    
    function onloadedBridge(oj) {
        sp.changeContents(argId,oj.responseText);
    }
    
    function chkAjaBrowser() {
        var a,ua = navigator.userAgent;
        this.bw= {
            safari   : ((a=ua.split('AppleWebKit/')[1])?a.split('(')[0].split('.')[0]:0)>=124,
            konqueror: ((a=ua.split('Konqueror/')[1])?a.split(';')[0]:0)>=3.3,
            mozes    : ((a=ua.split('Gecko/')[1])?a.split(' ')[0]:0) >= 20011128,
            opera    : (!!window.opera) && ((typeof XMLHttpRequest)=='function'),
            msie     : (!!window.ActiveXObject)?(!!createHttpRequest()):false
        }
        return (this.bw.safari||this.bw.konqueror||this.bw.mozes||this.bw.opera||this.bw.msie);
    }
    
    function createHttpRequest() {
        if (window.XMLHttpRequest) {
            return new XMLHttpRequest();
        } else if (window.ActiveXObject) {
            try {
                return new ActiveXObject('Msxml2.XMLHTTP');
            } catch (e) {
                try { return new ActiveXObject('Microsoft.XMLHTTP'); }
                catch (e2) { return null; }
            }
        } else {
            return null;
        }
    }
    
    function sendRequest(callback, data, method, url, async, sload, user, password) {
        var GET = method.toUpperCase() == 'GET';
        var oj  = createHttpRequest();
        if ( oj == null ) { return null };
        
        if ((sload)?sload:false)url +=((url.indexOf('?')==-1)?'?':'&')+'t='+(new Date()).getTime();
        
        var bwoj = new chkAjaBrowser(),
              o  = bwoj.bw.opera,
              s  = bwoj.bw.safari,
              k  = bwoj.bw.konqueror,
              m  = bwoj.bw.mozes;
        
        if (typeof callback=='object') {
            var callback_onload = callback.onload;
            var callback_onbeforsetheader = callback.onbeforsetheader;
        } else {
            var callback_onload = callback;
            var callback_onbeforsetheader = null;
        }
        
        if (o || s || m) {
            oj.onload = function () { callback_onload(oj);oj.abort(); }
        } else {
            oj.onreadystatechange = function () {
                if ( oj.readyState == 4 ) {
                    callback_onload(oj);
                    oj.abort();
                }
            }
        }
        
        data = uriEncode(data, url);
        if (GET) {
            url += ((url.indexOf('?')==-1)?'?':(data=='')?'':'&')+data;
        }
        
        oj.open(method,url,async,user,password);
        
        if (!!callback_onbeforsetheader)callback_onbeforsetheader(oj);
        setEncHeader(oj);
        
        //send メソッド
        oj.send(data);
        
        function setEncHeader(oj) {
            if (!o||typeof oj.setRequestHeader == 'function') {
                oj.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
            }
            return oj
        }
        
        function uriEncode(data, url) {
            var d = [];
            if (typeof data=='object') {
                for(var i in data)p(i,data[i]);
            } else if (typeof data=='string') {
                if (data=='')return '';
                if (data.charAt(0)=='&')data=data.substring(1,data.length)
                var datas = data.split('&');
                for(var i=0;i<datas.length;i++) {
                    var dataq = datas[i].split('=');
                    p(dataq[0],dataq[1]);
                }
            } 
            function p(k, v) { d.push( encodeURIComponent(k) + "=" + encodeURIComponent(v)); };
            return d.join("&");
        }
        return oj
    }
}
}
var SURFPOINT=new _SURFPOINT('QETYVYxBxAcpThMVaA81l8SAfFQJ1m0rGj1Jicpo3pQeCXS4WVINHWGdil1LRFkS');
SURFPOINT.IP='152.53.36.192';
SURFPOINT.LineCode='99';
SURFPOINT.LineJName='%E5%88%A4%E5%AE%9A%E4%B8%8D%E6%98%8E';
SURFPOINT.LineCF='0';
SURFPOINT.ProxyFlag='0';
SURFPOINT.TimeZone='-0500';
SURFPOINT.ContinentCode='1';
SURFPOINT.CountryCode='US';
SURFPOINT.CountryAName='United%20States%20of%20America';
SURFPOINT.CountryJName='%E3%82%A2%E3%83%A1%E3%83%AA%E3%82%AB%E5%90%88%E8%A1%86%E5%9B%BD';
SURFPOINT.PrefCode='US-DC';
SURFPOINT.PrefAName='District%20of%20Columbia';
SURFPOINT.PrefCF='50';
SURFPOINT.CityCode='US-DC010';
SURFPOINT.CityAName='Washington%20County';
SURFPOINT.CityLatitude='38.96678';
SURFPOINT.CityLongitude='-77.04137';
SURFPOINT.CityCF='20';
SURFPOINT.BCFlag='b';
SURFPOINT.OrgCode='500290023';
SURFPOINT.OrgName='Anexia';
SURFPOINT.OrgPrefCode='US-DC';
SURFPOINT.OrgCityCode='US-DC010';
SURFPOINT.OrgLatitude='38.9667800';
SURFPOINT.OrgLongitude='-77.0413700';
SURFPOINT.OrgZipCode='10017';
SURFPOINT.OrgAddress='535%205th%20Avenue%2C%20New%20York';
SURFPOINT.EncryptedIP='ac3499886c';
