// ==UserScript==
// @name          PlaceEngine for Hatena Map
// @namespace     http://www.placeengine.com
// @description	  Get current location by PlaceEngine (WiFi position sensing)
// @include http://map.hatena.ne.jp/*
// ==/UserScript==

// Copyright (C) 2006 Jun Rekimoto <rekimoto@acm.org>
// 2006-12-18 Initial Version

var d = document.getElementById("menu");
if (d){
    var newe = document.createElement('div');
    newe.innerHTML = '<div style="color:black;"><a href="http://www.placeengine.com"><img alt="PlaceEngine" style="border:0;" src="http://www.placeengine.com/images/small_bt3.png"></a> <input src="http://www.placeengine.com/images/small_bt2.png" type="image" onclick=\'pe.registerLocation()\' /><input src="http://www.placeengine.com/images/wide_bt1.png" type="image" onclick=\'pe.getLocation()\' /> <span id="pestatus"></span></div>';
    d.parentNode.insertBefore(newe, d);
}

var pe_js = document.createElement("script");
pe_js.type = "text/javascript";
pe_js.src = "http://www.placeengine.com/javascripts/pengine.js";
document.body.appendChild(pe_js);

var pe_js2 = document.createElement("script");
pe_js2.type = "text/javascript";
pe_js2.innerHTML = 'var pe = new PEngine({onGetLocation:function(x,y,r,info){if(map!=null && r>0)map.setCenter(new GLatLng(y,x),17);},idstatus:"pestatus",appkey:"bAjn4lEZAULj6p-V-7WQvb1mu7kNxLdTPDiru9KIKFTJtEt3aeOTO8g1g07.e2vLNns8UhGwcuMcMckvDQFjJ8cq-2QHAz7EC-GjugAAm4RwO3b38VaSe9fGk4OBW4EsYAtDm0AFh3eIatNSEDOevJsxZhtmFuJwe5VPHroschA-WNxDYYt7MlJqf0FNSE08x9rkcLAEQqyMzwCFa2Vs9mpplzOzf.8CsxPXalf7KOoKbAt6ts28K1-EeT1ZYZoJR5iINVzVeIIBmonDtvUpxst37FE3VQNcl5Z.ZbY1RjwGmViqP9hJ9p11QxBm3TBSIkag5DpXCiUQSKUg1Zoa6g__,aHR0cDovL21hcC5oYXRlbmEubmUuanAv,SGF0ZW5hIE1hcA__"});';
document.body.appendChild(pe_js2);









