function ntjBanner(image,url){
this.m_image = new Image();
this.m_image.src = image;
this.m_url = url;
this.src = this.m_image.src;
}
ntjBanner.prototype.set=function(img){
img.src=this.m_image.src;
var url = this.m_url;
if(url!=""){
if(navigator.appVersion.indexOf("MSIE")!=-1){
img.onmouseover=function(){img.style.cursor = "hand";};
img.onmouseout=function(){img.style.cursor = "default";};
}else{
img.onmouseover=function(){img.style.cursor = "pointer";};
img.onmouseout=function(){img.style.cursor = "default";};
}
img.onclick=function(){window.open(url,'','')};
}
};
/*
*/
function setPath(p){ path = p;}
function getCopyright(){
document.write('&copy; ');
var now = new Date()
document.write(now.getFullYear());
document.write(' NAVITIME JAPAN. All Rights Reserved.');
}
function setLoadImages(){
MM_preloadImages(
"img/icon_address.gif"
,"img/icon_address_act.gif"
,"img/icon_station.gif"
,"img/icon_station_act.gif"
,"img/icon_post.gif"
,"img/icon_post_act.gif"
,"img/icon_tel.gif"
,"img/icon_tel_act.gif"
,"img/icon_spot.gif"
,"img/icon_spot_act.gif");
}
function openWindow(url,x,y,scrollbar){
scrollbar = scrollbar == null ? "" : ",scrollbars=yes";
window.open(url,"","width="+x+",height="+y+",statusbars=yes"+scrollbar);
}
function selectPullDown()
{
var LCode = document.pullDown.categoryList.value;
var ACode = document.pullDown.areaList.value;
document.pullDown.LCode.value = LCode;
document.pullDown.ACode.value = ACode;
document.pullDown.submit();
}
var agent = navigator.userAgent;
var appver = navigator.appVersion;
var navi = navigator.appName;
var isDom = (document.getElementById!=null);
var isOpera = (agent.indexOf("Opera")>-1);
var isIe4 = (document.all && !isDom && !isOpera);
var isIe5 = (document.all && isDom && !isOpera);
var isIe = (isIe4 || isIe5);
var isFF = (agent.indexOf("Firefox")>-1);
var isNN = (navi.indexOf("Netscape",0)>-1 && !isFF);
var isNN4 = (document.layers && isNN);
var isNN6 = (isDom && isNN);
var isWin = (agent.indexOf('Win') != -1);
var isMac = (agent.indexOf('Mac') != -1);
var isSafari = (agent.indexOf("Safari")>-1);
function getWindowWidth(){
if(isNN || isOpera || isFF) return window.innerWidth;
if(isIe5) return document.body.clientWidth;
return 0;
}
function getWindowHeight(){
if(isNN || isOpera || isFF) return window.innerHeight;
if(isIe5) return document.body.clientHeight;
return 0;
}
function LinkActive(obj){
obj.style.background="#fff799";
obj.style.color="#555555";
obj.style.cursor = "hand";
obj.className='layeractive';
}
function LinkDefault(obj){
obj.style.background="#FFFFFF";
obj.style.color="#4444AA";
obj.style.textDecoration ="Underline";
obj.style.cursor = "hand";
obj.className='layerlink';
}
function LinkSelect(obj){
obj.style.background="#8888CC";
obj.style.color="#FFFFFF";
obj.style.cursor = "default";
obj.className='layerselect';
}
var m_cookie = document.cookie;
function getCookie(name){
name+="=";
m_cookie+=";";
var start = m_cookie.indexOf(name);
if(start!=-1){
var end = m_cookie.indexOf(";",start);
var value = m_cookie.substring(start+(name.length),end);
return decodeURL(value);
}
return '';
}
function decodeURL(str){
var s0, i, j, s, ss, u, n, f;
s0 = "";                // decoded str
for (i = 0; i < str.length; i++){   // scan the source str
s = str.charAt(i);
if (s == "+"){
s0 += " ";
}else{
if (s != "%"){
s0 += s;
}else{
u = 0;          // unicode of the character
f = 1;          // escape flag, zero means end of this sequence
while (true) {
ss = "";    // local str to parse as int
for (j = 0; j < 2; j++ ) {  // get two maximum hex characters to parse
sss = str.charAt(++i);
if (((sss >= "0") && (sss <= "9")) || ((sss >= "a") && (sss <= "f"))  || ((sss >= "A") && (sss <= "F"))) {
ss += sss;          // if hex, add the hex character
}else{
--i; break;
}    // not a hex char., exit the loop
}
n = parseInt(ss, 16);           // parse the hex str as byte
if (n <= 0x7f){u = n; f = 1;}   // single byte format
if ((n >= 0xc0) && (n <= 0xdf)){u = n & 0x1f; f = 2;}   // double byte format
if ((n >= 0xe0) && (n <= 0xef)){u = n & 0x0f; f = 3;}   // triple byte format
if ((n >= 0xf0) && (n <= 0xf7)){u = n & 0x07; f = 4;}   // quaternary byte format (extended)
if ((n >= 0x80) && (n <= 0xbf)){u = (u << 6) + (n & 0x3f); --f;}    // not a first, shift and add 6 lower bits
if (f <= 1){break;}             // end of the utf byte sequence
if (str.charAt(i + 1) == "%"){ i++ ;}                   // test for the next shift byte
else {break;}                   // abnormal, format error
}
s0 += String.fromCharCode(u);           // add the escaped character
}
}
}
return s0;
}
function encodeURL(str){
var s0, i, s, u;
s0 = "";                // encoded str
for (i = 0; i < str.length; i++){   // scan the source
s = str.charAt(i);
u = str.charCodeAt(i);          // get unicode of the char
if (s == " "){s0 += "+";}       // SP should be converted to "+"
else {
if ( u == 0x2a || u == 0x2d || u == 0x2e || u == 0x5f || ((u >= 0x30) && (u <= 0x39)) || ((u >= 0x41) && (u <= 0x5a)) || ((u >= 0x61) && (u <= 0x7a))){       // check for escape
s0 = s0 + s;            // don't escape
}
else {                  // escape
if ((u >= 0x0) && (u <= 0x7f)){     // single byte format
s = "0"+u.toString(16);
s0 += "%"+ s.substr(s.length-2);
}
else if (u > 0x1fffff){     // quaternary byte format (extended)
s0 += "%" + (oxf0 + ((u & 0x1c0000) >> 18)).toString(16);
s0 += "%" + (0x80 + ((u & 0x3f000) >> 12)).toString(16);
s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
}
else if (u > 0x7ff){        // triple byte format
s0 += "%" + (0xe0 + ((u & 0xf000) >> 12)).toString(16);
s0 += "%" + (0x80 + ((u & 0xfc0) >> 6)).toString(16);
s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
}
else {                      // double byte format
s0 += "%" + (0xc0 + ((u & 0x7c0) >> 6)).toString(16);
s0 += "%" + (0x80 + (u & 0x3f)).toString(16);
}
}
}
}
return s0;
}
function getUser(){
if(getCookie("info").indexOf(".")==-1) return "";
return getCookie("info").split(".")[0];
}
function getCarrier(){
if(getCookie("info").indexOf(".")==-1) return "";
return getCookie("info").split(".")[1];
}
if (isSafari && RegExp.rightContext == null) {
var originalMatch = String.prototype.match;
String.prototype.match = function (regexp) {
var result = originalMatch.apply(this, arguments);
if (! result)
return null;
RegExp.leftContext = this.substring(0, String(this).indexOf(String(result)));
RegExp.rightContext = this.substring(String(result).length, this.length);
return result;
};
}
function countLog(){
var imgObj = document.createElement("img");
var Dt = new Date();
var year = new String(Dt.getYear() + 1900);
var month =  Dt.getMonth()+1;
if(month<10){
month = '0' + new String(month);
} else {
month = new String(month);
}
var day =  Dt.getDate();
if(day<10){
day = '0' + new String(day);
} else {
day = new String(day);
}
var hour =  Dt.getHours();
if(hour<10){
hour = '0' + new String(hour);
} else {
hour = new String(hour);
}
var min =  Dt.getMinutes();
if(min<10){
min = '0' + new String(min);
} else {
min = new String(min);
}
var sec =  Dt.getSeconds();
if(sec<10){
sec = '0' + new String(sec);
} else {
sec = new String(sec);
}
imgObj.src = "http://" + location.host + "/pcstorage/cntlog/" + year + month + day + hour + min + sec + "?ctl=" + arguments[0].type + "&logId=" + arguments[0].logId;
}
function returnHtmlStr(str){
if(str==null)return null;
str = str.replace(/&amp;/g, "&");
str = str.replace(/&#44;/g, ",");
str = str.replace(/&#46;/g, ".");
str = str.replace(/&lt;/g, "<");
str = str.replace(/&gt;/g, ">");
str = str.replace(/&quot;/g, '"');
str = str.replace(/&rsquo;/g, "'");
return str;
}
NtjCommon = function(){};
var MM_contentVersion = 8;
var MM_FlashCanPlay;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i){
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
var _timeoutCounter=0;
function $TimeOutHandler$(a){
a.prototype.setTimeout=function(timeoutHandler,elapseTime){
var Ie="tempVar"+_timeoutCounter;
_timeoutCounter++;
eval(Ie+" = this;");
var oi=timeoutHandler.replace(/\\/g,"\\\\").replace(/\"/g,'\\"');
return window.setTimeout(Ie+'._setTimeoutDispatcher("'+oi+'");'+Ie+" = null;",elapseTime);
};
a.prototype._setTimeoutDispatcher=function(He){
eval(He);
};
}
function s(a,b,c){
var r = $(a).style[b];
if(r != "" && r.indexOf("px")!= -1 && r.indexOf("px") == r.length-2){
r=r.substr(0,r.indexOf("px"));
}
if(r != "" && r.indexOf("pt") != -1 && r.indexOf("pt") == r.length-2){
r=r.substr(0,r.indexOf("pt"));
}
return isNaN(r)?r:new Number(r);
}
NtjCommon.prototype.loadSWF=function(id,src,width,height,ver){
if(MM_FlashCanPlay){
var html = '<OBJ'+'ECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+id+'" WIDTH="'+width+'" HEIGHT="'+height+'">'+
'<PA'+'RAM NAME="movie" VALUE="'+src+'" />'+
'<PA'+'RAM NAME="loop" VALUE="true" />'+
'<PA'+'RAM NAME="quality" VALUE="high" />'+
'<PA'+'RAM NAME="wmode" VALUE="transparent" />'+
'<EM'+'BED name="'+id+'" src="'+src+'" loop="true" quality="high" swLiveConnect="FALSE" WIDTH="'+width+'" HEIGHT="'+height+'" TYPE="application/x-shockwave-flash" wmode="transparent">'+
'</EM'+'BED></OB'+'JECT>';
document.write(html);
}else{
document.write('<div class="impossible-load-flash">');
document.write('<div class="flash-link">');
document.write('<a href="http://www.adobe.com/shockwave/download/index.cgi?Lang=Japanese&P5_Language=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese&" target="_blank"><span>Download Flash Player</span></a>');
document.write('</div>');
document.write('<div class="flash-exp">');
document.write('当サイトはFlashコンテンツを使用しております。<br>');
document.write('快適にページをご覧頂く為、お手数ですが最新のFlash Player(バージョン8以上)をダウンロードして下さい。<br>');
document.write('</div>');
document.write('</div>');
}
};
var $break    = new Object();
Object.extend = function(destination, source) {
for (property in source) {
destination[property] = source[property];
}
return destination;
}
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
var $A = Array.from = function(iterable) {
if (!iterable) return [];
if (iterable.toArray) {
return iterable.toArray();
} else {
var results = [];
for (var i = 0; i < iterable.length; i++)
results.push(iterable[i]);
return results;
}
}
Object.extend(Array.prototype, {
_each: function(iterator) {
for (var i = 0; i < this.length; i++)
iterator(this[i]);
}
});
var Enumerable = {
each: function(iterator) {
var index = 0;
try {
this._each(function(value) {
try {
iterator(value, index++);
} catch (e) {
if (e != $continue) throw e;
}
});
} catch (e) {
if (e != $break) throw e;
}
},
inject: function(memo, iterator) {
this.each(function(value, index) {
memo = iterator(memo, value, index);
});
return memo;
}
}
/*--------------------------------------------------------------------------*/
var Form = {
serialize: function(form) {
var elements = Form.getElements($(form));
var queryComponents = new Array();
for (var i = 0; i < elements.length; i++) {
var queryComponent = Form.Element.serialize(elements[i]);
if (queryComponent)
queryComponents.push(queryComponent);
}
return queryComponents.join('&');
},
getElements: function(form) {
form = $(form);
var elements = new Array();
for (tagName in Form.Element.Serializers) {
var tagElements = form.getElementsByTagName(tagName);
for (var j = 0; j < tagElements.length; j++)
elements.push(tagElements[j]);
}
return elements;
},
getInputs: function(form, typeName, name) {
form = $(form);
var inputs = form.getElementsByTagName('input');
if (!typeName && !name)
return inputs;
var matchingInputs = new Array();
for (var i = 0; i < inputs.length; i++) {
var input = inputs[i];
if ((typeName && input.type != typeName) ||
(name && input.name != name))
continue;
matchingInputs.push(input);
}
return matchingInputs;
},
disable: function(form) {
var elements = Form.getElements(form);
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
element.blur();
element.disabled = 'true';
}
},
enable: function(form) {
var elements = Form.getElements(form);
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
element.disabled = '';
}
},
findFirstElement: function(form) {
return Form.getElements(form).find(function(element) {
return element.type != 'hidden' && !element.disabled &&
['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
});
},
focusFirstElement: function(form) {
Field.activate(Form.findFirstElement(form));
},
reset: function(form) {
$(form).reset();
}
}
Form.Element = {
serialize: function(element) {
element = $(element);
var method = element.tagName.toLowerCase();
var parameter = Form.Element.Serializers[method](element);
if (parameter) {
var key = encodeURIComponent(parameter[0]);
if (key.length == 0) return;
if (parameter[1].constructor != Array)
parameter[1] = [parameter[1]];
return parameter[1].map(function(value) {
return key + '=' + encodeURIComponent(value);
}).join('&');
}
},
getValue: function(element) {
element = $(element);
var method = element.tagName.toLowerCase();
var parameter = Form.Element.Serializers[method](element);
if (parameter)
return parameter[1];
}
}
Form.Element.Serializers = {
input: function(element) {
switch (element.type.toLowerCase()) {
case 'submit':
case 'hidden':
case 'password':
case 'text':
return Form.Element.Serializers.textarea(element);
case 'checkbox':
case 'radio':
return Form.Element.Serializers.inputSelector(element);
}
return false;
},
inputSelector: function(element) {
if (element.checked)
return [element.name, element.value];
},
textarea: function(element) {
return [element.name, element.value];
},
select: function(element) {
return Form.Element.Serializers[element.type == 'select-one' ?
'selectOne' : 'selectMany'](element);
},
selectOne: function(element) {
var value = '', opt, index = element.selectedIndex;
if (index >= 0) {
opt = element.options[index];
value = opt.value;
if (!value && !('value' in opt))
value = opt.text;
}
return [element.name, value];
},
selectMany: function(element) {
var value = new Array();
for (var i = 0; i < element.length; i++) {
var opt = element.options[i];
if (opt.selected) {
var optValue = opt.value;
if (!optValue && !('value' in opt))
optValue = opt.text;
value.push(optValue);
}
}
return [element.name, value];
}
}
/*--------------------------------------------------------------------------*/
var $F = Form.Element.getValue;
/*--------------------------------------------------------------------------*/
Object.extend(Array.prototype, Enumerable);
document.getElementsByClassName = function(className, parentElement) {
var children = ($(parentElement) || document.body).getElementsByTagName('*');
return $A(children).inject([], function(elements, child) {
if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
elements.push(child);
return elements;
});
}
NtjCommon.checkAll = function(form,name,check){
var l=form.elements.length;
for(var i=0; i<l; i++){
var obj = form.elements[i];
if(obj.name.indexOf(name) == 0){
obj.checked = check;
}
}
};
NtjCommon.Resizer = Class.create();
NtjCommon.Resizer.prototype = Object.extend(NtjCommon, {
initialize: function(a){
this.src = a;
this.reachW = 0;
this.reachH = 0;
this.timeoutId = "";
this.endFunction;
},
autoResizeTo:function(initw,inith,endw,endh,func){
var stl = this.src.style;
if(initw) stl.width = initw + "px";
if(inith) stl.height = inith + "px";
if(endw) this.reachW = Math.round(endw);
if(endw) this.reachH = Math.round(endh);
if(func!=null){
this.endFunction = func;
}
var x1 = new Number(s(this.src,"width"));
var x2 = new Number(this.reachW)-x1;
var x3 = Math.abs(x2/5)<1? (x2>0)?1:-1 : x2/5;
var y1 = new Number(s(this.src,"height"));
var y2 = new Number(this.reachH)-y1;
var y3 = Math.abs(y2/5)<1? (y2>0)?1:-1 : y2/5;
if(Math.abs(x2) <= 1){
stl.width = this.reachW + "px";
}else{
stl.width = Math.round(x1 + x3)+ "px";
}
if(Math.abs(y2) <= 1){
stl.height = this.reachH + "px";
}else{
stl.height = Math.ceil(y1 + y3) + "px";
}
if(s(this.src,"width")==this.reachW && s(this.src,"height")==this.reachH){
clearTimeout(this.timeoutId);
if(this.endFunction) this.endFunction();
return false;
}
this.timeoutId = this.setTimeout("this.autoResizeTo()",10);
}
});
NtjCommon.Popup = Class.create();
NtjCommon.Popup.prototype = Object.extend(NtjCommon, {
initialize: function(a,x,y){
this.src = a;
if(x!=null) this.src.style.left = x;
if(y!=null) this.src.style.top = y;
this.timeoutId = "";
},
open: function(){
this.src.style.visibility = "visible";
},
close: function(time){
if(time==0){
this.src.style.visibility = "hidden";
}else{
this.timeoutId = this.setTimeout("this.timerclose()",500);
}
},
timerclose: function(){
if(this.timeoutId != "") this.src.style.visibility = "hidden";
},
stopclose: function(){
clearTimeout(this.timeoutId);
this.timeoutId = "";
}
});
$TimeOutHandler$(NtjCommon.Resizer);
$TimeOutHandler$(NtjCommon.Popup);
/*  Prototype JavaScript framework, version 1.5.0
*  (c) 2005-2007 Sam Stephenson
*
*  Prototype is freely distributable under the terms of an MIT-style license.
*  For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.5.0',
BrowserFeatures: {
XPath: !!document.evaluate
},
ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
emptyFunction: function() {},
K: function(x) { return x }
}
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
var Abstract = new Object();
Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
Object.extend(Object, {
inspect: function(object) {
try {
if (object === undefined) return 'undefined';
if (object === null) return 'null';
return object.inspect ? object.inspect() : object.toString();
} catch (e) {
if (e instanceof RangeError) return '...';
throw e;
}
},
keys: function(object) {
var keys = [];
for (var property in object)
keys.push(property);
return keys;
},
values: function(object) {
var values = [];
for (var property in object)
values.push(object[property]);
return values;
},
clone: function(object) {
return Object.extend({}, object);
}
});
Function.prototype.bind = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
Function.prototype.bindAsEventListener = function(object) {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
}
}
Object.extend(Number.prototype, {
toColorPart: function() {
var digits = this.toString(16);
if (this < 16) return '0' + digits;
return digits;
},
succ: function() {
return this + 1;
},
times: function(iterator) {
$R(0, this, true).each(iterator);
return this;
}
});
var Try = {
these: function() {
var returnValue;
for (var i = 0, length = arguments.length; i < length; i++) {
var lambda = arguments[i];
try {
returnValue = lambda();
break;
} catch (e) {}
}
return returnValue;
}
}
/*--------------------------------------------------------------------------*/
var PeriodicalExecuter = Class.create();
PeriodicalExecuter.prototype = {
initialize: function(callback, frequency) {
this.callback = callback;
this.frequency = frequency;
this.currentlyExecuting = false;
this.registerCallback();
},
registerCallback: function() {
this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},
stop: function() {
if (!this.timer) return;
clearInterval(this.timer);
this.timer = null;
},
onTimerEvent: function() {
if (!this.currentlyExecuting) {
try {
this.currentlyExecuting = true;
this.callback(this);
} finally {
this.currentlyExecuting = false;
}
}
}
}
String.interpret = function(value){
return value == null ? '' : String(value);
}
Object.extend(String.prototype, {
gsub: function(pattern, replacement) {
var result = '', source = this, match;
replacement = arguments.callee.prepareReplacement(replacement);
while (source.length > 0) {
if (match = source.match(pattern)) {
result += source.slice(0, match.index);
result += String.interpret(replacement(match));
source  = source.slice(match.index + match[0].length);
} else {
result += source, source = '';
}
}
return result;
},
sub: function(pattern, replacement, count) {
replacement = this.gsub.prepareReplacement(replacement);
count = count === undefined ? 1 : count;
return this.gsub(pattern, function(match) {
if (--count < 0) return match[0];
return replacement(match);
});
},
scan: function(pattern, iterator) {
this.gsub(pattern, iterator);
return this;
},
truncate: function(length, truncation) {
length = length || 30;
truncation = truncation === undefined ? '...' : truncation;
return this.length > length ?
this.slice(0, length - truncation.length) + truncation : this;
},
strip: function() {
return this.replace(/^\s+/, '').replace(/\s+$/, '');
},
stripTags: function() {
return this.replace(/<\/?[^>]+>/gi, '');
},
stripScripts: function() {
return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
},
extractScripts: function() {
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
return (this.match(matchAll) || []).map(function(scriptTag) {
return (scriptTag.match(matchOne) || ['', ''])[1];
});
},
evalScripts: function() {
return this.extractScripts().map(function(script) { return eval(script) });
},
escapeHTML: function() {
var div = document.createElement('div');
var text = document.createTextNode(this);
div.appendChild(text);
return div.innerHTML;
},
unescapeHTML: function() {
var div = document.createElement('div');
div.innerHTML = this.stripTags();
return div.childNodes[0] ? (div.childNodes.length > 1 ?
$A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
div.childNodes[0].nodeValue) : '';
},
toQueryParams: function(separator) {
var match = this.strip().match(/([^?#]*)(#.*)?$/);
if (!match) return {};
return match[1].split(separator || '&').inject({}, function(hash, pair) {
if ((pair = pair.split('='))[0]) {
var name = decodeURIComponent(pair[0]);
var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
if (hash[name] !== undefined) {
if (hash[name].constructor != Array)
hash[name] = [hash[name]];
if (value) hash[name].push(value);
}
else hash[name] = value;
}
return hash;
});
},
toArray: function() {
return this.split('');
},
succ: function() {
return this.slice(0, this.length - 1) +
String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
},
camelize: function() {
var parts = this.split('-'), len = parts.length;
if (len == 1) return parts[0];
var camelized = this.charAt(0) == '-'
? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
: parts[0];
for (var i = 1; i < len; i++)
camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
return camelized;
},
capitalize: function(){
return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
},
underscore: function() {
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
},
dasherize: function() {
return this.gsub(/_/,'-');
},
inspect: function(useDoubleQuotes) {
var escapedString = this.replace(/\\/g, '\\\\');
if (useDoubleQuotes)
return '"' + escapedString.replace(/"/g, '\\"') + '"';
else
return "'" + escapedString.replace(/'/g, '\\\'') + "'";
}
});
String.prototype.gsub.prepareReplacement = function(replacement) {
if (typeof replacement == 'function') return replacement;
var template = new Template(replacement);
return function(match) { return template.evaluate(match) };
}
String.prototype.parseQuery = String.prototype.toQueryParams;
var Template = Class.create();
Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype = {
initialize: function(template, pattern) {
this.template = template.toString();
this.pattern  = pattern || Template.Pattern;
},
evaluate: function(object) {
return this.template.gsub(this.pattern, function(match) {
var before = match[1];
if (before == '\\') return match[2];
return before + String.interpret(object[match[3]]);
});
}
}
var $break    = new Object();
var $continue = new Object();
var Enumerable = {
each: function(iterator) {
var index = 0;
try {
this._each(function(value) {
try {
iterator(value, index++);
} catch (e) {
if (e != $continue) throw e;
}
});
} catch (e) {
if (e != $break) throw e;
}
return this;
},
eachSlice: function(number, iterator) {
var index = -number, slices = [], array = this.toArray();
while ((index += number) < array.length)
slices.push(array.slice(index, index+number));
return slices.map(iterator);
},
all: function(iterator) {
var result = true;
this.each(function(value, index) {
result = result && !!(iterator || Prototype.K)(value, index);
if (!result) throw $break;
});
return result;
},
any: function(iterator) {
var result = false;
this.each(function(value, index) {
if (result = !!(iterator || Prototype.K)(value, index))
throw $break;
});
return result;
},
collect: function(iterator) {
var results = [];
this.each(function(value, index) {
results.push((iterator || Prototype.K)(value, index));
});
return results;
},
detect: function(iterator) {
var result;
this.each(function(value, index) {
if (iterator(value, index)) {
result = value;
throw $break;
}
});
return result;
},
findAll: function(iterator) {
var results = [];
this.each(function(value, index) {
if (iterator(value, index))
results.push(value);
});
return results;
},
grep: function(pattern, iterator) {
var results = [];
this.each(function(value, index) {
var stringValue = value.toString();
if (stringValue.match(pattern))
results.push((iterator || Prototype.K)(value, index));
})
return results;
},
include: function(object) {
var found = false;
this.each(function(value) {
if (value == object) {
found = true;
throw $break;
}
});
return found;
},
inGroupsOf: function(number, fillWith) {
fillWith = fillWith === undefined ? null : fillWith;
return this.eachSlice(number, function(slice) {
while(slice.length < number) slice.push(fillWith);
return slice;
});
},
inject: function(memo, iterator) {
this.each(function(value, index) {
memo = iterator(memo, value, index);
});
return memo;
},
invoke: function(method) {
var args = $A(arguments).slice(1);
return this.map(function(value) {
return value[method].apply(value, args);
});
},
max: function(iterator) {
var result;
this.each(function(value, index) {
value = (iterator || Prototype.K)(value, index);
if (result == undefined || value >= result)
result = value;
});
return result;
},
min: function(iterator) {
var result;
this.each(function(value, index) {
value = (iterator || Prototype.K)(value, index);
if (result == undefined || value < result)
result = value;
});
return result;
},
partition: function(iterator) {
var trues = [], falses = [];
this.each(function(value, index) {
((iterator || Prototype.K)(value, index) ?
trues : falses).push(value);
});
return [trues, falses];
},
pluck: function(property) {
var results = [];
this.each(function(value, index) {
results.push(value[property]);
});
return results;
},
reject: function(iterator) {
var results = [];
this.each(function(value, index) {
if (!iterator(value, index))
results.push(value);
});
return results;
},
sortBy: function(iterator) {
return this.map(function(value, index) {
return {value: value, criteria: iterator(value, index)};
}).sort(function(left, right) {
var a = left.criteria, b = right.criteria;
return a < b ? -1 : a > b ? 1 : 0;
}).pluck('value');
},
toArray: function() {
return this.map();
},
zip: function() {
var iterator = Prototype.K, args = $A(arguments);
if (typeof args.last() == 'function')
iterator = args.pop();
var collections = [this].concat(args).map($A);
return this.map(function(value, index) {
return iterator(collections.pluck(index));
});
},
size: function() {
return this.toArray().length;
},
inspect: function() {
return '#<Enumerable:' + this.toArray().inspect() + '>';
}
}
Object.extend(Enumerable, {
map:     Enumerable.collect,
find:    Enumerable.detect,
select:  Enumerable.findAll,
member:  Enumerable.include,
entries: Enumerable.toArray
});
var $A = Array.from = function(iterable) {
if (!iterable) return [];
if (iterable.toArray) {
return iterable.toArray();
} else {
var results = [];
for (var i = 0, length = iterable.length; i < length; i++)
results.push(iterable[i]);
return results;
}
}
Object.extend(Array.prototype, Enumerable);
if (!Array.prototype._reverse)
Array.prototype._reverse = Array.prototype.reverse;
Object.extend(Array.prototype, {
_each: function(iterator) {
for (var i = 0, length = this.length; i < length; i++)
iterator(this[i]);
},
clear: function() {
this.length = 0;
return this;
},
first: function() {
return this[0];
},
last: function() {
return this[this.length - 1];
},
compact: function() {
return this.select(function(value) {
return value != null;
});
},
flatten: function() {
return this.inject([], function(array, value) {
return array.concat(value && value.constructor == Array ?
value.flatten() : [value]);
});
},
without: function() {
var values = $A(arguments);
return this.select(function(value) {
return !values.include(value);
});
},
indexOf: function(object) {
for (var i = 0, length = this.length; i < length; i++)
if (this[i] == object) return i;
return -1;
},
reverse: function(inline) {
return (inline !== false ? this : this.toArray())._reverse();
},
reduce: function() {
return this.length > 1 ? this : this[0];
},
uniq: function() {
return this.inject([], function(array, value) {
return array.include(value) ? array : array.concat([value]);
});
},
clone: function() {
return [].concat(this);
},
size: function() {
return this.length;
},
inspect: function() {
return '[' + this.map(Object.inspect).join(', ') + ']';
}
});
Array.prototype.toArray = Array.prototype.clone;
function $w(string){
string = string.strip();
return string ? string.split(/\s+/) : [];
}
if(window.opera){
Array.prototype.concat = function(){
var array = [];
for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
for(var i = 0, length = arguments.length; i < length; i++) {
if(arguments[i].constructor == Array) {
for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
array.push(arguments[i][j]);
} else {
array.push(arguments[i]);
}
}
return array;
}
}
var Hash = function(obj) {
Object.extend(this, obj || {});
};
Object.extend(Hash, {
toQueryString: function(obj) {
var parts = [];
this.prototype._each.call(obj, function(pair) {
if (!pair.key) return;
if (pair.value && pair.value.constructor == Array) {
var values = pair.value.compact();
if (values.length < 2) pair.value = values.reduce();
else {
key = encodeURIComponent(pair.key);
values.each(function(value) {
value = value != undefined ? encodeURIComponent(value) : '';
parts.push(key + '=' + encodeURIComponent(value));
});
return;
}
}
if (pair.value == undefined) pair[1] = '';
parts.push(pair.map(encodeURIComponent).join('='));
});
return parts.join('&');
}
});
Object.extend(Hash.prototype, Enumerable);
Object.extend(Hash.prototype, {
_each: function(iterator) {
for (var key in this) {
var value = this[key];
if (value && value == Hash.prototype[key]) continue;
var pair = [key, value];
pair.key = key;
pair.value = value;
iterator(pair);
}
},
keys: function() {
return this.pluck('key');
},
values: function() {
return this.pluck('value');
},
merge: function(hash) {
return $H(hash).inject(this, function(mergedHash, pair) {
mergedHash[pair.key] = pair.value;
return mergedHash;
});
},
remove: function() {
var result;
for(var i = 0, length = arguments.length; i < length; i++) {
var value = this[arguments[i]];
if (value !== undefined){
if (result === undefined) result = value;
else {
if (result.constructor != Array) result = [result];
result.push(value)
}
}
delete this[arguments[i]];
}
return result;
},
toQueryString: function() {
return Hash.toQueryString(this);
},
inspect: function() {
return '#<Hash:{' + this.map(function(pair) {
return pair.map(Object.inspect).join(': ');
}).join(', ') + '}>';
}
});
function $H(object) {
if (object && object.constructor == Hash) return object;
return new Hash(object);
};
ObjectRange = Class.create();
Object.extend(ObjectRange.prototype, Enumerable);
Object.extend(ObjectRange.prototype, {
initialize: function(start, end, exclusive) {
this.start = start;
this.end = end;
this.exclusive = exclusive;
},
_each: function(iterator) {
var value = this.start;
while (this.include(value)) {
iterator(value);
value = value.succ();
}
},
include: function(value) {
if (value < this.start)
return false;
if (this.exclusive)
return value < this.end;
return value <= this.end;
}
});
var $R = function(start, end, exclusive) {
return new ObjectRange(start, end, exclusive);
}
var Ajax = {
getTransport: function() {
return Try.these(
function() {return new XMLHttpRequest()},
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')}
) || false;
},
activeRequestCount: 0
}
Ajax.Responders = {
responders: [],
_each: function(iterator) {
this.responders._each(iterator);
},
register: function(responder) {
if (!this.include(responder))
this.responders.push(responder);
},
unregister: function(responder) {
this.responders = this.responders.without(responder);
},
dispatch: function(callback, request, transport, json) {
this.each(function(responder) {
if (typeof responder[callback] == 'function') {
try {
responder[callback].apply(responder, [request, transport, json]);
} catch (e) {}
}
});
}
};
Object.extend(Ajax.Responders, Enumerable);
Ajax.Responders.register({
onCreate: function() {
Ajax.activeRequestCount++;
},
onComplete: function() {
Ajax.activeRequestCount--;
}
});
Ajax.Base = function() {};
Ajax.Base.prototype = {
setOptions: function(options) {
this.options = {
method:       'post',
asynchronous: true,
contentType:  'application/x-www-form-urlencoded',
encoding:     'UTF-8',
parameters:   ''
}
Object.extend(this.options, options || {});
this.options.method = this.options.method.toLowerCase();
if (typeof this.options.parameters == 'string')
this.options.parameters = this.options.parameters.toQueryParams();
}
}
Ajax.Request = Class.create();
Ajax.Request.Events =
['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
_complete: false,
initialize: function(url, options) {
this.transport = Ajax.getTransport();
this.setOptions(options);
this.request(url);
},
request: function(url) {
this.url = url;
this.method = this.options.method;
var params = this.options.parameters;
if (!['get', 'post'].include(this.method)) {
params['_method'] = this.method;
this.method = 'post';
}
params = Hash.toQueryString(params);
if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
if (this.method == 'get' && params)
this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
try {
Ajax.Responders.dispatch('onCreate', this, this.transport);
this.transport.open(this.method.toUpperCase(), this.url,
this.options.asynchronous);
if (this.options.asynchronous)
setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
this.transport.onreadystatechange = this.onStateChange.bind(this);
this.setRequestHeaders();
var body = this.method == 'post' ? (this.options.postBody || params) : null;
this.transport.send(body);
/* Force Firefox to handle ready state 4 for synchronous requests */
if (!this.options.asynchronous && this.transport.overrideMimeType)
this.onStateChange();
}
catch (e) {
this.dispatchException(e);
}
},
onStateChange: function() {
var readyState = this.transport.readyState;
if (readyState > 1 && !((readyState == 4) && this._complete))
this.respondToReadyState(this.transport.readyState);
},
setRequestHeaders: function() {
var headers = {
'X-Requested-With': 'XMLHttpRequest',
'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
};
if (this.method == 'post') {
headers['Content-type'] = this.options.contentType +
(this.options.encoding ? '; charset=' + this.options.encoding : '');
/* Force "Connection: close" for older Mozilla browsers to work
* around a bug where XMLHttpRequest sends an incorrect
* Content-length header. See Mozilla Bugzilla #246651.
*/
if (this.transport.overrideMimeType &&
(navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
headers['Connection'] = 'close';
}
if (typeof this.options.requestHeaders == 'object') {
var extras = this.options.requestHeaders;
if (typeof extras.push == 'function')
for (var i = 0, length = extras.length; i < length; i += 2)
headers[extras[i]] = extras[i+1];
else
$H(extras).each(function(pair) { headers[pair.key] = pair.value });
}
for (var name in headers){
if(typeof headers[name] == "function"){
continue;
}
this.transport.setRequestHeader(name, headers[name]);
}
},
success: function() {
return !this.transport.status
|| (this.transport.status >= 200 && this.transport.status < 300);
},
respondToReadyState: function(readyState) {
var state = Ajax.Request.Events[readyState];
var transport = this.transport, json = this.evalJSON();
if (state == 'Complete') {
try {
this._complete = true;
(this.options['on' + this.transport.status]
|| this.options['on' + (this.success() ? 'Success' : 'Failure')]
|| Prototype.emptyFunction)(transport, json);
} catch (e) {
this.dispatchException(e);
}
if ((this.getHeader('Content-type') || 'text/javascript').strip().
match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
this.evalResponse();
}
try {
(this.options['on' + state] || Prototype.emptyFunction)(transport, json);
Ajax.Responders.dispatch('on' + state, this, transport, json);
} catch (e) {
this.dispatchException(e);
}
if (state == 'Complete') {
this.transport.onreadystatechange = Prototype.emptyFunction;
}
},
getHeader: function(name) {
try {
return this.transport.getResponseHeader(name);
} catch (e) { return null }
},
evalJSON: function() {
try {
var json = this.getHeader('X-JSON');
return json ? eval('(' + json + ')') : null;
} catch (e) { return null }
},
evalResponse: function() {
try {
return eval(this.transport.responseText);
} catch (e) {
this.dispatchException(e);
}
},
dispatchException: function(exception) {
(this.options.onException || Prototype.emptyFunction)(this, exception);
Ajax.Responders.dispatch('onException', this, exception);
}
});
Ajax.Updater = Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
initialize: function(container, url, options) {
this.container = {
success: (container.success || container),
failure: (container.failure || (container.success ? null : container))
}
this.transport = Ajax.getTransport();
this.setOptions(options);
var onComplete = this.options.onComplete || Prototype.emptyFunction;
this.options.onComplete = (function(transport, param) {
this.updateContent();
onComplete(transport, param);
}).bind(this);
this.request(url);
},
updateContent: function() {
var receiver = this.container[this.success() ? 'success' : 'failure'];
var response = this.transport.responseText;
if (!this.options.evalScripts) response = response.stripScripts();
if (receiver = $(receiver)) {
if (this.options.insertion)
new this.options.insertion(receiver, response);
else
receiver.update(response);
}
if (this.success()) {
if (this.onComplete)
setTimeout(this.onComplete.bind(this), 10);
}
}
});
Ajax.PeriodicalUpdater = Class.create();
Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
initialize: function(container, url, options) {
this.setOptions(options);
this.onComplete = this.options.onComplete;
this.frequency = (this.options.frequency || 2);
this.decay = (this.options.decay || 1);
this.updater = {};
this.container = container;
this.url = url;
this.start();
},
start: function() {
this.options.onComplete = this.updateComplete.bind(this);
this.onTimerEvent();
},
stop: function() {
this.updater.options.onComplete = undefined;
clearTimeout(this.timer);
(this.onComplete || Prototype.emptyFunction).apply(this, arguments);
},
updateComplete: function(request) {
if (this.options.decay) {
this.decay = (request.responseText == this.lastText ?
this.decay * this.options.decay : 1);
this.lastText = request.responseText;
}
this.timer = setTimeout(this.onTimerEvent.bind(this),
this.decay * this.frequency * 1000);
},
onTimerEvent: function() {
this.updater = new Ajax.Updater(this.container, this.url, this.options);
}
});
function $(element) {
if (arguments.length > 1) {
for (var i = 0, elements = [], length = arguments.length; i < length; i++)
elements.push($(arguments[i]));
return elements;
}
if (typeof element == 'string')
element = document.getElementById(element);
return Element.extend(element);
}
if (Prototype.BrowserFeatures.XPath) {
document._getElementsByXPath = function(expression, parentElement) {
var results = [];
var query = document.evaluate(expression, $(parentElement) || document,
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0, length = query.snapshotLength; i < length; i++)
results.push(query.snapshotItem(i));
return results;
};
}
document.getElementsByClassName = function(className, parentElement) {
var children = ($(parentElement) || document.body).getElementsByTagName('*');
return $A(children).inject([], function(elements, child) {
if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
elements.push(child);
return elements;
});
}
/*--------------------------------------------------------------------------*/
if (!window.Element)
var Element = new Object();
Element.extend = function(element) {
if (!element || _nativeExtensions || element.nodeType == 3) return element;
if (!element._extended && element.tagName && element != window) {
var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
if (element.tagName == 'FORM')
Object.extend(methods, Form.Methods);
if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
Object.extend(methods, Form.Element.Methods);
Object.extend(methods, Element.Methods.Simulated);
for (var property in methods) {
var value = methods[property];
if (typeof value == 'function' && !(property in element))
element[property] = cache.findOrStore(value);
}
}
element._extended = true;
return element;
};
Element.extend.cache = {
findOrStore: function(value) {
return this[value] = this[value] || function() {
return value.apply(null, [this].concat($A(arguments)));
}
}
};
Element.Methods = {
visible: function(element) {
return $(element).style.display != 'none';
},
toggle: function(element) {
element = $(element);
Element[Element.visible(element) ? 'hide' : 'show'](element);
return element;
},
hide: function(element) {
$(element).style.display = 'none';
return element;
},
show: function(element) {
$(element).style.display = '';
return element;
},
remove: function(element) {
element = $(element);
element.parentNode.removeChild(element);
return element;
},
update: function(element, html) {
html = typeof html == 'undefined' ? '' : html.toString();
$(element).innerHTML = html.stripScripts();
setTimeout(function() {html.evalScripts()}, 10);
return element;
},
replace: function(element, html) {
element = $(element);
html = typeof html == 'undefined' ? '' : html.toString();
if (element.outerHTML) {
element.outerHTML = html.stripScripts();
} else {
var range = element.ownerDocument.createRange();
range.selectNodeContents(element);
element.parentNode.replaceChild(
range.createContextualFragment(html.stripScripts()), element);
}
setTimeout(function() {html.evalScripts()}, 10);
return element;
},
inspect: function(element) {
element = $(element);
var result = '<' + element.tagName.toLowerCase();
$H({'id': 'id', 'className': 'class'}).each(function(pair) {
var property = pair.first(), attribute = pair.last();
var value = (element[property] || '').toString();
if (value) result += ' ' + attribute + '=' + value.inspect(true);
});
return result + '>';
},
recursivelyCollect: function(element, property) {
element = $(element);
var elements = [];
while (element = element[property])
if (element.nodeType == 1)
elements.push(Element.extend(element));
return elements;
},
ancestors: function(element) {
return $(element).recursivelyCollect('parentNode');
},
descendants: function(element) {
return $A($(element).getElementsByTagName('*'));
},
immediateDescendants: function(element) {
if (!(element = $(element).firstChild)) return [];
while (element && element.nodeType != 1) element = element.nextSibling;
if (element) return [element].concat($(element).nextSiblings());
return [];
},
previousSiblings: function(element) {
return $(element).recursivelyCollect('previousSibling');
},
nextSiblings: function(element) {
return $(element).recursivelyCollect('nextSibling');
},
siblings: function(element) {
element = $(element);
return element.previousSiblings().reverse().concat(element.nextSiblings());
},
match: function(element, selector) {
if (typeof selector == 'string')
selector = new Selector(selector);
return selector.match($(element));
},
up: function(element, expression, index) {
return Selector.findElement($(element).ancestors(), expression, index);
},
down: function(element, expression, index) {
return Selector.findElement($(element).descendants(), expression, index);
},
previous: function(element, expression, index) {
return Selector.findElement($(element).previousSiblings(), expression, index);
},
next: function(element, expression, index) {
return Selector.findElement($(element).nextSiblings(), expression, index);
},
getElementsBySelector: function() {
var args = $A(arguments), element = $(args.shift());
return Selector.findChildElements(element, args);
},
getElementsByClassName: function(element, className) {
return document.getElementsByClassName(className, element);
},
readAttribute: function(element, name) {
element = $(element);
if (document.all && !window.opera) {
var t = Element._attributeTranslations;
if (t.values[name]) return t.values[name](element, name);
if (t.names[name])  name = t.names[name];
var attribute = element.attributes[name];
if(attribute) return attribute.nodeValue;
}
return element.getAttribute(name);
},
getHeight: function(element) {
return $(element).getDimensions().height;
},
getWidth: function(element) {
return $(element).getDimensions().width;
},
classNames: function(element) {
return new Element.ClassNames(element);
},
hasClassName: function(element, className) {
if (!(element = $(element))) return;
var elementClassName = element.className;
if (elementClassName.length == 0) return false;
if (elementClassName == className ||
elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
return true;
return false;
},
addClassName: function(element, className) {
if (!(element = $(element))) return;
Element.classNames(element).add(className);
return element;
},
removeClassName: function(element, className) {
if (!(element = $(element))) return;
Element.classNames(element).remove(className);
return element;
},
toggleClassName: function(element, className) {
if (!(element = $(element))) return;
Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
return element;
},
observe: function() {
Event.observe.apply(Event, arguments);
return $A(arguments).first();
},
stopObserving: function() {
Event.stopObserving.apply(Event, arguments);
return $A(arguments).first();
},
cleanWhitespace: function(element) {
element = $(element);
var node = element.firstChild;
while (node) {
var nextNode = node.nextSibling;
if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
element.removeChild(node);
node = nextNode;
}
return element;
},
empty: function(element) {
return $(element).innerHTML.match(/^\s*$/);
},
descendantOf: function(element, ancestor) {
element = $(element), ancestor = $(ancestor);
while (element = element.parentNode)
if (element == ancestor) return true;
return false;
},
scrollTo: function(element) {
element = $(element);
var pos = Position.cumulativeOffset(element);
window.scrollTo(pos[0], pos[1]);
return element;
},
getStyle: function(element, style) {
element = $(element);
if (['float','cssFloat'].include(style))
style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
style = style.camelize();
var value = element.style[style];
if (!value) {
if (document.defaultView && document.defaultView.getComputedStyle) {
var css = document.defaultView.getComputedStyle(element, null);
value = css ? css[style] : null;
} else if (element.currentStyle) {
value = element.currentStyle[style];
}
}
if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
value = element['offset'+style.capitalize()] + 'px';
if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
if (Element.getStyle(element, 'position') == 'static') value = 'auto';
if(style == 'opacity') {
if(value) return parseFloat(value);
if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
if(value[1]) return parseFloat(value[1]) / 100;
return 1.0;
}
return value == 'auto' ? null : value;
},
setStyle: function(element, style) {
element = $(element);
for (var name in style) {
var value = style[name];
if(name == 'opacity') {
if (value == 1) {
value = (/Gecko/.test(navigator.userAgent) &&
!/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
if(/MSIE/.test(navigator.userAgent) && !window.opera)
element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
} else if(value == '') {
if(/MSIE/.test(navigator.userAgent) && !window.opera)
element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
} else {
if(value < 0.00001) value = 0;
if(/MSIE/.test(navigator.userAgent) && !window.opera)
element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
'alpha(opacity='+value*100+')';
}
} else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
element.style[name.camelize()] = value;
}
return element;
},
getDimensions: function(element) {
element = $(element);
var display = $(element).getStyle('display');
if (display != 'none' && display != null) // Safari bug
return {width: element.offsetWidth, height: element.offsetHeight};
var els = element.style;
var originalVisibility = els.visibility;
var originalPosition = els.position;
var originalDisplay = els.display;
els.visibility = 'hidden';
els.position = 'absolute';
els.display = 'block';
var originalWidth = element.clientWidth;
var originalHeight = element.clientHeight;
els.display = originalDisplay;
els.position = originalPosition;
els.visibility = originalVisibility;
return {width: originalWidth, height: originalHeight};
},
makePositioned: function(element) {
element = $(element);
var pos = Element.getStyle(element, 'position');
if (pos == 'static' || !pos) {
element._madePositioned = true;
element.style.position = 'relative';
if (window.opera) {
element.style.top = 0;
element.style.left = 0;
}
}
return element;
},
undoPositioned: function(element) {
element = $(element);
if (element._madePositioned) {
element._madePositioned = undefined;
element.style.position =
element.style.top =
element.style.left =
element.style.bottom =
element.style.right = '';
}
return element;
},
makeClipping: function(element) {
element = $(element);
if (element._overflow) return element;
element._overflow = element.style.overflow || 'auto';
if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
element.style.overflow = 'hidden';
return element;
},
undoClipping: function(element) {
element = $(element);
if (!element._overflow) return element;
element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
element._overflow = null;
return element;
}
};
Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
Element._attributeTranslations = {};
Element._attributeTranslations.names = {
colspan:   "colSpan",
rowspan:   "rowSpan",
valign:    "vAlign",
datetime:  "dateTime",
accesskey: "accessKey",
tabindex:  "tabIndex",
enctype:   "encType",
maxlength: "maxLength",
readonly:  "readOnly",
longdesc:  "longDesc"
};
Element._attributeTranslations.values = {
_getAttr: function(element, attribute) {
return element.getAttribute(attribute, 2);
},
_flag: function(element, attribute) {
return $(element).hasAttribute(attribute) ? attribute : null;
},
style: function(element) {
return element.style.cssText.toLowerCase();
},
title: function(element) {
var node = element.getAttributeNode('title');
return node.specified ? node.nodeValue : null;
}
};
Object.extend(Element._attributeTranslations.values, {
href: Element._attributeTranslations.values._getAttr,
src:  Element._attributeTranslations.values._getAttr,
disabled: Element._attributeTranslations.values._flag,
checked:  Element._attributeTranslations.values._flag,
readonly: Element._attributeTranslations.values._flag,
multiple: Element._attributeTranslations.values._flag
});
Element.Methods.Simulated = {
hasAttribute: function(element, attribute) {
var t = Element._attributeTranslations;
attribute = t.names[attribute] || attribute;
return $(element).getAttributeNode(attribute).specified;
}
};
if (document.all && !window.opera){
Element.Methods.update = function(element, html) {
element = $(element);
html = typeof html == 'undefined' ? '' : html.toString();
var tagName = element.tagName.toUpperCase();
if (['THEAD','TBODY','TR','TD'].include(tagName)) {
var div = document.createElement('div');
switch (tagName) {
case 'THEAD':
case 'TBODY':
div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';
depth = 2;
break;
case 'TR':
div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';
depth = 3;
break;
case 'TD':
div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';
depth = 4;
}
$A(element.childNodes).each(function(node){
element.removeChild(node)
});
depth.times(function(){ div = div.firstChild });
$A(div.childNodes).each(
function(node){ element.appendChild(node) });
} else {
element.innerHTML = html.stripScripts();
}
setTimeout(function() {html.evalScripts()}, 10);
return element;
}
};
Object.extend(Element, Element.Methods);
var _nativeExtensions = false;
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
var className = 'HTML' + tag + 'Element';
if(window[className]) return;
var klass = window[className] = {};
klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
});
Element.addMethods = function(methods) {
Object.extend(Element.Methods, methods || {});
function copy(methods, destination, onlyIfAbsent) {
onlyIfAbsent = onlyIfAbsent || false;
var cache = Element.extend.cache;
for (var property in methods) {
var value = methods[property];
if (!onlyIfAbsent || !(property in destination))
destination[property] = cache.findOrStore(value);
}
}
if (typeof HTMLElement != 'undefined') {
copy(Element.Methods, HTMLElement.prototype);
copy(Element.Methods.Simulated, HTMLElement.prototype, true);
copy(Form.Methods, HTMLFormElement.prototype);
[HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
copy(Form.Element.Methods, klass.prototype);
});
_nativeExtensions = true;
}
}
var Toggle = new Object();
Toggle.display = Element.toggle;
/*--------------------------------------------------------------------------*/
Abstract.Insertion = function(adjacency) {
this.adjacency = adjacency;
}
Abstract.Insertion.prototype = {
initialize: function(element, content) {
this.element = $(element);
this.content = content.stripScripts();
if (this.adjacency && this.element.insertAdjacentHTML) {
try {
this.element.insertAdjacentHTML(this.adjacency, this.content);
} catch (e) {
var tagName = this.element.tagName.toUpperCase();
if (['TBODY', 'TR'].include(tagName)) {
this.insertContent(this.contentFromAnonymousTable());
} else {
throw e;
}
}
} else {
this.range = this.element.ownerDocument.createRange();
if (this.initializeRange) this.initializeRange();
this.insertContent([this.range.createContextualFragment(this.content)]);
}
setTimeout(function() {content.evalScripts()}, 10);
},
contentFromAnonymousTable: function() {
var div = document.createElement('div');
div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
return $A(div.childNodes[0].childNodes[0].childNodes);
}
}
var Insertion = new Object();
Insertion.Before = Class.create();
Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
initializeRange: function() {
this.range.setStartBefore(this.element);
},
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.parentNode.insertBefore(fragment, this.element);
}).bind(this));
}
});
Insertion.Top = Class.create();
Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
initializeRange: function() {
this.range.selectNodeContents(this.element);
this.range.collapse(true);
},
insertContent: function(fragments) {
fragments.reverse(false).each((function(fragment) {
this.element.insertBefore(fragment, this.element.firstChild);
}).bind(this));
}
});
Insertion.Bottom = Class.create();
Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
initializeRange: function() {
this.range.selectNodeContents(this.element);
this.range.collapse(this.element);
},
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.appendChild(fragment);
}).bind(this));
}
});
Insertion.After = Class.create();
Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
initializeRange: function() {
this.range.setStartAfter(this.element);
},
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.parentNode.insertBefore(fragment,
this.element.nextSibling);
}).bind(this));
}
});
/*--------------------------------------------------------------------------*/
Element.ClassNames = Class.create();
Element.ClassNames.prototype = {
initialize: function(element) {
this.element = $(element);
},
_each: function(iterator) {
this.element.className.split(/\s+/).select(function(name) {
return name.length > 0;
})._each(iterator);
},
set: function(className) {
this.element.className = className;
},
add: function(classNameToAdd) {
if (this.include(classNameToAdd)) return;
this.set($A(this).concat(classNameToAdd).join(' '));
},
remove: function(classNameToRemove) {
if (!this.include(classNameToRemove)) return;
this.set($A(this).without(classNameToRemove).join(' '));
},
toString: function() {
return $A(this).join(' ');
}
};
Object.extend(Element.ClassNames.prototype, Enumerable);
var Selector = Class.create();
Selector.prototype = {
initialize: function(expression) {
this.params = {classNames: []};
this.expression = expression.toString().strip();
this.parseExpression();
this.compileMatcher();
},
parseExpression: function() {
function abort(message) { throw 'Parse error in selector: ' + message; }
if (this.expression == '')  abort('empty expression');
var params = this.params, expr = this.expression, match, modifier, clause, rest;
while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
params.attributes = params.attributes || [];
params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
expr = match[1];
}
if (expr == '*') return this.params.wildcard = true;
while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
modifier = match[1], clause = match[2], rest = match[3];
switch (modifier) {
case '#':       params.id = clause; break;
case '.':       params.classNames.push(clause); break;
case '':
case undefined: params.tagName = clause.toUpperCase(); break;
default:        abort(expr.inspect());
}
expr = rest;
}
if (expr.length > 0) abort(expr.inspect());
},
buildMatchExpression: function() {
var params = this.params, conditions = [], clause;
if (params.wildcard)
conditions.push('true');
if (clause = params.id)
conditions.push('element.readAttribute("id") == ' + clause.inspect());
if (clause = params.tagName)
conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
if ((clause = params.classNames).length > 0)
for (var i = 0, length = clause.length; i < length; i++)
conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
if (clause = params.attributes) {
clause.each(function(attribute) {
var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
var splitValueBy = function(delimiter) {
return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
}
switch (attribute.operator) {
case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;
case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
case '|=':      conditions.push(
splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
); break;
case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;
case '':
case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
default:        throw 'Unknown operator ' + attribute.operator + ' in selector';
}
});
}
return conditions.join(' && ');
},
compileMatcher: function() {
this.match = new Function('element', 'if (!element.tagName) return false; \
element = $(element); \
return ' + this.buildMatchExpression());
},
findElements: function(scope) {
var element;
if (element = $(this.params.id))
if (this.match(element))
if (!scope || Element.childOf(element, scope))
return [element];
scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
var results = [];
for (var i = 0, length = scope.length; i < length; i++)
if (this.match(element = scope[i]))
results.push(Element.extend(element));
return results;
},
toString: function() {
return this.expression;
}
}
Object.extend(Selector, {
matchElements: function(elements, expression) {
var selector = new Selector(expression);
return elements.select(selector.match.bind(selector)).map(Element.extend);
},
findElement: function(elements, expression, index) {
if (typeof expression == 'number') index = expression, expression = false;
return Selector.matchElements(elements, expression || '*')[index || 0];
},
findChildElements: function(element, expressions) {
return expressions.map(function(expression) {
return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
var selector = new Selector(expr);
return results.inject([], function(elements, result) {
return elements.concat(selector.findElements(result || element));
});
});
}).flatten();
}
});
function $$() {
return Selector.findChildElements(document, $A(arguments));
}
var Form = {
reset: function(form) {
$(form).reset();
return form;
},
serializeElements: function(elements, getHash) {
var data = elements.inject({}, function(result, element) {
if (!element.disabled && element.name) {
var key = element.name, value = $(element).getValue();
if (value != undefined) {
if (result[key]) {
if (result[key].constructor != Array) result[key] = [result[key]];
result[key].push(value);
}
else result[key] = value;
}
}
return result;
});
return getHash ? data : Hash.toQueryString(data);
}
};
Form.Methods = {
serialize: function(form, getHash) {
return Form.serializeElements(Form.getElements(form), getHash);
},
getElements: function(form) {
return $A($(form).getElementsByTagName('*')).inject([],
function(elements, child) {
if (Form.Element.Serializers[child.tagName.toLowerCase()])
elements.push(Element.extend(child));
return elements;
}
);
},
getInputs: function(form, typeName, name) {
form = $(form);
var inputs = form.getElementsByTagName('input');
if (!typeName && !name) return $A(inputs).map(Element.extend);
for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
var input = inputs[i];
if ((typeName && input.type != typeName) || (name && input.name != name))
continue;
matchingInputs.push(Element.extend(input));
}
return matchingInputs;
},
disable: function(form) {
form = $(form);
form.getElements().each(function(element) {
element.blur();
element.disabled = 'true';
});
return form;
},
enable: function(form) {
form = $(form);
form.getElements().each(function(element) {
element.disabled = '';
});
return form;
},
findFirstElement: function(form) {
return $(form).getElements().find(function(element) {
return element.type != 'hidden' && !element.disabled &&
['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
});
},
focusFirstElement: function(form) {
form = $(form);
form.findFirstElement().activate();
return form;
}
}
Object.extend(Form, Form.Methods);
/*--------------------------------------------------------------------------*/
Form.Element = {
focus: function(element) {
$(element).focus();
return element;
},
select: function(element) {
$(element).select();
return element;
}
}
Form.Element.Methods = {
serialize: function(element) {
element = $(element);
if (!element.disabled && element.name) {
var value = element.getValue();
if (value != undefined) {
var pair = {};
pair[element.name] = value;
return Hash.toQueryString(pair);
}
}
return '';
},
getValue: function(element) {
element = $(element);
var method = element.tagName.toLowerCase();
return Form.Element.Serializers[method](element);
},
clear: function(element) {
$(element).value = '';
return element;
},
present: function(element) {
return $(element).value != '';
},
activate: function(element) {
element = $(element);
element.focus();
if (element.select && ( element.tagName.toLowerCase() != 'input' ||
!['button', 'reset', 'submit'].include(element.type) ) )
element.select();
return element;
},
disable: function(element) {
element = $(element);
element.disabled = true;
return element;
},
enable: function(element) {
element = $(element);
element.blur();
element.disabled = false;
return element;
}
}
Object.extend(Form.Element, Form.Element.Methods);
var Field = Form.Element;
var $F = Form.Element.getValue;
/*--------------------------------------------------------------------------*/
Form.Element.Serializers = {
input: function(element) {
switch (element.type.toLowerCase()) {
case 'checkbox':
case 'radio':
return Form.Element.Serializers.inputSelector(element);
default:
return Form.Element.Serializers.textarea(element);
}
},
inputSelector: function(element) {
return element.checked ? element.value : null;
},
textarea: function(element) {
return element.value;
},
select: function(element) {
return this[element.type == 'select-one' ?
'selectOne' : 'selectMany'](element);
},
selectOne: function(element) {
var index = element.selectedIndex;
return index >= 0 ? this.optionValue(element.options[index]) : null;
},
selectMany: function(element) {
var values, length = element.length;
if (!length) return null;
for (var i = 0, values = []; i < length; i++) {
var opt = element.options[i];
if (opt.selected) values.push(this.optionValue(opt));
}
return values;
},
optionValue: function(opt) {
return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
}
}
/*--------------------------------------------------------------------------*/
Abstract.TimedObserver = function() {}
Abstract.TimedObserver.prototype = {
initialize: function(element, frequency, callback) {
this.frequency = frequency;
this.element   = $(element);
this.callback  = callback;
this.lastValue = this.getValue();
this.registerCallback();
},
registerCallback: function() {
setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},
onTimerEvent: function() {
var value = this.getValue();
var changed = ('string' == typeof this.lastValue && 'string' == typeof value
? this.lastValue != value : String(this.lastValue) != String(value));
if (changed) {
this.callback(this.element, value);
this.lastValue = value;
}
}
}
Form.Element.Observer = Class.create();
Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
getValue: function() {
return Form.Element.getValue(this.element);
}
});
Form.Observer = Class.create();
Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
getValue: function() {
return Form.serialize(this.element);
}
});
/*--------------------------------------------------------------------------*/
Abstract.EventObserver = function() {}
Abstract.EventObserver.prototype = {
initialize: function(element, callback) {
this.element  = $(element);
this.callback = callback;
this.lastValue = this.getValue();
if (this.element.tagName.toLowerCase() == 'form')
this.registerFormCallbacks();
else
this.registerCallback(this.element);
},
onElementEvent: function() {
var value = this.getValue();
if (this.lastValue != value) {
this.callback(this.element, value);
this.lastValue = value;
}
},
registerFormCallbacks: function() {
Form.getElements(this.element).each(this.registerCallback.bind(this));
},
registerCallback: function(element) {
if (element.type) {
switch (element.type.toLowerCase()) {
case 'checkbox':
case 'radio':
Event.observe(element, 'click', this.onElementEvent.bind(this));
break;
default:
Event.observe(element, 'change', this.onElementEvent.bind(this));
break;
}
}
}
}
Form.Element.EventObserver = Class.create();
Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
getValue: function() {
return Form.Element.getValue(this.element);
}
});
Form.EventObserver = Class.create();
Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
getValue: function() {
return Form.serialize(this.element);
}
});
if (!window.Event) {
var Event = new Object();
}
Object.extend(Event, {
KEY_BACKSPACE: 8,
KEY_TAB:       9,
KEY_RETURN:   13,
KEY_ESC:      27,
KEY_LEFT:     37,
KEY_UP:       38,
KEY_RIGHT:    39,
KEY_DOWN:     40,
KEY_DELETE:   46,
KEY_HOME:     36,
KEY_END:      35,
KEY_PAGEUP:   33,
KEY_PAGEDOWN: 34,
element: function(event) {
return event.target || event.srcElement;
},
isLeftClick: function(event) {
return (((event.which) && (event.which == 1)) ||
((event.button) && (event.button == 1)));
},
pointerX: function(event) {
return event.pageX || (event.clientX +
(document.documentElement.scrollLeft || document.body.scrollLeft));
},
pointerY: function(event) {
return event.pageY || (event.clientY +
(document.documentElement.scrollTop || document.body.scrollTop));
},
stop: function(event) {
if (event.preventDefault) {
event.preventDefault();
event.stopPropagation();
} else {
event.returnValue = false;
event.cancelBubble = true;
}
},
findElement: function(event, tagName) {
var element = Event.element(event);
while (element.parentNode && (!element.tagName ||
(element.tagName.toUpperCase() != tagName.toUpperCase())))
element = element.parentNode;
return element;
},
observers: false,
_observeAndCache: function(element, name, observer, useCapture) {
if (!this.observers) this.observers = [];
if (element.addEventListener) {
this.observers.push([element, name, observer, useCapture]);
element.addEventListener(name, observer, useCapture);
} else if (element.attachEvent) {
this.observers.push([element, name, observer, useCapture]);
element.attachEvent('on' + name, observer);
}
},
unloadCache: function() {
if (!Event.observers) return;
for (var i = 0, length = Event.observers.length; i < length; i++) {
Event.stopObserving.apply(this, Event.observers[i]);
Event.observers[i][0] = null;
}
Event.observers = false;
},
observe: function(element, name, observer, useCapture) {
element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' &&
(navigator.appVersion.match(/Konqueror|Safari|KHTML/)
|| element.attachEvent))
name = 'keydown';
Event._observeAndCache(element, name, observer, useCapture);
},
stopObserving: function(element, name, observer, useCapture) {
element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' &&
(navigator.appVersion.match(/Konqueror|Safari|KHTML/)
|| element.detachEvent))
name = 'keydown';
if (element.removeEventListener) {
element.removeEventListener(name, observer, useCapture);
} else if (element.detachEvent) {
try {
element.detachEvent('on' + name, observer);
} catch (e) {}
}
}
});
/* prevent memory leaks in IE */
if (navigator.appVersion.match(/\bMSIE\b/))
Event.observe(window, 'unload', Event.unloadCache, false);
var Position = {
includeScrollOffsets: false,
prepare: function() {
this.deltaX =  window.pageXOffset
|| document.documentElement.scrollLeft
|| document.body.scrollLeft
|| 0;
this.deltaY =  window.pageYOffset
|| document.documentElement.scrollTop
|| document.body.scrollTop
|| 0;
},
realOffset: function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.scrollTop  || 0;
valueL += element.scrollLeft || 0;
element = element.parentNode;
} while (element);
return [valueL, valueT];
},
cumulativeOffset: function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop  || 0;
valueL += element.offsetLeft || 0;
element = element.offsetParent;
} while (element);
return [valueL, valueT];
},
positionedOffset: function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop  || 0;
valueL += element.offsetLeft || 0;
element = element.offsetParent;
if (element) {
if(element.tagName=='BODY') break;
var p = Element.getStyle(element, 'position');
if (p == 'relative' || p == 'absolute') break;
}
} while (element);
return [valueL, valueT];
},
offsetParent: function(element) {
if (element.offsetParent) return element.offsetParent;
if (element == document.body) return element;
while ((element = element.parentNode) && element != document.body)
if (Element.getStyle(element, 'position') != 'static')
return element;
return document.body;
},
within: function(element, x, y) {
if (this.includeScrollOffsets)
return this.withinIncludingScrolloffsets(element, x, y);
this.xcomp = x;
this.ycomp = y;
this.offset = this.cumulativeOffset(element);
return (y >= this.offset[1] &&
y <  this.offset[1] + element.offsetHeight &&
x >= this.offset[0] &&
x <  this.offset[0] + element.offsetWidth);
},
withinIncludingScrolloffsets: function(element, x, y) {
var offsetcache = this.realOffset(element);
this.xcomp = x + offsetcache[0] - this.deltaX;
this.ycomp = y + offsetcache[1] - this.deltaY;
this.offset = this.cumulativeOffset(element);
return (this.ycomp >= this.offset[1] &&
this.ycomp <  this.offset[1] + element.offsetHeight &&
this.xcomp >= this.offset[0] &&
this.xcomp <  this.offset[0] + element.offsetWidth);
},
overlap: function(mode, element) {
if (!mode) return 0;
if (mode == 'vertical')
return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
element.offsetHeight;
if (mode == 'horizontal')
return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
element.offsetWidth;
},
page: function(forElement) {
var valueT = 0, valueL = 0;
var element = forElement;
do {
valueT += element.offsetTop  || 0;
valueL += element.offsetLeft || 0;
if (element.offsetParent==document.body)
if (Element.getStyle(element,'position')=='absolute') break;
} while (element = element.offsetParent);
element = forElement;
do {
if (!window.opera || element.tagName=='BODY') {
valueT -= element.scrollTop  || 0;
valueL -= element.scrollLeft || 0;
}
} while (element = element.parentNode);
return [valueL, valueT];
},
clone: function(source, target) {
var options = Object.extend({
setLeft:    true,
setTop:     true,
setWidth:   true,
setHeight:  true,
offsetTop:  0,
offsetLeft: 0
}, arguments[2] || {})
source = $(source);
var p = Position.page(source);
target = $(target);
var delta = [0, 0];
var parent = null;
if (Element.getStyle(target,'position') == 'absolute') {
parent = Position.offsetParent(target);
delta = Position.page(parent);
}
if (parent == document.body) {
delta[0] -= document.body.offsetLeft;
delta[1] -= document.body.offsetTop;
}
if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
if(options.setWidth)  target.style.width = source.offsetWidth + 'px';
if(options.setHeight) target.style.height = source.offsetHeight + 'px';
},
absolutize: function(element) {
element = $(element);
if (element.style.position == 'absolute') return;
Position.prepare();
var offsets = Position.positionedOffset(element);
var top     = offsets[1];
var left    = offsets[0];
var width   = element.clientWidth;
var height  = element.clientHeight;
element._originalLeft   = left - parseFloat(element.style.left  || 0);
element._originalTop    = top  - parseFloat(element.style.top || 0);
element._originalWidth  = element.style.width;
element._originalHeight = element.style.height;
element.style.position = 'absolute';
element.style.top    = top + 'px';
element.style.left   = left + 'px';
element.style.width  = width + 'px';
element.style.height = height + 'px';
},
relativize: function(element) {
element = $(element);
if (element.style.position == 'relative') return;
Position.prepare();
element.style.position = 'relative';
var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
element.style.top    = top + 'px';
element.style.left   = left + 'px';
element.style.height = element._originalHeight;
element.style.width  = element._originalWidth;
}
}
if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
Position.cumulativeOffset = function(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop  || 0;
valueL += element.offsetLeft || 0;
if (element.offsetParent == document.body)
if (Element.getStyle(element, 'position') == 'absolute') break;
element = element.offsetParent;
} while (element);
return [valueL, valueT];
}
}
Element.addMethods();
var NTEvent = function(){};
NTEvent.observers = [];
NTEvent.add = function(element, name, observer, useCapture){
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/)	|| element.attachEvent)){
name = 'keydown';
}
var hundler = function(e){
if(!e){
e=window.event;
}
if(e&&!e.target){
e.target=e.srcElement;
}
observer.call(element,e);
};
this._observeAndCache(element, name, hundler, useCapture);
};
NTEvent._observeAndCache = function(element, name, observer, useCapture) {
if (!this.observers){
this.observers = [];
}
if (element.addEventListener) {
this.observers.push([element, name, observer, useCapture]);
element.addEventListener(name, observer, useCapture);
} else if (element.attachEvent) {
this.observers.push([element, name, observer, useCapture]);
element.attachEvent('on' + name, observer);
}
};
NTEvent.unloadCache = function() {
if (!NTEvent.observers){
return;
}
for (var i = 0; i < NTEvent.observers.length; i++){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}
NTEvent.observers = false;
};
NTEvent.remove = function(element, name){
if (!NTEvent.observers){
return;
}
var newObservers = [];
for (var i = 0; i < NTEvent.observers.length; i++){
if(NTEvent.observers[i][0] == element && (!name || (name && NTEvent.observers[i][1] == name))){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}else{
newObservers[newObservers.length] = NTEvent.observers[i];
}
}
NTEvent.observers = newObservers;
};
NTEvent.stopObserving = function(element, name, observer, useCapture) {
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent)){
name = 'keydown';
}
if (element.removeEventListener) {
element.removeEventListener(name, observer, useCapture);
} else if (element.detachEvent) {
element.detachEvent('on' + name, observer);
}
}
NTEvent.add(window, 'unload', NTEvent.unloadCache);
var NTUserAgent = function(){}
NTUserAgent.type="";
NTUserAgent.version="";
NTUserAgent.os="";
NTUserAgent.subtype="";
(function(){
var type=0;
var version=0;
var subtype=null;
var os=null;
var ua=navigator.userAgent.toLowerCase();
if(ua.indexOf("opera")!=-1){
type=4;
version=9;
if(ua.indexOf("opera/7")!=-1||ua.indexOf("opera 7")!=-1){
version=7;
}else if(ua.indexOf("opera/8")!=-1||ua.indexOf("opera 8")!=-1){
version=8;
}
}else if(ua.indexOf("msie")!=-1&&document.all){
type=1;
version=6;
if(ua.indexOf("msie 5")!=-1){
version=5;
}
}else if(ua.indexOf("safari")!=-1){
type=3;
}else if(ua.indexOf("mozilla")!=-1){
type=2;
if(ua.indexOf("firefox")!=-1){
subtype=1;
version=1.5;
if(ua.indexOf("firefox/1.0")!=-1){
version=1.0;
}
}else if(ua.indexOf("netscape")!=-1){
subtype=2;
}else if(ua.indexOf("seamonkey")!=-1){
subtype=4;
}else{
subtype=3;
version=1.8;
if(ua.indexOf("rv:1.7")!=-1){
version=1.7;
}
}
}
if(ua.indexOf("x11;")!=-1){
os=1;
}else if(ua.indexOf("macintosh")!=-1){
os=2;
}
NTUserAgent.type=type;
NTUserAgent.version=version;
NTUserAgent.os=os;
NTUserAgent.subtype=subtype;
})();
/*
Copyright 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved.
Auther by myoshida@navitime.co.jp
Version1.2.2
*/
(function() {
var Vf = new Image(450,340);
var Gq = document;
var Tt = '+VzBW8wAgZi1lh3k+-/+T09Ty5b7XeU-/+Vv1XH1cwdAaWYg-';
var Mr = '+ACY-copy+ADsAIA-2007+ACA-NAVTEQ';
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = Gq.getElementById(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
function Xy(e){
if(NTUserAgent.type==1){
return e.x;
}else if(NTUserAgent.type==4){
return e.offsetX;
}else if(NTUserAgent.type==3){
return e.offsetX - s(e.target,"left");
}else{
if(e.target.x!=null){
return e.layerX - e.target.x;
}else{
return e.layerX;
}
}
};
function Nk(e){
if(NTUserAgent.type==1){
return e.y;
}else if(NTUserAgent.type==4){
return e.offsetY;
}else if(NTUserAgent.type==3){
return e.offsetY - s(e.target,"top");
}else{
if(e.target.y!=null){
return e.layerY - e.target.y;
}else{
return e.layerY;
}
}
};
function Za(e){
if(NTUserAgent.type==1){
return e.target.className;
}else if(NTUserAgent.type==3){
return e.target.className;
}else{
return e.target.className;
}
};
function Yq(a, b) {
window[a] = b;
}
function s(a,b,c){
var r = $(a).style[b];
if(r != "" && r.indexOf("px")!= -1 && r.indexOf("px") == r.length-2){
r=r.substr(0,r.indexOf("px"));
}
if(r != "" && r.indexOf("pt") != -1 && r.indexOf("pt") == r.length-2){
r=r.substr(0,r.indexOf("pt"));
}
return isNaN(r)?r:new Number(r);
}
function Vc(a,b,c,d){
var r = Gq.createElement("DIV");
if(!a || a==""){
do{
a = "div" + Math.floor(Math.random() * 1000000000);
}while($(a) != null);
}
r.id=a;
var s = r.style;
if(b!=null){s.position=b;}
if(c!=null){s.left = isNaN(c)?c:c+'px';}
if(d!=null){s.top = isNaN(d)?d:d+'px';}
return r;
}
function Hn(u,w,h){
var r = Gq.createElement("img");
if(u!=null && u!="")r.src = u;
if(w!=null){r.width = w; r.style.width = w + "px";}
if(h!=null){r.height = h; r.style.height = h + "px";}
return r;
}
function Bj(a){
if(!a) return;
var b = a.parentNode;
var l = b.childNodes.length;
for(var i=0; i<l; i++){
if(b.childNodes[i]==a){
b.removeChild(b.childNodes[i]);
break;
}
}
}
function Lw(a){
if(!a) return;
var l = a.childNodes.length;
for(var i=l; i>=0; i--){
var cl = 0;
try{
cl = a.childNodes[i].childNodes['length'];
if(cl> 0){
Lw(a.childNodes[i]);
}
a.removeChild(a.childNodes[i]);
}catch(e){
continue;
}
}
}
function CancelBubble(e){
if(NTUserAgent.type==1){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
e.cancelBubble=true;
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
}
}
function EmptyFunction(){};
var eventHandler = function(a){
var i=this;
return function(e){
if(!e){
e=window.event;
}
if(e&&!e.target){
e.target=e.srcElement;
}
i[a](e);
}
};
var methodHandler = function(a){
var i=this;
return function(){
var args = new Array(arguments.length);
for(var b=0; b<arguments.length; b++){
args[b] = arguments[b];
}
i[a].apply(i,args);
}
};
var _timeoutCounter=0;
function Jy(a){
a.prototype.setTimeout=function(timeoutHandler,elapseTime){
var Ie="tempVar"+_timeoutCounter;
_timeoutCounter++;
eval(Ie+" = this;");
var oi=timeoutHandler.replace(/\\/g,"\\\\").replace(/\"/g,'\\"');
return window.setTimeout(Ie+'._setTimeoutDispatcher("'+oi+'");'+Ie+" = null;",elapseTime);
};
a.prototype._setTimeoutDispatcher=function(He){
eval(He);
};
}
function scrollbar(a){
if(Gq.body){
Gq.body.scroll=a?"auto":"no"
if(window.innerHeight){
var s = Gq.body.style;
s.height=a?"auto":window.innerHeight-32
s.width=a?"auto":window.innerWidth-32
s.overflow=a?"visible":"hidden"
}
}else if(Gq.height){
if(a && Gq._height){
Gq.height=Gq._height
delete Gq._height
Gq.width=Gq._width
delete Gq._width
window.onresize=window._resize
}
if(!a){
if(!Gq._height){
Gq._height=Gq.height
Gq._width=Gq.width
window._resize=window.onresize
window.onresize=new Function("if(window._resize)_resize();scrollbar(false)")
}
Gq.height=window.innerHeight
Gq.width=window.innerWidth
}
}
}
var E = [
function(a,b){(window["onMapLoad"] || EmptyFunction)(a,b);},
function(a,b){(window["onMapMove"] || EmptyFunction)(a,b);},
function(a,b){(window["onMapZoom"] || EmptyFunction)(a,b);},
function(a,b,c){(window["onMapContext"] || EmptyFunction)(a,b,c);}
];
Array.prototype.push = function(a){
this[this.length] = a;
};
function setAlpha(a,b){
var s = a.style;
s.MozOpacity = b/100;
s.opacity = b/100;
if(s.filter && s.filter.length>0){
if(s.filter.indexOf("progid:DXImageTransform.Microsoft.Alpha(") > -1){
s.filter.match(/(.*progid:DXImageTransform.Microsoft.Alpha\(opacity=)\d+(\).*)/);
s.filter = RegExp.$1 + b + RegExp.$2;
}else{
return;
}
}else{
s.filter='progid:DXImageTransform.Microsoft.alpha(opacity='+b+')';
}
}
function Ff(b,w,h,p,c){
var a;
if(NTUserAgent.type==1 && NTUserAgent.version<7){
a = Vc(null,p ? "relative" : "absolute", 0, 0);
var s = a.style;
if(w) s.width = w+"px";
if(h) s.height = h+"px";
s.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="+b+")";
}else{
a = Hn(b,w,h);
a.style.position="absolute";
}
if(c) a.className = c;
return a;
}
function Vr(u,x,y,w,h,p,c){
var a=Vc("",p ? "relative" : "absolute", 0, 0);
a.style.overflow = "hidden";
Gr(a,w,h);
var b=Ff(u,Vf.width, Vf.height, false, c);
a.appendChild(b);
Vx(b,-x, -y);
if(c) a.className = c;
return a;
}
function Vx(a,b,c){
var s = a.style;
s.left = isNaN(b)?b:b+'px';
s.top= isNaN(c)?c:c+'px';
}
function Gr(a,b,c){
var s = a.style;
s.width= isNaN(b)?b:b+'px';
s.height = isNaN(c)?c:c+'px';
}
function aZ(a){
var Zf = document.createElement(a.tagName);
for(var i in a.style){
try{Zf.style[i] = a.style[i];}catch(e){}
}
var l = a.childNodes.length;
for(var i=0; i<l; i++){
var copyObject = aZ(a.childNodes[i]);
Zf.appendChild(copyObject);
}
if(a.innerHTML) Zf.innerHTML = a.innerHTML;
return Zf;
}
var NTHashMap = function(){
this.Uf = new Array();
};
NTHashMap.prototype = {
put: function(a,b){
var i = 0;
for (; i < this.Uf.length; i++) {
if (this.Uf[i].key == a) break;
}
this.Uf[i] = {key:a, value:b};
},
get: function(a){
for (var i = 0; i < this.Uf.length; i++) {
if (this.Uf[i].key == a) return this.Uf[i].value;
}
return null;
},
remove: function(a){
var exists = false;
var i = 0;
for (; i < this.Uf.length; i++) {
if (this.Uf[i].key == a) {
exists = true;
break;
}
}
if (exists) this.Uf.splice(i, 1);
},
size: function(a){
return this.Uf.length;
},
containsKey:function(a){
for (var i = 0; i < this.Uf.length; i++) {
if (this.Uf[i].key == a) return true;
}
return false;
},
toArray: function(a){
return this.Uf;
},
toString: function(){
if(this.size()==0){
return "";
}
var ret="{";
for (var i = 0; i < this.Uf.length; i++) {
if(ret.length > 1) ret += ",";
var a = this.Uf[i];
if(a.value != null) ret += a.key + ":" + a.value;
}
return ret + "}";
}
}
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTLatLng = function(a,b) {
this.Latitude = parseDms(a);
this.Longitude = parseDms(b);
};
NTLatLng.parse = function(a){
return new this(a.split(",")[0], a.split(",")[1]);
};
NTLatLng.prototype.getLongitude = function(){
return this.Longitude;
};
NTLatLng.prototype.getLatitude = function(){
return this.Latitude;
};
NTLatLng.prototype.getDmsLongitude = function(){
return changeDms(this.Longitude);
}
NTLatLng.prototype.getDmsLatitude = function(){
return changeDms(this.Latitude);
}
function changeDms(milsec){
var m= milsec<0?"-":"";
milsec = Math.abs(milsec);
var degree=(milsec-milsec%3600000)/3600000;
var minute=((milsec-degree*3600000)-(milsec-degree*3600000)%60000)/60000;
var second=((milsec-degree*3600000-minute*60000)-((milsec-degree*3600000-minute*60000)%1000))/1000;
var milliSecond=milsec-degree*3600000-minute*60000-second*1000;
return m + degree + "." + minute + "." + second + "." + milliSecond;
}
function parseDms(a){
var b = new String(a);
if(b.match(/[^0-9\-]/i)) {
var dms = new Array(4);
var m="", r=0 ,ret=0;
for(var i=0; i<b.length; i++){
if(b.substring(i,i+1).match(/[^0-9]/i)){
if(b.substring(i,i+1).match(/\-/i)){
m = "-";
}else{
r++;
}
continue;
}
if(dms[r]==null) dms[r] = "";
dms[r] += b.substring(i,i+1);
}
ret += new Number(dms[0]!=null ? dms[0]*3600000:0);
ret += new Number(dms[1]!=null ? dms[1]*60000:0);
ret += new Number(dms[2]!=null ? dms[2]*1000:0);
ret += new Number(dms[3]!=null ? dms[3]:0);
return m + ret;
}else{
return a;
}
}
function Vq(a,b,c){
if(b!=null){
a=Bu(a,b)
}
if(c!=null){
a=Fv(a,c)
}
return a
}
function Pg(a,b,c){
while(a>c){
a-=c-b
}
while(a<b){
a+=c-b
}
return a
}
function Fv(a,b){
return Math.min(a,b)
}
function Bu(a,b){
return Math.max(a,b)
}
function Gh(a){
return a*Math.PI/180
}
NTLatLng.prototype.latRadians=function(){
return Gh(Vq(this.Latitude/3600000,-90,90))
};
NTLatLng.prototype.lngRadians=function(){
return Gh(Pg(this.Longitude/3600000,-180,180))
};
NTLatLng.prototype.distanceFrom=function(a){
var b=this.latRadians();
var c=a.latRadians();
var d=b-c;
var e=this.lngRadians()-a.lngRadians();
var f=2*Math.asin(Math.sqrt(Math.pow(Math.sin(d/2),2)+Math.cos(b)*Math.cos(c)*Math.pow(Math.sin(e/2),2)));
return f*6378137
};
NTLatLng.DEFAULT = new NTLatLng(128390426,502963993);
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTPoint = function(x, y) {};
NTPoint.prototype.alert=function(){
};
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTColor = function(a,b,c) {
this.r=a;
this.g=b;
this.b=c;
};
NTColor.prototype.getWebCode = function(){
var r = new Number(this.r);
var g = new Number(this.g);
var b = new Number(this.b);
return r.toString(16) + g.toString(16) + b.toString(16);
};
NTColor.DEFAULT = new NTColor(0,0,150);
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTSize = function(a, b) {
this.x = Math.round(a);
this.y = Math.round(b);
};
NTSize.parse = function(a){
return new this(a.offsetWidth, a.offsetHeight);
}
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTMapStatus = function(a,b,c,d,e) {
this._ll = a;
this._size = b;
this._angle = c;
this._scale = d;
this._zoom = e;
this._route = new Array();
this._palette = "";
this._params = new NTHashMap();
};
NTMapStatus.prototype.setPos = function(a){
this._ll = a;
};
NTMapStatus.prototype.getPos = function(){
return this._ll;
};
NTMapStatus.prototype.setSize = function(a){
this._size = a;
};
NTMapStatus.prototype.getSize = function(){
return (this._size || new NTSize(-1,-1));
};
NTMapStatus.prototype.setAngle = function(a){
this._angle = a;
};
NTMapStatus.prototype.getAngle = function(){
return this._angle;
};
NTMapStatus.prototype.setScale = function(a){
this._scale = a;
};
NTMapStatus.prototype.getScale = function(){
return this._scale;
};
NTMapStatus.prototype.setZoom = function(a){
this._zoom = a;
};
NTMapStatus.prototype.getZoom = function(){
return this._zoom;
};
NTMapStatus.prototype.addRoute = function(a){
this._route[this._route.length] = a;
};
NTMapStatus.prototype.getRoute = function(){
return this._route;
};
NTMapStatus.prototype.removeRoute = function(a){
if(a==null) return;
var b = this._route;
var r = false;
for(var i=0; i<b.length; i++){
if(a == b[i]){
b[i] =null;
r = true;
}
}
var c = new Array();
for(var i=0; i<b.length; i++){
if(b[i]==null) continue;
c[c.length]=b[i];
}
this._route = c;
return r;
};
NTMapStatus.prototype.clearRoute = function(){
this._route = new Array();
};
NTMapStatus.prototype.setPalette = function(a){
this._palette = a;
};
NTMapStatus.prototype.getPalette = function(){
return this._palette;
};
NTMapStatus.prototype.addParam = function(a,b){
this._params.put(a,b);
};
NTMapStatus.prototype.removeParam = function(a){
this._params.remove(a);
};
NTMapStatus.prototype.getParam = function(){
return this._params.toArray();
};
NTMapStatus.DEFAULT = new NTMapStatus(new NTSize(400,400),0,3,5);
NTZoomToolbar.Mode = function() {
};
NTZoomToolbar.Mode.PC = "PC";
NTZoomToolbar.Mode.MOBILE = "MOBILE";
function NTZoomToolbar(){
this.Pf = new Array();
for (var i=arguments.length-1, j=0; i >0 ; i-=2, j++) {
this.Pf[j] = new Hv(arguments[i-1],arguments[i]);
}
this.Pc = Gq.body;
this.Xj = null;
this.Yd= eventHandler.apply(this, ["onMouseDown"]);
this.yJ= eventHandler.apply(this, ["onMouseMove"]);
this.Nn= eventHandler.apply(this, ["onMouseUp"]);
this.Wt= eventHandler.apply(this, ["onMouseOver"]);
this.Kk= eventHandler.apply(this, ["onMouseOut"]);
this.Ry= eventHandler.apply(this, ["onPlusClick"]);
this.Kh= eventHandler.apply(this, ["onMinusClick"]);
this.Cm= eventHandler.apply(this, ["onRailClick"]);
this.Zk= false;
this.changedFunc = null;
this.Gu = 9;
this.Bz = 0;
this.Ke = 10;
this.Hz= 20;
this.Zy = NTZoomToolbar.Mode.PC;
this.Cj = undefined;
this.Ic = undefined;
}
NTZoomToolbar.DEFAULT = new NTZoomToolbar(0,2,0,5,0,12,1,5,1,8,1,16,2,3,3,2,3,5,4,2,4,4,4,8);
NTZoomToolbar.prototype.addZoom = function(a,b){
this.Pf[this.Pf.length] = new Hv(a,b);
};
NTZoomToolbar.prototype.setParent = function(a){
this.Pc = a;
};
NTZoomToolbar.prototype.onChange = function(a){
this.changedFunc = a;
};
NTZoomToolbar.prototype.setStatus = function(a){
this.Xj = a;
for(var i=0; i<this.Pf.length; i++){
var z = this.Pf[i];
if(a.getScale()==z.getScale() && a.getZoom()==z.getZoom()){
this.Bz = i;
break;
}
}
if(this.Bz != 0){
this.scrollTo(this.Bz * this.Gu + 1);
}
};
NTZoomToolbar.prototype.setScaleByPoi = function(a,b){
if(a==null || a.poi==null || a.poi.length==0) return;
var Gg=0,Aw=0,Op=0,Cc=0,Xr,Mk;
for(var i=0; i<a.poi.length; i++){
if(a.poi[i]==null){continue;}
if(a.center == null){
if(Gg == 0 || Gg < a.poi[i].getLongitude()){ Gg=a.poi[i].getLongitude();}
if(Aw == 0 || Aw > a.poi[i].getLongitude()){ Aw=a.poi[i].getLongitude();}
if(Op == 0 || Op < a.poi[i].getLatitude()){ Op=a.poi[i].getLatitude();}
if(Cc == 0 || Cc > a.poi[i].getLatitude()){ Cc=a.poi[i].getLatitude();}
}else{
if(Gg == 0 || Gg < Math.abs(a.poi[i].getLongitude() - a.center.getLongitude())){
Gg = Math.abs(a.poi[i].getLongitude() - a.center.getLongitude());
}
if(Op == 0 || Op < Math.abs(a.poi[i].getLatitude() - a.center.getLatitude())){
Op = Math.abs(a.poi[i].getLatitude() - a.center.getLatitude());
}
}
}
if(a.center == null){
Xr = Math.abs(Gg - Aw)*1.1;
Mk = Math.abs(Op - Cc)*1.1;
}else{
Xr = Gg * 2 *1.1;
Mk = Op * 2 *1.1;
}
var processed = false;
for(var i=0; i < this.Pf.length; i++){
var s = new NTMapStatus(this.Xj.getPos(),this.Xj.getSize(),0,this.Pf[i].getScale(),this.Pf[i].getZoom());
var pxOfLon = Math.ceil(NTGeoUtil.getLonFactor(s));
var pxOfLat = Math.ceil(NTGeoUtil.getLatFactor(s));
if(this.Xj.getSize().x * pxOfLon > Xr && this.Xj.getSize().y * pxOfLat > Mk){
this.scrollTo(i * this.Gu + 1, true);
processed = true;
break;
}
}
if (!processed && b != null && b) {
this.scrollTo(this.Pf.length * this.Gu, true);
}
if(a.center==null){
return new NTLatLng(Math.round(new Number(Cc) + new Number(Op-Cc)/2) , Math.round(new Number(Aw) + new Number(Gg - Aw)/2));
}else{
return a.center;
}
};
NTZoomToolbar.prototype.onMouseDown = function(e){
this.Cv.onMouseDown(e);
this.Zk = true;
}
NTZoomToolbar.prototype.onMouseMove = function(e){
this.Cv.onMouseMove(e);
}
NTZoomToolbar.prototype.onMouseUp = function(e){
CancelBubble(e);
if(!this.Zk) return;
var a = this.Cv.onMouseUp(e);
this.scrollTo(s(this.Um,"top")+1);
this.Zk = false;
}
NTZoomToolbar.prototype.onRailClick = function(e){
if(e.target.parentNode != this.Xc){
return false;
}
var Gy = Nk(e);
if(NTUserAgent.type==2) Gy -=104;
if(NTUserAgent.type==3) Gy -=100;
if(NTUserAgent.type==4) Gy += e.target.offsetTop;
this.scrollTo(Gy);
};
NTZoomToolbar.prototype.scrollTo = function(a,b){
if(b==null) b=false;
var idx = Math.floor((a-1) / this.Gu);
if(idx >= this.Pf.length){
return false;
}
var ztv = this.Pf[idx];
if(this.Um) this.Um.style.top = idx * this.Gu + 1 + "px";
if(this.changedFunc != null){
this.changedFunc(ztv.getScale(), ztv.getZoom(),b);
}
};
NTZoomToolbar.prototype.load = function(){
var style;
this.jX = Vc("zoomToolbar","relative",this.Ke+"px",this.Hz+"px");
style = this.jX.style;
style.zIndex=901;
style.width = "26px";
style.padding = "2px";
this.Pc.appendChild(this.jX);
if (this.Cj) {
this.cI = Vr(Vf.src, this.Cj.left, this.Cj.top, this.Cj.width, this.Cj.height, 'relative', '');
}
else {
this.cI = Vr(Vf.src, 75, 75, 25, 25, 'relative', '');
}
style = this.cI.style;
style.left = '3px';
style.top = '2px';
this.jX.appendChild(this.cI);
this.Xc = Vr(Vf.src, 100, 50, 25, this.Pf.length * this.Gu, 'relative', '');
style = this.Xc.style;
style.left = '3px';
style.top = '0px';
if (this.Zy != NTZoomToolbar.Mode.MOBILE) {
this.jX.appendChild(this.Xc);
}
if (this.Ic) {
this.Zr = Vr(Vf.src, this.Ic.left, this.Ic.top, this.Ic.width, this.Ic.height, 'relative', '');
}
else {
this.Zr = Vr(Vf.src, 75, 50, 25, 25, 'relative', '');
}
style = this.Zr.style;
style.left = '3px';
style.top = '0px';
this.jX.appendChild(this.Zr);
this.Um = Vr(Vf.src, 75, 100, 25, 9, 'absolute', '');
style = this.Um.style;
style.top = '1px';
this.Xc.appendChild(this.Um);
var Lo = this.Um.setCapture?this.Um:window;
NTEvent.add(this.Um,'mousedown',this.Yd);
NTEvent.add(Lo,'mousemove',this.yJ);
NTEvent.add(Lo,'mouseup',this.Nn);
NTEvent.add(this.Xc, 'click', this.Cm);
NTEvent.add(this.cI,'mouseover',this.Wt);
NTEvent.add(this.Zr,'mouseover',this.Wt);
NTEvent.add(this.Um,'mouseover',this.Wt);
NTEvent.add(this.Xc,'mouseover',this.Wt);
NTEvent.add(this.cI,'mouseout',this.Kk);
NTEvent.add(this.Zr,'mouseout',this.Kk);
NTEvent.add(this.Um,'mouseout',this.Kk);
NTEvent.add(this.Xc,'mouseout',this.Kk);
NTEvent.add(this.cI,'click',this.Ry);
NTEvent.add(this.Zr,'click',this.Kh);
this.Cv = new NTMover({src:this.Um, move:this.Um});
this.Cv.downTarget=this.Um;
this.Cv.setAvailableArea(new NTSize(0,1), new NTSize(0,(s(this.Xc,"height")-s(this.Um,"height"))));
if(this.Bz != 0){
this.scrollTo(this.Bz * this.Gu + 1);
}
};
NTZoomToolbar.prototype.onMouseOver = function(e){
if(NTUserAgent.type==1 && NTUserAgent.version==5) return false;
e.target.style.cursor = "pointer";
};
NTZoomToolbar.prototype.onMouseOut = function(e){
if(NTUserAgent.type==1 && NTUserAgent.version==5) return false;
e.target.style.cursor = "default";
};
NTZoomToolbar.prototype.onMinusClick = function(e){
if(s(this.Um,"top") >= this.Pf.length * this.Gu + 1){
return false;
}
this.scrollTo(s(this.Um,"top") + this.Gu, true);
};
NTZoomToolbar.prototype.onPlusClick = function(e){
if(s(this.Um,"top") <= 1){
return false;
}
this.scrollTo(s(this.Um,"top") - this.Gu, true);
};
NTZoomToolbar.prototype.changeZoom = function(n) {
var a = Math.abs(n);
if(n > 0) {
if(s(this.Um,"top") <= 1){
return false;
}
while ((s(this.Um,"top") - this.Gu * a) < 1) {
a--;
}
this.scrollTo(s(this.Um,"top") - this.Gu * a, true);
}
if (n < 0) {
if(s(this.Um,"top") >= this.Pf.length * this.Gu + 1){
return false;
}
while ((s(this.Um,"top") + this.Gu * a) >= this.Pf.length * this.Gu + 1) {
a--;
}
this.scrollTo(s(this.Um,"top") + this.Gu * a, true);
}
}
NTZoomToolbar.prototype.getContent = function(){
return this.jX;
};
NTZoomToolbar.prototype.setZoomImage = function(a,b) {
this.Cj = a;
this.Ic = b;
};
NTZoomToolbar.prototype.setPosition = function(a, b){
this.Ke = a;
this.Hz = b;
};
NTZoomToolbar.prototype.setMode = function(a) {
this.Zy = a;
};
function Hv(a,b){
this.scale = a;
this.zoom = b;
}
Hv.prototype.getScale = function(){
return this.scale;
};
Hv.prototype.getZoom = function(){
return this.zoom;
};
function NTScaler(a,b,c){
this.Iz = b;
var top = this.Iz ? s(a, "height") - 37: s(a,"height")-45;
var bottom = (c != null && c.bottom) ? c.bottom : null;
if (bottom == null) {
this._sc = Vc('NTScale',"absolute","10px",top+"px");
} else {
this._sc = Vc('NTScale',"absolute","10px");
}
var stl;
stl = this._sc.style;
stl.zIndex = 910;
stl.font = "0px Arial";
stl.backgroundColor = "#FFF";
stl.height =!this.Iz ? "30px" : "18px";
if (bottom != null) {
stl.bottom = bottom + "px";
}
setAlpha(this._sc,60);
a.appendChild(this._sc);
if (!this.Iz) {
if (bottom == null) {
this._barMile = Vc('NTScaleBarMile',"absolute","12px", top+5+"px");
} else {
this._barMile = Vc('NTScaleBarMile',"absolute","12px");
}
stl = this._barMile.style;
stl.zIndex = 911;
stl.border = "1px #000 solid";
stl.width = "0px";
stl.height = "6px";
stl.backgroundColor = "#FFF";
stl.fontSize = "0px";
if (bottom != null) {
stl.bottom = (bottom + 17) + "px";
}
a.appendChild(this._barMile);
if (bottom == null) {
this._textMile = Vc('NTScaleTextMile',"absolute","0px",top+2+"px");
} else {
this._textMile = Vc('NTScaleTextMile',"absolute","0px");
}
stl = this._textMile.style;
stl.zIndex = 912;
stl.color = "#555";
stl.font = "bold 10px Arial";
if (bottom != null) {
stl.bottom = (bottom + 15) + "px";
}
a.appendChild(this._textMile);
}
if (bottom == null) {
if (this.Iz) {
top -= 10;
}
this._barMeter = Vc('NTScaleBarMeter',"absolute","12px", top+17+"px");
} else {
this._barMeter = Vc('NTScaleBarMeter',"absolute","12px");
}
stl = this._barMeter.style;
stl.zIndex = 911;
stl.border = "1px #000 solid";
stl.width = "0px";
stl.height = "6px";
stl.backgroundColor = "#FFF";
stl.fontSize = "0px";
if (bottom != null) {
stl.bottom = (bottom + 5) + "px";
}
a.appendChild(this._barMeter);
if (bottom == null) {
this._textMeter = Vc('NTScaleTextMeter',"absolute","0px",top+14+"px");
} else {
this._textMeter = Vc('NTScaleTextMeter',"absolute","0px");
}
stl = this._textMeter.style;
stl.zIndex = 912;
stl.color = "#555";
stl.font = "bold 10px Arial";
if (bottom != null) {
stl.bottom = (bottom + 3) + "px";
}
a.appendChild(this._textMeter);
}
NTScaler.prototype.getRange = function(a){
return Math.floor(NTGeoUtil.getLonFactor(a) * 5);
}
NTScaler.prototype.set = function(a){
var b = a.getPos();
var c = new NTLatLng(new Number(b.getLatitude()), new Number(b.getLongitude()) + this.getRange(a));
var d = b.distanceFrom(c);
var e = d*12.5;
var meter=this.of(e/1000,"Km",e,"m",1);
if (!this.Iz) {
var mile=this.of(e/1609.344,"mi.",e/0.3048,"ft.",10);
this._barMile.style.width = mile.length + "px";
this._textMile.style.left = mile.length + 17 + "px";
this._textMile.innerHTML = mile.display;
}
this._barMeter.style.width = meter.length + "px";
this._textMeter.style.left = meter.length + 17 + "px";
this._textMeter.innerHTML = meter.display;
var m;
if (!this.Iz) {
m = Math.max(meter.length,mile.length);
} else {
m = meter.length;
}
var n;
if (!this.Iz) {
n =Math.max(this._textMile.offsetWidth,this._textMeter.offsetWidth);
} else {
n = this._textMeter.offsetWidth;
}
this._sc.style.width = m + 17 + n + "px";
};
function Zt(a){
var b=a;
if(b>1){
var c=0;
while(b>=10){
b=b/10;
c=c+1
}
if(b>=5){
b=5
}else if(b>=2){
b=2
}else{
b=1
}
while(c>0){
b=b*10;
c=c-1
}
}
return b
};
NTScaler.prototype.of=function(a,b,c,d,x){
var e=a*x;
var f=b;
var m=true;
if(e<1){
e=c;
f=d;
m=false;
}
var g=Zt(e);
var h=Math.round(125*g/(2*e));
return{
length:h,display:g+" "+f
}
};
var NTPopup = function(a,b){
this.closeClickHandler = eventHandler.apply(this, ["onCloseClick"]);
this.Ei = a;
this.An = new Array();
this.Oj = new NTPopupFactor();
this.spaceX = 8;
this.spaceY = 24;
this.Zh = false;
this.Uj = 0;
this.Wm = 0;
this.Bo = 0;
this.Hf = "#FFF";
this.gG = "#949494";
if(b){
if(b.max){
this.Wm = b.max.x;
this.Bo = b.max.y;
}
if(b.bgcolor) this.Hf = b.bgcolor;
if(b.bordercolor) this.gG = b.bordercolor;
}
};
NTPopup.prototype = {
createDocument: function(a){
this.Pc = a;
this.yZ = Vc("","relative",0,0);
var s = this.yZ.style;
s.cursor = "default";
s.visibility = "hidden";
this.Oj.top = Df(25, 0, 220-(25-this.spaceX)*2, 25, 1, 0, 0, 0, this.Hf,true, this.gG );
this.Oj.middle = Df(0, 0, 240+20, 50-20, 0, 1, 1, 0, this.Hf,true, this.gG );
this.Oj.bottom = Df(25, 0, 220-(25-this.spaceX)*2, 25, 0, 0, 0, 1, this.Hf,true, this.gG );
this.Oj.tail = Ci(Vf.src,50,0,100,50,0,-1,false,"static");
this.Oj.tail.style.visibility = "hidden";
this.Oj.topleft = Ci(Vf.src,0,0,25,25,0,0,false,"object");
this.Oj.topright = Ci(Vf.src,25,0,25,25,0,0,false,"object");
this.Oj.bottomleft = Ci(Vf.src,0,25,25,25,0,0,false,"object");
this.Oj.bottomright = Ci(Vf.src,25,25,25,25,0,0,false,"object");
this.Oj.shadow = Ci(Vf.src,150,0,300,150,0,0,false,"static");
this.Oj.shadow.style.visibility = "hidden";
this.Oj.close = Ci(Vf.src,0,50,15,15,0,0,false,"object");
this.Oj.close.style.cursor = "pointer";
NTEvent.add(this.Oj.close, 'click', this.closeClickHandler);
var bg = this.Oj.getFactor();
for(var i=0; i< bg.length; i++){
this.yZ.appendChild(bg[i]);
}
this.yZ.style.position = "absolute";
this.Pc.appendChild(this.yZ);
this.Pc.appendChild(this.Oj.tail);
this.Pc.appendChild(this.Oj.shadow);
for(var o=0; o<this.Uj; o++){
this.Pc.appendChild(this.An[o].body);
}
this.setDepth();
this.resize();
return this.getDocument();
},
getDocument: function(){
return {base: this.yZ, shadow: this.Oj.shadow, tail: this.Oj.tail};
},
getPos: function(){
return this.Ei;
},
setPos: function(a){
this.Ei = a;
},
addContent: function(a,b){
b.className = "object";
var style = b.style;
style.display = "block";
style.visibility = "hidden";
style.position = "absolute";
style.cursor = "default";
var Ef = {title:a, body:b};
this.An.push(Ef);
this.Uj++;
},
getContent: function(){
return this.An;
},
setClassName: function(tagName,cName,o){
var inputs = o.getElementsByTagName(tagName);
if(inputs){
for(var i in inputs){
inputs[i].className=cName;
}
}
},
replaceContent: function(a){
for(var o=0; o<this.Uj; o++){
this.An[o].body.style.display="none";
this.An[o].body.style.visibility="hidden";
var len = this.An[o].body.childNodes.length;
for(var i=len - 1; i>=0; i--){
this.An[o].body.removeChild(this.An[o].body.childNodes[i]);
}
}
this.An = new Array();
this.Uj = 0;
this.setClassName('input','innerPopup',a.body);
this.setClassName('button','innerPopup',a.body);
this.addContent(a.title, a.body);
for(var o=0; o<this.Uj; o++){
this.Pc.appendChild(this.An[o].body);
}
this.setDepth();
this.resize();
},
resize: function(a,b){
var Wf;
if(!a && !b){
if(this.Uj == 0) return;
var Wm=130, Bo=50;
for(var i=0; i<this.Uj; i++){
Qv = this.An[i].body;
Wf = Qv.style;
Wf.position = "relative";
if(Qv.offsetWidth > Wm){
if(this.Wm > 0 && Qv.offsetWidth > this.Wm){
Wm = this.Wm<130?130:this.Wm;
Wf.width = this.Wm + "px";
}else{
Wm = Qv.offsetWidth<150?150:Qv.offsetWidth;
Wf.width = Wm+"px";
}
}else{
Wf.width = Wm+"px";
}
if(Qv.offsetHeight > Bo){
if(this.Bo>0 && Qv.offsetHeight > this.Bo){
Bo = this.Bo;
Wf.height = this.Bo - this.spaceY + "px";
Wf.overflow = "auto";
}else{
Bo = Qv.offsetHeight;
Wf.height = Bo+"px";
}
}
Wf.position = "absolute";
}
a = Wm;
b = Bo;
}
Gr(this.Oj.middle, a+(this.spaceX*2)-2, b-(25-this.spaceY/2));
Gr(this.Oj.top, a-(25-this.spaceX)*2, 24);
Gr(this.Oj.bottom, a-(25-this.spaceX)*2,24);
Vx(this.Oj.topright, a + this.spaceX -(25 - this.spaceX), 0);
Vx(this.Oj.bottomleft, 0, b+(this.spaceY/2));
Vx(this.Oj.bottomright, a + this.spaceX -(25 - this.spaceX), b+(this.spaceY/2));
Vx(this.Oj.tail, (a-100)/2+this.spaceX,-1);
Vx(this.Oj.shadow, Wm/2 - 50, this.yZ.offsetHeight - this.Oj.shadow.offsetHeight);
Vx(this.Oj.close, Wm+this.spaceX-this.Oj.close.offsetWidth, 5);
Wf = this.yZ.style;
Wf.width = a + this.spaceX * 2 + "px";
Wf.height = this.Oj.top.offsetHeight + this.Oj.middle.offsetHeight + this.Oj.bottom.offsetHeight + "px";
Wf.overflow = "hidden";
},
setDepth: function(a){
this.yZ.style.zIndex = (a||460);
this.Oj.tail.style.zIndex = (a||460)+20;
this.Oj.shadow.style.zIndex = (a||400)-200;
for(var o=0; o<this.Uj; o++){
this.An[o].body.style.zIndex = (a||400)+60;
}
},
open: function(){
this.yZ.style.visibility = "visible";
this.Oj.tail.style.visibility = "visible";
this.Oj.shadow.style.visibility = "visible";
this.Zh = true;
if(this.Uj>0) this.An[0].body.style.visibility = "visible";
},
close: function(){
this.yZ.style.visibility = "hidden";
this.Oj.tail.style.visibility = "hidden";
this.Oj.shadow.style.visibility = "hidden";
this.Zh = false;
for(var i=0; i<this.Uj; i++){
this.An[i].body.style.visibility = "hidden";
}
},
foreground: function(){
this.yZ.style.zIndex |= 100;
var bg = this.Oj.getFactor();
for(var i=0; i< bg.length; i++){
bg[i].style.zIndex |= 100;
}
for(var i=0; i<this.Uj; i++){
this.An[i].body.style.zIndex|=100;
}
},
back: function(){
this.yZ.style.zIndex &=~ 100;
var bg = this.Oj.getFactor();
for(var i=0; i< bg.length; i++){
bg[i].style.zIndex &=~ 100;
}
for(var i=0; i<this.Uj; i++){
this.An[i].body.style.zIndex &=~ 100;
}
},
remove: function(){
if(this.Oj.tail) Bj(this.Oj.tail);
if(this.Oj.shadow) Bj(this.Oj.shadow);
this.Ei = null;
this.An = null;
this.Uj = 0;
this.Wm = null;
this.Bo = null;
this.Hf = null;
this.gG = null;
this.Zh = null;
this.Oj.remove();
this.Oj = null;
if(this.yZ) Bj(this.yZ);
this.yZ = null;
},
onCloseClick: function(){
this.close();
},
hide: function(){
if(this.Zh){
this.yZ.style.visibility = "hidden";
this.Oj.tail.style.visibility = "hidden";
this.Oj.shadow.style.visibility = "hidden";
for(var i=0; i<this.Uj; i++){
this.An[i].body.style.visibility = "hidden";
}
}
},
visible: function(){
if(this.Zh){
this.yZ.style.visibility = "visible";
this.Oj.tail.style.visibility = "visible";
this.Oj.shadow.style.visibility = "visible";
for(var i=0; i<this.Uj; i++){
this.An[i].body.style.visibility = "visible";
}
}
},
isAvalable: function(){
return (this.yZ != null);
},
decorate: function(Ih){
if(Ih.border){
this.Oj.top.style.borderColor = Ih.border;
this.Oj.middle.style.borderColor = Ih.border;
this.Oj.bottom.style.borderColor = Ih.border;
}
if(Ih.color){
this.Oj.top.style.backgroundColor = Ih.color;
this.Oj.middle.style.backgroundColor = Ih.color;
this.Oj.bottom.style.backgroundColor = Ih.color;
}
if(Ih.max){
this.Wm = Ih.max.x;
this.Bo = Ih.max.y;
}
},
moveTo: function(a){
Vx(this.yZ, a.x - this.yZ.offsetWidth/2 - s(this.Pc, "left"), a.y - this.yZ.offsetHeight - this.Oj.tail.offsetHeight - s(this.Pc,"top")+1);
Vx(this.Oj.tail, a.x - 50 - s(this.Pc, "left"), a.y - this.Oj.tail.offsetHeight - s(this.Pc, "top"));
Vx(this.Oj.shadow, a.x - 50 - s(this.Pc, "left"), a.y - this.Oj.shadow.offsetHeight - s(this.Pc, "top"));
for(var i=0; i<this.Uj; i++){
Vx(this.An[i].body, a.x - this.yZ.offsetWidth/2 - s(this.Pc,"left") + this.spaceX, a.y - this.yZ.offsetHeight - this.Oj.tail.offsetHeight - s(this.Pc,"top") + this.spaceY);
}
}
};
function Ci(u,Tv,Ca,w,h,x,y,p,c){
var t = Vr(u, Tv, Ca, w, h, p, c);
var stl = t.style;
if(x) stl.left = x + "px";
if(y) stl.top = y + "px";
return t;
};
function Df(x,y,w,h,Wa,Gp,Vt,Wb,c,Nw,Tx){
var t = Vc("", Nw ? "relative" : "absolute", x ,y);
var stl = t.style;
stl.fontSize = "0";
if(Wa && Wa>0){
stl.borderTop = Wa + "px " + Tx + " solid";
h -= 1;
}
if(Gp && Gp>0){
stl.borderLeft = Gp + "px " + Tx + " solid";
w -= 1;
}
if(Vt && Vt>0){
stl.borderRight = Vt + "px " + Tx + " solid";
w -= 1;
}
if(Wb && Wb>0){
stl.borderBottom = Wb + "px " + Tx + " solid";
h -=1 ;
}
Gr(t,w,h);
stl.backgroundColor = c;
t.className = "object";
return t;
};
var NTPopupFactor = function(){
this.topleft =Vc('',"absolute", 0, 0);
this.topright =Vc('',"absolute", 0, 0);
this.bottomleft =Vc('',"absolute", 0, 0);
this.bottomright =Vc('',"absolute", 0, 0);
this.top =Vc('',"relative", 0, 0);
this.middle =Vc('',"relative", 0, 0);
this.bottom =Vc('',"relative", 0, 0);
this.tail =Vc('',"absolute", 0, 0);
this.shadow =Vc('',"absolute", 0, 0);
this.close =Vc('',"absolute", 0, 0);
};
NTPopupFactor.prototype.getFactor = function(){
return [this.top, this.middle, this.bottom,this.topleft, this.topright, this.bottomleft, this.bottomright, this.close];
};
NTPopupFactor.prototype.remove = function(){
this.topleft = null;
this.topright = null;
this.bottomleft = null;
this.bottomright = null;
this.top = null;
this.middle = null;
this.bottom = null;
this.tail = null;
this.shadow = null;
this.close = null;
};
var NTEvent = function(){};
NTEvent.observers = [];
NTEvent.add = function(element, name, observer, useCapture){
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)){
name = 'keydown';
}
var hundler = function(e){
if(!e){
e=window.event;
}
if(e&&!e.target){
e.target=e.srcElement;
}
observer.call(element,e);
};
this._observeAndCache(element, name, hundler, useCapture);
};
NTEvent._observeAndCache = function(element, name, observer, useCapture) {
if (!this.observers){
this.observers = [];
}
if (element.addEventListener) {
this.observers.push([element, name, observer, useCapture]);
element.addEventListener(name, observer, useCapture);
} else if (element.attachEvent) {
this.observers.push([element, name, observer, useCapture]);
element.attachEvent('on' + name, observer);
}
};
NTEvent.unloadCache = function() {
if (!NTEvent.observers){
return;
}
for (var i = 0; i < NTEvent.observers.length; i++){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}
NTEvent.observers = false;
};
NTEvent.remove = function(element, name){
if (!NTEvent.observers){
return;
}
var newObservers = [];
for (var i = 0; i < NTEvent.observers.length; i++){
if(NTEvent.observers[i][0] == element && (!name || (name && NTEvent.observers[i][1] == name))){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}else{
newObservers[newObservers.length] = NTEvent.observers[i];
}
}
NTEvent.observers = newObservers;
};
NTEvent.stopObserving = function(element, name, observer, useCapture) {
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent)){
name = 'keydown';
}
if (element.removeEventListener) {
element.removeEventListener(name, observer, useCapture);
} else if (element.detachEvent) {
element.detachEvent('on' + name, observer);
}
}
NTEvent.add(window, 'unload', NTEvent.unloadCache);
var NTUserAgent = function(){}
NTUserAgent.type="";
NTUserAgent.version="";
NTUserAgent.os="";
NTUserAgent.subtype="";
NTUserAgent.minorVersion="";
(function(){
var type=0;
var version=0;
var subtype=null;
var os=null;
var ua=navigator.userAgent.toLowerCase();
if(ua.indexOf("opera")!=-1){
type=4;
version=9;
if(ua.indexOf("opera/7")!=-1||ua.indexOf("opera 7")!=-1){
version=7;
}else if(ua.indexOf("opera/8")!=-1||ua.indexOf("opera 8")!=-1){
version=8;
}else if(ua.indexOf("opera/9")!=-1||ua.indexOf("opera 9")!=-1){
version=9;
var uaStr = new String(ua);
NTUserAgent.minorVersion = uaStr.substring(ua.indexOf("opera") + "opera".length + 3,ua.indexOf("opera") + "opera".length + 5);
if(NTUserAgent.minorVersion.substring(1) == " "){
NTUserAgent.minorVersion = NTUserAgent.minorVersion.substring(0,1) + "0";
}
}
}else if(ua.indexOf("msie")!=-1&&document.all){
type=1;
version=6;
if(ua.indexOf("msie 5")!=-1){
version=5;
}
}else if(ua.indexOf("safari")!=-1){
type=3;
}else if(ua.indexOf("mozilla")!=-1){
type=2;
if(ua.indexOf("firefox")!=-1){
subtype=1;
version=1.5;
if(ua.indexOf("firefox/1.0")!=-1){
version=1.0;
}
}else if(ua.indexOf("netscape")!=-1){
subtype=2;
}else if(ua.indexOf("seamonkey")!=-1){
subtype=4;
}else{
subtype=3;
version=1.8;
if(ua.indexOf("rv:1.7")!=-1){
version=1.7;
}
}
}
if(ua.indexOf("x11;")!=-1){
os=1;
}else if(ua.indexOf("macintosh")!=-1){
os=2;
}
NTUserAgent.type=type;
NTUserAgent.version=version;
NTUserAgent.os=os;
NTUserAgent.subtype=subtype;
})();
var NTMapCtrl = function(a){
this.src = a;
this.moveX = s(a, "left");
this.moveY = s(a, "top");
this.reachX = 0;
this.reachY = 0;
this.timeoutId = "";
this.endFunction;
};
NTMapCtrl.prototype.autoScrollTo=function(x,y,func){
if(x!=null) this.reachX = Math.round(x);
if(y!=null) this.reachY = Math.round(y);
if(func!=null){
this.endFunction = func;
}
var speed = (NTUserAgent.type==4 || NTUserAgent.type==2)?2:3;
var x1 = new Number(s(this.src,"left"));
var x2 = new Number(this.reachX)-x1;
var x3 = Math.abs(x2/speed)<1? (x2>0)?1:-1 : x2/speed;
var y1 = new Number(s(this.src, "top"));
var y2 = new Number(this.reachY)-y1;
var y3 = Math.abs(y2/speed)<1? (y2>0)?1:-1 : y2/speed;
if(Math.abs(x2) <= 1){
this.src.style.left = this.reachX + "px";
}else{
this.src.style.left = Math.round(x1 + x3)+ "px";
}
if(Math.abs(y2) <= 1){
this.src.style.top = this.reachY + "px";
}else{
this.src.style.top = Math.ceil(y1 + y3) + "px";
}
if(s(this.src,"left")==this.reachX && s(this.src,"top")==this.reachY){
clearTimeout(this.timeoutId);
if(this.endFunction) this.endFunction();
return false;
}
this.timeoutId = this.setTimeout("this.autoScrollTo()",10);
};
NTMapCtrl.prototype.autoMove = function(){
};
var NTMapScaleCtrl = function(a){
this.src = a;
this.startPos = new NTSize(s(a, "left"), s(a, "top"));
this.startSiz = new NTSize(a.offsetWidth, a.offsetHeight);
var stl = a.style;
stl.width = this.startSiz.x + "px";
stl.height = this.startSiz.y + "px";
this.endPos = null;
this.endSiz = null;
this.alpha = 100;
this.timeoutId = "";
this.endFunction;
};
NTMapScaleCtrl.prototype = {
autoChangeScale: function(a,c,z,func){
var speed = NTUserAgent.type==1?5:3;
if(a != null && c != null && z != null){
var Ph = new NTSize(NTGeoUtil.getLonFactor(a) , NTGeoUtil.getLatFactor(a));
a.setScale(c);
a.setZoom(z);
var hK = new NTSize(NTGeoUtil.getLonFactor(a) , NTGeoUtil.getLatFactor(a));
var Nv = Ph.x/hK.x;
var Hr = Ph.y/hK.y;
if(Nv > 5 || Nv < 0.2){
if(this.endFunction) this.endFunction();
return;
}
this.endSiz = new NTSize(Math.floor(this.startSiz.x * Nv),Math.floor(this.startSiz.y * Hr));
this.endPos = new NTSize(this.startPos.x - (Math.floor(this.startSiz.x * Nv)-this.startSiz.x)/2 , this.startPos.y - (Math.floor(this.startSiz.y * Hr)-this.startSiz.y)/2);
}
if(func!=null){
this.endFunction = func;
}
var x1 = new Number(s(this.src, "left"));
var x2 = new Number(this.endPos.x)-x1;
var x3 = Math.abs(x2/speed)<1? (x2>0)?1:-1 : x2 / speed;
var y1 = new Number(s(this.src, "top"));
var y2 = new Number(this.endPos.y)-y1;
var y3 = Math.abs(y2/speed)<1? (y2>0)?1:-1 : y2/speed;
var w1 = new Number(s(this.src, "width"));
var w2 = new Number(this.endSiz.x) - this.src.offsetWidth;
var w3 = Math.abs(w2/speed)<1? (w2>0)?1:-1 : w2/speed;
var h1 = new Number(s(this.src, "height"));
var h2 = new Number(this.endSiz.y) - this.src.offsetHeight;
var h3 = Math.abs(h2/speed)<1? (h2>0)?1:-1 : h2/speed;
var stl = this.src.style;
if(Math.abs(x2) <= 1){
stl.left = this.endPos.x + "px";
}else{
stl.left = Math.round(x1 + x3)+ "px";
}
if(Math.abs(y2) <= 1){
stl.top = this.endPos.y + "px";
}else{
stl.top = Math.ceil(y1 + y3) + "px";
}
if(Math.abs(w2) <= 1){
stl.width = this.endSiz.x + "px";
}else{
stl.width = Math.round(w1 + w3)+ "px";
}
if(Math.abs(h2) <= 1){
stl.height = this.endSiz.y + "px";
}else{
stl.height = Math.ceil(h1 + h3) + "px";
}
this.alpha -= 3;
setAlpha(this.src, this.alpha);
if(s(this.src, "left")==this.endPos.x && s(this.src, "top")==this.endPos.y){
this.stop();
return;
}
this.timeoutId = this.setTimeout("this.autoChangeScale()",10);
},
iswork: function(){
return (this.timeoutId!="");
},
stop: function(){
clearTimeout(this.timeoutId);
this.timeoutId = "";
if(this.endFunction) this.endFunction();
}
}
var NTResizer = function(a){
this.src = a;
this.reachW = 0;
this.reachH = 0;
this.timeoutId = "";
this.endFunction;
};
NTResizer.prototype.autoResize=function(initw,inith,endw,endh,func){
var stl = this.src.style;
if(initw) stl.width = initw + "px";
if(inith) stl.height = inith + "px";
if(endw) this.reachW = Math.round(endw);
if(endw) this.reachH = Math.round(endh);
if(func!=null){
this.endFunction = func;
}
var x1 = new Number(s(this.src,"width"));
var x2 = new Number(this.reachW)-x1;
var x3 = Math.abs(x2/5)<1? (x2>0)?1:-1 : x2/5;
var y1 = new Number(s(this.src,"height"));
var y2 = new Number(this.reachH)-y1;
var y3 = Math.abs(y2/5)<1? (y2>0)?1:-1 : y2/5;
if(Math.abs(x2) <= 1){
stl.width = this.reachW + "px";
}else{
stl.width = Math.round(x1 + x3)+ "px";
}
if(Math.abs(y2) <= 1){
stl.height = this.reachH + "px";
}else{
stl.height = Math.ceil(y1 + y3) + "px";
}
if(s(this.src,"width")==this.reachW && s(this.src,"height")==this.reachH){
clearTimeout(this.timeoutId);
if(this.endFunction) this.endFunction();
return false;
}
this.timeoutId = this.setTimeout("this.autoResize()",10);
};
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTMapIcon = function(a,b,c,d) {
this.Ei=a;
this.Pv = b;
this.Jh = d;
this.Oy = c;
this.Nf;
this.oL;
this.Le;
this.Ck = new Array();
this.Mw = 7;
this.Initialize();
};
NTMapIcon.prototype = {
Initialize: function(){
this.Nf = Ff(this.Pv.src, this.Pv.width,this.Pv.height);
this.Nf.className = (this.Oy !=null && this.Oy != "") ? "object" : "static";
this.Nf.style.visibility = "hidden";
if(this.Jh){
this.oL = Ff(this.Jh.src, this.Jh.width,this.Jh.height);
this.oL.className = "static";
this.oL.style.visibility = "hidden";
}
},
addDocument: function(a,b){
this._parent = a;
this._zindex = b;
this.Nf.style.zIndex=this._zindex;
this._parent.appendChild(this.Nf);
this.Np = document.createElement("div");
this.Np.className="object";
this.Np.style.position = "absolute";
this.Np.style.width = this.Nf.offsetWidth+"px";
this.Np.style.height = this.Nf.offsetHeight+"px";
this.Np.style.zIndex = 440;
this._parent.appendChild(this.Np);
for(var e = 0; e < this.Ck.length; e++){
NTEvent.add(this.Np, this.Ck[e].type, this.Ck[e].func);
}
if(this.oL){
this.oL.style.zIndex=this._zindex-200;
this._parent.appendChild(this.oL);
}
},
addEvent: function(a,b){
this.Ck.push({type:a, func:b});
},
removeEvent: function(){
},
getEvent: function(a){
if(a!=null){
for(e in this.Ck){
if(e.type == a) return e.func;
}
return function(){};
}
return this.Ck;
},
getId: function(){return this.Oy;},
getImage: function(){return this.Nf;},
getCather: function(){return this.Np;},
getShadow: function(){return this.oL;},
getPos: function(){return this.Ei;},
remove: function(){
var len = this._parent.childNodes.length;
for(var i=0; i<len; i++){
if(this._parent.childNodes[i]==this.Nf){
this._parent.removeChild(this._parent.childNodes[i]);
}
if(this.oL != null && this._parent.childNodes[i]==this.oL){
this._parent.removeChild(this._parent.childNodes[i]);
}
}
if (this.Np) {
this._parent.removeChild(this.Np);
}
this.Nf = null;
this.oL = null;
},
rebuild: function(){
this.Initialize();
this.addDocument(this._parent,this._zindex);
},
hide: function(){
if(!this.Nf) return;
this.Nf.style.visibility = "hidden";
if(this.oL) this.oL.style.visibility = "hidden";
},
visible: function(){
if(!this.Nf) return;
this.Nf.style.visibility = "visible";
if(this.oL) this.oL.style.visibility = "visible";
},
setGroup: function(a){
this.Le = a;
},
getGroup: function(){
return this.Le;
},
setIconPosition: function(a){
this.Mw = a;
},
getIconPosition: function(){
return this.Mw;
}
}
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTImage = function(a,b,c) {
this.src=a;
this.width=b;
this.height=c;
};
NTImage.prototype.getImage = function(){
return Hn(this.src,this.width,this.height);
}
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTGeoUtil = function() {};
NTGeoUtil.JP = function(a){
if(a.getLongitude() > 441230691 && a.getLatitude() > 86737111 && a.getLongitude() < 525430675 && a.getLatitude() < 165297104){
return true;
}
return false;
}
NTGeoUtil.getLonFactor = function(a){
var b = new Array(200000,33333.3,2727.27,818.181,163.636);
return b[a.getScale()]/a.getZoom();
};
NTGeoUtil.getLatFactor = function(a){
if(NTGeoUtil.JP(a.getPos())){
var b = new Array(160000,26666.6,2222.22,666.666,133.333);
return b[a.getScale()]/a.getZoom();
}
var wmesh = 0;
wmesh = this.getWorldMesh(a.getPos().getLatitude());
return this.getCurvature(a.getScale(),wmesh)/a.getZoom();
};
NTGeoUtil.pixel2LonLat = function(size,status){
var moveX,x1,x2,x2_1,x2_2;
var moveY,y1,y2,y2_1,y2_2;
if(status.getAngle() == 0){
moveX = size.x;
}else{
if(status.getAngle() < 90){
x1 = size.y; x2 = -size.x;
}else if(status.getAngle() < 180){
x1 = -size.x; x2 = -size.y;
}else if(status.getAngle() < 270){
x1 = -size.y; x2 = size.x;
}else{
x1 = size.x; x2 = size.y;
}
r = (status.getAngle() % 90) * (3.14/180);
x2_1 = x1 * Math.tan(r);
x2_2 = x2 - x2_1;
moveX = -Math.round(x2_2 * Math.cos(r) );
}
var lon = Math.round(moveX * this.getLonFactor(status));
if(status.getAngle() == 0){
moveY = size.y;
}else{
if(status.getAngle() < 90){
y1 = size.y; y2 = -size.x;
}else if(status.getAngle() < 180){
y1 = -size.x; y2 = -size.y;
}else if(status.getAngle() < 270){
y1 = -size.y; y2 = size.x;
}else{
y1 = size.x; y2 = size.y;
}
r = (status.getAngle() % 90) * (3.14/180);
y2_1 = y1 * Math.tan(r);
y2_2 = y2 - y2_1;
moveY = Math.round(y1 / Math.cos(r) + (y2_2 * Math.sin(r)) );
}
var lat = Math.round(moveY * this.getLatFactor(status));
return new NTLatLng(new Number(status.getPos().getLatitude()) - new Number(lat), new Number(status.getPos().getLongitude()) + new Number(lon));
};
NTGeoUtil.LonLat2Pixel = function(a,b){
var s = b.getSize();
var p = b.getPos();
var xx = this.pixel2LonLat(new NTSize(s.x,s.y/2),b).getLongitude()-p.getLongitude();
var yx = a.getLongitude() - p.getLongitude();
var zx = Math.round((yx/xx) * s.x + (s.x/2));
var xy = p.getLatitude() - this.pixel2LonLat(new NTSize(s.x/2,s.y),b).getLatitude();
var yy = p.getLatitude() - a.getLatitude();
var zy = Math.round((yy/xy) * s.y + (s.y/2));
return new NTSize(zx,zy);
};
NTGeoUtil.getWorldMesh = function(a){
/*
for(var i=169; i<=270; i++){
if((81600000 + (i-168) * 2400000) > a){
return i;
}
}
return -1;
*/
return Math.round((a/3600000) * 3/2) + 134;
};
NTGeoUtil.CURVATURE = [0,0,0,0,0,0,0,0,1220,1220,1220,1220,1159,1098,1035,961,895,833,775,720,659,610,565,542,520,499,482,466,451,438,426,412,399,389,377,366,357,349,342,336,329,323,317,311,305,299,293,287,281,275,265,261,257,254,250,248,245,242,239,235,232,229,226,222,218,216,214,211,209,206,205,204,201,200,199,198,195,194,193,192,189,187,185,184,182,181,178,176,173,171,168,167,166,165,163,162,161,160,159,157,156,155,153,153,153,153,153,153,151,151,151,151,151,151,151,149,149,149,149,149,149,149,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,148,148,148,148,148,148,149,149,149,149,149,149,150,150,150,150,150,150,151,151,151,151,151,151,153,153,153,153,153,153,155,156,157,159,160,161,162,163,165,166,167,168,171,173,176,178,181,182,184,185,187,189,192,193,194,195,198,199,200,201,204,205,206,209,211,214,216,218,222,226,229,232,235,239,242,245,248,250,254,257,261,265,275,281,287,293,299,305,311,317,323,329,336,342,349,357,366,377,389,399,412,426,438,451,466,482,499,520,542,565,610,659,720,775,833,895,961,1035,1098,1159,1220,1220,1220,1220];
NTGeoUtil.getCurvature = function(a,b){
var c = Math.floor(this.CURVATURE[b]/4);
c = a<2?Math.floor(c/3):c;
switch(a){
case 0:
return 2400000/c;
case 1:
return 400000/c;
case 2:
return 100000/c;
case 3:
return 30000/c;
case 4:
return 6000/c;
default:
return 0;
}
};
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTScale = function() {
};
NTScale.getScale = function(a){
};
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTUrl = function() {};
NTUrl.yZ = "http://www.navitime.co.jp/mapimage.jsp";
NTUrl.create = function(a,b){
var c=this.yZ;
if(b!=null&&b.length>0){
c=b;
}
c += "?MapCenterX=" + a.getPos().getLongitude() +
"&MapCenterY=" + a.getPos().getLatitude() +
"&MapWidth=" + a.getSize().x +
"&MapHeight=" + a.getSize().y +
"&MapScale=" + a.getScale() +
"&MapZoom=" + a.getZoom() +
"&MapAngle=" + a.getAngle() +
"&DrawTarget=0&DrawDirection=0&DrawScale=0" +
"&Palette=" + a.getPalette();
for (var i = 0; i < a.getParam().length; i++) {
var o = a.getParam()[i];
if(o.value == null) continue;
c += "&" + o.key + "=" + o.value;
}
var route = a.getRoute();
var rid = 0;
var iconid = 0;
var cache = new Array();
if(route != null){
for(var i=0; i<route.length; i++){
if(!route[i].isAvailable) continue;
var oi=NTUrlUtil.isExist(cache,route[i].orv);
var di=NTUrlUtil.isExist(cache,route[i].dnv);
if(oi!=-1){
route[i].setOrvId(oi)
cache[oi].icon = NTRouteIcon.OTHER;
}else{
if(route[i].sImg == null){
cache[cache.length] = new NTRouteIcon(cache.length,route[i].orv,NTRouteIcon.START,route[i].orvtf,"");
}else{
cache[cache.length] = new NTRouteIcon(cache.length,route[i].orv,NTRouteIcon.USER_DEF,route[i].orvtf,route[i].sImg);
}
route[i].setOrvId(cache.length-1);
}
if(di!=-1){
route[i].setDnvId(di);
cache[di].icon = NTRouteIcon.OTHER;
}else{
if(route[i].gImg == null){
cache[cache.length] = new NTRouteIcon(cache.length,route[i].dnv,NTRouteIcon.END,route[i].dnvtf,"");
}else{
cache[cache.length] = new NTRouteIcon(cache.length,route[i].dnv,NTRouteIcon.USER_DEF,route[i].dnvtf,route[i].gImg);
}
route[i].setDnvId(cache.length-1);
}
}
for(var i=0; i<cache.length; i++){
c += NTUrlUtil.getIconUrl(cache[i]);
}
for(var i=0; i<route.length; i++){
if(!route[i].isAvailable) continue;
c += NTUrlUtil.getRouteUrl(route[i],i);
}
for(var i=0; i<route.length; i++){
if(route[i].tollroad == null || route[i].tollroad.length == 0) continue;
if(route[i].tollroad == 8 || route[i].tollroad == 16 || route[i].tollroad == 32){
c += "&Tollroad=" + route[i].tollroad;
break;
}else{
c += "&Tollroad=" + 0;
break;
}
}
c+= "&rnd=" + Math.ceil(Math.random(10000)*10000);
}
return c;
};
var NTUrlUtil = function(){};
NTUrlUtil.isExist=function(a,b){
for(var c=0; c<a.length; c++){
if(a[c].pos.getLongitude() == b.getLongitude() && a[c].pos.getLatitude() == b.getLatitude()){
return c;
}
}
return -1;
};
NTUrlUtil.getIconUrl=function(a){
var r = "&Icon"+a.id + "=" + a.icon + "," + a.pos.getLongitude() + "," + a.pos.getLatitude() + ",," + a.iconUrl + ",1,0,4,";
r += a.toll==null?"-1":a.toll;
return r;
};
NTUrlUtil.getRouteUrl=function(a,b){
var r = "&Route"+ b + "=" + a.oid + ",,," + a.did + ",,,,,,," + a.method + ",," + a.color.r + "," + a.color.g + "," + a.color.b;
return r;
};
var NTRouteIcon = function(a,b,c,d,e){
this.id=a;
this.pos=b;
this.icon=c;
this.toll=d;
this.iconUrl=e;
};
NTRouteIcon.START = "10001";
NTRouteIcon.END = "10002";
NTRouteIcon.OTHER = "10003";
NTRouteIcon.USER_DEF = "0";
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTMover = function(target) {
this.srcElement = target.src;
this.moveElement= target.move;
this.downTarget;
this.mouseDownPos;
this.defaultPos = new NTSize(s(target.move,"left"),s(target.move, "top"));
this.isMouseDown=false;
this.differencialX;
this.differencialY;
this.movedX;
this.movedY;
this.dummy = Vc('',"absolute",0,0);
this.minPos = null;
this.maxPos = null;
};
NTMover.prototype.setAvailableArea = function(a,b){
this.minPos = a;
this.maxPos = b;
};
NTMover.prototype.onMouseDown = function(e){
if(e.button!=0 && e.button!=1){
CancelBubble(e);
return false;
}
if(this.srcElement.setCapture) this.srcElement.setCapture();
this.differencialX = e.clientX - Xy(e);
this.differencialY = e.clientY - Nk(e);
this.defaultPos = new NTSize(s(this.moveElement, "left"),s(this.moveElement, "top"));
this.mouseDownPos = new NTSize(Xy(e), Nk(e));
this.isMouseDown = true;
this.movedX = 0;
this.movedY = 0;
CancelBubble(e);
};
NTMover.prototype.onMouseMove = function(e){
var stl = this.moveElement.style;
if(this.isMouseDown){
if(NTUserAgent.type!=1 && NTUserAgent.version!=5){
stl.cursor = "move";
}
var x,y;
x=e.clientX + this.defaultPos.x - this.mouseDownPos.x - this.differencialX;
y=e.clientY + this.defaultPos.y - this.mouseDownPos.y - this.differencialY;
if(this.minPos !=null){
if(this.minPos.x >= x){
stl.left = this.minPos.x + "px";
this.movedX = this.minPos.x-this.defaultPos.x;
}else if(this.maxPos.x < x){
stl.left = this.maxPos.x + "px";
this.movedX = this.maxPos.x-this.defaultPos.x;
}else{
stl.left = x + "px";
this.movedX = x-this.defaultPos.x;
}
}else{
stl.left = x + "px";
this.movedX = x-this.defaultPos.x;
}
if(this.maxPos != null){
if(this.minPos.y > y){
stl.top = this.minPos.y + "px";
this.movedY = this.minPos.y-this.defaultPos.y;
}else if(this.maxPos.y < y){
stl.top = this.maxPos.y + "px";
this.movedY = this.maxPos.y-this.defaultPos.y;
}else{
stl.top = y + "px";
this.movedY = y-this.defaultPos.y;
}
}else{
stl.top = y + "px";
this.movedY = y-this.defaultPos.y;
}
}else{
CancelBubble(e);
}
};
NTMover.prototype.onMouseUp = function(e){
if(e.button!=0&&e.button!=1||this.isMouseDown==false){
CancelBubble(e);
return false;
}
this.mouseDownPos = null;
this.isMouseDown = false;
if(this.dummy.setCapture) this.dummy.setCapture();
if(this.movedX == 0 && this.movedY == 0){
return false;
}
if(NTUserAgent.type!=1 && NTUserAgent.version!=5){
this.srcElement.style.cursor = "pointer";
}
this.defaultPos = new NTSize(s(this.srcElement, "left"),s(this.srcElement, "top"));
return new NTSize(-this.movedX,-this.movedY);
};
/* Copyright (C) 2006 NAVITIME JAPAN CO.,LTD. All Rights Reserved. */
var NTRoute = function(a,b,c,d,e,f,g){
this.orv = a;
this.dnv = b;
this.color = (c==null) ? NTColor.DEFAULT : c;
this.method = d;
this.orvtf = e;
this.dnvtf = f;
this.tollroad = g;
this.oid;
this.did;
this.isAvailable = true;
this.sImg = null;
this.gImg = null;
};
NTRoute.prototype.setColor = function(a){
this.color = a;
};
NTRoute.prototype.setImage = function(a,b){
this.sImg = a;
this.gImg = b;
};
NTRoute.prototype.setOrvId = function(a){
this.oid=a;
};
NTRoute.prototype.setDnvId = function(a){
this.did=a;
};
NTRoute.prototype.remove = function(){
this.isAvailable = false;
}
EscapeSJIS=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0),m;
return c<128?(c<16?"%0":"%")+c.toString(16).toUpperCase():65376<c&&c<65440?"%"+(c-65216).toString(16).toUpperCase():(c=JCT11280.indexOf(s))<0?"%81E":"%"+((m=((c<8272?c:(c=JCT11280.lastIndexOf(s)))-(c%=188))/188)<31?m+129:m+193).toString(16).toUpperCase()+(64<(c+=c<63?64:65)&&c<91||95==c||96<c&&c<123?String.fromCharCode(c):"%"+c.toString(16).toUpperCase())
})
};
UnescapeSJIS=function(str){
return str.replace(/%(8[1-9A-F]|[9E][0-9A-F]|F[0-9A-C])(%[4-689A-F][0-9A-F]|%7[0-9A-E]|[@-~])|%([0-7][0-9A-F]|A[1-9A-F]|[B-D][0-9A-F])/ig,function(s){
var c=parseInt(s.substring(1,3),16),l=s.length;
return 3==l?String.fromCharCode(c<160?c:c+65216):JCT11280.charAt((c<160?c-129:c-193)*188+(4==l?s.charCodeAt(3)-64:(c=parseInt(s.substring(4),16))<127?c-64:c-65))
})
};
EscapeEUCJP=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<128?(c<16?"%0":"%")+c.toString(16):65376<c&&c<65440?"%8E%"+(c-65216).toString(16):(c=JCT8836.indexOf(s))<0?"%A1%A6":"%"+((c-(c%=94))/94+161).toString(16)+"%"+(c+161).toString(16)).toUpperCase()
})
};
UnescapeEUCJP=function(str){
return str.replace(/(%A[1-9A-F]|%[B-E][0-9A-F]|%F[0-9A-E]){2}|%8E%(A[1-9A-F]|[B-D][0-9A-F])|%[0-7][0-9A-F]/ig,function(s){
var c=parseInt(s.substring(1),16);
return c<161?String.fromCharCode(c<128?c:parseInt(s.substring(4),16)+65216):JCT8836.charAt((c-161)*94+parseInt(s.substring(4),16)-161)
})
};
EscapeJIS7=function(str){
var u=String.fromCharCode,ri=u(92,120,48,48,45,92,120,55,70),rj=u(65377,45,65439,93,43),
H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?u(c):"%"+c.toString(16).toUpperCase()
},
I=function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":"%")+c.toString(16).toUpperCase()
},
rI=new RegExp;rI.compile("[^*+.-9A-Z_a-z-]","g");
return ("g"+str+"g").replace(RegExp("["+ri+"]+","g"),function(s){
return "%1B%28B"+s.replace(rI,I)
}).replace(RegExp("["+rj,"g"),function(s){
var c,i=0,t="%1B%28I";while(c=s.charCodeAt(i++))t+=H(c-65344);return t
}).replace(RegExp("[^"+ri+rj,"g"),function(s){
var a,c,i=0,t="%1B%24B";while(a=s.charAt(i++))t+=(c=JCT8836.indexOf(a))<0?"%21%26":H((c-(c%=94))/94+33)+H(c+33);return t
}).slice(8,-1)
};
UnescapeJIS7=function(str){
var i=0,p,q,s="",u=String.fromCharCode,
P=("%28B"+str.replace(/%49/g,"I").replace(/%1B%24%4[02]|%1B%24@/ig,"%1B%24B")).split(/%1B/i),
I=function(s){
return u(parseInt(s.substring(1),16))
},
J=function(s){
return u((3==s.length?parseInt(s.substring(1),16):s.charCodeAt(0))+65344)
},
K=function(s){
var l=s.length;
return JCT8836.charAt(4<l?(parseInt(s.substring(1),16)-33)*94+parseInt(s.substring(4),16)-33:2<l?(37==(l=s.charCodeAt(0))?(parseInt(s.substring(1,3),16)-33)*94+s.charCodeAt(3):(l-33)*94+parseInt(s.substring(2),16))-33:(s.charCodeAt(0)-33)*94+s.charCodeAt(1)-33)
},
rI=new RegExp,rJ=new RegExp,rK=new RegExp;
rI.compile("%[0-7][0-9A-F]","ig");rJ.compile("(%2[1-9A-F]|%[3-5][0-9A-F])|[!-_]","ig");
rK.compile("(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E]){2}|(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])[!-~]|[!-~](%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])|[!-~]{2}","ig");
while(p=P[i++])s+="%24B"==(q=p.substring(0,4))?p.substring(4).replace(rK,K):"%28I"==q?p.substring(4).replace(rJ,J):p.replace(rI,I).substring(2);
return s
};
EscapeJIS8=function(str){
var u=String.fromCharCode,r=u(92,120,48,48,45,92,120,55,70,65377,45,65439,93,43),
H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?u(c):"%"+c.toString(16).toUpperCase()
},
I=function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":"%")+(c<128?c:c-65216).toString(16).toUpperCase()
},
rI=new RegExp;rI.compile("[^*+.-9A-Z_a-z-]","g");
return ("g"+str+"g").replace(RegExp("["+r,"g"),function(s){
return "%1B%28B"+s.replace(rI,I)
}).replace(RegExp("[^"+r,"g"),function(s){
var a,c,i=0,t="%1B%24B";while(a=s.charAt(i++))t+=(c=JCT8836.indexOf(a))<0?"%21%26":H((c-(c%=94))/94+33)+H(c+33);return t
}).slice(8,-1)
};
UnescapeJIS8=function(str){
var i=0,p,s="",
P=("%28B"+str.replace(/%1B%24%4[02]|%1B%24@/ig,"%1B%24B")).split(/%1B/i),
I=function(s){
var c=parseInt(s.substring(1),16);
return String.fromCharCode(c<128?c:c+65216)
},
K=function(s){
var l=s.length;
return JCT8836.charAt(4<l?(parseInt(s.substring(1),16)-33)*94+parseInt(s.substring(4),16)-33:2<l?(37==(l=s.charCodeAt(0))?(parseInt(s.substring(1,3),16)-33)*94+s.charCodeAt(3):(l-33)*94+parseInt(s.substring(2),16))-33:(s.charCodeAt(0)-33)*94+s.charCodeAt(1)-33)
},
rI=new RegExp,rK=new RegExp;
rI.compile("%([0-7][0-9A-F]|A[1-9A-F]|[B-D][0-9A-F])","ig");
rK.compile("(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E]){2}|(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])[!-~]|[!-~](%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])|[!-~]{2}","ig");
while(p=P[i++])s+="%24B"==p.substring(0,4)?p.substring(4).replace(rK,K):p.replace(rI,I).substring(2);
return s
};
EscapeUnicode=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":c<256?"%":c<4096?"%u0":"%u")+c.toString(16).toUpperCase()
})
};
UnescapeUnicode=function(str){
return str.replace(/%u[0-9A-F]{4}|%[0-9A-F]{2}/ig,function(s){
return String.fromCharCode("0x"+s.substring(s.length/3))
})
};
EscapeUTF7=function(str){
var B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
E=function(s){
var c=s.charCodeAt(0);
return B[c>>10]+B[c>>4&63]+B[(c&15)<<2|(c=s.charCodeAt(1))>>14]+(0<=c?B[c>>8&63]+B[c>>2&63]+B[(c&3)<<4|(c=s.charCodeAt(2))>>12]+(0<=c?B[c>>6&63]+B[c&63]:""):"")
},
re=new RegExp;re.compile("[^+]{1,3}","g");
return (str+"g").replace(/[^*+.-9A-Z_a-z-]+[*+.-9A-Z_a-z-]|[+]/g,function(s){
if("+"==s)return "+-";
var l=s.length-1,w=s.charAt(l);
return "+"+s.substring(0,l).replace(re,E)+("+"==w?"-+-":"*"==w||"."==w||"_"==w?w:"-"+w)
}).slice(0,-1)
};
UnescapeUTF7=function(str){
var i=0,B={};
while(i<64)B["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i)]=i++;
return str.replace(RegExp("[+][+/-9A-Za-z]*-?","g"),function(s){
if("+-"==s)return "+";
var b=B[s.charAt(1)],c,i=1,t="";
while(0<=b){
if((c=i&7)<6)c=c<3?b<<10|B[s.charAt(++i)]<<4|(b=B[s.charAt(++i)])>>2:(b&3)<<14|B[s.charAt(++i)]<<8|B[s.charAt(++i)]<<2|(b=B[s.charAt(++i)])>>4;
else{c=(b&15)<<12|B[s.charAt(++i)]<<6|B[s.charAt(++i)];b=B[s.charAt(++i)]}
if(c)t+=String.fromCharCode(c)
}
return t
})
};
EscapeUTF8=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<16?"%0"+c.toString(16):c<128?"%"+c.toString(16):c<2048?"%"+(c>>6|192).toString(16)+"%"+(c&63|128).toString(16):"%"+(c>>12|224).toString(16)+"%"+(c>>6&63|128).toString(16)+"%"+(c&63|128).toString(16)).toUpperCase()
})
};
UnescapeUTF8=function(str){
return str.replace(/%(E(0%[AB]|[1-CEF]%[89AB]|D%[89])[0-9A-F]|C[2-9A-F]|D[0-9A-F])%[89AB][0-9A-F]|%[0-7][0-9A-F]/ig,function(s){
var c=parseInt(s.substring(1),16);
return String.fromCharCode(c<128?c:c<224?(c&31)<<6|parseInt(s.substring(4),16)&63:((c&15)<<6|parseInt(s.substring(4),16)&63)<<6|parseInt(s.substring(7),16)&63)
})
};
EscapeUTF16LE=function(str){
var H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?String.fromCharCode(c):(c<16?"%0":"%")+c.toString(16).toUpperCase()
};
return str.replace(/[^ ]| /g,function(s){
var c=s.charCodeAt(0);return H(c&255)+H(c>>8)
})
};
UnescapeUTF16LE=function(str){
var u=String.fromCharCode,b=u(92,120,48,48,45,92,120,70,70);
return str.replace(/^%FF%FE/i,"").replace(RegExp("%[0-9A-F]{2}%[0-9A-F]{2}|%[0-9A-F]{2}["+b+"]|["+b+"]%[0-9A-F]{2}|["+b+"]{2}","ig"),function(s){
var l=s.length;
return u(4<l?"0x"+s.substring(4,6)+s.substring(1,3):2<l?37==(l=s.charCodeAt(0))?parseInt(s.substring(1,3),16)|s.charCodeAt(3)<<8:l|parseInt(s.substring(2),16)<<8:s.charCodeAt(0)|s.charCodeAt(1)<<8)
})
};
GetEscapeCodeType=function(str){
if(/%u[0-9A-F]{4}/i.test(str))return "Unicode";
if(/%([0-9A-DF][0-9A-F]%[8A]0%|E0%80|[0-7][0-9A-F]|C[01])%[8A]0|%00|%[7F]F/i.test(str))return "UTF16LE";
if(/%E[0-9A-F]%[8A]0%[8A]0|%[CD][0-9A-F]%[8A]0/i.test(str))return "UTF8";
if(/%F[DE]/i.test(str))return /%8[0-9A-D]|%9[0-9A-F]|%A0/i.test(str)?"UTF16LE":"EUCJP";
if(/%1B/i.test(str))return /%[A-D][0-9A-F]/i.test(str)?"JIS8":"JIS7";
var S=str.substring(0,6143).replace(/%[0-9A-F]{2}|[^ ]| /ig,function(s){
return s.length<3?"40":s.substring(1)
}),c,C,i=0,T;
while(0<=(c=parseInt(S.substring(i,i+=2),16))&&i<4092)if(128<=c){
if((C=parseInt(S.substring(i,i+2),16))<128)i+=2;
else if(194<=c&&c<240&&C<192){
if(c<224){T="UTF8";i+=2;continue}
if(2==parseInt(S.charAt(i+2),16)>>2){T="UTF8";i+=4;continue}
}
if(142==c&&161<=C&&C<224){if(!T)T="EUCJP";if("EUCJP"==T)continue}
if(c<161)return "SJIS";
if(c<224&&!T)
if((164==c&&C<244||165==c&&C<247)&&161<=C)i+=2;
else T=224<=C?"EUCJP":"SJIS";
else T="EUCJP"
}
return T?T:"EUCJP"
};
JCT11280=Function('var a="zKV33~jZ4zN=~ji36XazM93y!{~k2y!o~k0ZlW6zN?3Wz3W?{EKzK[33[`y|;-~j^YOTz$!~kNy|L1$353~jV3zKk3~k-4P4zK_2+~jY4y!xYHR~jlz$_~jk4z$e3X5He<0y!wy|X3[:~l|VU[F3VZ056Hy!nz/m1XD61+1XY1E1=1y|bzKiz!H034zKj~mEz#c5ZA3-3X$1~mBz$$3~lyz#,4YN5~mEz#{ZKZ3V%7Y}!J3X-YEX_J(3~mAz =V;kE0/y|F3y!}~m>z/U~mI~j_2+~mA~jp2;~m@~k32;~m>V}2u~mEX#2x~mBy+x2242(~mBy,;2242(~may->2&XkG2;~mIy-_2&NXd2;~mGz,{4<6:.:B*B:XC4>6:.>B*BBXSA+A:X]E&E<~r#z+625z s2+zN=`HXI@YMXIAXZYUM8X4K/:Q!Z&33 3YWX[~mB`{zKt4z (zV/z 3zRw2%Wd39]S11z$PAXH5Xb;ZQWU1ZgWP%3~o@{Dgl#gd}T){Uo{y5_d{e@}C(} WU9|cB{w}bzvV|)[} H|zT}d||0~{]Q|(l{|x{iv{dw}(5}[Z|kuZ }cq{{y|ij}.I{idbof%cu^d}Rj^y|-M{ESYGYfYsZslS`?ZdYO__gLYRZ&fvb4oKfhSf^d<Yeasc1f&a=hnYG{QY{D`Bsa|u,}Dl|_Q{C%xK|Aq}C>|c#ryW=}eY{L+`)][YF_Ub^h4}[X|?r|u_ex}TL@YR]j{SrXgo*|Gv|rK}B#mu{R1}hs|dP{C7|^Qt3|@P{YVV |8&}#D}ef{e/{Rl|>Hni}R1{Z#{D[}CQlQ||E}[s{SG_+i8eplY[=[|ec[$YXn#`hcm}YR|{Ci(_[ql|?8p3]-}^t{wy}4la&pc|3e{Rp{LqiJ],] `kc(]@chYnrM`O^,ZLYhZB]ywyfGY~aex!_Qww{a!|)*lHrM{N+n&YYj~Z b c#e_[hZSon|rOt`}hBXa^i{lh|<0||r{KJ{kni)|x,|0auY{D!^Sce{w;|@S|cA}Xn{C1h${E]Z-XgZ*XPbp]^_qbH^e[`YM|a||+=]!Lc}]vdBc=j-YSZD]YmyYLYKZ9Z>Xcczc2{Yh}9Fc#Z.l{}(D{G{{mRhC|L3b#|xK[Bepj#ut`H[,{E9Yr}1b{[e]{ZFk7[ZYbZ0XL]}Ye[(`d}c!|*y`Dg=b;gR]Hm=hJho}R-[n}9;{N![7k_{UbmN]rf#pTe[x8}!Qcs_rs[m`|>N}^V})7{^r|/E}),}HH{OYe2{Skx)e<_.cj.cjoMhc^d}0uYZd!^J_@g,[[[?{i@][|3S}Yl3|!1|eZ|5IYw|1D}e7|Cv{OHbnx-`wvb[6[4} =g+k:{C:}ed{S]|2M]-}WZ|/q{LF|dYu^}Gs^c{Z=}h>|/i|{W]:|ip{N:|zt|S<{DH[p_tvD{N<[8Axo{X4a.^o^X>Yfa59`#ZBYgY~_t^9`jZHZn`>G[oajZ;X,i)Z.^~YJe ZiZF^{][[#Zt^|]Fjx]&_5dddW]P0C[-]}]d|y {C_jUql] |OpaA[Z{lp|rz}:Mu#]_Yf6{Ep?f5`$[6^D][^u[$[6^.Z8]]ePc2U/=]K^_+^M{q*|9tYuZ,s(dS{i=|bNbB{uG}0jZOa:[-]dYtu3]:]<{DJ_SZIqr_`l=Yt`gkTnXb3d@kiq0a`Z{|!B|}e}Ww{Sp,^Z|0>_Z}36|]A|-t}lt{R6pi|v8hPu#{C>YOZHYmg/Z4nicK[}hF_Bg|YRZ7c|crkzYZY}_iXcZ.|)U|L5{R~qi^Uga@Y[xb}&qdbd6h5|Btw[}c<{Ds53[Y7]?Z<|e0{L[ZK]mXKZ#Z2^tavf0`PE[OSOaP`4gi`qjdYMgys/?[nc,}EEb,eL]g[n{E_b/vcvgb.{kcwi`~v%|0:|iK{Jh_vf5lb}KL|(oi=LrzhhY_^@`zgf[~g)[J_0fk_V{T)}I_{D&_/d9W/|MU[)f$xW}?$xr4<{Lb{y4}&u{XJ|cm{Iu{jQ}CMkD{CX|7A}G~{kt)nB|d5|<-}WJ}@||d@|Iy}Ts|iL|/^|no|0;}L6{Pm]7}$zf:|r2}?C_k{R(}-w|`G{Gy[g]bVje=_0|PT{^Y^yjtT[[[l!Ye_`ZN]@[n_)j3nEgMa]YtYpZy].d-Y_cjb~Y~[nc~sCi3|zg}B0}do{O^{|$`_|D{}U&|0+{J3|8*]iayx{a{xJ_9|,c{Ee]QXlYb]$[%YMc*]w[aafe]aVYi[fZEii[xq2YQZHg]Y~h#|Y:thre^@^|_F^CbTbG_1^qf7{L-`VFx Zr|@EZ;gkZ@slgko`[e}T:{Cu^pddZ_`yav^Ea+[#ZBbSbO`elQfLui}.F|txYcbQ`XehcGe~fc^RlV{D_0ZAej[l&jShxG[ipB_=u:eU}3e8[=j|{D(}dO{Do[BYUZ0/]AYE]ALYhZcYlYP/^-^{Yt_1_-;YT`P4BZG=IOZ&]H[e]YYd[9^F[1YdZxZ?Z{Z<]Ba2[5Yb[0Z4l?]d_;_)a?YGEYiYv`_XmZs4ZjY^Zb]6gqGaX^9Y}dXZr[g|]Y}K aFZp^k^F]M`^{O1Ys]ZCgCv4|E>}8eb7}l`{L5[Z_faQ|c2}Fj}hw^#|Ng|B||w2|Sh{v+[G}aB|MY}A{|8o}X~{E8paZ:]i^Njq]new)`-Z>haounWhN}c#{DfZ|fK]KqGZ=:u|fqoqcv}2ssm}.r{]{nIfV{JW)[K|,Z{Uxc|]l_KdCb%]cfobya3`p}G^|LZiSC]U|(X|kBlVg[kNo({O:g:|-N|qT}9?{MBiL}Sq{`P|3a|u.{Uaq:{_o|^S}jX{Fob0`;|#y_@[V[K|cw[<_ }KU|0F}d3|et{Q7{LuZttsmf^kYZ`Af`}$x}U`|Ww}d]| >}K,r&|XI|*e{C/a-bmr1fId4[;b>tQ_:]hk{b-pMge]gfpo.|(w[jgV{EC1Z,YhaY^q,_G[c_g[J0YX]`[h^hYK^_Yib,` {i6vf@YM^hdOKZZn(jgZ>bzSDc^Z%[[o9[2=/YHZ(_/Gu_`*|8z{DUZxYt^vuvZjhi^lc&gUd4|<UiA`z]$b/Z?l}YI^jaHxe|;F}l${sQ}5g}hA|e4}?o{ih}Uz{C)jPe4]H^J[Eg[|AMZMlc}:,{iz}#*|gc{Iq|/:|zK{l&}#u|myd{{M&v~nV};L|(g|I]ogddb0xsd7^V})$uQ{HzazsgxtsO^l}F>ZB]r|{7{j@cU^{{CbiYoHlng]f+nQ[bkTn/}<-d9q {KXadZYo+n|l[|lc}V2{[a{S4Zam~Za^`{HH{xx_SvF|ak=c^[v^7_rYT`ld@]:_ub%[$[m](Shu}G2{E.ZU_L_R{tz`vj(f?^}hswz}GdZ}{S:h`aD|?W|`dgG|if{a8|J1{N,}-Ao3{H#{mfsP|[ bzn+}_Q{MT{u4kHcj_q`eZj[8o0jy{p7}C|[}l){MuYY{|Ff!Ykn3{rT|m,^R|,R}$~Ykgx{P!]>iXh6[l[/}Jgcg{JYZ.^qYfYIZl[gZ#Xj[Pc7YyZD^+Yt;4;`e8YyZVbQ7YzZxXja.7SYl[s]2^/Ha$[6ZGYrb%XiYdf2]H]kZkZ*ZQ[ZYS^HZXcCc%Z|[(bVZ]]:OJQ_DZCg<[,]%Zaa [g{C00HY[c%[ChyZ,Z_`PbXa+eh`^&jPi0a[ggvhlekL]w{Yp^v}[e{~;k%a&k^|nR_z_Qng}[E}*Wq:{k^{FJZpXRhmh3^p>de^=_7`|ZbaAZtdhZ?n4ZL]u`9ZNc3g%[6b=e.ZVfC[ZZ^^^hD{E(9c(kyZ=bb|Sq{k`|vmr>izlH[u|e`}49}Y%}FT{[z{Rk}Bz{TCc/lMiAqkf(m$hDc;qooi[}^o:c^|Qm}a_{mrZ(pA`,}<2sY| adf_%|}`}Y5U;}/4|D>|$X{jw{C<|F.hK|*A{MRZ8Zsm?imZm_?brYWZrYx`yVZc3a@f?aK^ojEd {bN}/3ZH]/$YZhm^&j 9|(S|b]mF}UI{q&aM]LcrZ5^.|[j`T_V_Gak}9J[ ZCZD|^h{N9{~&[6Zd{}B}2O|cv]K}3s}Uy|l,fihW{EG`j_QOp~Z$F^zexS`dcISfhZBXP|.vn|_HYQ|)9|cr]<`&Z6]m_(ZhPcSg>`Z]5`~1`0Xcb4k1{O!bz|CN_T{LR|a/gFcD|j<{Z._[f)mPc:1`WtIaT1cgYkZOaVZOYFrEe[}T$}Ch}mk{K-^@]fH{Hdi`c*Z&|Kt{if[C{Q;{xYB`dYIX:ZB[}]*[{{p9|4GYRh2ao{DS|V+[zd$`F[ZXKadb*A] Ys]Maif~a/Z2bmclb8{Jro_rz|x9cHojbZ{GzZx_)]:{wAayeDlx}<=`g{H1{l#}9i|)=|lP{Qq}.({La|!Y{i2EZfp=c*}Cc{EDvVB|;g}2t{W4av^Bn=]ri,|y?|3+}T*ckZ*{Ffr5e%|sB{lx^0]eZb]9[SgAjS_D|uHZx]dive[c.YPkcq/}db{EQh&hQ|eg}G!ljil|BO]X{Qr_GkGl~YiYWu=c3eb}29v3|D|}4i||.{Mv})V{SP1{FX}CZW6{cm|vO{pS|e#}A~|1i}81|Mw}es|5[}3w{C`h9aL]o{}p[G`>i%a1Z@`Ln2bD[$_h`}ZOjhdTrH{[j_:k~kv[Sdu]CtL}41{I |[[{]Zp$]XjxjHt_eThoa#h>sSt8|gK|TVi[Y{t=}Bs|b7Zpr%{gt|Yo{CS[/{iteva|cf^hgn}($_c^wmb^Wm+|55jrbF|{9^ q6{C&c+ZKdJkq_xOYqZYSYXYl`8]-cxZAq/b%b*_Vsa[/Ybjac/OaGZ4fza|a)gY{P?| I|Y |,pi1n7}9bm9ad|=d{aV|2@[(}B`d&|Uz}B}{`q|/H|!JkM{FU|CB|.{}Az}#P|lk}K{|2rk7{^8^?`/|k>|Ka{Sq}Gz}io{DxZh[yK_#}9<{TRdgc]`~Z>JYmYJ]|`!ZKZ]gUcx|^E[rZCd`f9oQ[NcD_$ZlZ;Zr}mX|=!|$6ZPZYtIo%fj}CpcN|B,{VDw~gb}@hZg`Q{LcmA[(bo`<|@$|o1|Ss}9Z_}tC|G`{F/|9nd}i=}V-{L8aaeST]daRbujh^xlpq8|}zs4bj[S`J|]?G{P#{rD{]I`OlH{Hm]VYuSYUbRc*6[j`8]pZ[bt_/^Jc*[<Z?YE|Xb|?_Z^Vcas]h{t9|Uwd)_(=0^6Zb{Nc} E[qZAeX[a]P^|_J>e8`W^j_Y}R{{Jp__]Ee#e:iWb9q_wKbujrbR}CY`,{mJ}gz{Q^{t~N|? gSga`V_||:#mi}3t|/I`X{N*|ct|2g{km}gi|{={jC}F;|E}{ZZjYf*frmu}8Tdroi{T[|+~}HG{cJ}DM{Lp{Ctd&}$hi3|FZ| m}Kr|38}^c|m_|Tr{Qv|36}?Up>|;S{DV{k_as}BK{P}}9p|t`jR{sAm4{D=b4pWa[}Xi{EjwEkI}3S|E?u=X0{jf} S|NM|JC{qo^3cm]-|JUx/{Cj{s>{Crt[UXuv|D~|j|d{YXZR}Aq}0r}(_{pJfi_z}0b|-vi)Z mFe,{f4|q`b{}^Z{HM{rbeHZ|^x_o|XM|L%|uFXm}@C_{{Hhp%a7|0p[Xp+^K}9U{bP}: tT}B|}+$|b2|[^|~h{FAby[`{}xgygrt~h1[li`c4vz|,7p~b(|mviN}^pg[{N/|g3|^0c,gE|f%|7N{q[|tc|TKA{LU}I@|AZp(}G-sz{F |qZ{}F|f-}RGn6{Z]_5})B}UJ{FFb2]4ZI@v=k,]t_Dg5Bj]Z-]L]vrpdvdGlk|gF}G]|IW}Y0[G| /bo|Te^,_B}#n^^{QHYI[?hxg{[`]D^IYRYTb&kJ[cri[g_9]Ud~^_]<p@_e_XdNm-^/|5)|h_{J;{kacVopf!q;asqd}n)|.m|bf{QW|U)}b+{tL|w``N|to{t ZO|T]jF}CB|0Q{e5Zw|k |We}5:{HO{tPwf_uajjBfX}-V_C_{{r~gg|Ude;s+}KNXH}! `K}eW{Upwbk%ogaW}9EYN}YY|&v|SL{C3[5s.]Y]I]u{M6{pYZ`^,`ZbCYR[1mNg>rsk0Ym[jrE]RYiZTr*YJ{Ge|%-lf|y(`=[t}E6{k!|3)}Zk} ][G{E~cF{u3U.rJ|a9p#o#ZE|?|{sYc#vv{E=|LC}cu{N8`/`3`9rt[4|He{cq|iSYxY`}V |(Q|t4{C?]k_Vlvk)BZ^r<{CL}#h}R+[<|i=}X|{KAo]|W<`K{NW|Zx}#;|fe{IMr<|K~tJ_x}AyLZ?{GvbLnRgN}X&{H7|x~}Jm{]-| GpNu0}.ok>|c4{PYisrDZ|fwh9|hfo@{H~XSbO]Odv]%`N]b1Y]]|eIZ}_-ZA]aj,>eFn+j[aQ_+]h[J_m_g]%_wf.`%k1e#Z?{CvYu_B^|gk`Xfh^M3`afGZ-Z|[m{L}|k3cp[it ^>YUi~d>{T*}YJ{Q5{Jxa$hg|%4`}|LAgvb }G}{P=|<;Ux{_skR{cV|-*|s-{Mp|XP|$G|_J}c6cM{_=_D|*9^$ec{V;|4S{qO|w_|.7}d0|/D}e}|0G{Dq]Kdp{}dfDi>}B%{Gd|nl}lf{C-{y}|ANZr}#={T~|-(}c&{pI|ft{lsVP}){|@u}!W|bcmB{d?|iW|:dxj{PSkO|Hl]Li:}VYk@|2={fnWt{M3`cZ6|)}|Xj}BYa?vo{e4|L7|B7{L7|1W|lvYO}W8nJ|$Vih|{T{d*_1|:-n2dblk``fT{Ky|-%}m!|Xy|-a{Pz}[l{kFjz|iH}9N{WE{x,|jz}R {P|{D)c=nX|Kq|si}Ge{sh|[X{RF{t`|jsr*fYf,rK|/9}$}}Nf{y!1|<Std}4Wez{W${Fd_/^O[ooqaw_z[L`Nbv[;l7V[ii3_PeM}.h^viqYjZ*j1}+3{bt{DR[;UG}3Og,rS{JO{qw{d<_zbAh<R[1_r`iZTbv^^a}c{iEgQZ<exZFg.^Rb+`Uj{a+{z<[~r!]`[[|rZYR|?F|qppp]L|-d|}K}YZUM|=Y|ktm*}F]{D;g{uI|7kg^}%?Z%ca{N[_<q4xC]i|PqZC]n}.bDrnh0Wq{tr|OMn6tM|!6|T`{O`|>!]ji+]_bTeU}Tq|ds}n|{Gm{z,f)}&s{DPYJ`%{CGd5v4tvb*hUh~bf]z`jajiFqAii]bfy^U{Or|m+{I)cS|.9k:e3`^|xN}@Dnlis`B|Qo{`W|>||kA}Y}{ERYuYx`%[exd`]|OyiHtb}HofUYbFo![5|+]gD{NIZR|Go}.T{rh^4]S|C9_}xO^i`vfQ}C)bK{TL}cQ|79iu}9a];sj{P.o!f[Y]pM``Jda^Wc9ZarteBZClxtM{LW}l9|a.mU}KX}4@{I+f1}37|8u}9c|v${xGlz}jP{Dd1}e:}31}%3X$|22i<v+r@~mf{sN{C67G97855F4YL5}8f{DT|xy{sO{DXB334@55J1)4.G9A#JDYtXTYM4, YQD9;XbXm9SX]IB^4UN=Xn<5(;(F3YW@XkH-X_VM[DYM:5XP!T&Y`6|,^{IS-*D.H>:LXjYQ0I3XhAF:9:(==.F*3F1189K/7163D,:@|e2{LS36D4hq{Lw/84443@4.933:0307::6D7}&l{Mx657;89;,K5678H&93D(H<&<>0B90X^I;}Ag1{P%3A+>><975}[S{PZE453?4|T2{Q+5187;>447:81{C=hL6{Me^:=7ii{R=.=F<81;48?|h8}Uh{SE|,VxL{ST,7?9Y_5Xk3A#:$%YSYdXeKXOD8+TXh7(@>(YdXYHXl9J6X_5IXaL0N?3YK7Xh!1?XgYz9YEXhXaYPXhC3X`-YLY_XfVf[EGXZ5L8BXL9YHX]SYTXjLXdJ: YcXbQXg1PX]Yx4|Jr{Ys4.8YU+XIY`0N,<H%-H;:0@,74/:8546I=9177154870UC]d<C3HXl7ALYzXFXWP<<?E!88E5@03YYXJ?YJ@6YxX-YdXhYG|9o{`iXjY_>YVXe>AYFX[/(I@0841?):-B=14337:8=|14{c&93788|di{cW-0>0<097/A;N{FqYpugAFT%X/Yo3Yn,#=XlCYHYNX[Xk3YN:YRT4?)-YH%A5XlYF3C1=NWyY}>:74-C673<69545v {iT85YED=64=.F4..9878/D4378?48B3:7:7/1VX[f4{D,{l<5E75{dAbRB-8-@+;DBF/$ZfW8S<4YhXA.(5@*11YV8./S95C/0R-A4AXQYI7?68167B95HA1*<M3?1/@;/=54XbYP36}lc{qzSS38:19?,/39193574/66878Yw1X-87E6=;964X`T734:>86>1/=0;(I-1::7ALYGXhF+Xk[@W%TYbX7)KXdYEXi,H-XhYMRXfYK?XgXj.9HX_SX]YL1XmYJ>Y}WwIXiI-3-GXcYyXUYJ$X`Vs[7;XnYEZ;XF! 3;%8;PXX(N3Y[)Xi1YE&/ :;74YQ6X`33C;-(>Xm0(TYF/!YGXg8 9L5P01YPXO-5%C|qd{{/K/E6,=0144:361:955;6443@?B7*7:F89&F35YaX-CYf,XiFYRXE_e{}sF 0*7XRYPYfXa5YXXY8Xf8Y~XmA[9VjYj*#YMXIYOXk,HHX40YxYMXU8OXe;YFXLYuPXP?EB[QV0CXfY{:9XV[FWE0D6X^YVP*$4%OXiYQ(|xp|%c3{}V`1>Y`XH00:8/M6XhQ1:;3414|TE|&o@1*=81G8<3}6<|(f6>>>5-5:8;093B^3U*+*^*UT30XgYU&7*O1953)5@E78--F7YF*B&0:%P68W9Zn5974J9::3}Vk|-,C)=)1AJ4+<3YGXfY[XQXmT1M-XcYTYZXCYZXEYXXMYN,17>XIG*SaS|/eYJXbI?XdNZ+WRYP<F:R PXf;0Xg`$|1GX9YdXjLYxWX!ZIXGYaXNYm6X9YMX?9EXmZ&XZ#XQ>YeXRXfAY[4 ;0X!Zz0XdN$XhYL XIY^XGNXUYS/1YFXhYk.TXn4DXjB{jg|4DEX]:XcZMW=A.+QYL<LKXc[vV$+&PX*Z3XMYIXUQ:ZvW< YSXFZ,XBYeXMM)?Xa XiZ4/EXcP3%}&-|6~:1(-+YT$@XIYRBC<}&,|7aJ6}bp|8)K1|Xg|8C}[T|8Q.89;-964I38361<=/;883651467<7:>?1:.}le|:Z=39;1Y^)?:J=?XfLXbXi=Q0YVYOXaXiLXmJXO5?.SFXiCYW}-;|=u&D-X`N0X^,YzYRXO(QX_YW9`I|>hZ:N&X)DQXP@YH#XmNXi$YWX^=!G6YbYdX>XjY|XlX^XdYkX>YnXUXPYF)FXT[EVTMYmYJXmYSXmNXi#GXmT3X8HOX[ZiXN]IU2>8YdX1YbX<YfWuZ8XSXcZU%0;1XnXkZ_WTG,XZYX5YSX Yp 05G?XcYW(IXg6K/XlYP4XnI @XnO1W4Zp-9C@%QDYX+OYeX9>--YSXkD.YR%Q/Yo YUX].Xi<HYEZ2WdCE6YMXa7F)=,D>-@9/8@5=?7164;35387?N<618=6>7D+C50<6B03J0{Hj|N9$D,9I-,.KB3}m |NzE0::/81YqXjMXl7YG; [.W=Z0X4XQY]:MXiR,XgM?9$9>:?E;YE77VS[Y564760391?14941:0=:8B:;/1DXjFA-564=0B3XlH1+D85:0Q!B#:-6&N/:9<-R3/7Xn<*3J4.H:+334B.=>30H.;3833/76464665755:/83H6633:=;.>5645}&E|Y)?1/YG-,93&N3AE@5 <L1-G/8A0D858/30>8<549=@B8] V0[uVQYlXeD(P#ID&7T&7;Xi0;7T-$YE)E=1:E1GR):--0YI7=E<}n9|aT6783A>D7&4YG7=391W;Zx<5+>F#J39}o/|cc;6=A050EQXg8A1-}D-|d^5548083563695D?-.YOXd37I$@LYLWeYlX<Yd+YR A$;3-4YQ-9XmA0!9/XLY_YT(=5XdDI>YJ5XP1ZAW{9>X_6R(XhYO65&J%DA)C-!B:97#A9;@?F;&;(9=11/=657/H,<8}bz|j^5446>.L+&Y^8Xb6?(CYOXb*YF(8X`FYR(XPYVXmPQ%&DD(XmZXW??YOXZXfCYJ79,O)XnYF7K0!QXmXi4IYFRXS,6<%-:YO(+:-3Q!1E1:W,Zo}Am|n~;3580534*?3Zc4=9334361693:30C<6/717:<1/;>59&:4}6!|rS36=1?75<8}[B|s809983579I.A.>84758=108564741H*9E{L{|u%YQ<%6XfH.YUXe4YL@,>N}Tv|ve*G0X)Z;/)3@A74(4P&A1X:YVH97;,754*A66:1 D739E3553545558E4?-?K17/770843XAYf838A7K%N!YW4.$T19Z`WJ*0XdYJXTYOXNZ 1XaN1A+I&Xi.Xk3Z3GB&5%WhZ1+5#Y[X<4YMXhQYoQXVXbYQ8XSYUX4YXBXWDMG0WxZA[8V+Z8X;D],Va$%YeX?FXfX[XeYf<X:Z[WsYz8X_Y]%XmQ(!7BXIZFX]&YE3F$(1XgYgYE& +[+W!<YMYFXc;+PXCYI9YrWxGXY9DY[!GXiI7::)OC;*$.>N*HA@{C|}&k=:<TB83X`3YL+G4XiK]i}(fYK<=5$.FYE%4*5*H*6XkCYL=*6Xi6!Yi1KXR4YHXbC8Xj,B9ZbWx/XbYON#5B}Ue}+QKXnF1&YV5XmYQ0!*3IXBYb71?1B75XmF;0B976;H/RXU:YZX;BG-NXj;XjI>A#D3B636N;,*%<D:0;YRXY973H5)-4FXOYf0:0;/7759774;7;:/855:543L43<?6=E,.A4:C=L)%4YV!1(YE/4YF+ F3%;S;&JC:%/?YEXJ4GXf/YS-EXEYW,9;E}X$}547EXiK=51-?71C%?57;5>463553Zg90;6447?<>4:9.7538XgN{|!}9K/E&3-:D+YE1)YE/3;37/:05}n<}:UX8Yj4Yt864@JYK..G=.(A Q3%6K>3(P3#AYE$-6H/456*C=.XHY[#S.<780191;057C)=6HXj?955B:K1 E>-B/9,;5.!L?:0>/.@//:;7833YZ56<4:YE=/:7Z_WGC%3I6>XkC*&NA16X=Yz2$X:Y^&J48<99k8}CyB-61<18K946YO4{|N}E)YIB9K0L>4=46<1K0+R;6-=1883:478;4,S+3YJX`GJXh.Yp+Xm6MXcYpX(>7Yo,/:X=Z;Xi0YTYHXjYmXiXj;*;I-8S6N#XgY}.3XfYGO3C/Yf*NYX,1 6;YH&<XkK9C#I74.>}Hd`A748X[T450[n75<4439:18A107>|ET}Rf<1;14876/Yb983E<5.YNXd4149>,S=/4E/<306443G/06}0&}UkYSXFYF=44=-5095=88;63844,9E6644{PL}WA8:>)7+>763>>0/B3A545CCnT}Xm|dv}Xq1L/YNXk/H8;;.R63351YY747@15YE4J8;46;.38.>4A369.=-83,;Ye3?:3@YE.4-+N353;/;@(X[YYD>@/05-I*@.:551741Yf5>6A443<3535;.58/86=D4753442$635D1>0359NQ @73:3:>><Xn?;43C14 ?Y|X611YG1&<+,4<*,YLXl<1/AIXjF*N89A4Z576K1XbJ5YF.ZOWN.YGXO/YQ01:4G38Xl1;KI0YFXB=R<7;D/,/4>;$I,YGXm94@O35Yz66695385.>:6A#5}W7n^4336:4157597434433<3|XA}m`>=D>:4A.337370?-6Q96{`E|4A}C`|Qs{Mk|J+~r>|o,wHv>Vw}!c{H!|Gb|*Ca5}J||,U{t+{CN[!M65YXOY_*B,Y[Z9XaX[QYJYLXPYuZ%XcZ8LY[SYPYKZM<LMYG9OYqSQYM~[e{UJXmQYyZM_)>YjN1~[f3{aXFY|Yk:48YdH^NZ0|T){jVFYTZNFY^YTYN~[h{nPYMYn3I]`EYUYsYIZEYJ7Yw)YnXPQYH+Z.ZAZY]^Z1Y`YSZFZyGYHXLYG 8Yd#4~[i|+)YH9D?Y^F~Y7|-eYxZ^WHYdYfZQ~[j|3>~[k|3oYmYqY^XYYO=Z*4[]Z/OYLXhZ1YLZIXgYIHYEYK,<Y`YEXIGZI[3YOYcB4SZ!YHZ*&Y{Xi3~[l|JSY`Zz?Z,~[m|O=Yi>??XnYWXmYS617YVYIHZ(Z4[~L4/=~[n|Yu{P)|];YOHHZ}~[o33|a>~[r|aE]DH~[s|e$Zz~[t|kZFY~XhYXZB[`Y}~[u|{SZ&OYkYQYuZ2Zf8D~[v}% ~[w3},Q[X]+YGYeYPIS~[y}4aZ!YN^!6PZ*~[z}?E~[{3}CnZ=~[}}EdDZz/9A3(3S<,YR8.D=*XgYPYcXN3Z5 4)~[~}JW=$Yu.XX~] }KDX`PXdZ4XfYpTJLY[F5]X~[2Yp}U+DZJ::<446[m@~]#3}]1~]%}^LZwZQ5Z`/OT<Yh^ -~]&}jx[ ~m<z!%2+~ly4VY-~o>}p62yz!%2+Xf2+~ly4VY-zQ`z (=] 2z~o2",C={" ":0,"!":1},c=34,i=2,p,s=[],u=String.fromCharCode,t=u(12539);while(++c<127)C[u(c)]=c^39&&c^92?i++:0;i=0;while(0<=(c=C[a.charAt(i++)]))if(16==c)if((c=C[a.charAt(i++)])<87){if(86==c)c=1879;while(c--)s.push(u(++p))}else s.push(s.join("").substr(8272,360));else if(c<86)s.push(u(p+=c<51?c-16:(c-55)*92+C[a.charAt(i++)]));else if((c=((c-86)*92+C[a.charAt(i++)])*92+C[a.charAt(i++)])<49152)s.push(u(p=c<40960?c:c|57344));else{c&=511;while(c--)s.push(t);p=12539}return s.join("")')();
JCT8836=JCT11280.substring(0,8836);
var NTMap = function(a,b) {
this.Wc = false;
this.fY = false;
this.Tr = $(a);
this.Oy = a;
var s;
this.Xj = new NTMapStatus(NTLatLng.parse(this.Tr.innerHTML),NTSize.parse(this.Tr),0,3,3);
this.Tr.innerHTML="";
s = this.Tr.style
s.textAlign="left";
s.overflow="hidden";
s.position="relative";
this.Zl = Vc("MovingContainer","relative", "0px", "0px");
s = this.Zl.style;
s.position = "absolute";
s.zIndex = 12;
this.Zl.className = "container";
this.Tr.appendChild(this.Zl);
this.pG = Vc("IconContainer","absolute","0px","0px");
this.pG.style.zIndex = 100;
this.pG.className = "container";
this.Zl.appendChild(this.pG);
this.Il = new Array();
this.xT = 0;
this.Os = 6;
this.fE = (b && b.load=="manual")?false:true;
this.Ko = (b && b.mouse!=null)?b.mouse:2;
Vf.src = (b.image||"item1.2.png");
if(b && b.url) this.Ip = b.url;
this.Zm = false;
this.Ib = false;
this.Ss = null;
this.En = new Array();
this.Wd = new Array();
if(b && b.popup!="multi"){
this.vN = new NTPopup(this.Xj.getPos());
this.vN.createDocument(this.Zl);
this.Wd[0] = this.vN;
}
this.Zb= eventHandler.apply(this, ["Qo"]);
this.Yh= eventHandler.apply(this, ["oB"]);
this.Wt= eventHandler.apply(this, ["Qq"]);
this.Kk= eventHandler.apply(this, ["Ws"]);
this.Ks= eventHandler.apply(this, ["Fq"]);
this.Yd= eventHandler.apply(this, ["Pp"]);
this.yJ= eventHandler.apply(this, ["Bm"]);
this.Nn= eventHandler.apply(this, ["bW"]);
this.Yo= eventHandler.apply(this, ["Jo"]);
this.Kn= eventHandler.apply(this, ["Iy"]);
this.Pr= methodHandler.apply(this, ["At"]);
this.Qu= methodHandler.apply(this, ["setZoom"]);
this.Ee= eventHandler.apply(this, ["Jl"]);
this.iE= eventHandler.apply(this, ["Yp"]);
this.Wz= eventHandler.apply(this, ["Vk"]);
NTEvent.add(window, 'load', this.Zb);
NTEvent.add(window, 'unload', this.Yh);
this.Ro = b.copyrightInfo ? b.copyrightInfo : null;
this.rM= new NTMap.hI();
if (b.palette) {
this.setPalette(b.palette);
}
if (b.zoom) {
var zoom = b.zoom.split(",");
this.setZoom(new Number(zoom[0]), new Number(zoom[1]));
}
if (b.param) {
for (var p in b.param) {
this.addParam(p, b.param[p]);
}
}
this.Id = (b.beforeOnLoad != undefined && b.beforeOnLoad == true);
if (this.Id) {
this.Lq = new NTMover({src:this.Tr, move:this.Zl});
this.Lq.downTarget = this.Tr;
}
if(this.fE && this.Id){
this.Wc = true;
this.Xj.setSize(NTSize.parse(this.Tr));
Gr(this.pG, this.Xj.getSize().x, this.Xj.getSize().y);
this.reload();
}
};
NTMap.hI=function() {
this.delta = 0;
this.zoomable = true;
this.zoomTool = null;
};
NTMap.hI.prototype={
cancel:function() {
this.zoomable = false;
},
set:function(a) {
this.zoomTool = a;
},
add:function(a) {
this.delta += a;
this.zoomable = true;
this.setTimeout("this.changeZoom()", 200);
},
changeZoom:function(){
if (this.delta == 0) {
return;
}
if (this.zoomable && this.zoomTool != null) {
this.zoomable = false;
this.zoomTool.changeZoom(this.delta);
this.delta = 0;
this.zoomable = true;
}
}
};
NTMap.prototype.getId = function() {
return this.Oy;
};
NTMap.prototype.Qo = function(){
this.Xj.setSize(NTSize.parse(this.Tr));
Gr(this.pG, this.Xj.getSize().x, this.Xj.getSize().y);
if(this.center!=null){
Vx(this.center, Math.round(this.Xj.getSize().x/2-this.center.offsetWidth/2), Math.round(this.Xj.getSize().y/2-this.center.offsetHeight/2));
this.center.style.visibility = "visible";
}
if(this.Ar!=null){
this.Ar.style.visibility = "visible";
}
var Lo = this.Tr.setCapture?this.Tr:window;
if (!this.Id) {
this.Lq = new NTMover({src:this.Tr, move:this.Zl});
this.Lq.downTarget = this.Tr;
}
if(this.Ko >= 2){
NTEvent.add(this.Tr, 'dblclick',this.Ks);
}else if(this.Ko == 1){
NTEvent.add(this.Tr, 'click',this.Ks);
}
if(this.Ko >= 2){
NTEvent.add(this.Tr,'mousedown',this.Yd);
NTEvent.add(Lo,'mousemove',this.yJ);
NTEvent.add(Lo,'mouseup',this.Nn);
}
if(this.Ko >= 1){
NTEvent.add(this.Tr, 'DOMMouseScroll', this.Ee);
NTEvent.add(this.Tr, 'mousewheel', this.Ee);
NTEvent.add(Gq,'keypress',this.iE);
NTEvent.add(this.Tr, 'mouseover', this.Wt);
NTEvent.add(this.Tr, 'mouseout',this.Kk);
}
NTEvent.add(window,'mouseout',this.Yo);
NTEvent.add(this.Tr,'contextmenu', this.Wz);
this.Wc=true;
var cpid = (this.Ro != null && this.Ro.id) ? this.Ro.id : 'cp';
var Fa = Vc(cpid,'absolute');
this.Tr.appendChild(Fa);
var eK = Fa.style;
eK.fontSize = '10px';
eK.color = '#000';
eK.padding = '1px';
if (this.Ro == null) {
Fa.innerHTML = UnescapeUTF7(NTGeoUtil.JP(this.Xj.getPos())?Tt:Mr);
eK.left = "5px";
eK.top = this.Xj.getSize().y - Fa.offsetHeight -3+"px";
}
else {
if (this.Ro.text) {
Fa.innerHTML = this.Ro.text;
}
else {
Fa.innerHTML = UnescapeUTF7(NTGeoUtil.JP(this.Xj.getPos())?Tt:Mr);
}
if (!this.Ro.right && !this.Ro.left) {
eK.left = "5px";
}
if (!this.Ro.top && !this.Ro.bottom) {
eK.top = this.Xj.getSize().y - Fa.offsetHeight -3+"px";
}
if (this.Ro.left) {
eK.left = this.Ro.left + "px";
}
if (this.Ro.right) {
eK.right = this.Ro.right + "px";
}
if (this.Ro.top) {
eK.top = this.Ro.top + "px";
}
if (this.Ro.bottom) {
eK.bottom = this.Ro.bottom + "px";
}
if (this.Ro.height) {
eK.height = this.Ro.height + "px";
}
if (this.Ro.width) {
eK.width = this.Ro.width + "px";
}
if (this.Ro.textAlign) {
eK.textAlign = this.Ro.textAlign;
}
}
eK.zIndex = 902;
if(this.fE && !this.Id){
this.reload();
}else{
this.Di=true;
}
};
NTMap.prototype.oB = function(e){
this.clearMap();
this.Il = null;
this.En = null;
this.Wd = null;
Vf = null;
Lw(this.Tr);
};
NTMap.prototype.Vk = function(e){
if (Za(e) == 'object' && e.target != this.center) {
return;
}
var size = this.Ir(e);
var a = size.x;
var c = size.y;
a -=this.Xj.getSize().x/2;
c -=this.Xj.getSize().y/2;
var f =new NTSize(a,c);
var pos = e.target == this.center ? this.getPos() : NTGeoUtil.pixel2LonLat(f,this.Xj);
size = e.target == this.center ? new NTSize(this.Tr.offsetWidth / 2, this.Tr.offsetHeight / 2) : size;
E[3](pos,size,this);
CancelBubble(e);
return false;
};
NTMap.prototype.Qq = function(e){
if(NTUserAgent.type==1 && NTUserAgent.version==5) return false;
this.Zl.style.cursor = "pointer";
};
NTMap.prototype.Ws = function(e){
if (this.Rr) {
var a = this.Ir(e);
if(NTUserAgent.type==2||NTUserAgent.type==3){
var posX = e.pageX;
var posY = e.pageY;
for (var p=this.Tr; p; p=p.offsetParent) {
posX -= p.offsetLeft;
posY -= p.offsetTop;
}
a = new NTSize(posX, posY);
}
var x = a.x;
var y = a.y;
if (x <= 5 || y <= 5 || x >= this.Xj.getSize().x - 5 || y >= this.Xj.getSize().y - 5) {
this.closeContext();
}
}
if(NTUserAgent.type==1 && NTUserAgent.version==5) return false;
this.Zl.style.cursor = "default";
};
NTMap.prototype.Fq = function(e){
if(!this.Di) return false;
var Tb = e.target;
while(Tb.parentNode!=null){
if(Tb.className=="object") return;
Tb = Tb.parentNode;
}
if(NTUserAgent.type!=1 && NTUserAgent.version!=5){
this.Zl.style.cursor = "wait";
}
var size = this.Ir(e);
var a = size.x;
var c = size.y;
a -=this.Xj.getSize().x/2;
c -=this.Xj.getSize().y/2;
CancelBubble(e);
var f=new NTSize(a,c);
E[1](NTGeoUtil.pixel2LonLat(f,this.Xj),this);
this.moveTo(NTGeoUtil.pixel2LonLat(f,this.Xj));
};
NTMap.prototype.Pp = function(e){
var contextMenu = false;
for (var ele=e.target; ele; ele=ele.parentNode) {
if (ele == this.Rr) {
contextMenu = true;
}
}
if (!contextMenu) {
this.closeContext();
}
if(!this.Di) return false;
if(e.target.className=="object"){
return;
}else if(e.target.className=="innerPopup"){
return;
}
this.Lq.onMouseDown(e);
};
NTMap.prototype.Bm = function(e){
if(!this.Di) return false;
if(e.target.className=="object"){
return;
}else if(e.target.className=="innerPopup"){
return;
}
this.Lq.onMouseMove(e);
};
NTMap.prototype.bW = function(e){
if(!this.Di) return false;
if(e.target.className=="object"){
return;
}else if(e.target.className=="innerPopup"){
return;
}
var a = this.Lq.onMouseUp(e);
if(a){
this.Xj.setPos(NTGeoUtil.pixel2LonLat(a,this.Xj));
E[1](this.Xj.getPos(),this);
this.reload();
}
CancelBubble(e);
};
NTMap.prototype.Ir = function(e){
var a = Xy(e);
var c = Nk(e);
if(Za(e) == "static"){
if(NTUserAgent.type==2){
a += e.target.x;
c += e.target.y;
var p=e.target;
while(true){
if(p.className.indexOf("container")!=-1) break;
a += s(p,"left");
c += s(p,"top");
p = p.parentNode;
}
a += s(this.Zl, "left");
c += s(this.Zl, "top");
}
if(NTUserAgent.type==4){
var p=e.target;
while(true){
if(p.className.indexOf("container")!=-1) break;
a += s(p,"left");
c += s(p,"top");
p = p.parentNode;
}
a += s(this.Zl, "left");
c += s(this.Zl, "top");
}
}else{
if(NTUserAgent.type==2 || NTUserAgent.type==3){
if(e.target == this.pG){
a += s(this.Zl, "left");
}else{
a -= s(this.Zl, "left");
}
}
if(NTUserAgent.type==2 || NTUserAgent.type==3){
if(e.target == this.pG){
c += s(this.Zl, "top");
}else{
c -= s(this.Zl, "top");
}
}
}
return new NTSize(a,c);
};
NTMap.prototype.Jl = function(e){
if(this.Ss==null || !this.Di){
CancelBubble(e);
return;
}
var delta = 0;
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (NTUserAgent.type==4 && (NTUserAgent.version<9 || (NTUserAgent.version == 9 && new Number(NTUserAgent.minorVersion) < 20))) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
this.rM.cancel();
this.rM.add(delta);
CancelBubble(e);
};
NTMap.prototype.Yp = function(e){
this.closeContext();
if(e.target.tagName == "INPUT" || e.target.tagName == "TEXTAREA") return;
if(e.target != Gq)
var lon = this.Xj.getPos().getLongitude();
var lat = this.Xj.getPos().getLatitude();
if(e.keyCode==37){
E[1](NTGeoUtil.pixel2LonLat(new NTSize(-this.Xj.getSize().x/2,0), this.Xj),this);
this.moveTo(NTGeoUtil.pixel2LonLat(new NTSize(-this.Xj.getSize().x/2,0), this.Xj));
CancelBubble(e);
}
if(e.keyCode==38){
E[1](NTGeoUtil.pixel2LonLat(new NTSize(0,-this.Xj.getSize().y/2), this.Xj),this);
this.moveTo(NTGeoUtil.pixel2LonLat(new NTSize(0,-this.Xj.getSize().y/2), this.Xj));
CancelBubble(e);
}
if(e.keyCode==39){
E[1](NTGeoUtil.pixel2LonLat(new NTSize(this.Xj.getSize().x/2,0), this.Xj),this)
this.moveTo(NTGeoUtil.pixel2LonLat(new NTSize(this.Xj.getSize().x/2,0), this.Xj));
CancelBubble(e);
}
if(e.keyCode==40){
E[1](NTGeoUtil.pixel2LonLat(new NTSize(0,this.Xj.getSize().y/2), this.Xj),this);
this.moveTo(NTGeoUtil.pixel2LonLat(new NTSize(0,this.Xj.getSize().y/2), this.Xj));
CancelBubble(e);
}
if(e.keyCode==187 || e.keyCode==107 || e.charCode == 43){
if(!this.Ss) return;
this.Ss.onMinusClick();
CancelBubble(e);
}
if(e.keyCode==189 || e.keyCode==109 || e.charCode == 45 || e.charCode == 61){
if(!this.Ss) return;
this.Ss.onPlusClick();
CancelBubble(e);
}
};
NTMap.prototype.Iy = function(e){
/* kamitsubo
if (this.Lq.isMouseDown) {
return;
}
*/
if(this.center!=null){
Vx(this.center, Math.round(this.Xj.getSize().x/2-this.center.offsetWidth/2), Math.round(this.Xj.getSize().y/2-this.center.offsetHeight/2));
this.center.style.visibility = "visible";
}
var i=this.xT % this.Os;
if(!this.Ib){
Vx(this.Il[i], -s(this.Zl, "left") , -s(this.Zl,"top"));
this.Il[i].style.visibility = "visible";
this.buildIcon();
this.Im();
}
if(NTUserAgent.type!=1 && NTUserAgent.version!=5){
this.Zl.style.cursor = "pointer";
}
for(var x=0,y=i,z=this.Os+50; x<this.Os; x++,y++,z--){
if(y >= this.Os){
y=0;
}
if(this.Il[y]==null || y==i){
continue;
}
this.Il[y].style.zIndex = z;
}
if(this.Zm){
this.clearMap();
this.Zm = false;
}
for(var i=0; i<this.En.length; i++){
this.En[i].visible();
}
for(var i=0; i<this.Wd.length; i++){
this.Wd[i].visible();
}
E[0](this.Xj.getPos(),this);
if(this.Hk!=null) this.Hk.set(this.Xj);
this.fY = true;
if(!this.Ib){
this.Di = true;
}
};
NTMap.prototype.Jo=function(e){
if(!e.relatedTarget){
this.bW(e);
}
};
NTMap.prototype.moveTo = function(a){
if(arguments.length==0 && a==null) return false;
if(!this.Wc){
this.Xj.setPos(a);
}
if(!this.Di) return false;
this.Di = false;
var b = NTGeoUtil.LonLat2Pixel(a,this.Xj);
var mx = s(this.Zl, "left") - (b.x-this.Xj.getSize().x/2);
var my = s(this.Zl, "top") - (b.y-this.Xj.getSize().y/2);
if(Math.abs(s(this.Zl, "left") - mx) > 5000 || Math.abs(s(this.Zl, "top") - my) > 5000){
this.Xj.setPos(a);
this.Zm = true;
this.reload();
}else{
this.Ib = true;
this.Xj.setPos(a);
this.makeMapImage();
var m = new NTMapCtrl(this.Zl);
m.autoScrollTo(mx,my,this.Pr);
}
};
NTMap.prototype.At = function(a){
this.Ib = false;
var i=this.xT % this.Os;
Vx(this.Il[i], -s(this.Zl, "left"), -s(this.Zl, "top"));
this.buildIcon();
this.Im();
if(this.fY){
this.Il[i].style.visibility = "visible";
this.Di = true;
}
};
NTMap.prototype.reload = function(){
this.Xj.setSize(NTSize.parse(this.Tr));
if(!this.Wc && !this.Di) return false;
return this.makeMapImage()? true: false;
};
NTMap.prototype.makeMapImage = function(){
this.Di = false;
this.fY = false;
this.xT = ++this.xT % this.Os;
var stl, i=this.xT;
if(this.Il[i]==null){
this.Il[i] = Hn("", this.Xj.getSize().x, this.Xj.getSize().y);
stl = this.Il[i].style;
stl.position = "absolute";
NTEvent.add(this.Il[i],'load',this.Kn);
this.Zl.appendChild(this.Il[i]);
}else{
stl = this.Il[i].style;
stl.width = this.Xj.getSize().x + "px";
stl.height = this.Xj.getSize().y + "px";
setAlpha(this.Il[i],100);
}
stl.visibility = "hidden";
stl.zIndex=this.Os+50;
this.Il[i].src = NTUrl.create(this.Xj,(this.Ip||null));
return this.Il[i];
};
NTMap.prototype.clearMap = function(a){
for(var i=0; i<this.Il.length; i++){
if(this.Il[i]==null || i == this.xT % this.Os || (a!=null && this.Il[i]==a)) continue;
this.Il[i].style.visibility = "hidden";
}
};
NTMap.prototype.setZoom = function(a,b,c){
if(this.Xj.getScale()==a && this.Xj.getZoom()==b){
return false;
}
if(c && this.fE && this.Wc && this.fY){
for(var i=0; i<this.En.length; i++){
this.En[i].hide();
}
for(var i=0; i<this.Wd.length; i++){
this.Wd[i].hide();
}
if(this.Hb && this.Hb.iswork()){
this.clearMap();
this.Hb.stop();
}else{
var pY = this.Il[this.xT];
this.clearMap(pY);
this.Hb = new NTMapScaleCtrl(pY);
this.Hb.autoChangeScale(this.Xj,a,b,function(){
});
}
}
this.Xj.setScale(a);
this.Xj.setZoom(b);
if(this.Ss)
this.Ss.setStatus(this.Xj);
this.Zm = true;
if(this.fE){
if(this.reload()){
E[0](this.Xj.getPos(),this);
E[2](this.getZoom(),this);
}
}
};
NTMap.prototype.getZoom = function(){
return {scale: this.Xj.getScale(), zoom: this.Xj.getZoom()};
};
NTMap.prototype.setPalette = function(a){
this.Xj.setPalette(a);
this.Zm = true;
if(this.fE && this.Wc){
this.reload();
}
};
NTMap.prototype.addParam = function(a,b){
this.Xj.addParam(a,b);
};
NTMap.prototype.removeParam = function(a){
this.Xj.removeParam(a);
};
NTMap.prototype.getPos = function(){
return this.Xj.getPos();
};
NTMap.prototype.addRoute = function(){
for(var a=0; a<arguments.length; a++){
this.Xj.addRoute(arguments[a]);
}
if(this.fE){
this.reload();
}
};
NTMap.prototype.removeRoute = function(){
var r = false;
if(arguments.length > 0){
for(var i=0; i<arguments.length; i++){
r=this.Xj.removeRoute(arguments[i]);
}
}else{
if(this.Xj.getRoute().length>0){
this.Xj.clearRoute();
r=true;
}
}
if(r && this.fE){
this.reload();
}
};
NTMap.prototype.getRouteList = function(){
if(!this.Xj.getRoute().length) return null;
return this.Xj.getRoute();
};
NTMap.prototype.addCenter = function(a,b,c){
if (typeof a == 'string'){
}else if(typeof a == 'object'){
b=a.width;
c=a.height;
a=a.src;
}else{
return false;
}
this.center = Ff(a,b,c,true,"object");
NTEvent.add(this.center, "contextmenu", this.Wz);
this.Tr.appendChild(this.center);
this.center.style.zIndex=900;
this.center.style.visibility = "hidden";
};
NTMap.prototype.addBackground = function(a){
if(a==null) return;
this.Ar = Vc("bgi","absolute",0,0);
Gr(this.Ar, this.Xj.getSize().x, this.Xj.getSize().y);
this.Ar.style.backgroundImage = "url(" + a.src + ")";
this.Tr.appendChild(this.Ar);
this.Ar.style.zIndex=10;
this.Ar.style.visibility = "hidden";
};
NTMap.prototype.addIcon = function(){
var mC = arguments;
for(var i = 0; i<mC.length; i++){
mC[i].addDocument(this.Zl,301);
this.En.push(mC[i]);
}
if(this.fY){
this.buildIcon();
this.Im();
}
};
NTMap.prototype.getIcon = function(a){
var Ej = new Array();
for(var i=0; i<this.En.length; i++){
if(a && a!=this.En[i].getGroup()){
continue;
}
Ej.push(this.En[i]);
}
return Ej;
};
NTMap.prototype.clearIcon = function(a){
var Ej = new Array();
for(var i=0; i<this.En.length; i++){
if(a && a!=this.En[i].getGroup()){
Ej.push(this.En[i]);
continue;
}
this.En[i].remove();
}
this.En = Ej;
};
NTMap.prototype.buildIcon = function(){
for(var i=0; i<this.En.length; i++){
var a=this.En[i];
if(a.getImage()==null) continue;
var Nf = a.getImage();
if(a==null || a.getPos()==null) continue;
var p = NTGeoUtil.LonLat2Pixel(a.getPos(),this.Xj);
var iconXDiff = 0;
var iconYDiff = 0;
var position = a.getIconPosition();
if(position == 1 || position == 4 || position == 7){
iconXDiff = Nf.offsetWidth/2;
}
else if(position == 2 || position == 5 || position == 8){
iconXDiff = Nf.offsetWidth;
}
if(position == 3 || position == 4 || position == 5){
iconYDiff = Nf.offsetHeight/2;
}
else if(position == 6 || position == 7 || position == 8){
iconYDiff = Nf.offsetHeight;
}
Vx(Nf, p.x - iconXDiff - s(this.Zl, "left"), p.y - iconYDiff - s(this.Zl, "top"));
Vx(a.getCather(), p.x - iconXDiff - s(this.Zl, "left"), p.y - iconYDiff - s(this.Zl, "top"));
var is = a.getShadow();
if(is!=null){
Vx(is, s(Nf,"left"), new Number(s(Nf,"top")) + Nf.offsetHeight-is.offsetHeight);
is.style.visibility = "visible";
}
Nf.style.visibility = "visible";
}
};
NTMap.prototype.openContext = function(a,b){
this.closeContext();
a.style.position = 'absolute';
a.style.top = b.top + "px";
a.style.left= b.left+ "px";
a.style.visibility = 'visible';
this.Rr = a;
this.Tr.appendChild(a);
};
NTMap.prototype.closeContext = function() {
if (this.Rr) {
this.Rr.style.visibility = 'hidden';
Lw(this.Rr);
Bj(this.Rr);
this.Rr = undefined;
}
};
NTMap.prototype.addMsg = function(a){
if(this.vN){
return false;
}
var d = a.createDocument(this.Zl);
this.Wd.push(a);
a.moveTo(NTGeoUtil.LonLat2Pixel(a.getPos(),this.Xj));
return true;
};
NTMap.prototype.closeMsg=function(a) {
if (!this.vN) {
return false;
}
this.vN.close();
}
NTMap.prototype.openMsg = function(Ei,a){
if(!this.vN || !Ei){
return;
}
this.vN.decorate({color:a.bgcolor, border: a.bordercolor, max:a.max});
this.vN.setPos(Ei);
this.vN.replaceContent({title:"", body:a.content});
this.Wd[0]=this.vN;
this.vN.moveTo(NTGeoUtil.LonLat2Pixel(Ei,this.Xj));
this.vN.open();
return this.vN;
};
NTMap.prototype.Im = function(){
for(var i=0; i<this.Wd.length; i++){
if(this.Wd[i]==null || this.Wd[i].getPos()==null) continue;
var p = NTGeoUtil.LonLat2Pixel(this.Wd[i].getPos(),this.Xj);
this.Wd[i].moveTo(p);
}
};
NTMap.prototype.loadToolbar = function(a){
if(!a) a = NTZoomToolbar.DEFAULT;
a.setParent(this.Tr);
a.setStatus(this.Xj);
a.onChange(this.Qu);
a.load();
this.Ss = a;
this.rM.set(a);
};
NTMap.prototype.loadScalebar = function(a){
this.Hk = new NTScaler(this.Tr,NTGeoUtil.JP(this.Xj.getPos()),a);
};
NTMap.prototype.setProperty = function(a,b){
if(a=="autoload"){
this.fE = b;
}
if(a=="url"){
this.Ip = b;
}
if(a=="image"){
Vf = new Image();
Vf.src = b;
}
};
NTMap.prototype.moveMapPlate = function(a,b){
style = this.Zl.style;
if(a) style.left = this.Zl.offsetLeft + a + "px";
if(b) style.top = this.Zl.offsetTop + b + "px";
};
NTMap.prototype.changeCenterPosition = function(a,b) {
this.Xj.setPos(NTGeoUtil.pixel2LonLat(new NTSize(a,b),this.Xj));
}
Yq('NTMap', NTMap);
Yq('NTSize', NTSize);
Yq('NTIcon', NTMapIcon);
Yq('NTImage', NTImage);
Yq('NTColor',NTColor);
Yq('NTLatLng', NTLatLng);
Yq('NTRoute', NTRoute);
Yq('NTPopup', NTPopup);
Yq('NTZoomToolbar', NTZoomToolbar);
Yq('NTResizer', NTResizer);
Yq('eventHandler',Object.eventHandler);
Yq('NTEvent', NTEvent);
Jy(NTMapCtrl);
Jy(NTMapScaleCtrl);
Jy(NTResizer);
Jy(NTMap.hI);
})();
/*
NAVITIME Animation Gateway Interface Script
Copyright 2007 NAVITIME JAPAN CO.,LTD. All Rights Reserved.
Auther by myoshida@navitime.co.jp
Version1.0.0
*/
(function(){
Object.extend = function(destination, source) {
for (property in source) {
destination[property] = source[property];
}
return destination;
}
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}
var $A = Array.from = function(iterable) {
if (!iterable) return [];
if (iterable.toArray) {
return iterable.toArray();
} else {
var results = [];
for (var i = 0; i < iterable.length; i++)
results.push(iterable[i]);
return results;
}
}
Function.prototype.bind = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
function $() {
var Ww = new Array();
for (var i = 0; i < arguments.length; i++) {
var Ub = arguments[i];
if (typeof Ub == 'string')
Ub = document.getElementById(Ub);
if (arguments.length == 1)
return Ub;
Ww.push(Ub);
}
return Ww;
}
function Fv(a, b){
window[a] = b;
}
function Wz(a){
var b = a.parentNode;
var l = b.childNodes.length;
for(var i=0; i<l; i++){
if(b.childNodes[i]==a){
b.removeChild(b.childNodes[i]);
break;
}
}
}
function wW(a){
var Lw = a.childNodes.length;
for(var i=Lw; i>=0; i--){
var Lw = 0;
try{
Uh = a.childNodes[i].childNodes['length'];
if(Uh> 0){
wW(a.childNodes[i]);
}
a.removeChild(a.childNodes[i]);
}catch(e){
continue;
}
}
}
Og= function(a,b){
var Rk = a.style;
if(new String(b).indexOf("+")==0 || new String(b).indexOf("-")==0){
b = eval("(Rk.MozOpacity|1)*100" + b);
}
Rk.MozOpacity = b/100;
Rk.opacity = b/100;
Rk.filter='progid:DXImageTransform.Microsoft.alpha(opacity='+b+')';
}
Zr = function(u,w,h){
var r = document.createElement("img");
if(u!=null && u!="")r.src = u;
if(w!=null) r.width = w;
if(h!=null)r.height = h;
return r;
}
Sv = function(url,b){
var a;
if(NTUserAgent.type==1 && NTUserAgent.version<7){
a = (b && b.src)?b.src:document.createElement("div");
var s = a.style;
s.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="+url+")";
if(b && b.width) s.width = b.width+"px";
if(b && b.height) s.height = b.height+"px";
if(b && b.classNm) a.className = b.classNm;
if(b && b.id) a.id = b.id;
}else{
a = Zr(url,(b.width||null),(b.height||null));
if(b && b.classNm) a.className = b.classNm;
if(b && b.id) a.id = b.id;
if(b && b.src){
b.src.appendChild(a);
b.src.style.width = "auto";
b.src.style.height = "auto";
if(NTUserAgent.type==4){
b.src.style.display = "inline";
}
}
}
return a;
}
Object.extend(Math, {
floor2: function(a){
var b=new String(a);
var c=b.indexOf(".")>-1?b.indexOf("."):b.length;
return new Number(b.substr(0,c));
}
});
var Xg=0;
function Li(a){
a.prototype.setTimeout=function(timeoutHandler,elapseTime){
var Yi="tempVar"+Xg;
Xg++;
eval(Yi+" = this;");
var Sg=timeoutHandler.replace(/\\/g,"\\\\").replace(/\"/g,'\\"');
return window.setTimeout(Yi+'.Rd("'+Sg+'");'+Yi+" = null;",elapseTime);
};
a.prototype.Rd=function(Iv){
eval(Iv);
};
}
var NTEvent = function(){};
NTEvent.observers = [];
NTEvent.add = function(element, name, observer, useCapture){
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)){
name = 'keydown';
}
var hundler = function(e){
if(!e){
e=window.event;
}
if(e&&!e.target){
e.target=e.srcElement;
}
observer.call(element,e);
};
this._observeAndCache(element, name, hundler, useCapture);
};
NTEvent._observeAndCache = function(element, name, observer, useCapture) {
if (!this.observers){
this.observers = [];
}
if (element.addEventListener) {
this.observers.push([element, name, observer, useCapture]);
element.addEventListener(name, observer, useCapture);
} else if (element.attachEvent) {
this.observers.push([element, name, observer, useCapture]);
element.attachEvent('on' + name, observer);
}
};
NTEvent.unloadCache = function() {
if (!NTEvent.observers){
return;
}
for (var i = 0; i < NTEvent.observers.length; i++){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}
NTEvent.observers = false;
};
NTEvent.remove = function(element, name){
if (!NTEvent.observers){
return;
}
var newObservers = [];
for (var i = 0; i < NTEvent.observers.length; i++){
if(NTEvent.observers[i][0] == element && (!name || (name && NTEvent.observers[i][1] == name))){
NTEvent.stopObserving.apply(this, NTEvent.observers[i]);
NTEvent.observers[i][0] = null;
}else{
newObservers[newObservers.length] = NTEvent.observers[i];
}
}
NTEvent.observers = newObservers;
};
NTEvent.stopObserving = function(element, name, observer, useCapture) {
var element = $(element);
useCapture = useCapture || false;
if (name == 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent)){
name = 'keydown';
}
if (element.removeEventListener) {
element.removeEventListener(name, observer, useCapture);
} else if (element.detachEvent) {
element.detachEvent('on' + name, observer);
}
}
NTEvent.add(window, 'unload', NTEvent.unloadCache);
var NTUserAgent = function(){}
NTUserAgent.type="";
NTUserAgent.version="";
NTUserAgent.os="";
NTUserAgent.subtype="";
(function(){
var type=0;
var version=0;
var subtype=null;
var os=null;
var ua=navigator.userAgent.toLowerCase();
if(ua.indexOf("opera")!=-1){
type=4;
version=9;
if(ua.indexOf("opera/7")!=-1||ua.indexOf("opera 7")!=-1){
version=7;
}else if(ua.indexOf("opera/8")!=-1||ua.indexOf("opera 8")!=-1){
version=8;
}
}else if(ua.indexOf("msie")!=-1&&document.all){
type=1;
version=7;
if(ua.indexOf("msie 6")!=-1){
version=6;
}
if(ua.indexOf("msie 5")!=-1){
version=5;
}
}else if(ua.indexOf("safari")!=-1){
type=3;
}else if(ua.indexOf("mozilla")!=-1){
type=2;
if(ua.indexOf("firefox")!=-1){
subtype=1;
version=1.5;
if(ua.indexOf("firefox/1.0")!=-1){
version=1.0;
}
}else if(ua.indexOf("netscape")!=-1){
subtype=2;
}else if(ua.indexOf("seamonkey")!=-1){
subtype=4;
}else{
subtype=3;
version=1.8;
if(ua.indexOf("rv:1.7")!=-1){
version=1.7;
}
}
}
if(ua.indexOf("x11;")!=-1){
os=1;
}else if(ua.indexOf("macintosh")!=-1){
os=2;
}
NTUserAgent.type=type;
NTUserAgent.version=version;
NTUserAgent.os=os;
NTUserAgent.subtype=subtype;
})();
var Os = {
emptyFunction: function(){},
S: function(a,b){
var r = $(a).style[b];
if(r != "" && r.indexOf("px")!= -1 && r.indexOf("px") == r.length-2){
r=r.substr(0,r.indexOf("px"));
}
if(r != "" && r.indexOf("pt") != -1 && r.indexOf("pt") == r.length-2){
r=r.substr(0,r.indexOf("pt"));
}
return isNaN(r)?r:new Number(r);
},
P: function(a){return a+"px";},
C: function(e){
if(NTUserAgent.type==1){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
e.cancelBubble=true;
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
}
}
}
Os.Resizer = Class.create();
Os.Resizer.prototype = {
initialize: function(a,b){
this.Od = a;
this.setOption(b);
this.Mh = null;
if(this.Ct >=0)this.setTimeout("this.run()",this.Ct);
},
setOption: function(b){
if(this.Mh) this.stop();
var Rk = this.Od.style;
if(b.endx)this.Lc = Math.round(b.endx);
if(b.endy)this.Wg = Math.round(b.endy);
if(b.startx) Rk.width = Os.P(b.startx);
if(b.starty) Rk.height = Os.P(b.starty);
this.Sd = (b.func||Os.emptyFunction);
this.Ct = (b.interval||0);
this.Eh = Math.floor(10/(b.speed||2)/((NTUserAgent.type==4 || NTUserAgent.type==2)?1.5:1.5));
},
run:function(a){
if(a) this.setOption(a);
var Rk = this.Od.style;
Rk.cursor="default";
var x1 = new Number(Os.S(this.Od,"width"));
var x2 = new Number(this.Lc)-x1;
var x3 = Math.abs(x2/this.Eh)<1? x2/Math.abs(x2) : x2/this.Eh;
var y1 = new Number(Os.S(this.Od,"height"));
var y2 = new Number(this.Wg)-y1;
var y3 = Math.abs(y2/this.Eh)<1? y2/Math.abs(y2) : y2/this.Eh;
Rk.width = Os.P((Math.abs(x2)<=1) ? this.Lc : Math.round(x1+x3));
Rk.height = Os.P((Math.abs(y2) <= 1) ? this.Wg : Math.round(y1+y3));
if(Os.S(this.Od,"width")==this.Lc && Os.S(this.Od,"height")==this.Wg){
this.stop();
return this.Sd();
}
this.Mh = this.setTimeout("this.run()",10);
},
stop: function(){
clearTimeout(this.Mh);
this.Mh=null;
}
}
Os.MarginResizer = Class.create();
Object.extend(Os.MarginResizer.prototype, Os.Resizer.prototype);
Os.MarginResizer.prototype = Object.extend(Os.MarginResizer.prototype,{
setOption: function(b){
Os.Resizer.prototype.setOption.call(this, b);
if(b.endMgnL || b.endMgnL==0)this.Pu = Math.round(b.endMgnL);
if(b.startMgnL) this.Od.style.marginLeft = Os.P(b.startMgnL);
},
run:function(a){
if(a) this.setOption(a);
var Rk = this.Od.style;
Rk.cursor="default";
var x1 = new Number(Os.S(this.Od,"width"));
var x2 = new Number(this.Lc)-x1;
var x3 = Math.abs(x2/this.Eh)<1? x2/Math.abs(x2) : x2/this.Eh;
var y1 = new Number(Os.S(this.Od,"height"));
var y2 = new Number(this.Wg)-y1;
var y3 = Math.abs(y2/this.Eh)<1? y2/Math.abs(y2) : y2/this.Eh;
var ml1 = new Number(Os.S(this.Od,"marginLeft"));
var ml2 = new Number(this.Pu)-ml1;
var ml3 = Math.abs(ml2/this.Eh)<1? ml2/Math.abs(ml2) : ml2/this.Eh;
Rk.width = Os.P((Math.abs(x2)<=1) ? this.Lc : Math.round(x1+x3));
Rk.height = Os.P((Math.abs(y2) <= 1) ? this.Wg : Math.round(y1+y3));
Rk.marginLeft = Os.P((Math.abs(ml2) <= 1) ? this.Pu : Math.round(ml1+ml3));
if(Os.S(this.Od,"width")==this.Lc &&
Os.S(this.Od,"height")==this.Wg &&
Os.S(this.Od,"marginLeft")==this.Pu){
this.stop();
return this.Sd();
}
this.Mh = this.setTimeout("this.run()",10);
}
});
Os.Mover = Class.create();
Os.Mover.prototype = {
initialize: function(a,b){
this.Od = a;
this.Tp = this.Od.offsetLeft;
this.Rj = this.Od.offsetTop;
this.setOption(b);
this.Mh = null;
if(this.Ct >=0) this.setTimeout("this.run()",this.Ct);
},
setOption: function(b){
if(this.Mh) this.stop();
if(b && b.left) this.Tp = Math.round(b.left);
if(b && b.top)this.Rj = Math.round(b.top);
this.Sd = (b.func||Os.emptyFunction);
this.Ct = (b.interval||0);
this.Eh = Math.floor(10/(b.speed||2)/((NTUserAgent.type==4 || NTUserAgent.type==2)?1.5:1.5));
},
run: function(a){
if(a) this.setOption(a);
var Rk = this.Od.style;
Rk.cursor="default";
var x1 = new Number(Os.S(this.Od,"left"));
var x2 = new Number(this.Tp)-x1;
var x3 = Math.abs(x2/this.Eh)<1? x2/Math.abs(x2) : x2/this.Eh;
var y1 = new Number(Os.S(this.Od, "top"));
var y2 = new Number(this.Rj)-y1;
var y3 = Math.abs(y2/this.Eh)<1? y2/Math.abs(y2) : y2/this.Eh;
Rk.left = Os.P((Math.abs(x2)<=1) ? this.Tp : Math.round(x1 + x3));
Rk.top = Os.P((Math.abs(y2)<=1) ? this.Rj : Math.round(y1 + y3));
if(Os.S(this.Od,"left")==this.Tp && Os.S(this.Od,"top")==this.Rj){
this.stop();
return this.Sd();
}
this.Mh = this.setTimeout("this.run()",10);
},
stop: function(){
clearTimeout(this.Mh);
this.Mh = null;
}
};
Os.Transparencer = Class.create();
Os.Transparencer.prototype = {
initialize: function(a,b){
this.Od=a;
this.setOption(b);
this.Mh = null;
if(this.Ct >=0) this.setTimeout("this.run()",this.Ct);
},
setOption: function(b){
if(this.Mh) this.stop();
if(!b) return;
this.cL = (new Number(b.from)||100);
if(b.from!=null){
Og(this.Od,b.from);
}
this.Le = (new Number(b.to)||0);
this.Sd = (b.func||Os.emptyFunction);
this.Ct = (b.interval||0);
this.Eh = Math.floor(15/(b.speed||2)/((NTUserAgent.type==4 || NTUserAgent.type==2)?1.5:1.5));
},
run: function(a){
if(a) this.setOption(a);
this.Od.style.cursor="default";
this.cL += (this.Le - this.cL)/this.Eh
Og(this.Od,this.cL);
if(Math.abs(this.Le-this.cL)<0.5){
Og(this.Od,this.Le);
this.stop();
return this.Sd();
}
this.Mh = this.setTimeout("this.run()",10);
},
stop: function(){
clearTimeout(this.Mh);
this.Mh = null;
}
};
Os.Object = function(){};
Os.Object.prototype = {
X: function(e){
if(NTUserAgent.type==1){
return e.x;
}else if(NTUserAgent.type==4){
return e.offsetX;
}else if(NTUserAgent.type==3){
return e.offsetX - Os.S(e.target,"left");
}else{
return e.target.x ? e.layerX - e.target.x : e.layerX;
}
},
Y: function(e){
if(NTUserAgent.type==1){
return e.y;
}else if(NTUserAgent.type==4){
return e.offsetY;
}else if(NTUserAgent.type==3){
return e.offsetY - Os.S(e.target,"top");
}else{
return e.target.y ? e.layerY - e.target.y : e.layerY;
}
},
copy: function(a){
var Ic = document.createElement(a.tagName);
a.parentNode.appendChild(Ic);
for(var i in a.style){
try{Ic.style[i] = a.style[i];}catch(e){}
}
var l = a.childNodes.length;
for(var i=0; i<l; i++){
var copyObject = this.copy(a.childNodes[i]);
Ic.appendChild(copyObject);
}
if(a.innerHTML) Ic.innerHTML = a.innerHTML;
return Ic;
},
W: function(a){return a.offsetWidth;},
H: function(a){return a.offsetHeight;}
}
Os.Object.Util = {
createPng: function(url,b){
return Sv(url,b);
},
setAlpha: function(a,b){
Og(a,b);
},
removeElement: function(a){
wW(a);
Wz(a);
},
windowSize: function(){
var Ii, Dt;
if (window.innerHeight && window.scrollMaxY) {
Ii = document.body.scrollWidth;
Dt = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
Ii = document.body.scrollWidth;
Dt = document.body.scrollHeight;
} else {
Ii = document.body.offsetWidth;
Dt = document.body.offsetHeight;
}
var Et, Oh, $Lz$, $Dx$;
if (self.innerHeight) {
Et = self.innerWidth;
Oh = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
Et = document.documentElement.clientWidth;
Oh = document.documentElement.clientHeight;
} else if (document.body) {
Et = document.body.clientWidth;
Oh = document.body.clientHeight;
}
if(Dt < Oh){
Dx = Oh;
} else {
Dx = Dt;
}
if(Ii < Et){
Lz = Et;
} else {
Lz = Ii;
}
return {windowWidth:Et, windowHeight:Oh, pageWidth:Lz, pageHeight:Dx};
},
scroll: function(){
if(NTUserAgent.type==1){
return document.body.scrollTop
}else{
return pageYOffset;
}
}
}
Os.Object.DragDrop = Class.create();
Os.Object.DragDrop.prototype = Object.extend(new Os.Object, {
initialize: function(a,b){
this.Od = a;
this.Od.style.position="absolute";
this.Hc = (b.trigger || this.Od);
this.minPos = new Object, this.maxPos = new Object;
if(b && b.area){
this.minPos.x = b.area[0];
this.minPos.y = b.area[1];
this.maxPos.x = b.area[2];
this.maxPos.y = b.area[3];
}
this.Yg = b && b.clone;
var Fy = this.Hc.setCapture?this.Hc:window;
this.Eq = {x:0, y:0};
NTEvent.add(this.Hc, "mousedown", this.startDrag.bind(this));
NTEvent.add(Fy, "mouseup",this.stopDrag.bind(this));
NTEvent.add(Fy, "mousemove", this.move.bind(this));
this.Di = (b.ondrag || function(){});
this.Vo = (b.onmove || function(){});
this.Bq = (b.ondrop || function(){});
},
addEvent: function(dom,event,func){
NTEvent.add(dom, event, func);
},
startDrag: function(e){
if((e.button!=0 && e.button!=1)||e.target!=this.Hc){
Os.C(e);
return false;
}
if(this.Hc.setCapture) this.Jc = this.Hc.setCapture();
this.Hj ={x:(e.clientX - this.X(e)), y:(e.clientY - this.Y(e))};
this.Sc ={x:Os.S(this.Od, "left"), y:NTAgis.S(this.Od, "top")};
this.Cs ={x:this.X(e), y:this.Y(e)};
this.Uz = true;
this.Eq = {x:0, y:0};
this.Hc.style.cursor = "move";
Os.C(e);
if(this.Yg){
this.Hy = this.copy(this.Od);
this.Hy.style.zIndex=this.Od.style.zIndex-1;
Og(this.Od, "-50");
}
this.Di(this.Sc);
},
move: function(e){
var Rk = this.Od.style;
if(!this.Uz){
NTAgis.C(e);
return;
}
var x,y;
x=e.clientX + this.Sc.x - this.Cs.x - this.Hj.x;
y=e.clientY + this.Sc.y - this.Cs.y - this.Hj.y;
if(this.minPos.x >= x){
Rk.left = Os.P(this.minPos.x);
this.Eq.x = this.minPos.x-this.Sc.x;
}else if(this.maxPos.x < x){
Rk.left = Os.P(this.maxPos.x);
this.Eq.x = this.maxPos.x-this.Sc.x;
}else{
Rk.left = Os.P(x);
this.Eq.x = x-this.Sc.x;
}
if(this.minPos.y > y){
Rk.top = Os.P(this.minPos.y);
this.Eq.y = this.minPos.y-this.Sc.y;
}else if(this.maxPos.y < y){
Rk.top = Os.P(this.maxPos.y);
this.Eq.y = this.maxPos.y-this.Sc.y;
}else{
Rk.top = Os.P(y);
this.Eq.y = y-this.Sc.y;
}
this.Vo({pos:{x:x,y:y}, moved:this.Eq});
},
stopDrag: function(e){
if(e.button!=0&&e.button!=1||this.Uz==false){
Os.C(e);
return false;
}
this.Cs = null;
this.Uz = false;
if(this.Hc.releaseCapture)this.Hc.releaseCapture(this.Jc);
if(this.Hy){
Wz(this.Hy);
Og(this.Od, "+50");
}
if(this.Eq.x == 0 && this.Eq.y == 0){
return false;
}
this.Hc.style.cursor = "default";
this.Sc = {x:Os.S(this.Hc,"left"),y:Os.S(this.Hc, "top")};
this.Bq({x:Os.S(this.Od, "left"), y:NTAgis.S(this.Od, "top")});
return {x:-this.Eq.x,y:-this.Eq.y};
}
});
Os.Object.Button = Class.create();
Os.Object.Button.prototype = Object.extend(new Os.Object,{
initialize: function(a,b){
this.Od = a;
if(b && b.image){
this.Fm = b.image;
this.Od = Sv(this.Fm, {src: this.Od, width: this.Od.offsetWidth, height:this.Od.offsetHeight});
}
this.Lk = (b.ratio||1.5);
this.Zt = {startx:this.W(a), starty:this.H(a), endx: Math.floor(this.W(a)*this.Lk), endy: Math.floor(this.H(a)*this.Lk), func:this.openAlt.bind(this)};
this.Vh = {endx:this.W(a), endy:this.H(a)};
if(b && b.alt){
this.alt = document.createElement("div");
this.alt.innerHTML = b.alt;
this.alt.style.position = "absolute";
this.alt.style.zIndex = 4000;
this.alt.style.fontSize="75%";
this.alt.style.top = Os.P(this.Od.offsetTop + Math.floor(this.H(a)*this.Lk));
if(this.Od.tagName=='IMG'){
this.alt.style.left = Os.P(this.Od.parentNode.offsetLeft);
}else{
this.alt.style.left = Os.P(this.Od.offsetLeft);
}
this.alt.style.border = "1px #AAA solid";
this.alt.style.backgroundColor="#FFFACD";
this.alt.style.padding = "2px";
this.alt.style.display = "none";
if(this.Od.tagName=='IMG'){
this.Od.parentNode.parentNode.appendChild(this.alt);
}else{
this.Od.parentNode.appendChild(this.alt);
}
}
this.Ei = new Os.Resizer(this.Od,{interval:-1});
if(b && b.click) this.On = b.click;
NTEvent.add(this.Od, "mouseover", this.scaleup.bind(this));
NTEvent.add(this.Od, "mouseout" , this.scaledown.bind(this));
NTEvent.add(this.Od, "click", this.click.bind(this));
},
scaleup: function(e){
e.target.style.cursor="pointer";
this.Ei.setOption(this.Zt);
this.Ei.run();
},
openAlt: function(){
if(this.alt) this.alt.style.display = "block";
},
scaledown: function(e){
e.target.style.cursor="default";
if(this.alt) this.alt.style.display = "none";
this.Ei.setOption(this.Vh);
this.Ei.run();
},
click: function(e){
(this.On || Os.emptyFunction)();
}
});
var Sz = Class.create();
Sz.prototype = Object.extend(new Os.Object,{
initialize: function(a,b){
this.Od = (a)?$(a):'';
this.Wh = (b&&b.id)?b.id:'';
this.Yp = (b&&b.isUse)?b.isUse:false;
this.Ze = (b&&b.cusSts)?b.cusSts:'';
this.Fe = (b&&b.click&&this.Yp)?b.click:(b&&b.disClickFunc&&!this.Yp)?b.disClickFunc:Os.emptyFunction;
this.Rh = (b&&b.alt)?b.alt:'';
this.Kt = (b&&b.cusClickFunc)?b.cusClickFunc:Os.emptyFunction;
this.Jx = DocControl.loadPng(b.holeImg, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docOverLayImgLow'});
this.Jx.style.display = 'none';
this.Od.appendChild(this.Jx);
this.Eu = DocControl.loadPng(b.stageImg, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docOverLayImgLow'});
if( this.Ze == 'set' ){
this.Eu.style.display = 'block';
}else{
this.Eu.style.display = 'none';
}
this.Od.appendChild(this.Eu);
if(b&&b.gsImage){
this.Mt = DocControl.loadPngIcon(b.gsImage, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docGSImg', imgClmInd:b.imgClmInd, imgRowInd:b.imgRowInd});
this.Mt.style.display = 'none';
this.Od.appendChild(this.Mt);
}
if(b&&b.image){
this.Fm = b.image;
this.Cl = DocControl.loadPngIcon(b.image, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docImg', imgClmInd:b.imgClmInd, imgRowInd:b.imgRowInd});
this.Cl.style.display = 'block';
this.Od.appendChild(this.Cl);
}
if(!this.Yp){
this.Mb = DocControl.loadPng(b.lockImg, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docOverLayImg'});
this.Mb.style.display = 'block';
this.Od.appendChild(this.Mb);
}
this.Nv = DocControl.loadPng(b.upImg, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docOverLayImg'});
this.Nv.style.display = 'none';
this.Od.appendChild(this.Nv);
this.Hp = DocControl.loadPng(b.downImg, {width: this.Od.offsetWidth, height:this.Od.offsetHeight, classNm:'docOverLayImg'});
this.Hp.style.display = 'none';
this.Od.appendChild(this.Hp);
if(b&&b.mode)this.changeMode(b);
if(a&&b){
NTEvent.add(this.Od, "mouseover", this.mover.bind(this));
NTEvent.add(this.Od, "mouseout" , this.mout.bind(this));
NTEvent.add(this.Od, "click", this.click.bind(this));
}
},
getSrc: function(b){
return this.Od;
},
getId: function(b){
return this.Wh;
},
getImageSrc: function(b){
return this.Cl;
},
getCusSts: function(e){
return this.Ze;
},
getMode: function(e){
return this.Ga;
},
getAlt: function(e){
return this.Rh;
},
mover: function(e){
},
mout: function(e){
},
click: function(e){
if(!DocControl.getLock()){
if( this.Ga == 'Execute' || (this.Ga == 'Custom' && this.Ze == 'set')){
this.Fe();
if( this.Yp )DocControl.closeArea();
} else if( this.Ga == 'Custom' ){
this.Kt(this);
}
}
},
setExeOption: function(e){
if(this.Yp){
this.Od.style.backgroundColor = 'transparent';
if( this.Ze == 'set' ){
this.mover = function(){document.body.style.cursor='pointer';};
this.mout = function(){document.body.style.cursor='auto';};
} else {
this.mover = function(){document.body.style.cursor='pointer';this.Od.style.backgroundColor = '#AFA';DocControl.setDocExp(this);};
this.mout = function(){document.body.style.cursor='auto';this.Od.style.backgroundColor = 'transparent';DocControl.resetDocExp(this);};
}
if( this.Mt != undefined && this.Mt != null ){
this.Mt.style.display = 'none';
}
this.Cl.style.display = 'block';
this.Nv.style.display = 'none';
this.Hp.style.display = 'none';
} else {
this.mover = function(){document.body.style.cursor='pointer';DocControl.setDocExp(this);};
this.mout = function(){document.body.style.cursor='auto';DocControl.resetDocExp(this);};
this.Nv.style.display = 'none';
this.Hp.style.display = 'none';
}
NTEvent.remove(this.Od, "mouseover");
NTEvent.remove(this.Od, "mouseout");
NTEvent.add(this.Od, "mouseover", this.mover.bind(this));
NTEvent.add(this.Od, "mouseout" , this.mout.bind(this));
},
setCusOption: function(e){
if(e && e.cusSts)this.Ze = e.cusSts;
if(this.Yp == false && this.Mb)this.Mb.style.display = 'block';
if(this.Ze == 'set'){
this.mover = function(){document.body.style.cursor='pointer';};
this.mout = function(){document.body.style.cursor='auto';};
this.Hp.style.display = 'none';
this.Nv.style.display = 'none';
} else if(this.Ze == 'use'){
this.mover = function(){document.body.style.cursor='pointer';this.Od.style.backgroundColor = '#DDD';DocControl.setDocExp(this);};
this.mout = function(){document.body.style.cursor='auto';this.Od.style.backgroundColor = 'transparent';DocControl.resetDocExp(this);};
if( this.Mt != undefined && this.Mt != null ){
this.Mt.style.display = 'block';
this.Cl.style.display = 'none';
}
this.Hp.style.display = 'block';
this.Nv.style.display = 'none';
} else if(this.Ze == 'nouse'){
this.mover = function(){document.body.style.cursor='pointer';this.Od.style.backgroundColor = '#CFC';DocControl.setDocExp(this);};
this.mout = function(){document.body.style.cursor='auto';this.Od.style.backgroundColor = 'transparent';DocControl.resetDocExp(this);};
if( this.Mt != undefined && this.Mt != null ){
this.Mt.style.display = 'none';
this.Cl.style.display = 'block';
}
this.Nv.style.display = 'block';
this.Hp.style.display = 'none';
}
NTEvent.remove(this.Od, "mouseover");
NTEvent.remove(this.Od, "mouseout");
NTEvent.add(this.Od, "mouseover", this.mover.bind(this));
NTEvent.add(this.Od, "mouseout" , this.mout.bind(this));
},
changeMode: function(e){
this.Ga = e.mode;
if( this.Ga == 'Execute'){
this.setExeOption(e);
} else if( this.Ga == 'Custom'){
this.setCusOption(e);
}
},
displayHole: function(e){
this.Jx.style.display = 'block';
},
noneHole: function(e){
this.Jx.style.display = 'none';
},
displayStage: function(e){
this.Eu.style.display = 'block';
},
noneStage: function(e){
this.Eu.style.display = 'none';
}
});
var Ao = Class.create();
Ao.prototype = Object.extend(new Os.Object,{
initialize: function(a,b){
this.Od = (a)?$(a):'';
this.Bn = (b&&b.idArray)?b.idArray:'';
if(b&&b.image)this.setImage(b);
this.On = (b&&b.click)?b.click:Os.emptyFunction;
this.Rh = (b&&b.alt)?b.alt:'';
NTEvent.add(this.Od, "click", this.click.bind(this));
NTEvent.add(this.Od, "mouseover", this.mover.bind(this));
NTEvent.add(this.Od, "mouseout" , this.mout.bind(this));
},
getSrc: function(b){
return this.Od;
},
getIdArray: function(b){
return this.Bn;
},
getAlt: function(e){
return this.Rh;
},
setImage: function(b){
this.Fm = b.image;
this.Cl = DocControl.loadPng(this.Fm, {src: this.Od, width: this.Od.offsetWidth, height:this.Od.offsetHeight});
},
mover: function(e){
this.Od.style.backgroundColor = '#AFA';
document.body.style.cursor='pointer';
DocControl.setDocExp(this);
},
mout: function(e){
this.Od.style.backgroundColor = '#FFF';
document.body.style.cursor='auto';
DocControl.resetDocExp(this);
},
click: function(e){
if(!DocControl.getLock()){
this.On(this);
}
}
});
Fv('docItem', Sz);
Fv('presetItem', Ao);
Fv('NTAgis', Os);
Li(Os.Resizer);
Li(Os.Mover);
Li(Os.Transparencer);
Li(Os.MarginResizer);
})();
/*
NAVITIME Dynamic Script Window
Copyright 2007 NAVITIME JAPAN CO.,LTD. All Rights Reserved.
Auther by myoshida@navitime.co.jp
Version1.0.0
*/
var activeWindow = undefined;
NTWindow = function(){};
NTWindow.prototype = {
initialize: function(){
this.base = null;
this.width=0;
this.height=0;
},
loading: document.createElement("img"),
create: function(){
this.base = document.createElement("div");
},
onload: function(){},
open: function(){},
hide: function(){},
close: function(){
this.base = null;
},
get: function(a){
if(!a || !a.uri) return;
if(!this.base) this.create();
if(this.loading.src==""){
this.loading.src = "/pcstorage/img/loading.gif";
this.loading.style.position = "absolute";
}
this.loading.style.left = NTAgis.P(this.width/2-50);
this.loading.style.top  = NTAgis.P(this.height/2-25);
this.loading.style.display="block";
this.base.appendChild(this.loading);
var uri=a.uri, param="";
if(typeof a.param=="string"){
var parameters = a.param.split("&");
for(var i=0; i<parameters.length; i++){
var key = parameters[i].split("=")[0], value=parameters[i].split("=")[1];
if(value.match(/[^a-zA-Z0-9-_%]/)){
value = EscapeUTF8(value);
}
param += (i>0?"&":"") + key + "=" + value;
}
}else if(typeof a.param=="object"){
param = $H(a.param).toQueryString();
}
if(a.form){
param = Form.serialize(a.form);
}
this.action = a.uri + "?" + param;
if(a.func){
this.onExpandFunc = a.func;
}
var options = new Object();
options.parameters = param;
options.onComplete = this.expand.bind(this);
if(a.method && a.method == "post"){
options.method = "post";
}else{
options.method = "get";
}
new Ajax.Request(uri,options);
},
expand: function(response){
this.content.innerHTML = "";
this.content.innerHTML = NTWindow.Control.analyzeHTML(response.responseText);
NTWindow.Control.executeScript(response.responseText, this.action);
this.loading.style.display="none";
this.content.scrollTop = 0;
(this.onExpandFunc||function(){})();
},
cursor: function(e){
if(e.target.style.cursor!="pointer"){
e.target.style.cursor="pointer";
}else{
e.target.style.cursor="default";
}
},
wheelscroll: function(e){
NTAgis.C(e);
var length=50, delta=0, dom=e.target.parentNode;
do{
if((dom.id||"").indexOf("NTWindow")!=-1 && (dom.id||"").indexOf("Content")!=-1) break;
dom = dom.parentNode;
}while(dom.parentNode!=null);
if (e.wheelDelta) {
delta = e.wheelDelta/120;
if (NTUserAgent.type==4) delta = -delta;
} else if (e.detail) {
delta = -e.detail/3;
}
if(delta == 1){
dom.scrollTop = dom.scrollTop-length<0 ? 0 : dom.scrollTop-length;
}
if(delta == -1){
if(dom.offsetHeight + dom.scrollTop + length >= dom.scrollHeight){
dom.scrollTop = dom.scrollHeight - dom.offsetHeight;
}else{
dom.scrollTop += length;
}
}
}
}
NTWindow.Control = {
modal: null,
actWindow: null,
simplActs: new Array(),
ScriptFragment: '<script[^>]*>([\r\n\s\t]*<\![-]*)?((?:\n|\r|.)*?)(\/\/[\s\t\-]*>)?[\r\n]*</script>',
analyzeHTML: function(html){
return html.replace(new RegExp(NTWindow.Control.ScriptFragment, 'img'), '');
},
executeScript: function(html, action){
var matchAll = new RegExp(NTWindow.Control.ScriptFragment, 'img');
var matchOne = new RegExp(NTWindow.Control.ScriptFragment, 'im');
var scripts = (html.match(matchAll) || []).map(function(scriptTag) {
return (scriptTag.match(matchOne) || ['','',''])[2];
});
scripts.each(function(value,idx){
try{
if(value) eval(value);
}catch(e){
var options = new Object();
options.parameters = "message=" + EscapeUTF8(e.message) + "&script="+EscapeUTF8(value) + "&action=" + EscapeUTF8(action||"") + "&line=" + (e.number & 0xffff);
options.method="post";
new Ajax.Request("/pcnavi/mjx/scripterr.jsp", options);
}
});
},
self: function(a){
var c = a, f=null;
do{
try{
c = c.parentNode;
if(c.tagName=="DIV" && c.className=="window-container"){
f = c;
break;
}
}catch(e){}
}while(f==null && c.parentNode !=null);
if(this.actWindow && this.actWindow.base.id == f.id) return this.actWindow;
for(var i=0; i<this.simplActs.length; i++){
if(this.simplActs[i].base.id == f.id) return this.simplActs[i];
}
if(this.modal && this.modal.base.id == f.id) return this.modal;
return null;
},
adjust: function(){
if(this.actWindow)this.actWindow.adjust(arguments[0]);
for(var i=0; i<this.simplActs.length; i++){
this.simplActs[i].adjust(arguments[0]);
}
if(this.modal)this.modal.adjust();
},
createActionWindow: function(){
this.actWindow = new NTWindow.Action(arguments[0]);
},
getActionWindow: function(){
return this.actWindow;
},
acquireAction: function(){
if(arguments[0].process == 'totalnavi' || arguments[0].process == 'totalnavi_f' || arguments[0].process == 'drive'){
this.actWindow.route(arguments[0]);
}else{
this.actWindow.search(arguments[0]);
}
},
openActionMenu: function(){
this.actWindow.openMenu(arguments[0]);
},
reOpenActWin: function(){
this.actWindow.reOpen();
},
actTabChange: function(){
this.actWindow.tabChange(arguments[0], arguments[1]);
},
setSearchPointAct: function(){
this.actWindow.setSearchPoint(arguments[0]);
},
historyMoveAct: function(){
this.actWindow.historyMove(arguments[0]);
},
clickSrchPntHstyAct: function(){
this.actWindow.clickSrchPntHsty(arguments[0]);
},
clickSrchResultClose: function(){
this.actWindow.closeResultClickFunc();
},
createSimpleAction: function(){
this.simplActs[this.simplActs.length] = new NTWindow.SimpleAction(arguments[0]);
},
getSimpleAction: function(){
for(var i=0; i<this.simplActs.length; i++){
if(this.simplActs[i].name == arguments[0].name){
return this.simplActs[i];
}
}
},
acquireSimpleAction: function(){
for(var i=0; i<this.simplActs.length; i++){
if(this.simplActs[i].name == arguments[0].name){
this.simplActs[i].get(arguments[0]);
}
}
},
openSimpleAction: function(){
for(var i=0; i<this.simplActs.length; i++){
if(this.simplActs[i].name == arguments[0].name){
this.simplActs[i].open(arguments[0]);
} else {
this.simplActs[i].close(arguments[0]);
}
}
},
closeSimpleAction: function(){
for(var i=0; i<this.simplActs.length; i++){
if(this.simplActs[i].name == arguments[0].name){
this.simplActs[i].close(arguments[0]);
}
}
},
createModal: function(){
this.modal = new NTWindow.Modal(arguments[0]);
},
getModal: function(){
return this.modal;
},
closeModal: function(){
this.modal.close();
this.modal = null;
}
};
NTWindow.List = Class.create();
NTWindow.List.prototype = Object.extend(new NTWindow(), {
initialize: function(param){
this.history = new Array();
this.title = (param.title||null);
this.width = (param.width||250);
this.height = (param.height||350);
this.base_x = (param.x||0);
this.base_y = (param.y||0);
this.data = (param.data||null);
this.onLoadFunc  = (param.onLoad|| function(){});
this.onOpenFunc  = (param.onOpen|| function(){});
this.onHideFunc  = (param.onHide|| function(){});
this.onCloseFunc = (param.onClose|| function(){});
this.onActivateFunc  = (param.onActive|| function(){});
this.onDeactivateFunc = (param.onDeactive|| function(){});
this.type = (param.type||null);
this.create(param);
},
create: function(param){
for(var i=0; i<NTWindow.Control.lists.length; i++){
NTWindow.Control.lists[i].deactivate();
}
this.base = document.createElement("div");
var st = this.base.style;
st.width = (this.width+2)+"px";
st.height = (this.height+2)+"px";
st.position = "absolute";
st.zIndex = "3001"
st.left = NTAgis.P(this.base_x);
st.top = NTAgis.P(this.base_y);
st.overflow="hidden";
this.base.className = "window-container";
this.base.id = "NTWindowList"+Math.random(50000);
$('list-window').appendChild(this.base);
NTEvent.add(this.base, "mousedown", this.activate.bind(this));
this.icon = NTAgis.Object.Util.createPng("/pcstorage/img/map/window.png",{width:40,height:40});
this.icon.id = "listicon" + Math.floor(Math.random(10000)*10000);
st = this.icon.style;
st.left="0px";
st.zIndex = "3003"
st.display="none";
st.position="relative";
this.base.appendChild(this.icon);
NTEvent.add(this.icon, "click", this.openClickFunc.bind(this));
NTEvent.add(this.icon, "mouseover", this.iconOver.bind(this));
NTEvent.add(this.icon, "mouseout",  this.iconOut.bind(this));
if(this.title){
this.msg = document.createElement("div");
this.msg.style.position = "absolute";
this.msg.appendChild(NTAgis.Object.Util.createPng("/pcstorage/img/map/msgh.png",{width:100,height:10}));
this.msg_text = document.createElement("div");
st = this.msg_text.style;
st.fontSize="75%";
st.borderLeft = "1px #f19149 solid";
st.borderRight = "1px #f19149 solid";
st.backgroundColor = "#fff45c";
st.width = "94px";
st.padding = "2px";
st.textAlign = "left";
this.msg_text.innerHTML = this.title;
this.msg.appendChild(this.msg_text);
this.msg.appendChild(NTAgis.Object.Util.createPng("/pcstorage/img/map/msgf.png",{width:100,height:15}));
this.base.appendChild(this.msg);
st = this.msg.style;
st.left="-30px";
st.top = -(this.msg_text.offsetHeight+25)+"px";
st.zIndex = 3002;
this.msg.style.display="none";
}
this.bg = document.createElement("div");
st = this.bg.style;
st.width=this.width+"px";
st.height=this.height+"px";
st.backgroundColor="#35A";
st.left="0px";
st.top="0px";
st.position = "absolute";
st.border = "1px #126 solid";
NTAgis.Object.Util.setAlpha(this.bg,85);
this.base.appendChild(this.bg);
this.head = document.createElement("div");
st = this.head.style;
st.textAlign="right";
st.height="25px";
st.position="relative";
this.head_panel = document.createElement("div");
if(this.title){
this.head_panel.innerHTML = this.title;
st = this.head_panel.style;
st.position = "absolute";
st.left="1px";
st.top="4px";
st.paddingLeft="2px";
st.width = (this.base.offsetWidth-46)+"px"
st.height = "1.1em";
st.textAlign="left";
st.color = "#FFF";
st.fontWeight = "bold";
st.overflow = "hidden";
}
this.button_close = document.createElement("img");
st = this.button_close.style;
st.margin="3px 1px 0px 0px";
st.width="19px";
st.height="19px";
this.button_close.src="/pcstorage/img/map/windowrclose.png";
st.position = "relative";
NTEvent.add(this.button_close, 'click', this.hideClickFunc.bind(this));
NTEvent.add(this.button_close, "mouseover", this.buttonCloseOver.bind(this));
NTEvent.add(this.button_close, "mouseout", this.buttonCloseOut.bind(this));
NTEvent.add(this.button_close, "mouseup", this.buttonCloseOut.bind(this));
this.button_remove = document.createElement("img");
this.button_remove.src="/pcstorage/img/map/windowremove.png";
this.button_remove.style.margin="3px 4px 0px 0px";
this.button_remove.style.width="19px";
this.button_remove.style.height="19px";
this.button_remove.style.position = "relative";
NTEvent.add(this.button_remove, 'click', this.closeClickFunc.bind(this));
NTEvent.add(this.button_remove, "mouseover", this.buttonRemoveOver.bind(this));
NTEvent.add(this.button_remove, "mouseout", this.buttonRemoveOut.bind(this));
this.content = document.createElement("div");
this.content.id = "NTWindowListContent"+Math.random(50000);
st = this.content.style;
st.position="relative";
st.overflow="auto";
st.backgroundColor="#FFF";
st.margin="0px 4px 4px 3px";
st.borderTop = "2px #249 solid";
st.borderLeft = "2px #249 solid";
st.width = greater(this.base.offsetWidth-10,1)+"px";
st.height = greater(this.base.offsetHeight-32,1)+"px";
st.textAlign="left";
NTEvent.add(this.content, "DOMMouseScroll", this.wheelscroll.bind(this));
NTEvent.add(this.content, "mousewheel",     this.wheelscroll.bind(this));
this.mover = new NTAgis.Mover(this.base, {interval:-1});
this.sizer = new NTAgis.Resizer(this.base, {interval:-1});
this.transparencer = new NTAgis.Transparencer(this.bg, {interval:-1});
this.sizer.setOption({speed:3, startx:1,starty:1,endx:this.base.offsetWidth, endy: this.base.offsetHeight, func:this.onload.bind(this)});
this.sizer.run();
var option = new Object();
option.trigger = this.head_panel;
option.area = [-this.base.parentNode.offsetLeft - (this.width-50),-this.base.parentNode.offsetTop,,];
option.ondrag = this.activate.bind(this);
new NTAgis.Object.DragDrop(this.base,option);
NTWindow.Control.addList(this);
},
onload: function(){
this.base.appendChild(this.head);
this.head.appendChild(this.head_panel);
this.head.appendChild(this.button_close);
this.head.appendChild(this.button_remove);
this.base.appendChild(this.content);
if(this.data){
this.data.func = this.onLoadFunc;
this.get(this.data);
}
this.activate();
},
iconOver: function(e){
this.cursor(e);
if(this.title && this.msg){
this.msg.style.display = "block";
}
},
iconOut: function(e){
this.cursor(e);
if(this.title && this.msg){
this.msg.style.display = "none";
}
},
openClickFunc: function(){
otherWindowClose(this.type);
this.open();
},
open: function(){
if(this.hideIndex!=0 && this.lastpos){
this.bg.style.display = "block";
this.base.style.overflow="hidden";
this.icon.style.display="none";
this.mover.setOption({left:0 - $("list-window").offsetLeft + 8, top: 0 - $("list-window").offsetTop + $("mainmap").offsetTop});
this.mover.run();
this.sizer.setOption({endx:this.width, endy:this.height, func:this.onopen.bind(this)});
this.sizer.run();
this.transparencer.setOption({from: 20, to:70});
this.transparencer.run();
this.hideIndex = 0;
this.lastpos = null;
}
this.activate();
},
onopen: function(){
this.head.style.display="block";
this.base.style.overflow="hidden";
this.bg.style.display = "block";
this.content.style.display="block";
this.onOpenFunc();
MapAdjuster.adjust();
},
hideClickFunc: function(){
mapResizer.resize(340);
nowOpenWindow = "";
this.hide();
},
hide: function(){
this.lastpos = {x:NTAgis.S(this.base,"left"), y:NTAgis.S(this.base,"top")};
this.head.style.display="none";
this.content.style.display="none";
this.mover.setOption({left:-1*42*NTWindow.Control.getEmptyHideIndex(),top:-15});
this.mover.run();
this.sizer.setOption({endx:40,endy:40, func:this.onhide.bind(this)});
this.sizer.run();
this.transparencer.setOption({from: 70, to:20});
this.transparencer.run();
this.hideIndex = NTWindow.Control.getEmptyHideIndex();
activeWindow = undefined;
},
onhide: function(){
this.bg.style.display="none";
this.icon.style.display="block";
this.base.style.overflow="visible";
this.onHideFunc();
},
closeClickFunc: function(){
mapResizer.resize(340);
nowOpenWindow = "";
this.close();
},
close: function(){
NTWindow.Control.deleteList(this);
NTAgis.Object.Util.removeElement(this.base);
this.base=null;
this.bg=null;
this.content=null;
this.data = null;
this.onCloseFunc();
if (this.type == 'navi_list') {
naviWindow = null;
} else if (this.type == 'drive_list') {
driveWindow = null;
}
},
activate: function(){
for(var i=0; i<NTWindow.Control.lists.length; i++){
NTWindow.Control.lists[i].deactivate();
}
this.base.style.zIndex=3011;
if(this.msg) this.msg.style.zIndex=3012;
this.icon.style.zIndex=3013;
this.bg.style.backgroundColor="#35A";
this.head_panel.style.color="#FFF";
this.onActivateFunc();
NTWindow.Control.actWindow = this;
activeWindow = this;
},
deactivate: function(){
this.base.style.zIndex=3001;
if(this.msg) this.msg.style.zIndex=3002;
this.icon.style.zIndex=3003;
this.bg.style.backgroundColor="#666";
this.head_panel.style.color="#CCC";
this.onDeactivateFunc();
},
move: function(a){
new NTAgis.Mover(this.base, {endx:a.x, endy:a.y});
},
setTitle: function(a){
this.title = a;
this.head_panel.innerHTML = a;
this.msg_text.innerHTML = a;
},
buttonCloseOver: function(e){
this.button_close.src="/pcstorage/img/map/windowrclose_ov.png";
},
buttonCloseOut: function(e){
this.button_close.src="/pcstorage/img/map/windowrclose.png";
},
buttonRemoveOver: function(e){
this.button_remove.src="/pcstorage/img/map/windowremove_ov.png";
},
buttonRemoveOut: function(e){
this.button_remove.src="/pcstorage/img/map/windowremove.png";
}
});
NTWindow.Action = Class.create();
NTWindow.Action.prototype = Object.extend(new NTWindow(), {
initialize: function(param){
this.width = (param.width||350);
this.height = (param.height||450);
this.isOpen = false;
this.base = document.createElement("div");
this.base.id = "NTWindowAction"+Math.random(50000);
this.base.className = "window-container";
var st=this.base.style;
st.width = this.width+"px";
st.height = this.height+"px";
st.position = "absolute";
st.zIndex = "2001"
st.left = (param.x||5)+"px";
st.top = (param.y||0)+"px";
st.overflow = "hidden";
$('action-window').appendChild(this.base);
this.bg = document.createElement("div");
st = this.bg.style;
st.width=this.base.style.width;
st.height=this.base.style.height;
st.backgroundColor="#FFF";
st.left="0px";
st.top="0px";
st.position = "absolute";
this.base.appendChild(this.bg);
this.button_close = NTAgis.Object.Util.createPng("/pcstorage/img/map/menutab/shutter_01.gif",{width:10,height:145});
st = this.button_close.style;
st.position = "absolute";
st.left = (this.width-10)+"px";
st.top = (this.height/2-72)+"px";
st.margin="0px";
st.zIndex="2002";
NTEvent.add(this.button_close, 'click', this.closeClickFunc.bind(this));
NTEvent.add(this.button_close, "mouseover", this.cursor.bind(this));
NTEvent.add(this.button_close, "mouseout",  this.cursor.bind(this));
this.content = document.createElement("div");
this.content.id = "NTWindowActionContent"+Math.random(50000);
st = this.content.style;
st.position="relative";
st.overflow="auto";
st.backgroundColor="#FFF";
st.margin="0px 4px 0px 6px";
st.width = greater(this.base.offsetWidth-17,1) +"px";
st.height = greater(this.base.offsetHeight,1) +"px";
st.border = "1px #32962D solid";
st.borderTop = "4px #32962D solid";
NTEvent.add(this.content, "DOMMouseScroll", this.wheelscroll.bind(this));
NTEvent.add(this.content, "mousewheel",     this.wheelscroll.bind(this));
if(param.source){
this.source = param.source;
this.source.style.visibility="visible";
this.content.appendChild(this.source);
}
st.textAlign="left";
this.base.appendChild(this.button_close);
this.base.appendChild(this.content);
this.base.style.display = "none";
this.sizer = new NTAgis.Resizer(this.base,{interval:-1});
this.searchPointList = new Array();
this.setSearchPoint(param.searchPointVal);
},
open: function(data){
this.base.style.display = "block";
this.data = (data||null);
this.sizer.setOption({speed:4, startx:1,starty:this.height,endx:this.width, endy:this.height, func:this.onopen.bind(this)})
this.sizer.run();
this.isOpen = true;
},
onopen: function(){
if(this.source){
this.source.style.display="block";
}
},
closeClickFunc: function(func){
mapResizer.resize(340);
this.close();
$("actionTrigger").style.display="block";
adjustActionWinTrigger();
},
closeResultClickFunc: function(func){
$('resultField').style.display = 'none';
$('navimenuResult').style.display = 'block';
},
close: function(func){
this.onCloseFunc = func;
this.sizer.setOption({speed:4, startx:this.width,starty:this.height,endx:1, endy:this.height, func:this.onclose.bind(this)})
this.sizer.run();
this.isOpen = false;
},
onclose: function(){
this.base.style.display = "none";
if(typeof this.onCloseFunc=="function") this.onCloseFunc();
},
setTitle: function(a){
this.title = a;
this.head_panel.innerHTML = a;
},
openMenu: function(){
$('pointLoading').style.display = 'none';
$('navimenuResult').style.display = 'block';
this.open();
MapAdjuster.adjust();
},
search: function(){
mapOverLayClose();
if(NTPoiCurrent.navi == 'drive'){
$('menuTab').src = '/pcstorage/img/map/menutab/pointOnNotAuth.gif';
} else {
$('menuTab').src = '/pcstorage/img/map/menutab/pointOnAuth.gif';
}
if( !this.isOpen ){
this.open();
MapAdjuster.adjust();
if (!mapResizer.isMoved){
mapResizer.resize(340);
}
$("actionTrigger").style.display="none";
}
$('routeSearchPanel').style.display = 'none';
$('navimenuResult').style.display = 'none';
$('resultField').style.display = 'none';
$('pointSearchPanel').style.display = 'block';
$('pointLoading').style.display = 'block';
var searchParam = null;
if ( arguments[0].param == undefined || arguments[0].param == null){
searchParam = this.createActWinParam(arguments[0].process);
} else{
searchParam = arguments[0].param;
}
var func = this.searchLoadFunction($('resultField'), $('pointLoading') );
new Ajax.Request(arguments[0].uri, {method:arguments[0].method, parameters: searchParam, onComplete: func});
},
route: function(){
mapOverLayClose();
if(NTPoiCurrent.navi == 'drive'){
$('menuTab').src = '/pcstorage/img/map/menutab/routeOnNotAuth.gif';
} else {
$('menuTab').src = '/pcstorage/img/map/menutab/routeOnAuth.gif';
}
if( !this.isOpen ){
this.open();
MapAdjuster.adjust();
if (!mapResizer.isMoved){
mapResizer.resize(340);
}
$("actionTrigger").style.display="none";
}
$('pointSearchPanel').style.display = 'none';
$('routeSearchPanel').style.display = 'block';
var isReload = false;
if ( arguments[0].process == 'drive' ){
isReload = NaviSetting.setNaviType(1, arguments[0].isReload);
}else if ( arguments[0].process == 'totalnavi' ){
isReload = NaviSetting.setNaviType(2, arguments[0].isReload);
}else if ( arguments[0].process == 'totalnavi_f' ){
isReload = NaviSetting.setNaviType(3, arguments[0].isReload);
}
if( $('routeField').innerHTML == '' || arguments[0].myFlg || isReload ||
(arguments[0].isReload != null &&  arguments[0].isReload != undefined && arguments[0].isReload == true)){
$('routeField').style.display = 'none';
$('routeLoading').style.display = 'block';
if(arguments[0].param != null && arguments[0].param != undefined){
arguments[0].param.process = arguments[0].process;
} else {
arguments[0].param = {process:arguments[0].process};
}
var func = this.searchLoadFunction($('routeField'), $('routeLoading') );
new Ajax.Request(arguments[0].uri, {method:arguments[0].method, parameters: arguments[0].param, onComplete: func});
} else {
if ( arguments[0].process == 'totalnavi' || arguments[0].process == 'totalnavi_f' ){
if ( TotalNavi.reDrawRoute.length > 0 ){
if(TotalNavi.reDrawRoute[TotalNavi.routeidx].iscar){
eval(TotalNavi.reDrawRoute[TotalNavi.routeidx].drawFunc[0](false, false));
}else{
eval(TotalNavi.reDrawRoute[TotalNavi.routeidx].drawFunc[(TotalNavi.sctidx-1)]);
}
ntmap.reload();
}
} else if( arguments[0].process == 'drive' ){
if( Drive.drawRoute != null ){
Drive.drawRoute(false);
ntmap.reload();
}
}
}
},
createActWinParam: function(process){
if ( process == 'navimenu' ){
return {};
}else if ( process == 'station' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), SCode: NTPoiCurrent.id};
}else if ( process == 'drive' ){
return {};
}else if ( process == 'totalnavi' ){
return {};
}else if ( process == 'totalnavi_f' ){
return {};
}else if ( process == 'bus' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), SCode: NTPoiCurrent.id};
}else if ( process == 'around' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), LCode:this.aroundCond?this.aroundCond.LCode:'', isSearched:this.aroundCond?this.aroundCond.isSearched:'', process:process};
}else if ( process == 'aroundRank' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet' ){
return GourmetCtl.createParam();
}else if ( process == 'parking' ){
return {LCode:"0805", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), process:process};
}else if ( process == 'gas' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), cond:this.gasCond?this.gasCond.condition:'0.0.0.0.0.0.0', groupId:'00002', process:process};
}else if ( process == 'hotel' ){
return {LCode:"0608", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), process:process};
}else if ( process == 'weather' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'traffic' ){
return {tab:4, lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude(), rds:5000};
}else if ( process == 'myLocation' ){
return {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'kwdSearch' ){
return {keyword:this.srchKwd, atr:'1'}
}else if ( process == 'hospital'){
return {LCode:"0503", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'convenience'){
return {LCode:"0201001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'bank'){
return {LCode:"0501001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'supermarket'){
return {LCode:"0202001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'wifi'){
return {LCode:"0506013", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'weather'){
return {};
}else if ( process == 'leisure'){
return {LCode:"0101", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'cafe'){
return {LCode:"0301", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'pub'){
return {LCode:"0308", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'firstfood'){
return {LCode:"0303001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'ramen'){
return {LCode:"0304001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'pasta'){
return {LCode:"0306003", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'organic'){
return {LCode:"0310005", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'cosmetic'){
return {LCode:"0402002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'nail'){
return {LCode:"0402004", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'healing'){
return {LCode:"0507", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'foreignlang'){
return {LCode:"0103009", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gym'){
return {LCode:"0102014", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_france'){
return {LCode:"0306006", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_italia'){
return {LCode:"0306005", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_india'){
return {LCode:"0306007004", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_china'){
return {LCode:"0307002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_spain'){
return {LCode:"0306007005", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_mexico'){
return {LCode:"0306007006", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'gourmet_thai_viet'){
return {LCode:"0306007003", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'jpnoodle'){
return {LCode:"0304002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'cake'){
return {LCode:"0310002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'ceremony'){
return {LCode:"0305002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'crab'){
return {LCode:"0305027001", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}else if ( process == 'globefish'){
return {LCode:"0305027002", lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
}
},
searchLoadFunction: function(result, loading){
return function(response){
result.innerHTML = '';
result.innerHTML = response.responseText;
loading.style.display = 'none';
result.style.display = 'block';
NTWindow.Control.executeScript(response.responseText);
NTWindow.Control.scrollTop();
}
},
tabChange: function(){
if(!this.isOpen){
this.reOpen();
}
if($(arguments[0]+'SearchPanel').style.display != 'block'){
$('pointSearchPanel').style.display = 'none'
$('routeSearchPanel').style.display = 'none'
$(arguments[0]+'SearchPanel').style.display = 'block'
if(arguments[1] == 'drive'){
$('menuTab').src = '/pcstorage/img/map/menutab/' + arguments[0] + 'OnNotAuth.gif';
} else {
$('menuTab').src = '/pcstorage/img/map/menutab/' + arguments[0] + 'OnAuth.gif';
}
if( arguments[0]=='route'){
this.route({process:arguments[1], uri:'/pcnavi/mjx/totalnaviCondition1.jsp', method:'get'});
}else{
$('pointLoading').style.display = 'none'
}
}
},
reOpen: function(){
if(!this.isOpen){
this.open();
if($('pointSearchPanel').style.display == 'block'){
} else if($('routeSearchPanel').style.display == 'block'){
}
mapResizer.resize(340);
MapAdjuster.adjust();
$("actionTrigger").style.display="none";
}
},
adjust: function(){
this.base.style.height = greater(arguments[0].height,1) + "px";
this.bg.style.height = greater(arguments[0].height,1) + "px";
this.content.style.height = greater(arguments[0].height - 6,1) + "px";
this.button_close.style.top = arguments[0].height / 2 - 72 + "px";
},
setSearchPoint: function(){
if( arguments[0].ankId == null || arguments[0].ankId == undefined ){
var rec = document.createElement('div');
rec.className = 'srchPintRec';
var ank = document.createElement('a');
ank.setAttribute("id", "searchPointHisotry"+Math.random(50000));
ank.setAttribute("href", "#");
if(isIe){
ank.setAttribute("onclick", new Function("NTWindow.Control.historyMoveAct({id:this.id});NTWindow.Control.clickSrchPntHstyAct();return false;"));
} else{
ank.setAttribute("onclick", "NTWindow.Control.historyMoveAct({id:this.id});NTWindow.Control.clickSrchPntHstyAct();return false;");
}
ank.innerHTML = arguments[0].name;
rec.appendChild(ank);
$('searchPointHistryListContent').insertBefore(rec, $('searchPointHistryListContent').firstChild);
arguments[0].ankId = ank.id;
this.searchPointList.unshift(arguments[0]);
if(this.searchPointList.length>10){
this.searchPointList.pop();
$('searchPointHistryListContent').removeChild($('searchPointHistryListContent').lastChild);
}
}
$('searchPointName').innerHTML = arguments[0].name;
},
historyMove: function(){
var ind = 0;
if(arguments[0].id != 'searchPointName'){
for(; this.searchPointList.length > ind; ind++){
if( arguments[0].id == this.searchPointList[ind].ankId){
point = Object.clone(this.searchPointList[ind]);
tmp1 = this.searchPointList.slice(0, ind);
tmp2 = this.searchPointList.slice(ind+1, this.searchPointList.length);
this.searchPointList = tmp1.concat(tmp2);
this.searchPointList.unshift(point);
break;
}
}
}
Around.move(this.searchPointList[0]);
createPoi(NTPoiCurrent);
},
clickSrchPntHsty: function(){
if( $('searchPointFootClose').style.display == 'block' ){
$('searchPointFootClose').style.display='none';
$('searchPointFootOpen').style.display='block';
$('searchPointHistryList').style.display='block';
$('searchPointHistryListFoot').style.display='block';
} else if($('searchPointFootOpen').style.display == 'block' ){
$('searchPointFootOpen').style.display='none';
$('searchPointFootClose').style.display='block';
$('searchPointHistryList').style.display='none';
$('searchPointHistryListFoot').style.display='none';
}
}
});
NTWindow.SimpleAction = Class.create();
NTWindow.SimpleAction.prototype = Object.extend(new NTWindow(), {
initialize: function(param){
this.name = (param.name||'');
this.width = (param.width||340);
this.height = (param.height||450);
this.isOpen = false;
this.source = param.source;
this.base = document.createElement("div");
this.base.id = "NTWindowAction"+Math.random(50000);
this.base.className = "window-container";
var st=this.base.style;
st.width = this.width+"px";
st.height = this.height+"px";
st.position = "absolute";
st.zIndex = "2001"
st.left = (param.x||0)+"px";
st.top = (param.y||0)+"px";
st.overflow = "hidden";
param.source.appendChild(this.base);
this.content = document.createElement("div");
this.content.id = "NTWindowActionContent"+Math.random(50000);
st = this.content.style;
st.position="relative";
st.overflow="auto";
st.backgroundImage = 'url("/pcstorage/img/map/white_1.png")';
st.margin="2px";
st.border = "3px #FFC630 solid";
st.width = greater(this.base.offsetWidth-10,1) +"px";
st.height = greater(this.base.offsetHeight-10,1) +"px";
NTEvent.add(this.content, "DOMMouseScroll", this.wheelscroll.bind(this));
NTEvent.add(this.content, "mousewheel",     this.wheelscroll.bind(this));
st.textAlign="left";
this.base.appendChild(this.content);
this.base.style.display = "none";
this.sizer = new NTAgis.Resizer(this.base,{interval:-1});
},
open: function(){
this.base.style.display = "block";
this.data = (arguments[0]||null);
this.sizer.setOption({speed:4, startx:this.width,starty:1,endx:this.width, endy:arguments[0].height, func:this.onopen.bind(this)})
this.sizer.run();
this.isOpen = true;
this.adjust(arguments[0]);
},
onopen: function(){
if(this.source){
this.source.style.display="block";
}
},
close: function(func){
this.onCloseFunc = func;
this.sizer.setOption({speed:4, startx:this.width,starty:this.height,endx:1, endy:1, func:this.onclose.bind(this)})
this.sizer.run();
this.isOpen = false;
},
onclose: function(){
this.base.style.display = "none";
if(typeof this.onCloseFunc=="function") this.onCloseFunc();
},
adjust: function(){
},
resize: function(){
this.base.style.width = arguments[0].width + 'px';
this.content.style.width = new Number(arguments[0].width) - 10 + 'px';
}
});
NTWindow.Modal = Class.create();
NTWindow.Modal.prototype = Object.extend(new NTWindow, {
initialize: function(option){
this.onLoadFunc  = (option.onLoad|| function(){});
this.onCloseFunc  = (option.onClose|| function(){});
this.create(option);
},
create: function(option){
this.width = (option.x||400);
this.height = (option.y||400);
this.base = document.createElement("div");
this.base.className = "window-container";
this.base.id = "NTWindowModal"+Math.random(50000);
$('mainframe').appendChild(this.base);
var st = this.base.style;
st.display="none";
st.position="absolute";
st.zIndex=10000;
st.width = NTAgis.P(this.width);
st.height = NTAgis.P(this.height+20);
this.bg = document.createElement("div");
this.bg.style.backgroundColor="#000";
this.bg.style.position="absolute";
$('mainframe').appendChild(this.bg);
this.bg.style.width = NTAgis.P(NTAgis.Object.Util.windowSize().windowWidth);
this.bg.style.height = NTAgis.P(NTAgis.Object.Util.windowSize().pageHeight);
this.bg.style.left = "0px";
this.bg.style.top = "0px";
this.bg.style.zIndex = 9990;
this.bg.style.display="none";
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_1.png",{width:10,height:25});
img.style.position="absolute";
img.style.left=NTAgis.P(0);
this.base.appendChild(img);
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_2.png",{width:10,height:25});
img.style.position="absolute";
img.style.left=NTAgis.P(this.width-10);
this.base.appendChild(img);
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_bg.png",{width:(this.width-20),height:25});
img.style.position="absolute";
img.style.left="10px";
this.base.appendChild(img);
if(option.source){
this.content = NTAgis.Object.copy(option.source);
this.content.style.display ="block";
}else{
this.content = document.createElement("div");
this.content.style.backgroundColor="#FFF";
this.content.style.overflow = "auto";
this.content.style.width = NTAgis.P(this.width);
this.content.style.height = NTAgis.P(this.height);
}
this.content.id = "NTWindowModalContent"+Math.random(50000);
this.content.style.position="absolute";
this.content.style.top="25px";
NTEvent.add(this.content, "DOMMouseScroll", this.wheelscroll.bind(this));
NTEvent.add(this.content, "mousewheel",     this.wheelscroll.bind(this));
this.base.appendChild(this.content);
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_3.png",{width:10,height:10});
img.style.position="absolute";
img.style.left=NTAgis.P(0);
img.style.top=NTAgis.P(this.height+25);
this.base.appendChild(img);
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_4.png",{width:10,height:10});
img.style.position="absolute";
img.style.left=NTAgis.P(this.width-10);
img.style.top=NTAgis.P(this.height+25);
this.base.appendChild(img);
var img = NTAgis.Object.Util.createPng("/pcstorage/img/map/modal_bg.png",{width:(this.width-20),height:10});
img.style.position="absolute";
img.style.left="10px";
img.style.top=NTAgis.P(this.height+25);
this.base.appendChild(img);
this.button_remove = document.createElement("img");
this.button_remove.src="/pcstorage/img/map/windowremove.png";
this.button_remove.style.position = "absolute";
this.button_remove.style.left=NTAgis.P(this.width-26);
this.button_remove.style.top=NTAgis.P(5);
this.button_remove.style.width="19px";
this.button_remove.style.height="19px";
NTEvent.add(this.button_remove, 'click', this.close.bind(this));
NTEvent.add(this.button_remove, "mouseover", this.buttonRemoveOver.bind(this));
NTEvent.add(this.button_remove, "mouseout", this.buttonRemoveOut.bind(this));
this.base.appendChild(this.button_remove);
if(option.data){
option.data.func = this.open.bind(this);
this.get(option.data);
}
NTWindow.Control.modal = this;
},
open: function(){
NTWindow.Control.modal = this;
new NTAgis.Transparencer(this.bg, {from:20, to:60, speed:3, func:this.onLoadFunc.bind(this)});
this.bg.style.display="block";
var st = this.base.style;
st.display="block";
st.left = NTAgis.P(Math.floor((NTAgis.Object.Util.windowSize().windowWidth/2)-(this.content.offsetWidth/2)));
st.top  = NTAgis.P(Math.floor((NTAgis.Object.Util.windowSize().windowHeight/2)-(this.content.offsetHeight/2))+NTAgis.Object.Util.scroll());
if (NTAgis.S(this.base.id, 'left') < 0) st.left = '10px';
if (NTAgis.S(this.base.id, 'top') < 36) st.top = '45px';
if(this.selectedTab)this.changeTab(this.selectedTab);
},
close: function(){
NTWindow.Control.modal = null;
this.base.style.display="none";
new NTAgis.Transparencer(this.bg, {from:50, to:50, speed:5, func:this.onclose.bind(this)});
NTAgis.Object.Util.removeElement(this.base);
$('mainframe').removeChild(this.bg);
this.base=null;
this.content=null;
},
onclose: function(){
this.onCloseFunc();
this.bg.style.display="none";
},
buttonRemoveOver: function(e){
this.button_remove.src="/pcstorage/img/map/windowremove_ov.png";
},
buttonRemoveOut: function(e){
this.button_remove.src="/pcstorage/img/map/windowremove.png";
},
setTab: function(tabs){
this.tabWidth = 161;
this.tabHeight = 36;
this.tabMargin = 2;
this.tabList = new Array();
if(tabs){
for(var i=0; i<tabs.length; i++){
this.tab = document.createElement("div");
if(tabs[i].idx == 'tabID_Adv'){
this.tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_ad_off.gif")';
} else if (tabs[i].idx == 'tabID_01128' || tabs[i].idx == 'tabID_01129' || tabs[i].idx == 'tabID_01130' || tabs[i].idx == 'tabID_01135') {
this.tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_off.gif")';
} else {
this.tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_blue_off.gif")';
}
this.tab.style.backgroundColor="transparent";
this.tab.style.backgroundRepeat = 'no-repeat';
this.tab.style.position="absolute";
this.tab.style.left=NTAgis.P(i * (this.tabWidth + this.tabMargin) + 10);
this.tab.style.top=NTAgis.P(-(this.tabHeight));
this.tab.style.paddingLeft = '66px';
this.tab.style.paddingTop = '3px';
this.tab.style.width = "97px";
this.tab.style.height = this.tabHeight + "px";
this.tab.style.color="#FFF";
this.tab.style.fontWeight="bold";
this.tab.innerHTML = tabs[i].text;
this.tab.style.verticalAlign="bottom";
this.tab.style.align="center";
this.tabImg = document.createElement("div");
this.tabImg.style.position="absolute";
this.tabImg.style.backgroundColor="transparent";
this.tabImg.style.width = "60px";
this.tabImg.style.height = "25px";
this.tabImg.style.left=NTAgis.P(i * (this.tabWidth + this.tabMargin) + 15);
this.tabImg.style.top=NTAgis.P(-(this.tabHeight)+7);
this.tab.tabIdx = tabs[i].idx;
this.tabImg.style.backgroundImage = tabs[i].img.indexOf('http://') >= 0 ?
'url(' + tabs[i].img + ')' :
'url(/pcstorage/img/gourmet/' + tabs[i].img + ')';
this.tabImg.style.backgroundPosition = 'center center';
this.tabImg.style.backgroundRepeat = 'no-repeat';
this.base.appendChild(this.tab);
this.base.appendChild(this.tabImg);
if(i == 0 || tabs[i].selected && tabs[i].selected=='on'){
this.selectedTab = this.tab;
}
this.tabList.push(this.tab);
NTEvent.add(this.tab, 'click', this.changeTab.bind(this, this.tab));
NTEvent.add(this.tabImg, 'click', this.changeTab.bind(this, this.tab));
}
}
},
changeTab: function(tab){
for(var i=0; i<this.tabList.length; i++){
document.getElementById(this.tabList[i].tabIdx).style.display = "none";
if(this.tabList[i].tabIdx == 'tabID_Adv'){
this.tabList[i].style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_ad_off.gif")';
} else if (this.tabList[i].tabIdx == 'tabID_01128' || this.tabList[i].tabIdx == 'tabID_01129' || this.tabList[i].tabIdx == 'tabID_01130' || this.tabList[i].tabIdx == 'tabID_01135') {
this.tabList[i].style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_off.gif")';
} else {
this.tabList[i].style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_blue_off.gif")';
}
this.tabList[i].style.color="#FFF";
}
document.getElementById(tab.tabIdx).style.display = "block";
if(tab.tabIdx == 'tabID_Adv'){
tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_ad_on.gif")';
} else if (tab.tabIdx == 'tabID_01128' || tab.tabIdx == 'tabID_01129' || tab.tabIdx == 'tabID_01130' || tab.tabIdx == 'tabID_01135') {
outPutCntLog({type:'modal', logId:'tab_' + tab.tabIdx});
tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_on.gif")';
} else {
tab.style.backgroundImage = 'url("/pcstorage/img/gourmet/tab_blue_on.gif")';
}
tab.style.color="#000";
},
tabScrollTop: function(){
$(this.content.id).scrollTop = 0;
},
adjust: function(){
this.bg.style.width = NTAgis.P(NTAgis.Object.Util.windowSize().windowWidth);
this.bg.style.height = NTAgis.P(NTAgis.Object.Util.windowSize().pageHeight);
}
});
NTEvent.add(window, "load", function(){
});
NTPoiStatus = Class.create();
NTPoiStatus.prototype = {
name:null,
address:null,
tel:null,
note:null,
id:null,
categoryId:null,
categoryName:null,
provId:null,
spotId:null,
groupId:null,
vics:null,
advId:null,
detailProvId:null,
catchCopy:null,
img:null,
navi:null,
coupon:null,
reserveUrl:null,
reserveType:null,
reserveIconList:new Array(),
coupon:null,
isBusStop:false,
isRegistPoi:false,
hasDetail:false,
dProvIdList:new Array(),
upperIconList:new Array(),
lowerIconList:new Array(),
votable:false,
zip:null,
initialize: function(){
this.navi  = arguments[0].navi;
},
reset: function(){
this.name=null;
this.address=null;
this.tel=null;
this.note=null;
this.id=null;
this.categoryId=null;
this.categoryName=null;
this.provId=null;
this.spotId=null;
this.groupId=null;
this.vics=null;
this.note=null;
this.advId=null;
this.detailProvId=null;
this.catchCopy=null;
this.img=null;
this.coupon=null;
this.reserveUrl=null;
this.reserveType=null;
this.reserveIconList=new Array();
this.isBusStop=false;
this.isRegistPoi=false;
this.hasDetail=false;
this.upperIconList=new Array();
this.lowerIconList=new Array();
this.votable = false;
this.zip=null;
},
toString: function(){
text = '{';
text += 'name:\'' + (this.name || '') + '\',';
text += 'address:\'' + (this.address || '') + '\',';
text += 'tel:\'' + (this.tel || '') + '\',';
text += 'note:\'' + (this.note || '') + '\',';
text += 'id:\'' + (this.id || '') + '\',';
text += 'categoryId:\'' + (this.categoryId || '') + '\',';
text += 'categoryName:\'' + (this.categoryName || '')+ '\',';
text += 'provId:\'' + (this.provId || '') + '\',';
text += 'spotId:\'' + (this.spotId || '') + '\',';
text += 'groupId:\'' + (this.groupId || '') + '\',';
text += 'vics:\'' + (this.vics || '') + '\',';
text += 'advId:\'' + (this.advId || '') + '\',';
text += 'detailProvId:\'' + (this.detailProvId || '') + '\',';
text += 'catchCopy:\'' + (this.catchCopy || '') + '\',';
text += 'img:\'' + (this.img || '') + '\',';
text += 'coupon:\'' + (this.coupon || '') + '\',';
text += 'reserveUrl:\'' + (this.reserveUrl || '') + '\',';
text += 'reserveType:\'' + (this.reserveType || '') + '\',';
text += 'reserveIconList:['
for(var i = 0; i < this.reserveIconList.length; i++){
if(i != 0)text += ',';
text += '{prm:\'' + this.reserveIconList[i].prm + '\',';
text += 'img:\'' + this.reserveIconList[i].img + '\'}';
}
text += '],';
text += 'isBusStop:' + (this.isBusStop || false)+ ',';
text += 'isRegistPoi:' + (this.isRegistPoi || false)+ ',';
text += 'hasDetail:' + (this.hasDetail || false)+ ',';
text += 'upperIconList:['
for(var i = 0; i < this.upperIconList.length; i++){
if(i != 0)text += ',';
text += '{dProvId:\'' + this.upperIconList[i].dProvId + '\',';
text += 'img:\'' + this.upperIconList[i].img + '\'}';
}
text += '],';
text += 'lowerIconList:['
for(var i = 0; i < this.lowerIconList.length; i++){
if(i != 0)text += ',';
text += '{dProvId:\'' + this.lowerIconList[i].dProvId + '\',';
text += 'img:\'' + this.lowerIconList[i].img + '\'}';
}
text += '],';
text += 'votable:' + this.votable + ',';
text += 'zip:\'' + this.zip +'\'';
text += '}';
return text;
},
set: function(prm){
this.name = prm.name;
this.address = prm.address;
this.tel = prm.tel;
this.note = prm.note;
this.id = prm.id;
this.categoryId = prm.categoryId;
this.categoryName = prm.categoryName;
this.provId = prm.provId;
this.spotId = prm.spotId;
this.groupId = prm.groupId;
this.vics = prm.vics;
this.advId = prm.advId;
this.detailProvId = prm.detailProvId;
this.catchCopy = prm.catchCopy;
this.img = prm.img;
this.coupon = prm.coupon;
this.reserveUrl = prm.reserveUrl;
this.reserveType = prm.reserveType;
this.reserveIconList = new Array();
if(prm.reserveIconList)this.reserveIconList = prm.reserveIconList;
this.isBusStop = prm.isBusStop;
this.isRegistPoi = prm.isRegistPoi;
this.hasDetail = prm.hasDetail;
this.upperIconList = new Array();
if(prm.upperIconList)this.upperIconList = prm.upperIconList;
this.lowerIconList = new Array();
if(prm.lowerIconList)this.lowerIconList = prm.lowerIconList;
this.votable = prm.votable != null && prm.votable;
this.zip = (prm.zip != null && prm.zip!=undefined && prm.zip != 'null')?prm.zip:"";
}
}
EscapeSJIS=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0),m;
return c<128?(c<16?"%0":"%")+c.toString(16).toUpperCase():65376<c&&c<65440?"%"+(c-65216).toString(16).toUpperCase():(c=JCT11280.indexOf(s))<0?"%81E":"%"+((m=((c<8272?c:(c=JCT11280.lastIndexOf(s)))-(c%=188))/188)<31?m+129:m+193).toString(16).toUpperCase()+(64<(c+=c<63?64:65)&&c<91||95==c||96<c&&c<123?String.fromCharCode(c):"%"+c.toString(16).toUpperCase())
})
};
UnescapeSJIS=function(str){
return str.replace(/%(8[1-9A-F]|[9E][0-9A-F]|F[0-9A-C])(%[4-689A-F][0-9A-F]|%7[0-9A-E]|[@-~])|%([0-7][0-9A-F]|A[1-9A-F]|[B-D][0-9A-F])/ig,function(s){
var c=parseInt(s.substring(1,3),16),l=s.length;
return 3==l?String.fromCharCode(c<160?c:c+65216):JCT11280.charAt((c<160?c-129:c-193)*188+(4==l?s.charCodeAt(3)-64:(c=parseInt(s.substring(4),16))<127?c-64:c-65))
})
};
EscapeEUCJP=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<128?(c<16?"%0":"%")+c.toString(16):65376<c&&c<65440?"%8E%"+(c-65216).toString(16):(c=JCT8836.indexOf(s))<0?"%A1%A6":"%"+((c-(c%=94))/94+161).toString(16)+"%"+(c+161).toString(16)).toUpperCase()
})
};
UnescapeEUCJP=function(str){
return str.replace(/(%A[1-9A-F]|%[B-E][0-9A-F]|%F[0-9A-E]){2}|%8E%(A[1-9A-F]|[B-D][0-9A-F])|%[0-7][0-9A-F]/ig,function(s){
var c=parseInt(s.substring(1),16);
return c<161?String.fromCharCode(c<128?c:parseInt(s.substring(4),16)+65216):JCT8836.charAt((c-161)*94+parseInt(s.substring(4),16)-161)
})
};
EscapeJIS7=function(str){
var u=String.fromCharCode,ri=u(92,120,48,48,45,92,120,55,70),rj=u(65377,45,65439,93,43),
H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?u(c):"%"+c.toString(16).toUpperCase()
},
I=function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":"%")+c.toString(16).toUpperCase()
},
rI=new RegExp;rI.compile("[^*+.-9A-Z_a-z-]","g");
return ("g"+str+"g").replace(RegExp("["+ri+"]+","g"),function(s){
return "%1B%28B"+s.replace(rI,I)
}).replace(RegExp("["+rj,"g"),function(s){
var c,i=0,t="%1B%28I";while(c=s.charCodeAt(i++))t+=H(c-65344);return t
}).replace(RegExp("[^"+ri+rj,"g"),function(s){
var a,c,i=0,t="%1B%24B";while(a=s.charAt(i++))t+=(c=JCT8836.indexOf(a))<0?"%21%26":H((c-(c%=94))/94+33)+H(c+33);return t
}).slice(8,-1)
};
UnescapeJIS7=function(str){
var i=0,p,q,s="",u=String.fromCharCode,
P=("%28B"+str.replace(/%49/g,"I").replace(/%1B%24%4[02]|%1B%24@/ig,"%1B%24B")).split(/%1B/i),
I=function(s){
return u(parseInt(s.substring(1),16))
},
J=function(s){
return u((3==s.length?parseInt(s.substring(1),16):s.charCodeAt(0))+65344)
},
K=function(s){
var l=s.length;
return JCT8836.charAt(4<l?(parseInt(s.substring(1),16)-33)*94+parseInt(s.substring(4),16)-33:2<l?(37==(l=s.charCodeAt(0))?(parseInt(s.substring(1,3),16)-33)*94+s.charCodeAt(3):(l-33)*94+parseInt(s.substring(2),16))-33:(s.charCodeAt(0)-33)*94+s.charCodeAt(1)-33)
},
rI=new RegExp,rJ=new RegExp,rK=new RegExp;
rI.compile("%[0-7][0-9A-F]","ig");rJ.compile("(%2[1-9A-F]|%[3-5][0-9A-F])|[!-_]","ig");
rK.compile("(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E]){2}|(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])[!-~]|[!-~](%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])|[!-~]{2}","ig");
while(p=P[i++])s+="%24B"==(q=p.substring(0,4))?p.substring(4).replace(rK,K):"%28I"==q?p.substring(4).replace(rJ,J):p.replace(rI,I).substring(2);
return s
};
EscapeJIS8=function(str){
var u=String.fromCharCode,r=u(92,120,48,48,45,92,120,55,70,65377,45,65439,93,43),
H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?u(c):"%"+c.toString(16).toUpperCase()
},
I=function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":"%")+(c<128?c:c-65216).toString(16).toUpperCase()
},
rI=new RegExp;rI.compile("[^*+.-9A-Z_a-z-]","g");
return ("g"+str+"g").replace(RegExp("["+r,"g"),function(s){
return "%1B%28B"+s.replace(rI,I)
}).replace(RegExp("[^"+r,"g"),function(s){
var a,c,i=0,t="%1B%24B";while(a=s.charAt(i++))t+=(c=JCT8836.indexOf(a))<0?"%21%26":H((c-(c%=94))/94+33)+H(c+33);return t
}).slice(8,-1)
};
UnescapeJIS8=function(str){
var i=0,p,s="",
P=("%28B"+str.replace(/%1B%24%4[02]|%1B%24@/ig,"%1B%24B")).split(/%1B/i),
I=function(s){
var c=parseInt(s.substring(1),16);
return String.fromCharCode(c<128?c:c+65216)
},
K=function(s){
var l=s.length;
return JCT8836.charAt(4<l?(parseInt(s.substring(1),16)-33)*94+parseInt(s.substring(4),16)-33:2<l?(37==(l=s.charCodeAt(0))?(parseInt(s.substring(1,3),16)-33)*94+s.charCodeAt(3):(l-33)*94+parseInt(s.substring(2),16))-33:(s.charCodeAt(0)-33)*94+s.charCodeAt(1)-33)
},
rI=new RegExp,rK=new RegExp;
rI.compile("%([0-7][0-9A-F]|A[1-9A-F]|[B-D][0-9A-F])","ig");
rK.compile("(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E]){2}|(%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])[!-~]|[!-~](%2[1-9A-F]|%[3-6][0-9A-F]|%7[0-9A-E])|[!-~]{2}","ig");
while(p=P[i++])s+="%24B"==p.substring(0,4)?p.substring(4).replace(rK,K):p.replace(rI,I).substring(2);
return s
};
EscapeUnicode=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<16?"%0":c<256?"%":c<4096?"%u0":"%u")+c.toString(16).toUpperCase()
})
};
UnescapeUnicode=function(str){
return str.replace(/%u[0-9A-F]{4}|%[0-9A-F]{2}/ig,function(s){
return String.fromCharCode("0x"+s.substring(s.length/3))
})
};
EscapeUTF7=function(str){
var B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
E=function(s){
var c=s.charCodeAt(0);
return B[c>>10]+B[c>>4&63]+B[(c&15)<<2|(c=s.charCodeAt(1))>>14]+(0<=c?B[c>>8&63]+B[c>>2&63]+B[(c&3)<<4|(c=s.charCodeAt(2))>>12]+(0<=c?B[c>>6&63]+B[c&63]:""):"")
},
re=new RegExp;re.compile("[^+]{1,3}","g");
return (str+"g").replace(/[^*+.-9A-Z_a-z-]+[*+.-9A-Z_a-z-]|[+]/g,function(s){
if("+"==s)return "+-";
var l=s.length-1,w=s.charAt(l);
return "+"+s.substring(0,l).replace(re,E)+("+"==w?"-+-":"*"==w||"."==w||"_"==w?w:"-"+w)
}).slice(0,-1)
};
UnescapeUTF7=function(str){
var i=0,B={};
while(i<64)B["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i)]=i++;
return str.replace(RegExp("[+][+/-9A-Za-z]*-?","g"),function(s){
if("+-"==s)return "+";
var b=B[s.charAt(1)],c,i=1,t="";
while(0<=b){
if((c=i&7)<6)c=c<3?b<<10|B[s.charAt(++i)]<<4|(b=B[s.charAt(++i)])>>2:(b&3)<<14|B[s.charAt(++i)]<<8|B[s.charAt(++i)]<<2|(b=B[s.charAt(++i)])>>4;
else{c=(b&15)<<12|B[s.charAt(++i)]<<6|B[s.charAt(++i)];b=B[s.charAt(++i)]}
if(c)t+=String.fromCharCode(c)
}
return t
})
};
EscapeUTF8=function(str){
return str.replace(/[^*+.-9A-Z_a-z-]/g,function(s){
var c=s.charCodeAt(0);
return (c<16?"%0"+c.toString(16):c<128?"%"+c.toString(16):c<2048?"%"+(c>>6|192).toString(16)+"%"+(c&63|128).toString(16):"%"+(c>>12|224).toString(16)+"%"+(c>>6&63|128).toString(16)+"%"+(c&63|128).toString(16)).toUpperCase()
})
};
UnescapeUTF8=function(str){
return str.replace(/%(E(0%[AB]|[1-CEF]%[89AB]|D%[89])[0-9A-F]|C[2-9A-F]|D[0-9A-F])%[89AB][0-9A-F]|%[0-7][0-9A-F]/ig,function(s){
var c=parseInt(s.substring(1),16);
return String.fromCharCode(c<128?c:c<224?(c&31)<<6|parseInt(s.substring(4),16)&63:((c&15)<<6|parseInt(s.substring(4),16)&63)<<6|parseInt(s.substring(7),16)&63)
})
};
EscapeUTF16LE=function(str){
var H=function(c){
return 41<c&&c<58&&44!=c||64<c&&c<91||95==c||96<c&&c<123?String.fromCharCode(c):(c<16?"%0":"%")+c.toString(16).toUpperCase()
};
return str.replace(/[^ ]| /g,function(s){
var c=s.charCodeAt(0);return H(c&255)+H(c>>8)
})
};
UnescapeUTF16LE=function(str){
var u=String.fromCharCode,b=u(92,120,48,48,45,92,120,70,70);
return str.replace(/^%FF%FE/i,"").replace(RegExp("%[0-9A-F]{2}%[0-9A-F]{2}|%[0-9A-F]{2}["+b+"]|["+b+"]%[0-9A-F]{2}|["+b+"]{2}","ig"),function(s){
var l=s.length;
return u(4<l?"0x"+s.substring(4,6)+s.substring(1,3):2<l?37==(l=s.charCodeAt(0))?parseInt(s.substring(1,3),16)|s.charCodeAt(3)<<8:l|parseInt(s.substring(2),16)<<8:s.charCodeAt(0)|s.charCodeAt(1)<<8)
})
};
GetEscapeCodeType=function(str){
if(/%u[0-9A-F]{4}/i.test(str))return "Unicode";
if(/%([0-9A-DF][0-9A-F]%[8A]0%|E0%80|[0-7][0-9A-F]|C[01])%[8A]0|%00|%[7F]F/i.test(str))return "UTF16LE";
if(/%E[0-9A-F]%[8A]0%[8A]0|%[CD][0-9A-F]%[8A]0/i.test(str))return "UTF8";
if(/%F[DE]/i.test(str))return /%8[0-9A-D]|%9[0-9A-F]|%A0/i.test(str)?"UTF16LE":"EUCJP";
if(/%1B/i.test(str))return /%[A-D][0-9A-F]/i.test(str)?"JIS8":"JIS7";
var S=str.substring(0,6143).replace(/%[0-9A-F]{2}|[^ ]| /ig,function(s){
return s.length<3?"40":s.substring(1)
}),c,C,i=0,T;
while(0<=(c=parseInt(S.substring(i,i+=2),16))&&i<4092)if(128<=c){
if((C=parseInt(S.substring(i,i+2),16))<128)i+=2;
else if(194<=c&&c<240&&C<192){
if(c<224){T="UTF8";i+=2;continue}
if(2==parseInt(S.charAt(i+2),16)>>2){T="UTF8";i+=4;continue}
}
if(142==c&&161<=C&&C<224){if(!T)T="EUCJP";if("EUCJP"==T)continue}
if(c<161)return "SJIS";
if(c<224&&!T)
if((164==c&&C<244||165==c&&C<247)&&161<=C)i+=2;
else T=224<=C?"EUCJP":"SJIS";
else T="EUCJP"
}
return T?T:"EUCJP"
};
JCT11280=Function('var a="zKV33~jZ4zN=~ji36XazM93y!{~k2y!o~k0ZlW6zN?3Wz3W?{EKzK[33[`y|;-~j^YOTz$!~kNy|L1$353~jV3zKk3~k-4P4zK_2+~jY4y!xYHR~jlz$_~jk4z$e3X5He<0y!wy|X3[:~l|VU[F3VZ056Hy!nz/m1XD61+1XY1E1=1y|bzKiz!H034zKj~mEz#c5ZA3-3X$1~mBz$$3~lyz#,4YN5~mEz#{ZKZ3V%7Y}!J3X-YEX_J(3~mAz =V;kE0/y|F3y!}~m>z/U~mI~j_2+~mA~jp2;~m@~k32;~m>V}2u~mEX#2x~mBy+x2242(~mBy,;2242(~may->2&XkG2;~mIy-_2&NXd2;~mGz,{4<6:.:B*B:XC4>6:.>B*BBXSA+A:X]E&E<~r#z+625z s2+zN=`HXI@YMXIAXZYUM8X4K/:Q!Z&33 3YWX[~mB`{zKt4z (zV/z 3zRw2%Wd39]S11z$PAXH5Xb;ZQWU1ZgWP%3~o@{Dgl#gd}T){Uo{y5_d{e@}C(} WU9|cB{w}bzvV|)[} H|zT}d||0~{]Q|(l{|x{iv{dw}(5}[Z|kuZ }cq{{y|ij}.I{idbof%cu^d}Rj^y|-M{ESYGYfYsZslS`?ZdYO__gLYRZ&fvb4oKfhSf^d<Yeasc1f&a=hnYG{QY{D`Bsa|u,}Dl|_Q{C%xK|Aq}C>|c#ryW=}eY{L+`)][YF_Ub^h4}[X|?r|u_ex}TL@YR]j{SrXgo*|Gv|rK}B#mu{R1}hs|dP{C7|^Qt3|@P{YVV |8&}#D}ef{e/{Rl|>Hni}R1{Z#{D[}CQlQ||E}[s{SG_+i8eplY[=[|ec[$YXn#`hcm}YR|{Ci(_[ql|?8p3]-}^t{wy}4la&pc|3e{Rp{LqiJ],] `kc(]@chYnrM`O^,ZLYhZB]ywyfGY~aex!_Qww{a!|)*lHrM{N+n&YYj~Z b c#e_[hZSon|rOt`}hBXa^i{lh|<0||r{KJ{kni)|x,|0auY{D!^Sce{w;|@S|cA}Xn{C1h${E]Z-XgZ*XPbp]^_qbH^e[`YM|a||+=]!Lc}]vdBc=j-YSZD]YmyYLYKZ9Z>Xcczc2{Yh}9Fc#Z.l{}(D{G{{mRhC|L3b#|xK[Bepj#ut`H[,{E9Yr}1b{[e]{ZFk7[ZYbZ0XL]}Ye[(`d}c!|*y`Dg=b;gR]Hm=hJho}R-[n}9;{N![7k_{UbmN]rf#pTe[x8}!Qcs_rs[m`|>N}^V})7{^r|/E}),}HH{OYe2{Skx)e<_.cj.cjoMhc^d}0uYZd!^J_@g,[[[?{i@][|3S}Yl3|!1|eZ|5IYw|1D}e7|Cv{OHbnx-`wvb[6[4} =g+k:{C:}ed{S]|2M]-}WZ|/q{LF|dYu^}Gs^c{Z=}h>|/i|{W]:|ip{N:|zt|S<{DH[p_tvD{N<[8Axo{X4a.^o^X>Yfa59`#ZBYgY~_t^9`jZHZn`>G[oajZ;X,i)Z.^~YJe ZiZF^{][[#Zt^|]Fjx]&_5dddW]P0C[-]}]d|y {C_jUql] |OpaA[Z{lp|rz}:Mu#]_Yf6{Ep?f5`$[6^D][^u[$[6^.Z8]]ePc2U/=]K^_+^M{q*|9tYuZ,s(dS{i=|bNbB{uG}0jZOa:[-]dYtu3]:]<{DJ_SZIqr_`l=Yt`gkTnXb3d@kiq0a`Z{|!B|}e}Ww{Sp,^Z|0>_Z}36|]A|-t}lt{R6pi|v8hPu#{C>YOZHYmg/Z4nicK[}hF_Bg|YRZ7c|crkzYZY}_iXcZ.|)U|L5{R~qi^Uga@Y[xb}&qdbd6h5|Btw[}c<{Ds53[Y7]?Z<|e0{L[ZK]mXKZ#Z2^tavf0`PE[OSOaP`4gi`qjdYMgys/?[nc,}EEb,eL]g[n{E_b/vcvgb.{kcwi`~v%|0:|iK{Jh_vf5lb}KL|(oi=LrzhhY_^@`zgf[~g)[J_0fk_V{T)}I_{D&_/d9W/|MU[)f$xW}?$xr4<{Lb{y4}&u{XJ|cm{Iu{jQ}CMkD{CX|7A}G~{kt)nB|d5|<-}WJ}@||d@|Iy}Ts|iL|/^|no|0;}L6{Pm]7}$zf:|r2}?C_k{R(}-w|`G{Gy[g]bVje=_0|PT{^Y^yjtT[[[l!Ye_`ZN]@[n_)j3nEgMa]YtYpZy].d-Y_cjb~Y~[nc~sCi3|zg}B0}do{O^{|$`_|D{}U&|0+{J3|8*]iayx{a{xJ_9|,c{Ee]QXlYb]$[%YMc*]w[aafe]aVYi[fZEii[xq2YQZHg]Y~h#|Y:thre^@^|_F^CbTbG_1^qf7{L-`VFx Zr|@EZ;gkZ@slgko`[e}T:{Cu^pddZ_`yav^Ea+[#ZBbSbO`elQfLui}.F|txYcbQ`XehcGe~fc^RlV{D_0ZAej[l&jShxG[ipB_=u:eU}3e8[=j|{D(}dO{Do[BYUZ0/]AYE]ALYhZcYlYP/^-^{Yt_1_-;YT`P4BZG=IOZ&]H[e]YYd[9^F[1YdZxZ?Z{Z<]Ba2[5Yb[0Z4l?]d_;_)a?YGEYiYv`_XmZs4ZjY^Zb]6gqGaX^9Y}dXZr[g|]Y}K aFZp^k^F]M`^{O1Ys]ZCgCv4|E>}8eb7}l`{L5[Z_faQ|c2}Fj}hw^#|Ng|B||w2|Sh{v+[G}aB|MY}A{|8o}X~{E8paZ:]i^Njq]new)`-Z>haounWhN}c#{DfZ|fK]KqGZ=:u|fqoqcv}2ssm}.r{]{nIfV{JW)[K|,Z{Uxc|]l_KdCb%]cfobya3`p}G^|LZiSC]U|(X|kBlVg[kNo({O:g:|-N|qT}9?{MBiL}Sq{`P|3a|u.{Uaq:{_o|^S}jX{Fob0`;|#y_@[V[K|cw[<_ }KU|0F}d3|et{Q7{LuZttsmf^kYZ`Af`}$x}U`|Ww}d]| >}K,r&|XI|*e{C/a-bmr1fId4[;b>tQ_:]hk{b-pMge]gfpo.|(w[jgV{EC1Z,YhaY^q,_G[c_g[J0YX]`[h^hYK^_Yib,` {i6vf@YM^hdOKZZn(jgZ>bzSDc^Z%[[o9[2=/YHZ(_/Gu_`*|8z{DUZxYt^vuvZjhi^lc&gUd4|<UiA`z]$b/Z?l}YI^jaHxe|;F}l${sQ}5g}hA|e4}?o{ih}Uz{C)jPe4]H^J[Eg[|AMZMlc}:,{iz}#*|gc{Iq|/:|zK{l&}#u|myd{{M&v~nV};L|(g|I]ogddb0xsd7^V})$uQ{HzazsgxtsO^l}F>ZB]r|{7{j@cU^{{CbiYoHlng]f+nQ[bkTn/}<-d9q {KXadZYo+n|l[|lc}V2{[a{S4Zam~Za^`{HH{xx_SvF|ak=c^[v^7_rYT`ld@]:_ub%[$[m](Shu}G2{E.ZU_L_R{tz`vj(f?^}hswz}GdZ}{S:h`aD|?W|`dgG|if{a8|J1{N,}-Ao3{H#{mfsP|[ bzn+}_Q{MT{u4kHcj_q`eZj[8o0jy{p7}C|[}l){MuYY{|Ff!Ykn3{rT|m,^R|,R}$~Ykgx{P!]>iXh6[l[/}Jgcg{JYZ.^qYfYIZl[gZ#Xj[Pc7YyZD^+Yt;4;`e8YyZVbQ7YzZxXja.7SYl[s]2^/Ha$[6ZGYrb%XiYdf2]H]kZkZ*ZQ[ZYS^HZXcCc%Z|[(bVZ]]:OJQ_DZCg<[,]%Zaa [g{C00HY[c%[ChyZ,Z_`PbXa+eh`^&jPi0a[ggvhlekL]w{Yp^v}[e{~;k%a&k^|nR_z_Qng}[E}*Wq:{k^{FJZpXRhmh3^p>de^=_7`|ZbaAZtdhZ?n4ZL]u`9ZNc3g%[6b=e.ZVfC[ZZ^^^hD{E(9c(kyZ=bb|Sq{k`|vmr>izlH[u|e`}49}Y%}FT{[z{Rk}Bz{TCc/lMiAqkf(m$hDc;qooi[}^o:c^|Qm}a_{mrZ(pA`,}<2sY| adf_%|}`}Y5U;}/4|D>|$X{jw{C<|F.hK|*A{MRZ8Zsm?imZm_?brYWZrYx`yVZc3a@f?aK^ojEd {bN}/3ZH]/$YZhm^&j 9|(S|b]mF}UI{q&aM]LcrZ5^.|[j`T_V_Gak}9J[ ZCZD|^h{N9{~&[6Zd{}B}2O|cv]K}3s}Uy|l,fihW{EG`j_QOp~Z$F^zexS`dcISfhZBXP|.vn|_HYQ|)9|cr]<`&Z6]m_(ZhPcSg>`Z]5`~1`0Xcb4k1{O!bz|CN_T{LR|a/gFcD|j<{Z._[f)mPc:1`WtIaT1cgYkZOaVZOYFrEe[}T$}Ch}mk{K-^@]fH{Hdi`c*Z&|Kt{if[C{Q;{xYB`dYIX:ZB[}]*[{{p9|4GYRh2ao{DS|V+[zd$`F[ZXKadb*A] Ys]Maif~a/Z2bmclb8{Jro_rz|x9cHojbZ{GzZx_)]:{wAayeDlx}<=`g{H1{l#}9i|)=|lP{Qq}.({La|!Y{i2EZfp=c*}Cc{EDvVB|;g}2t{W4av^Bn=]ri,|y?|3+}T*ckZ*{Ffr5e%|sB{lx^0]eZb]9[SgAjS_D|uHZx]dive[c.YPkcq/}db{EQh&hQ|eg}G!ljil|BO]X{Qr_GkGl~YiYWu=c3eb}29v3|D|}4i||.{Mv})V{SP1{FX}CZW6{cm|vO{pS|e#}A~|1i}81|Mw}es|5[}3w{C`h9aL]o{}p[G`>i%a1Z@`Ln2bD[$_h`}ZOjhdTrH{[j_:k~kv[Sdu]CtL}41{I |[[{]Zp$]XjxjHt_eThoa#h>sSt8|gK|TVi[Y{t=}Bs|b7Zpr%{gt|Yo{CS[/{iteva|cf^hgn}($_c^wmb^Wm+|55jrbF|{9^ q6{C&c+ZKdJkq_xOYqZYSYXYl`8]-cxZAq/b%b*_Vsa[/Ybjac/OaGZ4fza|a)gY{P?| I|Y |,pi1n7}9bm9ad|=d{aV|2@[(}B`d&|Uz}B}{`q|/H|!JkM{FU|CB|.{}Az}#P|lk}K{|2rk7{^8^?`/|k>|Ka{Sq}Gz}io{DxZh[yK_#}9<{TRdgc]`~Z>JYmYJ]|`!ZKZ]gUcx|^E[rZCd`f9oQ[NcD_$ZlZ;Zr}mX|=!|$6ZPZYtIo%fj}CpcN|B,{VDw~gb}@hZg`Q{LcmA[(bo`<|@$|o1|Ss}9Z_}tC|G`{F/|9nd}i=}V-{L8aaeST]daRbujh^xlpq8|}zs4bj[S`J|]?G{P#{rD{]I`OlH{Hm]VYuSYUbRc*6[j`8]pZ[bt_/^Jc*[<Z?YE|Xb|?_Z^Vcas]h{t9|Uwd)_(=0^6Zb{Nc} E[qZAeX[a]P^|_J>e8`W^j_Y}R{{Jp__]Ee#e:iWb9q_wKbujrbR}CY`,{mJ}gz{Q^{t~N|? gSga`V_||:#mi}3t|/I`X{N*|ct|2g{km}gi|{={jC}F;|E}{ZZjYf*frmu}8Tdroi{T[|+~}HG{cJ}DM{Lp{Ctd&}$hi3|FZ| m}Kr|38}^c|m_|Tr{Qv|36}?Up>|;S{DV{k_as}BK{P}}9p|t`jR{sAm4{D=b4pWa[}Xi{EjwEkI}3S|E?u=X0{jf} S|NM|JC{qo^3cm]-|JUx/{Cj{s>{Crt[UXuv|D~|j|d{YXZR}Aq}0r}(_{pJfi_z}0b|-vi)Z mFe,{f4|q`b{}^Z{HM{rbeHZ|^x_o|XM|L%|uFXm}@C_{{Hhp%a7|0p[Xp+^K}9U{bP}: tT}B|}+$|b2|[^|~h{FAby[`{}xgygrt~h1[li`c4vz|,7p~b(|mviN}^pg[{N/|g3|^0c,gE|f%|7N{q[|tc|TKA{LU}I@|AZp(}G-sz{F |qZ{}F|f-}RGn6{Z]_5})B}UJ{FFb2]4ZI@v=k,]t_Dg5Bj]Z-]L]vrpdvdGlk|gF}G]|IW}Y0[G| /bo|Te^,_B}#n^^{QHYI[?hxg{[`]D^IYRYTb&kJ[cri[g_9]Ud~^_]<p@_e_XdNm-^/|5)|h_{J;{kacVopf!q;asqd}n)|.m|bf{QW|U)}b+{tL|w``N|to{t ZO|T]jF}CB|0Q{e5Zw|k |We}5:{HO{tPwf_uajjBfX}-V_C_{{r~gg|Ude;s+}KNXH}! `K}eW{Upwbk%ogaW}9EYN}YY|&v|SL{C3[5s.]Y]I]u{M6{pYZ`^,`ZbCYR[1mNg>rsk0Ym[jrE]RYiZTr*YJ{Ge|%-lf|y(`=[t}E6{k!|3)}Zk} ][G{E~cF{u3U.rJ|a9p#o#ZE|?|{sYc#vv{E=|LC}cu{N8`/`3`9rt[4|He{cq|iSYxY`}V |(Q|t4{C?]k_Vlvk)BZ^r<{CL}#h}R+[<|i=}X|{KAo]|W<`K{NW|Zx}#;|fe{IMr<|K~tJ_x}AyLZ?{GvbLnRgN}X&{H7|x~}Jm{]-| GpNu0}.ok>|c4{PYisrDZ|fwh9|hfo@{H~XSbO]Odv]%`N]b1Y]]|eIZ}_-ZA]aj,>eFn+j[aQ_+]h[J_m_g]%_wf.`%k1e#Z?{CvYu_B^|gk`Xfh^M3`afGZ-Z|[m{L}|k3cp[it ^>YUi~d>{T*}YJ{Q5{Jxa$hg|%4`}|LAgvb }G}{P=|<;Ux{_skR{cV|-*|s-{Mp|XP|$G|_J}c6cM{_=_D|*9^$ec{V;|4S{qO|w_|.7}d0|/D}e}|0G{Dq]Kdp{}dfDi>}B%{Gd|nl}lf{C-{y}|ANZr}#={T~|-(}c&{pI|ft{lsVP}){|@u}!W|bcmB{d?|iW|:dxj{PSkO|Hl]Li:}VYk@|2={fnWt{M3`cZ6|)}|Xj}BYa?vo{e4|L7|B7{L7|1W|lvYO}W8nJ|$Vih|{T{d*_1|:-n2dblk``fT{Ky|-%}m!|Xy|-a{Pz}[l{kFjz|iH}9N{WE{x,|jz}R {P|{D)c=nX|Kq|si}Ge{sh|[X{RF{t`|jsr*fYf,rK|/9}$}}Nf{y!1|<Std}4Wez{W${Fd_/^O[ooqaw_z[L`Nbv[;l7V[ii3_PeM}.h^viqYjZ*j1}+3{bt{DR[;UG}3Og,rS{JO{qw{d<_zbAh<R[1_r`iZTbv^^a}c{iEgQZ<exZFg.^Rb+`Uj{a+{z<[~r!]`[[|rZYR|?F|qppp]L|-d|}K}YZUM|=Y|ktm*}F]{D;g{uI|7kg^}%?Z%ca{N[_<q4xC]i|PqZC]n}.bDrnh0Wq{tr|OMn6tM|!6|T`{O`|>!]ji+]_bTeU}Tq|ds}n|{Gm{z,f)}&s{DPYJ`%{CGd5v4tvb*hUh~bf]z`jajiFqAii]bfy^U{Or|m+{I)cS|.9k:e3`^|xN}@Dnlis`B|Qo{`W|>||kA}Y}{ERYuYx`%[exd`]|OyiHtb}HofUYbFo![5|+]gD{NIZR|Go}.T{rh^4]S|C9_}xO^i`vfQ}C)bK{TL}cQ|79iu}9a];sj{P.o!f[Y]pM``Jda^Wc9ZarteBZClxtM{LW}l9|a.mU}KX}4@{I+f1}37|8u}9c|v${xGlz}jP{Dd1}e:}31}%3X$|22i<v+r@~mf{sN{C67G97855F4YL5}8f{DT|xy{sO{DXB334@55J1)4.G9A#JDYtXTYM4, YQD9;XbXm9SX]IB^4UN=Xn<5(;(F3YW@XkH-X_VM[DYM:5XP!T&Y`6|,^{IS-*D.H>:LXjYQ0I3XhAF:9:(==.F*3F1189K/7163D,:@|e2{LS36D4hq{Lw/84443@4.933:0307::6D7}&l{Mx657;89;,K5678H&93D(H<&<>0B90X^I;}Ag1{P%3A+>><975}[S{PZE453?4|T2{Q+5187;>447:81{C=hL6{Me^:=7ii{R=.=F<81;48?|h8}Uh{SE|,VxL{ST,7?9Y_5Xk3A#:$%YSYdXeKXOD8+TXh7(@>(YdXYHXl9J6X_5IXaL0N?3YK7Xh!1?XgYz9YEXhXaYPXhC3X`-YLY_XfVf[EGXZ5L8BXL9YHX]SYTXjLXdJ: YcXbQXg1PX]Yx4|Jr{Ys4.8YU+XIY`0N,<H%-H;:0@,74/:8546I=9177154870UC]d<C3HXl7ALYzXFXWP<<?E!88E5@03YYXJ?YJ@6YxX-YdXhYG|9o{`iXjY_>YVXe>AYFX[/(I@0841?):-B=14337:8=|14{c&93788|di{cW-0>0<097/A;N{FqYpugAFT%X/Yo3Yn,#=XlCYHYNX[Xk3YN:YRT4?)-YH%A5XlYF3C1=NWyY}>:74-C673<69545v {iT85YED=64=.F4..9878/D4378?48B3:7:7/1VX[f4{D,{l<5E75{dAbRB-8-@+;DBF/$ZfW8S<4YhXA.(5@*11YV8./S95C/0R-A4AXQYI7?68167B95HA1*<M3?1/@;/=54XbYP36}lc{qzSS38:19?,/39193574/66878Yw1X-87E6=;964X`T734:>86>1/=0;(I-1::7ALYGXhF+Xk[@W%TYbX7)KXdYEXi,H-XhYMRXfYK?XgXj.9HX_SX]YL1XmYJ>Y}WwIXiI-3-GXcYyXUYJ$X`Vs[7;XnYEZ;XF! 3;%8;PXX(N3Y[)Xi1YE&/ :;74YQ6X`33C;-(>Xm0(TYF/!YGXg8 9L5P01YPXO-5%C|qd{{/K/E6,=0144:361:955;6443@?B7*7:F89&F35YaX-CYf,XiFYRXE_e{}sF 0*7XRYPYfXa5YXXY8Xf8Y~XmA[9VjYj*#YMXIYOXk,HHX40YxYMXU8OXe;YFXLYuPXP?EB[QV0CXfY{:9XV[FWE0D6X^YVP*$4%OXiYQ(|xp|%c3{}V`1>Y`XH00:8/M6XhQ1:;3414|TE|&o@1*=81G8<3}6<|(f6>>>5-5:8;093B^3U*+*^*UT30XgYU&7*O1953)5@E78--F7YF*B&0:%P68W9Zn5974J9::3}Vk|-,C)=)1AJ4+<3YGXfY[XQXmT1M-XcYTYZXCYZXEYXXMYN,17>XIG*SaS|/eYJXbI?XdNZ+WRYP<F:R PXf;0Xg`$|1GX9YdXjLYxWX!ZIXGYaXNYm6X9YMX?9EXmZ&XZ#XQ>YeXRXfAY[4 ;0X!Zz0XdN$XhYL XIY^XGNXUYS/1YFXhYk.TXn4DXjB{jg|4DEX]:XcZMW=A.+QYL<LKXc[vV$+&PX*Z3XMYIXUQ:ZvW< YSXFZ,XBYeXMM)?Xa XiZ4/EXcP3%}&-|6~:1(-+YT$@XIYRBC<}&,|7aJ6}bp|8)K1|Xg|8C}[T|8Q.89;-964I38361<=/;883651467<7:>?1:.}le|:Z=39;1Y^)?:J=?XfLXbXi=Q0YVYOXaXiLXmJXO5?.SFXiCYW}-;|=u&D-X`N0X^,YzYRXO(QX_YW9`I|>hZ:N&X)DQXP@YH#XmNXi$YWX^=!G6YbYdX>XjY|XlX^XdYkX>YnXUXPYF)FXT[EVTMYmYJXmYSXmNXi#GXmT3X8HOX[ZiXN]IU2>8YdX1YbX<YfWuZ8XSXcZU%0;1XnXkZ_WTG,XZYX5YSX Yp 05G?XcYW(IXg6K/XlYP4XnI @XnO1W4Zp-9C@%QDYX+OYeX9>--YSXkD.YR%Q/Yo YUX].Xi<HYEZ2WdCE6YMXa7F)=,D>-@9/8@5=?7164;35387?N<618=6>7D+C50<6B03J0{Hj|N9$D,9I-,.KB3}m |NzE0::/81YqXjMXl7YG; [.W=Z0X4XQY]:MXiR,XgM?9$9>:?E;YE77VS[Y564760391?14941:0=:8B:;/1DXjFA-564=0B3XlH1+D85:0Q!B#:-6&N/:9<-R3/7Xn<*3J4.H:+334B.=>30H.;3833/76464665755:/83H6633:=;.>5645}&E|Y)?1/YG-,93&N3AE@5 <L1-G/8A0D858/30>8<549=@B8] V0[uVQYlXeD(P#ID&7T&7;Xi0;7T-$YE)E=1:E1GR):--0YI7=E<}n9|aT6783A>D7&4YG7=391W;Zx<5+>F#J39}o/|cc;6=A050EQXg8A1-}D-|d^5548083563695D?-.YOXd37I$@LYLWeYlX<Yd+YR A$;3-4YQ-9XmA0!9/XLY_YT(=5XdDI>YJ5XP1ZAW{9>X_6R(XhYO65&J%DA)C-!B:97#A9;@?F;&;(9=11/=657/H,<8}bz|j^5446>.L+&Y^8Xb6?(CYOXb*YF(8X`FYR(XPYVXmPQ%&DD(XmZXW??YOXZXfCYJ79,O)XnYF7K0!QXmXi4IYFRXS,6<%-:YO(+:-3Q!1E1:W,Zo}Am|n~;3580534*?3Zc4=9334361693:30C<6/717:<1/;>59&:4}6!|rS36=1?75<8}[B|s809983579I.A.>84758=108564741H*9E{L{|u%YQ<%6XfH.YUXe4YL@,>N}Tv|ve*G0X)Z;/)3@A74(4P&A1X:YVH97;,754*A66:1 D739E3553545558E4?-?K17/770843XAYf838A7K%N!YW4.$T19Z`WJ*0XdYJXTYOXNZ 1XaN1A+I&Xi.Xk3Z3GB&5%WhZ1+5#Y[X<4YMXhQYoQXVXbYQ8XSYUX4YXBXWDMG0WxZA[8V+Z8X;D],Va$%YeX?FXfX[XeYf<X:Z[WsYz8X_Y]%XmQ(!7BXIZFX]&YE3F$(1XgYgYE& +[+W!<YMYFXc;+PXCYI9YrWxGXY9DY[!GXiI7::)OC;*$.>N*HA@{C|}&k=:<TB83X`3YL+G4XiK]i}(fYK<=5$.FYE%4*5*H*6XkCYL=*6Xi6!Yi1KXR4YHXbC8Xj,B9ZbWx/XbYON#5B}Ue}+QKXnF1&YV5XmYQ0!*3IXBYb71?1B75XmF;0B976;H/RXU:YZX;BG-NXj;XjI>A#D3B636N;,*%<D:0;YRXY973H5)-4FXOYf0:0;/7759774;7;:/855:543L43<?6=E,.A4:C=L)%4YV!1(YE/4YF+ F3%;S;&JC:%/?YEXJ4GXf/YS-EXEYW,9;E}X$}547EXiK=51-?71C%?57;5>463553Zg90;6447?<>4:9.7538XgN{|!}9K/E&3-:D+YE1)YE/3;37/:05}n<}:UX8Yj4Yt864@JYK..G=.(A Q3%6K>3(P3#AYE$-6H/456*C=.XHY[#S.<780191;057C)=6HXj?955B:K1 E>-B/9,;5.!L?:0>/.@//:;7833YZ56<4:YE=/:7Z_WGC%3I6>XkC*&NA16X=Yz2$X:Y^&J48<99k8}CyB-61<18K946YO4{|N}E)YIB9K0L>4=46<1K0+R;6-=1883:478;4,S+3YJX`GJXh.Yp+Xm6MXcYpX(>7Yo,/:X=Z;Xi0YTYHXjYmXiXj;*;I-8S6N#XgY}.3XfYGO3C/$XjL$*NYX,1 6;YH&<XkK9C#I74.>}Hd`A748X[T450[n75<4439:18A107>|ET}Rf<1;14876/Yb983E<5.YNXd4149>,S=/4E/<306443G/06}0&}UkYSXFYF=44=-5095=88;63844,9E6644{PL}WA8:>)7+>763>>0/B3A545CCnT}Xm|dv}Xq1L/YNXk/H8;;.R63351YY747@15YE4J8;46;.38.>4A369.=-83,;Ye3?:3@YE.4-+N353;/;@(X[YYD>@/05-I*@.:551741Yf5>6A443<3535;.58/86=D4753442$635D1>0359NQ @73:3:>><Xn?;43C14 ?Y|X611YG1&<+,4<*,YLXl<1/AIXjF*N89A4Z576K1XbJ5YF.ZOWN.YGXO/YQ01:4G38Xl1;KI0YFXB=R<7;D/,/4>;$I,YGXm94@O35Yz66695385.>:6A#5}W7n^4336:4157597434433<3|XA}m`>=D>:4A.337370?-6Q96{`E|4A}C`|Qs{Mk|J+~r>|o,wHv>Vw}!c{H!|Gb|*Ca5}J||,U{t+{CN[!M65YXOY_*B,Y[Z9XaX[QYJYLXPYuZ%XcZ8LY[SYPYKZM<LMYG9OYqSQYM~[e{UJXmQYyZM_)>YjN1~[f3{aXFY|Yk:48YdH^NZ0|T){jVFYTZNFY^YTYN~[h{nPYMYn3I]`EYUYsYIZEYJ7Yw)YnXPQYH+Z.ZAZY]^Z1Y`YSZFZyGYHXLYG 8Yd#4~[i|+)YH9D?Y^F~Y7|-eYxZ^WHYdYfZQ~[j|3>~[k|3oYmYqY^XYYO=Z*4[]Z/OYLXhZ1YLZIXgYIHYEYK,<Y`YEXIGZI[3YOYcB4SZ!YHZ*&Y{Xi3~[l|JSY`Zz?Z,~[m|O=Yi>??XnYWXmYS617YVYIHZ(Z4[~L4/=~[n|Yu{P)|];YOHHZ}~[o33|a>~[r|aE]DH~[s|e$Zz~[t|kZFY~XhYXZB[`Y}~[u|{SZ&OYkYQYuZ2Zf8D~[v}% ~[w3},Q[X]+YGYeYPIS~[y}4aZ!YN^!6PZ*~[z}?E~[{3}CnZ=~[}}EdDZz/9A3(3S<,YR8.D=*XgYPYcXN3Z5 4)~[~}JW=$Yu.XX~] }KDX`PXdZ4XfYpTJLY[F5]X~[2Yp}U+DZJ::<446[m@~]#3}]1~]%}^LZwZQ5Z`/OT<Yh^ -~]&}jx[ ~m<z!%2+~ly4VY-~o>}p62yz!%2+Xf2+~ly4VY-zQ`z (=] 2z~o2",C={" ":0,"!":1},c=34,i=2,p,s=[],u=String.fromCharCode,t=u(12539);while(++c<127)C[u(c)]=c^39&&c^92?i++:0;i=0;while(0<=(c=C[a.charAt(i++)]))if(16==c)if((c=C[a.charAt(i++)])<87){if(86==c)c=1879;while(c--)s.push(u(++p))}else s.push(s.join("").substr(8272,360));else if(c<86)s.push(u(p+=c<51?c-16:(c-55)*92+C[a.charAt(i++)]));else if((c=((c-86)*92+C[a.charAt(i++)])*92+C[a.charAt(i++)])<49152)s.push(u(p=c<40960?c:c|57344));else{c&=511;while(c--)s.push(t);p=12539}return s.join("")')();
JCT8836=JCT11280.substring(0,8836);
NaviSetting = {
throughMax : 0,
naviType : 0,
exeName : null,
exeCode : null,
exeLon : null,
exeLat : null,
exeAddress : null,
exeTel : null,
exeCatcode : null,
exeMapid : null,
exeSpotid : null,
exeGroupid : null,
exeAdvid : null,
exeIconIdx : null,
TnaviScripts : null,
userType: null,
clearPOI : function(i, iconClr){
if(this.exeIconIdx[i])ntmap.clearIcon(this.exeIconIdx[i]);
this.exeName[i] = "";
this.exeCode[i] = "";
this.exeLon[i] = 0;
this.exeLat[i] = 0;
this.exeAddress[i] = "";
this.exeTel[i] = "";
this.exeCatcode[i] = "";
this.exeMapid[i] = "";
this.exeSpotid[i] = "";
this.exeGroupid[i]= "";
this.exeAdvid[i]="";
this.exeIconIdx[i]="";
if ( i >= 2 ) {
$("Ldmk"+(i - 1)).value = "";
$("LdmkAdd"+(i - 1)).value = "";
}
if( this.naviType == '2' || (this.naviType == '1'&&this.userType != '0')){
TotalNavi.chengeMethodDisp({clearInd:i});
}
this.routeSearchReady();
},
setPOI : function(i,lo,la,cd,nm,ad,tl,ct,mp,sp,gid,aid,isResize,isAnimation){
if (i >= this.throughMax+2){
alert('設定できる経由地は最大' + this.throughMax + '個までです');
return;
}
if( this.naviType != '3' ){
this.clearText(i);
}
i = new Number(i);
if(!isSafari){
this.exeName[i] = function(){var s = "";for(var i=0;i<nm.length;i++)s+=nm.substring(i,i+1)+'<wbr>';return s;}();
} else {
this.exeName[i] = nm;
}
this.exeCode[i] = cd;
this.exeLon[i] = lo;
this.exeLat[i] = la;
if(ad != null){this.exeAddress[i] = ad};
if(tl != null){this.exeTel[i] = tl};
if(ct != null){this.exeCatcode[i] = ct};
if(mp != null){this.exeMapid[i] = mp};
if(sp != null){this.exeSpotid[i] = sp};
if(gid != null){this.exeGroupid[i] = gid};
if(aid != null){this.exeAdvid[i] = aid};
var target = i>2?2:i;
var searchPanelFld = $("search-panel"+target);
var inpFld = $('pointInpTxt'+target);
var setCtlFld = $('pointSetCtl'+target);
var setFld = $('pointMsg'+i);
var msgFld = $('msg'+i);
var chgFld = $('chgPoint'+i);
var msgDispCtl = function(){
if(searchPanelFld != null)searchPanelFld.style.display='none';
if( i >= 2 ){
$('thrInp').style.display = 'block';
$('thrRec' + new String(i - 2)).style.display = 'block';
$('thr_panel').style.display = 'none';
$('addThr').style.display = 'block';
NaviSetting.visibleThrEdit(i);
}
if( NaviSetting.userType == '200' || NaviSetting.userType == '300' || NaviSetting.userType == 'drive' ||NaviSetting.naviType == '3' ){
TotalNavi.chengeMethodDisp();
}
setFld.style.display = 'block';
msgFld.innerHTML = NaviSetting.exeName[i];
if((NaviSetting.naviType == '3' && i == '1') )chgFld.style.display = 'none';
inpFld.style.display = 'none';
setCtlFld.style.display = 'none';
}
this.routeSearchReady();
msgDispCtl();
if( this.exeIconIdx[i] != "" )ntmap.clearIcon(this.exeIconIdx[i]);
var image = null;
var type = null;
var iconGroup = 'navi_';
if ( i == 0 ){
iconGroup += 'orv';
image = new NTImage("/pcstorage/img/map/point_start.png", 25,38);
} else if ( i == 1 ){
iconGroup += 'dnv';
image = new NTImage("/pcstorage/img/map/point_goal.png", 25,38);
} else if ( i >= 2 ) {
iconGroup += 'ldmk' + i;
image = new NTImage("/pcstorage/img/map/point_kei.png", 25,38);
}
var shadow = new NTImage("/pcstorage/img/map/poiShadow.png", 40,30);
var icon = new NTIcon(new NTLatLng(this.exeLat[i],this.exeLon[i]) ,image,"",shadow);
icon.setGroup(iconGroup);
ntmap.addIcon(icon);
NaviSetting.exeIconIdx[i] = iconGroup;
},
getDataLoadFunction : function(a){
if (a >= 2) {
a = 2;
}
return function(response){
if(response.responseText.indexOf("<script>") != -1){
var scriptStFragment = '[\r\n\s\t]*<script[^>]*>([\r\n\s\t]*<\![-]*)?';
var scriptEdFragment = '(\/\/[\s\t\-]*>)?[\r\n]*</script>';
var scriptMatch = new RegExp(scriptStFragment,'img');
response.responseText.match(scriptMatch);
var script = RegExp.rightContext;
scriptMatch = new RegExp(scriptEdFragment,'img');
script.match(scriptMatch);
script = RegExp.leftContext;
eval(script);
}else{
$('result'+a).innerHTML = response.responseText;
$('search-panel'+a).style.display='block';
$('search-panel'+a).style.overflow='auto';
}
$('loading'+a).style.visibility = 'hidden';
};
},
getData : function(form,target,uri){
if ( target >= (this.throughMax + 2) ){
alert('設定できる経由地は最大' + this.throughMax + '個までです');
return;
}
var func = "";
if(target!=null){
func = this.getDataLoadFunction(target);
this.clearPOI(target);
}
if ( target >= 2 ) {
this.hideThrEdit(this.getThrNo());
form.set.value = target;
}
var param = Form.serialize(form);
if (target > 2) {
target = 2;
}
$('pointSetCtl'+target).style.display = 'none';
$('loading'+target).style.visibility = 'visible';
new Ajax.Request(uri, {method:"get", parameters: param, onComplete: func});
},
extractExeScript : function(ind){
var scriptStFragment = '<script[^>]*>([\r\n\s\t]*<\![-]*)?';
var scriptEdFragment = '(\/\/[\s\t\-]*>)?[\r\n]*</script>';
var scriptMatch = new RegExp(scriptStFragment,'img');
this.TnaviScripts[ind].match(scriptMatch);
var routeScript = RegExp.rightContext;
scriptMatch = new RegExp(scriptEdFragment,'img');
routeScript.match(scriptMatch);
routeScript = RegExp.leftContext;
return routeScript;
},
getTnaviResultLoadFunction : function(){
return function(response){
$('navi_result_loading').style.display="none";
$('navi_result_area').style.display= 'block';
$('navi_result').innerHTML = response.responseText;
var ScriptFragment = '<script[^>]*>([\r\n\s\t]*<\![-]*)?((?:\n|\r|.)*?)(\/\/[\s\t\-]*>)?[\r\n]*</script>';
var matchAll = new RegExp(ScriptFragment, 'img');
var matchOne = new RegExp(ScriptFragment, 'im');
NaviSetting.TnaviScripts = response.responseText.match(matchAll);
var routeScript = '';
if( this.naviType == '1' ){
routeScript = NaviSetting.extractExeScript(0);
eval(routeScript);
} else {
for(var n = 0; n < NaviSetting.TnaviScripts.length; n++ ){
routeScript = NaviSetting.extractExeScript(n);
eval(routeScript);
}
}
};
},
getTnaviResult : function(getdatauri,rowid,myflg,crsname,reloadParam,addParam){
if( document.mn_navi.month != undefined && document.mn_navi.month != null ){
if(!this.checkDate(document.mn_navi.month.value.split("/")[0],document.mn_navi.month.value.split("/")[1],document.mn_navi.day.value)){
alert('指定された日付が不正です');
return;
}
}
mapOverLayClose();
var form = "";
var param = "";
var uri = '';
var aparam = '';
if( (this.exeLon[0]>0 && this.exeLat[0]>0 && this.exeLon[1]>0 && this.exeLat[1]>0) ||
(myflg == 'on') || (rowid != null) || reloadParam != null ){
form = document.mn_navi;
if ( reloadParam != null ) {
uri = '/pcnavi/mjx/totalnavi1.jsp'
param = reloadParam;
} else if ( myflg == "on" || rowid != null ) {
uri = '/pcnavi/mjx/totalnavi1.jsp'
param = {rowid:rowid,myroute:myflg,crsname:crsname}
} else {
if(this.exeLon[2]>0 && this.exeLat[2]>0){
if( (this.exeLon[0]==this.exeLon[2] && this.exeLat[0]==this.exeLat[2]) ||
(this.exeLon[1]==this.exeLon[2] && this.exeLat[1]==this.exeLat[2]) ){
alert("出発地と経由地と目的地は別の場所を指定して下さい");
return;
}
}else{
if(this.exeLon[0]==this.exeLon[1] && this.exeLat[0]==this.exeLat[1]){
alert("出発地と目的地は別の場所を指定して下さい");
return;
}
}
form.orv.value = this.exeLon[0]+"."+this.exeLat[0]+"."+this.exeCode[0]+"."+this.exeName[0];
form.dnv.value = this.exeLon[1]+"."+this.exeLat[1]+"."+this.exeCode[1]+"."+this.exeName[1];
form.orvAdd.value = this.exeAddress[0]+"."+this.exeTel[0]+"."+this.exeCatcode[0]+"."+this.exeMapid[0]+"."+this.exeSpotid[0]+".."+this.exeGroupid[0]+"."+this.exeAdvid[0];
form.dnvAdd.value = this.exeAddress[1]+"."+this.exeTel[1]+"."+this.exeCatcode[1]+"."+this.exeMapid[1]+"."+this.exeSpotid[1]+".."+this.exeGroupid[1]+"."+this.exeAdvid[1];
for ( var i = 0; i < this.throughMax; i++ ){
if(this.exeLon[i+2]!="" && this.exeLat[i+2]!=""){
$("Ldmk"+(i + 1)).value = this.exeLon[i+2]+"."+this.exeLat[i+2]+"."+this.exeCode[i+2]+"."+this.exeName[i+2];
} else {
$("Ldmk"+(i + 1)).value = "";
}
if(this.exeAddress[i+2]!="" || this.exeTel[i+2]!="" || this.exeCatcode[i+2]!="" || this.exeMapid[i+2]!="" || this.exeSpotid[i+2]!=""){
$("LdmkAdd"+(i + 1)).value = this.exeAddress[i+2]+"."+this.exeTel[i+2]+"."+this.exeCatcode[i+2]+"."+this.exeMapid[i+2]+"."+this.exeSpotid[i+2]+".."+this.exeGroupid[i+2]+"."+this.exeAdvid[i+2];
} else {
$("LdmkAdd"+(i + 1)).value = "";
}
}
if (this.naviType != '1'){
TotalNavi.deleteNoneParam();
}
if ( this.userType != '0' ){
uri = '/pcnavi/mjx/totalnavi1.jsp'
} else {
if ( this.naviType == '3' ){
uri = '/pcnavi/mjx/totalnavi2.jsp'
} else {
uri = '/pcnavi/mjx/drive.jsp'
}
}
/*
if( (this.exeLon[2] == "" && this.exeLon[2].length == 0 && this.exeLat[2] == "" && this.exeLat[2].length == 0 ) ||
this.naviType == '1' || (this.naviType == '2' && this.userType == '200')||
(this.naviType == '2' && this.userType == '300' && document.routeType.routeType[1].checked )  || this.naviType == '3'){
form.tollroad.value = $('tr1').checked?1:0;
if( this.naviType == '2' && this.userType == '300' ){
form.vics.value = $('vics1').checked?1:0;
}
}else {
form.tollroadLdmk.checked = $('tr1').checked?1:0;
form.vicsLdmk.value = $('vics1').checked?1:0;
}
*/
param = Form.serialize(form);
}
if( addParam != null && addParam != undefined){
param = param + addParam;
}
func = this.getTnaviResultLoadFunction();
$('naviInpArea').style.display='none';
/*			if ( this.naviType == '2' ) {
$('naviInpArea_Condition').style.display='none';
if( $('naviCondDetail_Disabled').style.display == 'none'){
$('naviCondDetail_Open').style.display = 'none';
}
$('naviCondDetail_Close').style.display = 'none';
}
*/
$('mn_tab4form').style.display = 'block';
$('navi_result').innerHTML = '';
$('navi_result_area').style.display= 'none';
$('navi_result_loading').style.display="block";
new Ajax.Request(uri, {method:"post", parameters: param, onComplete: func});
}else{
var orvForm = "";
var dnvForm = "";
orvForm = document.navi_orv;
if ( this.naviType != '3' ) {
dnvForm = document.navi_dnv;
}
var msg = true;
if (this.exeName[0] == "" && orvForm.keyword.value != "") {
this.getData(orvForm,0,getdatauri);
msg = false;
}
if ( this.naviType != '3' && this.exeName[1] == "" && dnvForm.keyword.value != "") {
this.getData(dnvForm,1,getdatauri);
msg = false;
}
if (msg == true) {
alert("出発地と目的地を設定して下さい");
}
return false;
}
},
movePage : function(form,target,ctl,keyword,pg,type,acode,blist){
form.keyword.value = keyword;
form.ctl.value = ctl;
form.p.value = pg==null||pg==""?0:pg;
form.type.value = type==null||type==""?"":type;
form.set.value = target;
form.ACode.value = acode==null||acode==""?"":acode;
form.bList.value = blist==null||blist==""?"":blist;
},
getThrNo : function(){
var ind = 2;
if( this.exeName && this.exeName != undefined ){
while(this.exeName[ind] != "" && ind < 10 ){
ind++;
}
}
return ind;
},
hideThrEdit : function(ind){
for(var i = 2; i < ind; i++) {
$("chgPoint"+(i)).style.visibility = "hidden";
}
},
visibleThrEdit : function(ind){
for(var i = 2; i < ind; i++) {
$("chgPoint"+(i)).style.visibility = "visible";
}
},
clearThr : function(ind){
this.clearPOI(ind+2);
if (ind == (this.throughMax - 1)) {
$('msg'+(ind+2)).innerHTML = '';
$('thrRec'+(ind)).style.display = 'none';
}
var setInd = ind+2;
var nextInd = setInd + 1;
while( (nextInd < (this.throughMax + 2)) && (this.exeName[nextInd] != "") ){
this.exeName[setInd] = this.exeName[nextInd];
this.exeCode[setInd] = this.exeCode[nextInd];
this.exeLon[setInd] = this.exeLon[nextInd];
this.exeLat[setInd] = this.exeLat[nextInd];
this.exeAddress[setInd] = this.exeAddress[nextInd];
this.exeTel[setInd] = this.exeTel[nextInd];
this.exeCatcode[setInd] = this.exeCatcode[nextInd];
this.exeMapid[setInd] = this.exeMapid[nextInd];
this.exeSpotid[setInd] = this.exeSpotid[nextInd];
this.exeIconIdx[setInd] = this.exeIconIdx[nextInd];
$("Ldmk"+(ind+1)).value = $("Ldmk"+(ind + 2)).value;
$("LdmkAdd"+(ind+1)).value = $("LdmkAdd"+(ind + 2)).value;
$("msg"+(ind+2)).innerHTML = this.exeName[nextInd];
setInd++;
nextInd++;
ind++;
}
if (nextInd <= (this.throughMax + 2 ) ) {
$("msg"+(ind+2)).innerHTML = "";
$("thrRec"+(ind)).style.display = 'none';
this.exeName[ind+2] = "";
this.exeCode[ind+2] = "";
this.exeLon[ind+2] = 0;
this.exeLat[ind+2] = 0;
this.exeAddress[ind+2] = "";
this.exeTel[ind+2] = "";
this.exeCatcode[ind+2] = "";
this.exeMapid[ind+2] = "";
this.exeSpotid[ind+2] = "";
this.exeGroupid[ind+2]= "";
this.exeAdvid[ind+2]="";
this.exeIconIdx[ind+2]="";
$("Ldmk"+(ind + 1)).value = "";
$("LdmkAdd"+(ind + 1)).value = "";
}
if (nextInd == 3) {
$("thrInp").style.display = 'none';
}
},
setNaviType : function(type, isReload){
ret = false;
if ( this.naviType != type || isReload ) {
this.exeName = new Array("","","","","","","","","","");
this.exeCode = new Array("","","","","","","","","","");
this.exeLon = new Array("","","","","","","","","","");
this.exeLat = new Array("","","","","","","","","","");
this.exeAddress = new Array("","","","","","","","","","");
this.exeTel = new Array("","","","","","","","","","");
this.exeCatcode = new Array("","","","","","","","","","");
this.exeMapid = new Array("","","","","","","","","","");
this.exeSpotid = new Array("","","","","","","","","","");
this.exeGroupid = new Array("","","","","","","","","","");
this.exeAdvid = new Array("","","","","","","","","","");
if ( !this.exeIconIdx ){
this.exeIconIdx = new Array("","","","","","","","","","");
}
this.naviType = type;
ret = true;
}
return ret;
},
setMapPosition : function(ind) {
this.setPOI(ind,
PoiCommon.getVertex().split('.')[0],
PoiCommon.getVertex().split('.')[1],
PoiCommon.getVertex().split('.')[2],
PoiCommon.getVertex().split('.')[3],
PoiCommon.getAdditional().split('.')[0],
PoiCommon.getAdditional().split('.')[1],
PoiCommon.getAdditional().split('.')[2],
PoiCommon.getAdditional().split('.')[3],
PoiCommon.getAdditional().split('.')[4],
PoiCommon.getAdditional().split('.')[6],
PoiCommon.getAdditional().split('.')[7]);
},
nonePopUpInfo : function(obj){
obj.style.display = 'none';
},
chgPoint : function(ind){
$('pointTxt' + ind).value = $('msg' + ind).innerHTML.replace(/<wbr>|<WBR>/g,'');
$('pointMsg' + ind).style.display='none';
$('pointInpTxt' + ind).style.display='block';
$('pointSetCtl' + ind).style.display='block';
if ( this.naviType == '2' || this.naviType == '3' ) {
TotalNavi.chengeMethodDisp();
}
this.clearPOI(ind);
this.routeSearchReady();
},
addThr : function(ind){
if ( ind >= (this.throughMax + 2) ){
alert('設定できる経由地は最大' + this.throughMax + '個までです');
return false;
}
$('thr_panel').style.display='block';
$('pointTxt2').className = 'initExampleText'
$('pointTxt2').value='経由地を入力';
$('pointInpArea2').style.display='block';
$('pointInpTxt2').style.display='block';
$('pointSetCtl2').style.display='block';
$('addThr').style.display='none';
return true;
},
showRegist: function(){
if(NTWindow.Control.getSimpleAction({name:'myRegist'}).isOpen){
chgMyRegistDisp(arguments[0]);
}
chgMyRegistDisp(arguments[0]);
},
resetDisp: function(ind){
$('search-panel'+ind).style.display='none';
$('pointInpArea'+ind).style.display='block';
},
setUserAttr: function(){
this.userType = arguments[0].userType;
if(this.userType != '0'){
this.throughMax = 8;
} else {
this.throughMax = 1;
}
},
cancelAddThr: function(){
$('thr_panel').style.display = 'none';
$('addThr').style.display = 'block';
$('result2').innerHTML = '';
$('search-panel2').style.display='none';
this.visibleThrEdit(this.getThrNo());
},
routeSearchReady: function(){
if(this.exeLon[0]>0 && this.exeLat[0]>0 && this.exeLon[1]>0 && this.exeLat[1]>0){
$('routeSearchBtn').src = "/pcstorage/img/map/navi/rootseach_on.gif"
} else {
$('routeSearchBtn').src = "/pcstorage/img/map/navi/rootseach_off.gif"
}
},
chgConditionFromResult: function(){
$('mn_tab4form').style.display='none';
$('naviInpArea').style.display='block';
$('naviInpArea_Point').style.display='block';
$('naviInpArea_Condition').style.display='block';
if( $('naviCondition_detail') != undefined && $('naviCondition_detail') != null ){
$('naviCondDetail_Open').style.display='none';
$('naviCondDetail_Close').style.display='block';
$('naviCondition_detail').style.display='block';
}
},
chgPointFromResult: function(ind){
$('mn_tab4form').style.display = 'none';
$('naviInpArea').style.display = 'block';
$('naviInpArea_Point').style.display = 'block';
$('naviInpArea_Condition').style.display = 'block';
if($('naviCondition_detail') != undefined && $('naviCondition_detail') != null ){
if( this.naviType != '1' ){
$('naviCondDetail_Open').style.display = 'block';
$('naviCondDetail_Close').style.display = 'none';
}
$('naviCondition_detail').style.display = 'none';
}
this.chgPoint(ind);
},
clearThrFromResult: function(ind){
this.clearThr(ind);
this.getTnaviResult('/pcnavi/mjx/nd060403.jsp');
},
addThrFromResult: function(){
if(this.addThr(this.getThrNo())){
$('naviInpArea').style.display = 'block';
$('naviInpArea_Point').style.display = 'block';
$('mn_tab4form').style.display = 'none';
}
},
rtnInpDisp: function(){
$('mn_tab4form').style.display = 'none';
$('naviInpArea').style.display = 'block';
},
restoreCondition: function(){
this.restoreSetPOI(arguments[0].ORV, 0);
this.restoreSetPOI(arguments[0].DNV, 1);
for(var n = 1; 1; n++){
if(eval('arguments[0].LDMK' + n) == undefined || eval('arguments[0].LDMK' + n) == null ) break;
this.restoreSetPOI(eval('arguments[0].LDMK' + n), n + 1);
}
TotalNavi.chengeMethodDisp();
if((arguments[0].LDMK == undefined || arguments[0].LDMK == null) && this.userType == '300' ){
if(arguments[0].MTHD == '0'){
document.mn_navi.transwalk.checked = true;
document.mn_navi.taxi.checked = false;
document.mn_navi.car.checked = false;
document.mn_navi.walk.checked = false;
} else if(arguments[0].MTHD == '1'){
document.mn_navi.transwalk.checked = true;
document.mn_navi.taxi.checked = true;
document.mn_navi.car.checked = true;;
document.mn_navi.walk.checked = false;
} else if(arguments[0].MTHD == '2'){
document.mn_navi.car.checked = true;
document.mn_navi.transwalk.checked = false;
document.mn_navi.taxi.checked = false;
document.mn_navi.walk.checked = false;
} else if(arguments[0].MTHD == '3'){
document.mn_navi.walk.checked = true;
document.mn_navi.transwalk.checked = false;
document.mn_navi.taxi.checked = false;
document.mn_navi.car.checked = false;
} else if(arguments[0].MTHD == '4'){
document.mn_navi.transwalk.checked = true;
document.mn_navi.taxi.checked = true;
document.mn_navi.car.checked = true;
document.mn_navi.walk.checked = false;
} else if(arguments[0].MTHD == '18'){
document.mn_navi.car.checked = true;
document.mn_navi.transwalk.checked = false;
document.mn_navi.taxi.checked = false;
document.mn_navi.walk.checked = false;
} else if(arguments[0].MTHD == '20'){
document.mn_navi.transwalk.checked = true;
document.mn_navi.taxi.checked = true;
document.mn_navi.car.checked = true;
document.mn_navi.walk.checked = false;
}
if( document.mn_navi.car.checked && arguments[0].Tollroad != undefined && arguments[0].Tollroad != null && arguments[0].Tollroad != '0' ){
document.mn_navi.tollroad.checked = true;
}
if( document.mn_navi.car.checked && arguments[0].Vics != undefined && arguments[0].Vics != null && arguments[0].Vics.length == 14 ){
document.mn_navi.vics.checked = true;
}
} else {
if(arguments[0].MTHD == '0'){
document.mn_navi.way[0].checked = true;
} else if(arguments[0].MTHD == '1'){
document.mn_navi.way[0].checked = true;
} else if(arguments[0].MTHD == '2'){
document.mn_navi.way[1].checked = true;
} else if(arguments[0].MTHD == '3'){
document.mn_navi.way[2].checked = true;
} else if(arguments[0].MTHD == '4'){
document.mn_navi.way[0].checked = true;
} else if(arguments[0].MTHD == '18'){
document.mn_navi.way[1].checked = true;
} else if(arguments[0].MTHD == '20'){
document.mn_navi.way[0].checked = true;
}
if(document.mn_navi.way[1].checked && arguments[0].Tollroad != undefined && arguments[0].Tollroad != null && arguments[0].Tollroad == '1' ){
if(this.userType == '300'){
document.mn_navi.tollroadLdmk.checked = true;
}else if(this.userType == '200'){
document.mn_navi.tollRoad.checked = true;
} else if(this.userType == 'drive'){
document.mn_navi.tollroad.checked = true;
}
}
if((this.userType == '300'||this.userType == 'drive') && document.mn_navi.way[1].checked && arguments[0].Vics != undefined && arguments[0].Vics != null && arguments[0].Vics.length == 14 ){
document.mn_navi.vics.checked = true;
}
}
if(arguments[0].YEAR != undefined && arguments[0].YEAR != null && arguments[0].MONTH != undefined && arguments[0].MONTH != null){
for( var n = 0; document.mn_navi.month[n] != undefined && document.mn_navi.month[n] != null; n++ ){
if( document.mn_navi.month[n].value == arguments[0].YEAR + '/' + arguments[0].MONTH ){
document.mn_navi.month[n].selected = true;
break;
}
}
}
if(arguments[0].DAY != undefined && arguments[0].DAY != null){
for( var n = 0; document.mn_navi.day[n] != undefined && document.mn_navi.day[n] != null; n++ ){
if( document.mn_navi.day[n].value == arguments[0].DAY ){
document.mn_navi.day[n].selected = true;
break;
}
}
}
if(arguments[0].HOUR != undefined && arguments[0].HOUR != null){
for( var n = 0; document.mn_navi.hour[n] != undefined && document.mn_navi.hour[n] != null; n++ ){
if( document.mn_navi.hour[n].value == arguments[0].HOUR ){
document.mn_navi.hour[n].selected = true;
break;
}
}
}
if(arguments[0].MINUTE != undefined && arguments[0].MINUTE != null){
for( var n = 0; document.mn_navi.minute[n] != undefined && document.mn_navi.minute[n] != null; n++ ){
if( document.mn_navi.minute[n].value == arguments[0].MINUTE ){
document.mn_navi.minute[n].selected = true;
break;
}
}
}
if(arguments[0].BASIS != undefined && arguments[0].BASIS != null){
if( arguments[0].BASIS == '1' ){
document.mn_navi.basis[0].selected = true;
} else if( arguments[0].BASIS == '0' ){
document.mn_navi.basis[1].selected = true;
} else if( arguments[0].BASIS == '4' ){
document.mn_navi.basis[2].selected = true;
} else if( arguments[0].BASIS == '3' ){
document.mn_navi.basis[3].selected = true;
}
}
if(arguments[0].EX_SORT != undefined && arguments[0].EX_SORT != null){
for( var n = 0; document.mn_navi.sort[n] != undefined && document.mn_navi.sort[n] != null; n++ ){
if( document.mn_navi.sort[n].value == arguments[0].EX_SORT ){
document.mn_navi.sort[n].selected = true;
break;
}
}
}
if(arguments[0].WSPEED != undefined && arguments[0].WSPEED != null){
for( var n = 0; document.mn_navi.wspeed[n] != undefined && document.mn_navi.wspeed[n] != null; n++ ){
if( document.mn_navi.wspeed[n].value == arguments[0].WSPEED ){
document.mn_navi.wspeed[n].selected = true;
break;
}
}
}
document.mn_navi.airplane.checked = arguments[0].AIRPLANE=='1'?true:false;
document.mn_navi.sprexprs.checked = arguments[0].SPREXPRS=='1'?true:false;
document.mn_navi.utrexprs.checked = arguments[0].UTREXPRS=='1'?true:false;
document.mn_navi.mtrplbus.checked = arguments[0].exprs12=='1'?true:false;
document.mn_navi.othexprs.checked = arguments[0].exprs5=='1'||arguments[0].exprs5=='7'?true:false;
document.mn_navi.intercitybus.checked = arguments[0].exprs25=='1'?true:false;
document.mn_navi.ferry.checked = arguments[0].exprs11=='1'?true:false;
},
restoreSetPOI: function(poi, ind){
var poiInfo = poi.split('\.');
this.exeName[ind] = poiInfo[0];
this.exeLon[ind] = poiInfo[1];
this.exeLat[ind] = poiInfo[2];
var target = ind;
if(ind >= 2){
target = 2;
}
var inpFld = $('pointInpTxt'+target);
var setCtlFld = $('pointSetCtl'+target);
var setFld = $('pointMsg'+ind);
var msgFld = $('msg'+ind);
var chgFld = $('chgPoint'+ind);
if( ind >= 2 ){
$('thrInp').style.display = 'block';
$('thrRec' + new Number(ind - 2)).style.display = 'block';
$('thr_panel').style.display = 'none';
$('addThr').style.display = 'block';
this.visibleThrEdit(ind);
}
this.routeSearchReady();
msgFld.innerHTML = NaviSetting.exeName[ind];
setFld.style.display = 'block';
if((NaviSetting.naviType == '3' && ind == '1') )chgFld.style.display = 'none';
inpFld.style.display = 'none';
setCtlFld.style.display = 'none';
},
clearText: function(ind){
if(new Number(ind) > 2) ind = '2';
if($('pointTxt' + ind).className == 'initExampleText'){
$('pointTxt' + ind).value = "";
$('pointTxt' + ind).className = 'exampleText';
}
},
clearMapIcon: function(){
for(var n = 0; n < this.exeIconIdx.length; n++){
ntmap.clearIcon(this.exeIconIdx[n]);
}
},
checkDate: function(year, month, day){
var dt = new Date(year, month - 1, day);
if(dt == null || dt.getFullYear() != year || dt.getMonth() + 1 != month || dt.getDate() != day) {
return false;
}
return true;
}
}
/*
* IE PNG Fix v1.4
*
* Copyright (c) 2006 Takashi Aida http://www.isella.com/aod2/
*
*/
if (typeof IEPNGFIX == 'undefined') {
var IEPNGFIX = {
blank:  'http://www.navitime.co.jp/pcstorage/img/blank.gif',
filter: 'DXImageTransform.Microsoft.AlphaImageLoader',
fixit: function (elem, src, method) {
if (elem.filters[this.filter]) {
var filter = elem.filters[this.filter];
filter.enabled = true;
filter.src = src;
filter.sizingMethod = method;
}
else {
elem.style.filter = 'progid:' + this.filter +
'(src="' + src + '",sizingMethod="' + method + '")';
}
},
fixwidth: function(elem) {
if (elem.currentStyle.width == 'auto' &&
elem.currentStyle.height == 'auto') {
elem.style.width = elem.offsetWidth + 'px';
}
},
fixchild: function(elem, recursive) {
if (!/MSIE (5\.5|6\.|7\.)/.test(navigator.userAgent)) return;
for (var i = 0, n = elem.childNodes.length; i < n; i++) {
var childNode = elem.childNodes[i];
if (childNode.style) {
if (childNode.style.position) {
childNode.style.position = childNode.style.position;
}
else {
childNode.style.position = 'relative';
}
}
if (recursive && childNode.hasChildNodes()) {
this.fixchild(childNode, recursive);
}
}
},
fix: function(elem) {
if (!/MSIE (5\.5|6\.|7\.)/.test(navigator.userAgent)) return;
var bgImg =
elem.currentStyle.backgroundImage || elem.style.backgroundImage;
if (elem.tagName == 'IMG') {
if ((/\.png$/i).test(elem.src)) {
this.fixwidth(elem);
this.fixit(elem, elem.src, 'scale');
elem.src = this.blank;
elem.runtimeStyle.behavior = 'none';
}
}
else if (bgImg && bgImg != 'none') {
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) {
var s = RegExp.$1;
this.fixwidth(elem);
elem.style.backgroundImage = 'none';
this.fixit(elem, s, 'scale'); // crop | image | scale
if (elem.tagName == 'A' && elem.style) {
if (!elem.style.cursor) {
elem.style.cursor = 'pointer';
}
}
this.fixchild(elem);
elem.runtimeStyle.behavior = 'none';
}
}
},
hover: function(elem, hvImg) {
var bgImg = elem.style.backgroundImage;
if (!bgImg && elem.currentStyle) bgImg = elem.currentStyle.backgroundImage;
if (elem.tagName == 'IMG' && hvImg) {
var image = elem.src;
elem.onmouseover = function() {
elem.src = hvImg;
IEPNGFIX.fix(elem);
};
elem.onmouseout = function() {
elem.src = image;
IEPNGFIX.fix(elem);
};
}
else if (bgImg && bgImg != 'none' && hvImg) {
elem.onmouseover = function() {
elem.style.backgroundImage = 'url(' + hvImg + ')';
IEPNGFIX.fix(elem);
};
elem.onmouseout = function() {
elem.style.backgroundImage = bgImg;
IEPNGFIX.fix(elem);
};
}
IEPNGFIX.fix(elem);
}
};
} // end if (typeof IEPNGFIX == 'undefined')
function changePage(obj,url,prm){
obj.get({uri:url,param:prm});
}
Around = {
N2A: ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"],
CENTER: new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/poiPoi.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
ICONS: [
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_1.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_2.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_3.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_4.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_5.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_6.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_7.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_8.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_9.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
new NTIcon(new NTLatLng(0,0),new NTImage('/pcstorage/img/map/point_10.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30)),
],
iconData:null,
centerPoi: null,
view:function(id,n,idx){
var b="none";
var c="block";
for(var i=0;i<=n;i++){
var s=$(id+i+idx);
if(s != null){
s.style.display=(s.style.display==b || s.style.display=="")?c:b;
}
}
},
searchFreeword:function(obj){
if(this.checkKeyword()){
document.mc_search.lon.value = ntmap.getPos().getLongitude();
document.mc_search.lat.value = ntmap.getPos().getLatitude();
NTWindow.Control.acquireAction({process:'around', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get', param:Form.serialize(document.mc_search)});
}
},
checkKeyword:function(){
var kwd = document.mc_search.aroundKwd.value;
while(kwd.indexOf("?") >= 0){
kwd = kwd.replace("?","");
}
while(kwd.indexOf(" ") >= 0){
kwd = kwd.replace(" ", "");
}
if(kwd=='' || document.mc_search.aroundKwd.className=='initExampleText'){
alert('検索文字を入力してください');
document.mc_search.aroundKwd.focus();
return false;
}
return true;
},
move:function(prm){
mapOverLayClose();
if(prm.popid != null){
this.popUp(prm.popid,prm.lat,prm.lon);
}
mapMove(new NTLatLng(prm.lat,prm.lon));
if(prm.srchPntSet != null && prm.srchPntSet != undefined && prm.srchPntSet == true){
NTWindow.Control.setSearchPointAct(prm);
searchAroundRankSpot();
}
NTPoiCurrent.reset();
if(prm.name) NTPoiCurrent.name=prm.name;
if(prm.add) NTPoiCurrent.address=prm.add;
if(prm.note)  NTPoiCurrent.note=prm.note;
if(prm.tel)  NTPoiCurrent.tel=prm.tel;
if(prm.id)   NTPoiCurrent.id=prm.id;
if(prm.cid)  NTPoiCurrent.categoryId=prm.cid;
if(prm.cname)NTPoiCurrent.categoryName=prm.cname;
if(prm.pid)  NTPoiCurrent.provId=prm.pid;
if(prm.sid)  NTPoiCurrent.spotId=prm.sid;
if(prm.gid)  NTPoiCurrent.groupId=prm.gid;
if(prm.isBusStop != undefined) NTPoiCurrent.isBusStop=prm.isBusStop;
if(prm.name != undefined) NTPoiCurrent.hasDetail=prm.hasDetail;
if(prm.isRegistPoi != undefined) NTPoiCurrent.isRegistPoi=prm.isRegistPoi;
if(prm.hasDetail != undefined) NTPoiCurrent.hasDetail=prm.hasDetail;
if(prm.catchCopy)  NTPoiCurrent.catchCopy=prm.catchCopy;
if(prm.coupon)  NTPoiCurrent.coupon=prm.coupon;
if(prm.img)  NTPoiCurrent.img=prm.img;
if(prm.reserveType)  NTPoiCurrent.reserveType=prm.reserveType;
if(prm.reserveIconList)  NTPoiCurrent.reserveIconList=prm.reserveIconList;
if(prm.upperIconList)  NTPoiCurrent.upperIconList=prm.upperIconList;
if(prm.lowerIconList)  NTPoiCurrent.lowerIconList=prm.lowerIconList;
if (prm.aid != null) {
NTPoiCurrent.advId = prm.aid;
}
if (prm.votable) NTPoiCurrent.votable = prm.votable;
if (prm.zip) NTPoiCurrent.zip = prm.zip;
},
popUp:function(id,lat,lon){
ntmap.openMsg(new NTLatLng(lat,lon), {max:{x:320,y:240}, content:$(id)});
},
popClose:function(){
if(this.popobj!=null && this.popobj.isAvalable()){
this.popobj.remove();
this.popobj = null;
}
},
walkRoute:function(orvlat,orvlon,dnvlat,dnvlon,r,g,b,method){
ntmap.setProperty('autoload',false);
var orv = new NTLatLng(orvlat,orvlon);
var dnv = new NTLatLng(dnvlat,dnvlon);
var color = new NTColor(r,g,b);
var route = new NTRoute(orv,dnv,color,method)
RouteDispCtl.chgRoute('walk',route);
ntmap.reload();
ntmap.setProperty('autoload',true);
},
detail:function(uri){
NTWindow.Control.createModal({x:780, y: 500, data:{uri:uri}});
},
detailAdv:function(uri){
NTWindow.Control.createModal({x:800, y: 640, data:{uri:uri}});
},
setIcons: function(center, icons){
var mp_pois = new Array();
var mp_icons = new Array();
var icon = new NTIcon(new NTLatLng(center.lat,center.lon),new NTImage('/pcstorage/img/map/poiPoi.png',25,38),"",new NTImage('/pcstorage/img/map/poiShadow.png',40,30));
icon.setGroup("aroundList");
icon.addEvent("click", function(){
onIconClick(Around.centerPoi, new NTLatLng(center.lat, center.lon));
});
ntmap.addIcon(icon);
for(var i=0; i<icons.length; i++){
this.iconData = icons[i];
mp_pois.push(new NTLatLng(icons[i].lat,icons[i].lon));
icon = new NTIcon(new NTLatLng(icons[i].lat,icons[i].lon),new NTImage('/pcstorage/img/map/point_'+ (i+1) +'.png',25,38),'',new NTImage('/pcstorage/img/map/poiShadow.png',40,30));
icon.setGroup("aroundList");
icon.addEvent("click", onIconClick.bind(this, this.iconData, new NTLatLng(this.iconData.lat, this.iconData.lon)));
ntmap.addIcon(icon);
}
tbar.setScaleByPoi({poi:mp_pois,center:new NTLatLng(center.lat,center.lon)});
},
advLog: function(pId,sId,aId,frm){
if(pId==null || pId==''){return;}
if(sId==null || sId==''){return;}
if(aId==null || aId==''){return;}
if(frm==null || frm==''){return;}
new Ajax.Request("mjx/advLog.jsp",{method:"get",parameters:{provId:pId,spotId:sId,advId:aId,from:frm}});
},
adrsLog: function(md){
new Ajax.Request("mjx/adrsLog.jsp",{method:"get",parameters:{mode:md}});
}
};
Drive = {
drawRoute: null,
set:function(target){
$('md_'+target).innerHTML = NTPoiCurrent.name;
if(target.indexOf('ldmk') == -1){
document.md_navi[target].value = PoiCommon.getVertex();
document.md_navi[target+'Add'].value = PoiCommon.getAdditional();
}else{
document.md_navi['ldmk1'].value = PoiCommon.getVertex();
document.md_navi['ldmkAdd1'].value = PoiCommon.getAdditional();
var msg = '<a href="javascript:;" onclick="Drive.clear(\'' + target + '\'); return false;"><img src="/pcstorage/img/map/navi/btn_crear.gif" witdh="50" height="20"></a>';
$('md_'+target+'setting').innerHTML = msg;
}
},
clear:function(target){
document.md_navi[target].value = "";
var add = target;
var img = target;
var status = "";
if(target.indexOf('ldmk') != -1){
var index = target.substr(4);
add = 'ldmkAdd' + index;
img = 'ldmk';
status = "未設定(任意)"
}else{
add = target+'Add';
status = "未設定(必須)"
}
document.md_navi[add].value = "";
$('md_'+target).innerHTML = status;
var msg = '<a href="javascript:;" onclick="Drive.set(\'' + target + '\'); return false;"><img src="/pcstorage/img/map/navi/btn_' + img + '.gif" witdh="50" height="20"></a>';
$('md_'+target+'setting').innerHTML = msg;
},
/*
callResult:function(){
if(this.checkSet()){
if(this.myW == null){
this.myW = new NTWindow.List({title:"車ルート検索",width:400,height:400,x:100,y:60,onClose:ntmap.removeRoute.bind(ntmap),data:{uri:"/pcnavi/mjx/drive.jsp",form:document.md_navi}});
}else{
this.myW.get({uri:"/pcnavi/mjx/drive.jsp",form:document.md_navi});
this.myW.open();
}
}
},
*/
swichTollRoad:function(tr,orv,dnv,orvAdd,dnvAdd,vics,ldmk,ldmkAdd){
if(!orvAdd) orvAdd='.....-1';
if(!dnvAdd) dnvAdd='.....-1';
var param = 'tollroad='+tr+'&orv='+orv+'&dnv='+dnv+'&orvAdd='+orvAdd+'&dnvAdd='+dnvAdd+'&vics='+vics;
if(ldmk){
param += '&ldmk1=' + ldmk;
if(ldmkAdd){
param += '&ldmkAdd1=' + ldmkAdd;
}else{
param += '&ldmkAdd1=' + '.....-1';
}
}
$('md_result').style.display = "none";
$('md_result_2').style.display = "block";
var func = NaviSetting.getTnaviResultLoadFunction();
new Ajax.Request("/pcnavi/mjx/drive.jsp", {method:"get", parameters: param, onComplete: func});
},
checkSet:function(){
if(document.md_navi['orv'].value==''){
alert('出発地をセットしてください');
return false;
}else if(document.md_navi['dnv'].value==''){
alert('目的地をセットしてください');
return false;
}
var arLon = new Array();
var arLat = new Array();
var idx = 0;
arLon[0] = document.md_navi['orv'].value.split('.')[0];
arLat[0] = document.md_navi['orv'].value.split('.')[1];
idx++;
if(document.md_navi['ldmk1'].value != ''){
arLon[idx] = document.md_navi['ldmk1'].value.split('.')[0];
arLat[idx] = document.md_navi['ldmk1'].value.split('.')[1];
idx++;
}
arLon[idx] = document.md_navi['dnv'].value.split('.')[0];
arLat[idx] = document.md_navi['dnv'].value.split('.')[1];
for(i=0;i<idx;i++){
if(arLon[i]==arLon[i+1]&&arLat[i]==arLat[i+1]){
if(idx==1){
alert('出発地・目的地に同一地点がセットされています');
}else{
alert('出発地・経由地・目的地に同一地点がセットされています');
}
return false;
}
}
return true;
},
callMyRouteRg:function(sbm,name){
new NTWindow.Modal({x:500,y:380,data:{uri:"/pcnavi/mjx/myroute2.jsp",param:{sbm:sbm,name:name}}});
},
setCondition:function(){
var aForm = document.car_navi;
var rForm = document.md_retry;
for(var i = 0 ; rForm != null && i < rForm.length ; i++ ){
var rElm = rForm.elements[i];
if(aForm[rElm.name] != null){
var aElm = aForm[rElm.name];
if(aElm.type == 'hidden'){
aElm.value = rElm.value;
}else if(aElm.type == 'select-one'){
for(var el = 0; el < aElm.length ; el++){
if(aElm[el].value == rElm.value){
aElm.selectedIndex = el;
break;
}
}
}else if(aElm.type == 'checkbox'){
if(rElm.value == '1'){
aElm.checked = true;
}else{
aElm.checked = false;
}
}else{//radio
for(var el = 0; el < aElm.length ; el++){
if(aElm[el].value == rElm.value){
aElm[el].checked = true;
}else{
aElm[el].checked = false;
}
}
}
}
}
}
/*	200807 maprenewal hoshi
tabExchange: function(nm){
$("car_tab1").src = "/pcstorage/img/map/navi/tab/tab1off.gif";
$("car_tab4").src = "/pcstorage/img/map/navi/tab/tab4off.gif";
$("car_"+nm).src = "/pcstorage/img/map/navi/tab/"+nm+"on.gif";
$("car_tab1form").style.display="none";
$("car_tab4form").style.display="none";
$("car_"+nm+"form").style.display = "block";
}
*/
};
FreeWord = {
myW:null,
openFreeword:function(){
if(this.myW == null){
this.myW = new NTWindow.List({title:"フリーワード検索",onLoad:function(){document.mf_freeword.keyword.focus();},width:270,height:530,x:100,y:60,data:{uri:"/pcnavi/mjx/freeword1.jsp",form:document.mf_freeword}});
}else{
this.myW.get({uri:"/pcnavi/mjx/freeword1.jsp"});
this.myW.open();
}
},
searchFreeword:function(){
if(this.checkKeyword()){
this.myW.get({uri:"/pcnavi/mjx/freeword1.jsp",form:document.mf_freeword});
}
},
checkKeyword:function(){
var kwd = document.mf_freeword.keyword.value;
while(kwd.indexOf("　") >= 0){
kwd = kwd.replace("　","");
}
while(kwd.indexOf(" ") >= 0){
kwd = kwd.replace(" ", "");
}
if(kwd==''){
alert('検索文字を入力してください。');
document.mf_freeword.keyword.focus();
return false;
}
return true;
},
setPOI:function(lon,lat,cd,nm,ad,tl,ct,mp,sp,gr,tr){
PoiCommon.setPOI(lon,lat,cd,nm,ad,tl,ct,mp,sp,gr,tr);
},
movePage:function(keyword,pg,type,obj){
pg = pg==null||pg==""?0:pg;
type = type==null||type==""?"":type;
param='keyword='+keyword+'&p='+pg+'&type='+type;
this.myW.get({uri:"/pcnavi/mjx/freeword1.jsp",param:param});
},
moveAddressList:function(keyword,pg,acode,blist,obj){
pg = pg==null||pg==""?0:pg;
acode = acode==null||acode==""?"":acode;
blist = blist==null||blist==""?"":blist;
param='keyword='+keyword+'&p='+pg+'&ACode='+acode+'&bList='+blist;
this.myW.get({uri:"/pcnavi/mjx/freeword2.jsp",param:param});
}
};
var GourmetImage = Class.create();
GourmetImage.prototype = {
initialize: function(src, w, h){
this.src = src;
this.width = w;
this.height = h;
NTEvent.add(this.src, "mouseover", this.mouseOverImage.bind(this));
NTEvent.add(this.src, "mouseout",  this.mouseOutImage.bind(this));
this.mover = new NTAgis.Resizer(this.src, {interval:-1});
},
mouseOverImage: function(e){
this.mover.setOption({endx: this.width, endy: this.height});
this.mover.run();
},
mouseOutImage: function(e){
this.mover.setOption({endx: 40, endy: 40});
this.mover.run();
}
};
Gourmet = {
view:function(id){
if($(id).style.display=="block"){
$(id).style.display="none";
}else{
$(id).style.display="block";
}
},
child:function(index){
var parentElement = eval('document.mg_search.mg_cate' + index);
var chileElement =  eval('document.mg_search.mg_catec' + index);
if(chileElement != null && chileElement.length >0 ){
if(parentElement.checked){
var c_num = chileElement.length;
var i = 0;
while (i < c_num)
{
chileElement[i].checked = false;
i++;
}
}
}else{
if(parentElement.checked){
if(chileElement!=null){
chileElement.checked = false;
}
}
}
$("mg_catea").checked = false;
},
parent:function(index){
var parentElement = eval('document.mg_search.mg_cate' +index);
parentElement.checked = false;
$("mg_catea").checked = false;
},
all:function(size){
if($("mg_catea").checked){
var i = 0;
while (i < size)
{
var parentElement = eval('document.mg_search.mg_cate' + i);
var chileElement =  eval('document.mg_search.mg_catec' + i);
parentElement.checked = false;
if(chileElement != null){
if(chileElement.length >0){
var c_num = chileElement.length;
var j = 0;
while (j < c_num)
{
chileElement[j].checked = false;
j++;
}
}else{
chileElement.checked = false;
}
}
i++;
}
}
},
none:function(cSize){
var i = 0;
while (i < cSize)
{
$("mg_child"+i).style.display="none";
i++;
}
},
reset:function(cSize,sSize){
$("mg_catea").checked = true;
this.all(cSize);
this.none(cSize);
var i = 0;
while (i < sSize)
{
$("mg_s"+i).checked = false;
i++;
}
var min = $('mg_min').getElementsByTagName('option');
var minArray = $A(min);
minArray[0].selected = true;
var max = $('mg_max').getElementsByTagName('option');
var maxArray = $A(max);
maxArray[0].selected = true;
},
callResult:function(){
document.mg_search.lon.value=ntmap.getPos().getLongitude();
document.mg_search.lat.value=ntmap.getPos().getLatitude();
gourmetOpenFunc(document.mg_search, true);
},
images: new Array(),
setImage: function(){
document.getElementsByClassName("mgd_image").each(function(val,idx){
Gourmet.images.push(new GourmetImage(val, val.offsetWidth, val.offsetHeight));
val.style.width  = "40px";
val.style.height = "40px";
});
},
research: function(obj){
obj.close();
NTWindow.GourmetWindow.open();
},
changeView: function(open,close){
if($(open).style.display == 'none'){
$(open).style.display = 'block';
}
if($(close).style.display == 'block'){
$(close).style.display = 'none';
}
},
resizeImg: function(imgObjNm){
var imgObj = $(imgObjNm);
if(imgObj != null){
var currentWidth = imgObj.width;
if(currentWidth > 470){
imgObj.style.width = "470px";
}
var currentHeight = imgObj.height;
if(currentHeight > 350){
imgObj.style.height = "350px";
}
}
}
};
GourmetCtl = {
searchType: 1,
gKword: null,
ACode: null,
groupId: null,
lon: 0,
lat: 0,
LCode: "",
cateArr: new Array(),
charge_min: "00000",
charge_max: "00000",
srvArr: new Array("0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"),
srvCond: null,
estimate: 0,
pg: 0,
radius: 2000,
clipWin: null,
timeId: "",
baseOpen: function(){
gourmetBaseOpenFunc();
},
createParam: function(){
if (arguments[0] && arguments[0].type ) {
this.searchType = arguments[0].type;
this.pg = 0;
}
var param = {};
param.searchType = this.searchType;
if ( this.gKword != null) {
param.gKword = this.gKword;
}
if ( this.ACode != null) {
param.ACode = this.ACode;
}
if (this.groupId != null) {
param.groupId = this.groupId;
}
this.lon = arguments[0] && arguments[0].lon?arguments[0].lon:ntmap.getPos().getLongitude();
param.lon = this.lon;
this.lat = arguments[0] && arguments[0].lat?arguments[0].lat:ntmap.getPos().getLatitude();
param.lat = this.lat;
this.createLCode();
param.LCode = this.LCode;
this.createCond();
param.Cond = this.srvCond;
param.pg = this.pg;
param.radius = this.radius;
return param;
},
tabExchange: function(nm){
$("gl_tab1").src = "/pcstorage/img/gourmet/gr_tab1off.gif";
$("gl_tab2").src = "/pcstorage/img/gourmet/gr_tab2off.gif";
$("gl_tab"+nm).src = "/pcstorage/img/gourmet/gr_tab"+nm+"on.gif";
this.radius = 2000;
this.searchType = nm;
},
clear: function(){
this.srvCond = null;
},
setDefault: function(){
this.searchType = 1;
this.gKword = "";
this.ACode = null;
this.groupId = null;
this.lon = ntmap.getPos().getLongitude();
this.lat = ntmap.getPos().getLatitude();
this.LCode = "";
this.cateArr.clear();
this.charge_min = "00000";
this.charge_max = "00000";
for ( var i = 0; i < this.srvArr.length; i++ ) {
this.srvArr[i] = "0";
}
this.srvCond = null;
this.estimate = 0;
this.pg = 0;
},
setPageNext: function(){
this.pg++;
},
setPagePrev: function(){
this.pg--;
},
createLCode: function(){
this.LCode = "";
if (this.cateArr.length != 0 ) {
for(var n = 0; n < this.cateArr.length; n++) {
this.LCode += this.cateArr[n];
this.LCode += ".";
}
this.LCode = this.LCode.substring(0, this.LCode.length - 1);
} else {
this.LCode = "03"
}
},
createCond: function(){
var condition = "";
for(var i = 0; i < this.srvArr.length; i++){
condition += this.srvArr[i] + ".";
}
condition += this.charge_min + ".";
condition += this.charge_max;
condition += "." + this.estimate;
this.srvCond = condition;
},
openGourmetCondition: function(){
new NTWindow.Modal({x:720, y: 470, data:{uri:"/pcnavi/mjx/gourmetcondition.jsp"}});
},
gcGenreVisible: function(id){
this.gcAllHide();
$(id).style.visibility="visible";
},
gcGenreHidden: function(id){
this.timeId = setTimeout("GourmetCtl.gcHideTimer('"+id+"')",300);
},
gcAllHide: function(id){
var obj = document.getElementsByClassName("gcon_GenreChild", document.gourmetCondition);
for(var i=0; i<obj.length; i++){
obj[i].style.visibility = "hidden";
}
this.timeId="";
},
gcHideTimer: function(id){
if(this.timeId=="") return;
$(id).style.visibility = "hidden";
this.timeId="";
},
gcStopClose: function(){
clearTimeout(this.timeId);
this.timeId="";
},
gcGenreParentFWChg: function(i){
var isBold = false
var parentElement = eval('document.gourmetCondition.gcon_cate' + i);
if( parentElement.checked == true ) {
isBold = true;
}
if (!isBold){
var chileElement =  eval('document.gourmetCondition.gcon_catec' + i);
for(var n = 0; n < chileElement.length; n++){
if( chileElement[n].checked == true ) {
isBold = true;
}
}
}
if (isBold){
$("gcon_GenreParent"+i).style.fontWeight = "bold";
} else {
$("gcon_GenreParent"+i).style.fontWeight = "normal";
}
},
gcClickParent: function(index){
var parentElement = eval('document.gourmetCondition.gcon_cate' + index);
var chileElement =  eval('document.gourmetCondition.gcon_catec' + index);
var setChecked = parentElement.checked;
for( var n = 0; n < chileElement.length; n++ ){
chileElement[n].checked = setChecked;
}
},
gcClickChild:function(index){
var parentElement = eval('document.gourmetCondition.gcon_cate' + index);
var chileElement =  eval('document.gourmetCondition.gcon_catec' + index);
var setChecked = false;
var checkCnt = 0;
for( var n = 0; n < chileElement.length; n++ ){
if( chileElement[n].checked == true ) {
checkCnt++;
}
}
if ( chileElement.length == checkCnt && chileElement.length != 0 ) {
parentElement.checked = true;
} else {
parentElement.checked = false;
}
},
gcDispReset:function(cSize,sSize){
this.allGenreClear(cSize);
var i = 1;
while (i < sSize)
{
$("gcon_s"+i).checked = false;
i++;
}
var couponArr = document.getElementsByName("gcon_coupon");
couponArr[0].checked = true;
couponArr[1].checked = false;
var min = $('gcon_min').getElementsByTagName('option');
var minArray = $A(min);
minArray[0].selected = true;
var max = $('gcon_max').getElementsByTagName('option');
var maxArray = $A(max);
for( var i = 0; i < maxArray.length; i++ ) {
if ( maxArray[i].value == "99999" ) {
maxArray[i].selected = true;
}
}
var estArr = document.getElementsByName("gcon_estimate");
estArr[0].checked = true;
for (var i = 1; i < estArr.length; i++) {
estArr[i].checked = false;
}
},
allGenreClear:function(size){
var i = 0;
while (i < size)
{
var parentElement = eval('document.gourmetCondition.gcon_cate' + i);
var chileElement =  eval('document.gourmetCondition.gcon_catec' + i);
parentElement.checked = false;
if(chileElement != null){
if(chileElement.length >0){
var c_num = chileElement.length;
var j = 0;
while (j < c_num)
{
chileElement[j].checked = false;
j++;
}
}else{
chileElement.checked = false;
}
}
this.gcGenreParentFWChg(i);
i++;
}
},
gcSetCondition:function(cSize,sSize){
this.setDefault();
var i = 0;
while (i < cSize)
{
var parentElement = eval('document.gourmetCondition.gcon_cate' + i);
var chileElement =  eval('document.gourmetCondition.gcon_catec' + i);
if ( parentElement.checked == true) {
this.cateArr.push(parentElement.value);
} else {
if(chileElement != null){
if(chileElement.length >0){
var c_num = chileElement.length;
var j = 0;
while (j < c_num)
{
if ( chileElement[j].checked == true ){
this.cateArr.push(chileElement[j].value);
}
j++;
}
}
}
}
i++;
}
var sInd = 0;
if (document.gourmetCondition.gcon_coupon[0].checked == true ) {
this.srvArr[sInd] = document.gourmetCondition.gcon_coupon[0].value;
} else {
this.srvArr[sInd] = document.gourmetCondition.gcon_coupon[1].value;
}
sInd++;
while (sInd < sSize) {
if ( $("gcon_s" + sInd).checked == true ) {
this.srvArr[sInd] = 1;
} else {
this.srvArr[sInd] = 0;
}
sInd++;
}
this.charge_min = document.gourmetCondition.gcon_min.value;
sInd++;
if (document.gourmetCondition.gcon_max.value == "99999"){
this.charge_max = "0";
} else {
this.charge_max = document.gourmetCondition.gcon_max.value;
}
sInd++;
for (var i = 0; i < document.gourmetCondition.gcon_estimate.length; i++) {
if ( document.gourmetCondition.gcon_estimate[i].checked == true ) {
this.estimate = document.gourmetCondition.gcon_estimate[i].value;
}
}
},
gcReappearance:function(cSize,sSize){
var i = 0;
while (i < this.cateArr.length)
{
var value = this.cateArr[i];
var hit = false;
var j = 0;
while( j < cSize ){
var targetElement = eval('document.gourmetCondition.gcon_cate' + j);
if( targetElement.value != null && targetElement.value == this.cateArr[i] ){
targetElement.checked = true;
targetElement =  eval('document.gourmetCondition.gcon_catec' + j);
var k = 0;
while(k < targetElement.length){
targetElement[k].checked = true;
k++;
}
hit = true;
break;
} else {
targetElement =  eval('document.gourmetCondition.gcon_catec' + j);
var k = 0;
while(k < targetElement.length){
if( targetElement[k].value != null && targetElement[k].value == this.cateArr[i] ){
targetElement[k].checked = true;
hit = true;
break;
}
k++;
}
if(hit){
break;
}
}
j++;
}
if (hit) {
this.gcGenreParentFWChg(j);
}
i++;
}
var sInd = 0;
var couponElement =  eval('document.gourmetCondition.gcon_coupon');
for(var n = 0; n < couponElement.length; n++){
if(couponElement[n].value == this.srvArr[sInd] ) {
couponElement[n].checked = true;
break;
}
}
sInd++;
while (sInd < sSize) {
if ( this.srvArr[sInd] == '1' ) {
$("gcon_s" + sInd).checked = true;
}
sInd++;
}
var minElements = eval("document.gourmetCondition.gcon_min");
for (var n = 0; n < minElements.length; n++){
if (minElements[n].value == this.charge_min ){
minElements[n].selected = true;
break;
}
}
var maxElements = eval("document.gourmetCondition.gcon_max");
var gconMaxVal = 0;
if (this.charge_max == "0"){
gconMaxVal = '99999';
} else {
gconMaxVal = this.charge_max;
}
for (var n = 0; n < maxElements.length; n++){
if (maxElements[n].value == gconMaxVal ){
maxElements[n].selected = true;
break;
}
}
var estElements = eval("document.gourmetCondition.gcon_estimate");
for (var n = 0; n < estElements.length; n++) {
if ( estElements[n].value == this.estimate ) {
estElements[n].checked = true;
}
}
},
openClippingWin:function(param){
var uri = '/pcnavi/mjx/gourmetClip.jsp?';
var style = 'width=570,height=600,scrollbars=yes,resizable=no';
if ( param.groupId != null ) {
uri += 'groupId=' + param.groupId;
}
if ( param.provId != null ) {
uri += '&provId=' + param.provId;
}
if ( param.spotId != null ) {
uri += '&spotId=' + param.spotId;
}
if ( param.process != null ) {
uri += '&process=' + param.process;
}
if ( param.forward != null ) {
uri += '&forward=' + param.forward;
}
if ( this.clipWin == null || this.clipWin.closed ){
this.clipWin = window.open(uri,'clipWin',style);
this.clipWin.focus();
} else {
this.clipWin.location = uri;
this.clipWin.focus();
}
},
aroundMove:function(param){
onIconClick(param, new NTLatLng(param.lat, param.lon));
}
};
SpotReview = {
div:'',
getDataLoadFunction: function(response){
$(div).innerHTML = response.responseText;
NTWindow.Control.modal.tabScrollTop();
},
getPage: function(form, page, target){
div = target;
param = Form.serialize(form);
param += '&p=' + page
new Ajax.Request("mjx/spotReviewList.jsp", {method:"get", parameters: param, onComplete: SpotReview.getDataLoadFunction});
},
changeReview: function(a){
if ($('longReview'+a).style.display == 'none'){
$('longReview'+a).style.display = 'block';
$('shortReview'+a).style.display = 'none';
} else {
$('longReview'+a).style.display = 'none';
$('shortReview'+a).style.display = 'block';
}
}
};
var common_uri = "http://" + location.host + "/pcnavi/";
var realEnv_url = "";
var mapLink_url = "";
var submap = null;
var scaling = [];
scaling["0,3"]  = "0,1";
scaling["0,6"]  = "0,1";
scaling["0,12"] = "0,1";
scaling["1,5"]  = "0,3";
scaling["1,8"]  = "0,5";
scaling["1,14"] = "0,8";
scaling["1,24"] = "0,13";
scaling["2,3"]  = "1,3";
scaling["2,5"]  = "1,6";
scaling["3,2"]  = "1,8";
scaling["3,3"]  = "1,12";
scaling["3,5"]  = "1,18";
scaling["3,7"]  = "2,2";
scaling["4,2"]  = "3,1";
scaling["4,3"]  = "3,2";
scaling["4,6"]  = "3,3";
scaling["4,10"] = "3,5";
function adjustActionWinTrigger(){
$('actionOpen').style.top = $("mainmap").offsetHeight/2 - $("actionOpen").offsetHeight/2 + "px";
}
RouteDispCtl = {
currentType: null,
addRoute: function(){
this.currentType = arguments[0];
var route = new Array();
var exeMethod = 'ntmap.addRoute(';
for(var n = 1; n < arguments.length; n++) {
exeMethod += 'arguments[' + n + '],';
}
exeMethod = exeMethod.substring(0,exeMethod.length - 1);
exeMethod += ');'
eval(exeMethod);
},
removeRoute: function(param){
if( param != null && param.initFlg == true ) {
ntmap.removeRoute();
this.currentType = null;
}else if( this.currentType == 'walk' ){
ntmap.removeRoute();
this.currentType = null;
}
},
chgRoute: function(){
ntmap.removeRoute();
this.addRoute.apply(this,arguments);
}
};
var setPos = function(a, nmUpdateFlg){
var b;
eval("b=" + a.responseText);
displayPoiName(b.name);
if(nmUpdateFlg)NTPoiCurrent.name = b.name;
}
var setPos_defalult = setPos;
var setPos_First = function(a, nmUpdateFlg){
var b;
eval("b=" + a.responseText);
if(nmUpdateFlg)NTPoiCurrent.name = b.name;
setPos = setPos_defalult;
}
function displayPoiName(name){
$('curPosition').innerHTML = name;
}
function onMapMove(k, b){
var url = "http://" + location.host + "/map/?datum=1&unit=0&lat=%2b" + k.getDmsLatitude() + "&lon=%2b" + k.getDmsLongitude();
if(document.maplink != undefined && document.maplink != null){
document.maplink.mapurl.value = url ;
}
var param = "lon=" + k.getLongitude() + "&lat=" + k.getLatitude();
NTPoiCurrent.reset();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){setPos(res, true)}});
NTPoiCurrent.longitude = k.getLongitude();
NTPoiCurrent.latitude = k.getLatitude();
var map = b === ntmap ? submap : ntmap;
map.moveTo(k);
};
function onMapZoom(a,b) {
if (!(b === ntmap)) {
if(b.getZoom().scale == 0 && b.getZoom().zoom == 1){
SubMapInnerFrame.hide();
} else {
SubMapInnerFrame.show();
}
return;
}
var sz = scaling[a.scale + "," + a.zoom].split(",");
if($('subarea').style.display != 'none')submap.setZoom(sz[0],sz[1]);
}
var isMainLoaded = false;
var isSubLoaded = false;
function onMapLoad(a,b) {
if (b === ntmap && submap && isMainLoaded == false) {
isMainLoaded = true;
}
if (b === submap && ntmap && isSubLoaded == false) {
isSubLoaded = true;
}
SubMapInnerFrame.moveCenter();
}
function createPoi(poistatus){
ntmap.clearIcon();
var image = new NTImage("/pcstorage/img/map/poiPoi.png", 25,38);
var shadow = new NTImage("/pcstorage/img/map/poiShadow.png", 40,30);
var icon = new NTIcon(ntmap.getPos(),image,"",shadow);
var iconPoi = Object.clone(poistatus);
icon.addEvent("click",function(){
onIconClick(iconPoi, icon.getPos());
});
createMsg(poistatus, icon.getPos());
ntmap.addIcon(icon);
};
function createMsg(poistatus,pos){
if(poistatus.advId && poistatus.advId != ''){createAdvMsg(poistatus,pos); return;}
var div = document.createElement("div");
var text = returnHtmlStr(poistatus.name);
text += createTwLink(poistatus,pos);
text += '<br>';
if(poistatus.zip) text += returnHtmlStr("〒" + (poistatus.zip.length>4?poistatus.zip.substring(0,3)+"-"+poistatus.zip.substring(3):poistatus.zip)) + " ";
if(poistatus.address) text += returnHtmlStr(poistatus.address) + '<br>';
if(poistatus.note) text += returnHtmlStr(poistatus.note) + '<br>';
if(poistatus.tel)     text += "TEL:" + poistatus.tel + '<br>';
if( poistatus.groupId == '00008' && poistatus.hasDetail && (NTPoiCurrent.upperIconList.length > 0 ||  NTPoiCurrent.lowerIconList.length > 0 || NTPoiCurrent.detailProvId )){
text+= createHotelSiteLink(poistatus);
}
else{
if(poistatus.hasDetail){
text+= '<p class="pop_link"><a href="javascript:;" onclick="new NTWindow.Modal(';
text+= '{x:780, y: 500, data:{';
text+= 'uri:\'/pcnavi/mjx/detail.jsp\',';
text+= 'param:\'provId='+poistatus.provId + '&spotId='+ poistatus.spotId + '&groupId='+ poistatus.groupId + '&LCode='+ poistatus.categoryId + '\'';
text+= '}}); return false;">詳細情報</a>';
}
if (!poistatus.hasDetail && NTPoiCurrent.upperIconList.length > 0) {
text += '詳細情報 ';
}
for(var i = 0; i < NTPoiCurrent.upperIconList.length; i++){
text+= createDetailLink(poistatus, NTPoiCurrent.upperIconList[i]);
}
if(NTPoiCurrent.lowerIconList.length > 0){
text+= '<hr>その他の情報';
for(var i = 0; i < NTPoiCurrent.lowerIconList.length; i++){
text+= createDetailLink(poistatus, NTPoiCurrent.lowerIconList[i]);
}
}
}
text += createVoteLink(NTPoiCurrent);
text += createMenuLink(poistatus, pos);
if(poistatus.reserveType && poistatus.reserveType != ''){
text += createReserveLink(poistatus);
}
text+= '</p>';
div.innerHTML = text;
div.style.minWidth = "210px";
div.style.width = "100%";
ntmap.openMsg(pos, {max:{x:300,y:250}, content:div});
};
function createAdvMsg(poistatus,pos){
var div = document.createElement("div");
var text = "";
if(poistatus.catchCopy) text+= '<p style="border-bottom:1px dashed #CCCCCC;padding: 2px; font-size: 80%; margin-bottom: 2px; color: #666666;">' + poistatus.catchCopy.replace("＼","<br>") + '</p>';
text+= '<div style="float: left; width: 200px; ">';
text+= '<b>' + function(){var s='';for(var i=0;i<returnHtmlStr(poistatus.name).length;i++){s+=returnHtmlStr(poistatus.name).substring(i,i+1)+'<wbr>'}return s;}() + '</b>';
text += createTwLink(poistatus,pos);
text += "<br>";
if(poistatus.zip) text += returnHtmlStr("〒" + (poistatus.zip.length>4?poistatus.zip.substring(0,3)+"-"+poistatus.zip.substring(3):poistatus.zip)) + " ";
if(poistatus.address) text += returnHtmlStr(poistatus.address) + '<br>';
if(poistatus.tel)     text += "TEL:" + poistatus.tel + '<br>';
if(poistatus.note)    text += returnHtmlStr(poistatus.note) + '<br>';
if(poistatus.provId && poistatus.spotId && poistatus.advId && poistatus.advId != ''){
text+= '<p class="pop_link"><a href="javascript:;" onclick="new NTWindow.Modal(';
text+= '{x:800, y: 640, data:{';
text+= 'uri:\'/pcnavi/mjx/detail.jsp\',';
text+= 'param:\'provId='+poistatus.provId + '&spotId='+ poistatus.spotId + '&advId='+ poistatus.advId +'\'';
text+= '}}); return false;">詳細情報</a>';
}
if(poistatus.navi != 'totalnavi'){
text+= '<br><a href="javascript:;" onclick="NTWindow.Control.acquireAction({process:\'totalnavi_f\', uri:\'/pcnavi/mjx/totalnaviCondition1.jsp\', method:\'post\', isReload:true, param:{dnv:\'' + PoiCommon.getVertex(poistatus, pos) + '\', dnvAdd:\'' + PoiCommon.getAdditional(poistatus) + '\'}});return false;">乗物徒歩+車ルート</a>';
text+= '<br><a href="javascript:;" onclick="openMail(\'' + pos.getDmsLatitude() + '\',\'' + pos.getDmsLongitude() + '\');return false;">ケータイに送る</a>　';
}
if(poistatus.coupon != null){
text += '<img src="/pcstorage/img/gourmet/icon_coupon_small.gif" style="padding-left:25px;">';
}
if( poistatus.groupId == '00008' && poistatus.hasDetail && (NTPoiCurrent.upperIconList.length > 0 ||  NTPoiCurrent.lowerIconList.length > 0 || NTPoiCurrent.detailProvId )){
text+= '<hr>';
text+= createHotelSiteLink(poistatus);
}
else if(NTPoiCurrent.lowerIconList.length > 0){
text+= '<hr>その他の情報';
for(var i = 0; i < NTPoiCurrent.lowerIconList.length; i++){
text+= createDetailLink(poistatus, NTPoiCurrent.lowerIconList[i]);
}
}
text += createVoteLink(NTPoiCurrent);
if(poistatus.navi == 'totalnavi'){
text += createMenuLink(poistatus, pos);
}
text+= '</p></div>';
if(poistatus.img) text+= '<div style="float: right;"><img src="' + poistatus.img + '" width="100" alt="' + poistatus.name + '"></div>';
text+= '<div class="clear"><div></div></div>';
div.innerHTML = text;
ntmap.openMsg(pos, {max:{x:350,y:300}, content:div});
};
function createDetailLink(poistatus, icon){
if (icon.dProvId == 'NTJCGM') {
var html = '';
html += '<a href="' + kuchikomiUrl + 'spot/main?provId=' + poistatus.provId + '&spotId=' + poistatus.spotId + '">';
html += '<img src="';
html += icon.img.match(/^http:/) ?
icon.img : '/pcstorage/img/gourmet/';
html += '" />';
html += '</a>';
return html;
}
var linkHtml = "";
linkHtml+= '<a href="javascript:;" onclick="';
if(icon.dProvId == '01130' || icon.dProvId == '01135' || icon.dProvId == '01128' || icon.dProvId == '01129'){
linkHtml += 'outPutCntLog({type:\'popup\', logId:\'' + icon.dProvId + '\'});';
}
linkHtml+= 'new NTWindow.Modal(';
linkHtml+= '{x:780, y: 600, data:{';
linkHtml+= 'uri:\'/pcnavi/mjx/detail.jsp\',';
linkHtml+= 'param:\'provId='+poistatus.provId +
'&spotId='+ poistatus.spotId +
'&groupId='+ poistatus.groupId +
'&LCode='+ poistatus.categoryId +
((poistatus.advId && poistatus.advId != '') ? '&advId=' + poistatus.advId : '') +
'&detailProvId='+ icon.dProvId + '\'';
linkHtml+= '}}); return false;"><img src="/pcstorage/img/gourmet/' + icon.img + '"></a>';
return linkHtml;
};
function createHotelSiteLink(poistatus){
var linkHtml ='';
linkHtml+= '<a href="' + hotelUrl + '/hotelDetail/basis?provId=' + poistatus.provId + '&spotId='+ poistatus.spotId + '&tab=1">';
linkHtml+= '詳細情報・プラン検索・予約';
linkHtml+= '</a>';
linkHtml+= '<br>';
return linkHtml;
}
function createVoteLink(st) {
if (st.provId && st.spotId && st.votable) {
return '<br>&gt;&gt;<a href="' +
kuchikomiUrl +
'spot/main?provId=' + st.provId +
'&spotId=' + st.spotId + '">口コミを投稿/閲覧する</a><br>';
}
return '';
};
function createMenuLink(poistatus, pos){
var linkHtml = "<br>";
if(poistatus.id && !poistatus.isBusStop){
if(poistatus.navi == 'totalnavi'){
linkHtml+= '　<a href="javascript:;" onclick="setNaviPoi({dnv:\'' + PoiCommon.getVertex(poistatus, pos) + '\', dnvAdd:\'' + PoiCommon.getAdditional(poistatus) + '\'}); ntmap.closeMsg(); return false;">ここへ行く</a> / ';
linkHtml+= '<a href="javascript:;" onclick="setNaviPoi({orv:\'' + PoiCommon.getVertex(poistatus, pos) + '\', orvAdd:\'' + PoiCommon.getAdditional(poistatus) + '\'}); ntmap.closeMsg(); return false;">ここから出発</a><br><br>';
} else {
stationSelect = encodeURL(poistatus.id + ',' + poistatus.name);
linkHtml+= '乗換案内<br>';
linkHtml+= '　<a href="' + common_uri + '?ctl=020010&dnvStationSelect=' + stationSelect + '">到着駅にする</a> / ';
linkHtml+= '<a href="' + common_uri + '?ctl=020010&orvStationSelect=' + stationSelect + '">出発駅にする</a><br><br>';
}
} else {
linkHtml+= '　<a href="javascript:;" onclick="setNaviPoi({dnv:\'' + PoiCommon.getVertex(poistatus, pos) + '\', dnvAdd:\'' + PoiCommon.getAdditional(poistatus) + '\'}); ntmap.closeMsg(); return false;">ここへ行く</a> / ';
linkHtml+= '<a href="javascript:;" onclick="setNaviPoi({orv:\'' + PoiCommon.getVertex(poistatus, pos) + '\', orvAdd:\'' + PoiCommon.getAdditional(poistatus) + '\'}); ntmap.closeMsg(); return false;">ここから出発</a><br><br>';
}
if(!poistatus.id){
linkHtml+= '<a href="javascript:;" onclick="';
linkHtml+= 'NTPoiCurrent.set(' + poistatus.toString() + ');';
linkHtml+= 'mapMove(new NTLatLng(' + pos.getLatitude() + ',' + pos.getLongitude() + '));'
linkHtml+= 'NTWindow.Control.acquireAction({process:\'station\', uri:\'/pcnavi/mjx/station.jsp\', method:\'get\'});'
linkHtml+= 'ntmap.closeMsg(); return false;">最寄り駅</a>　';
}
if(poistatus.id){
linkHtml+= '<a href="http://' + location.host + '/diagram/' + poistatus.id;
if(poistatus.isBusStop){
linkHtml+= '_t4'
} else {
linkHtml+= '_t1'
}
linkHtml+= '">時刻表</a>　';
}
if(poistatus.isBusStop){
linkHtml+= '<a href="javascript:;" onclick="';
linkHtml+= 'NTPoiCurrent.set(' + poistatus.toString() + ');';
linkHtml+= 'mapMove(new NTLatLng(' + pos.getLatitude() + ',' + pos.getLongitude() + '));'
linkHtml+= 'NTWindow.Control.acquireAction({process:\'bus\', uri:\'/pcnavi/mjx/bus.jsp\', method:\'get\'});'
linkHtml+= 'ntmap.closeMsg(); return false;">路線表示</a><br>';
}
linkHtml+= '<a href="javascript:;" onclick="';
linkHtml+= 'NTPoiCurrent.set(' + poistatus.toString() + ');';
linkHtml+= 'mapMove(new NTLatLng(' + pos.getLatitude() + ',' + pos.getLongitude() + '));'
linkHtml+= 'NTWindow.Control.acquireAction({process:\'around\', uri:\'/pcnavi/mjx/around.jsp\', method:\'get\'});'
linkHtml+= 'ntmap.closeMsg(); return false;">周辺検索</a>　';
linkHtml+= '<a href="javascript:;" onclick="openMail(\'' + pos.getDmsLatitude() + '\',\'' + pos.getDmsLongitude() + '\');return false;">ケータイに送る</a>　';
if(poistatus.navi == 'totalnavi' && !poistatus.isRegistPoi){
linkHtml+= '<br>';
linkHtml+= createMyRegistLink(poistatus,pos);//別メソッド切り出し d-kezuka 2009/07/13
} else if(poistatus.navi == 'drive' && NaviSetting.userType!='0' && !poistatus.isRegistPoi){
linkHtml+= '<br>';
linkHtml+= createMyRegistLink(poistatus,pos);//別メソッド切り出し d-kezuka 2009/07/13
} else if(poistatus.navi == 'drive'){
linkHtml+= '<br>';
linkHtml+= '<a href="?ctl=0310" style="color:#AAA; text-decoration:none;" onclick="countLog({type:\'v0190\',logId:\'mobileIntro1\'})">My地点登録</a>';
linkHtml+= '<img src="/pcstorage/img/icon_key_gry.gif">';
}
return linkHtml;
};
function createMyRegistLink(poistatus,pos){
var linkHtml = "";
linkHtml+= '<a href="javascript:void(0);" onclick="MyPoi.openRegistWin({';
linkHtml+= 'sbm:\'ins\',';
linkHtml+= 'lon:\'' + pos.getLongitude() + '\',';
linkHtml+= 'lat:\'' + pos.getLatitude() + '\'';
if(poistatus.name)       linkHtml+= ',name:\'' + poistatus.name + '\'';
if(poistatus.address)    linkHtml+= ',address:\'' + poistatus.address + '\'';
if(poistatus.tel)        linkHtml+= ',phone:\'' + poistatus.tel + '\'';
if(poistatus.categoryId) linkHtml+= ',LCode:\'' + poistatus.categoryId + '\'';
if(poistatus.provId)     linkHtml+= ',provId:\'' + poistatus.provId + '\'';
if(poistatus.spotId)     linkHtml+= ',spotId:\'' + poistatus.spotId + '\'';
if(poistatus.groupId)    linkHtml+= ',groupId:\'' + poistatus.groupId + '\'';
linkHtml+= '}); ntmap.closeMsg(); return false;">My地点登録</a>　';
return linkHtml;
};
function createReserveLink(poistatus){
var linkHtml = "<br>";
if(poistatus.reserveType == 'hotel'){
linkHtml += createHotelLink(poistatus);
} else if(poistatus.reserveType == 'airline'){
linkHtml += createAirlineLink(poistatus);
}
return linkHtml;
};
function createHotelLink(poistatus){
/*var linkHtml = "";
var icon = "";
if(poistatus.provId == '70001'){
icon = 'icon_rakuten.gif';
} else if (poistatus.provId == '70002'){
icon = 'icon_ecoupon.gif';
}
linkHtml+= '<a href="#" onclick="window.open(\'' + common_uri + '?ctl=9999&provId=';
linkHtml+= poistatus.provId;
linkHtml+= '&url=';
linkHtml+= poistatus.reserveUrl;
linkHtml+= '\');return false;">予約する</a>&nbsp;';
linkHtml+= "<img src=\"/pcstorage/img/" + icon + "\">";
return linkHtml;*/
}
function createAirlineLink(poistatus){
var linkHtml = "";
linkHtml += '<div style="margin:5px 0px 0px 44px;">';
for(var i = 0; i < poistatus.reserveIconList.length; i++){
linkHtml+= '<a href="#" onclick="outPutCntLog({type:\'msg\', logId:\'' + poistatus.reserveIconList[i].img + '\'});NTWindow.Control.acquireAction({process:\'reserve\', uri:\'/pcnavi/mjx/reserve.jsp\', method:\'get\', param:{SCode:\'' + poistatus.id + '\',provCode:\'' + poistatus.reserveIconList[i].prm + '\'}});" style="margin:5px;">';
linkHtml+= '<img src="/pcstorage/img/' + poistatus.reserveIconList[i].img + '">';
linkHtml+= '</a>'
}
linkHtml += "</div>";
return linkHtml;
}
function createTwLink(poistatus, pos){
var text = "";
var twUrl = "http://twitter.com/home?status=";
var twTitle = poistatus.name+"の地図 ";
var mapUrl = mapLink_url + "?back=pc&f=tw&datum=1&unit=0&lat=" + changeDms_Map(pos.getLatitude()) + "&lon=" + changeDms_Map(pos.getLongitude());
var mapUrlAdd = "";
if(poistatus.provId!=undefined && poistatus.provId!=null && poistatus.provId.length>0&&poistatus.spotId!=undefined && poistatus.spotId!=null && poistatus.spotId.length>0){
mapUrlAdd = "&spt=" + poistatus.provId +"."+ poistatus.spotId;
}else if(poistatus.id!=undefined && poistatus.id!=null && poistatus.id.length>0){
mapUrl += "&nam="+ EscapeSJIS(poistatus.name);
}
if(poistatus.advId!=undefined && poistatus.advId!=null && poistatus.advId.length>0){
if(mapUrlAdd.length>0)mapUrl+="&";
mapUrlAdd += "&advId=" + poistatus.advId;
}
var logParam = "t=tw";
logParam += pos.getLatitude()&&pos.getLatitude().length>0?"&lat="+pos.getLatitude():"";
logParam += pos.getLongitude()&&pos.getLongitude().length>0?"&lon="+pos.getLongitude():"";
logParam += poistatus.id&&poistatus.id.length>0?"&nodeId="+poistatus.id:"";
logParam += poistatus.categoryId&&poistatus.categoryId.length>0?"&LCode="+poistatus.categoryId:"";
logParam += poistatus.provId&&poistatus.provId.length>0?"&provId="+poistatus.provId:"";
logParam += poistatus.spotId&&poistatus.spotId.length>0?"&spotId="+poistatus.spotId:"";
logParam += poistatus.groupId&&poistatus.groupId.length>0?"&groupId="+poistatus.groupId:"";
logParam += poistatus.advId&&poistatus.advId.length>0?"&advId="+poistatus.advId:"";
twUrl += encodeURIComponent(twTitle+mapUrl+mapUrlAdd);
text +="&nbsp;&nbsp;<a title=\"twitterへ送る\"  href=\"javascript:void(0)\" onclick=\"outPutCntLog2(\'"+logParam+"\');openTw(\'"+twUrl+"\');\">";
text +="<img src='http://twitter-badges.s3.amazonaws.com/t_mini-a.png'></a>";
return text;
}
function openTw(twUrl){
if( realEnv_url.indexOf(location.host) < 0 ){
alert("検証環境です。Twitterへポストはしないでください。");
}
window.open(twUrl,'_blank');
}
function outPutCntLog(){
var imgObj = document.createElement("img");
imgObj.src = "http://" + location.host + "/pcstorage/cntlog/" + createLogTime() + "?ctl=map_" + arguments[0].type + "_" + arguments[0].logId;
}
function outPutCntLog2(lg){
var imgObj = document.createElement("img");
imgObj.src = "http://" + location.host + "/pcstorage/cntlog/" + createLogTime() + "?" + lg;
}
function createLogTime(){
var Dt = new Date();
var year = new String(Dt.getYear() + 1900);
var month =  Dt.getMonth()+1;
if(month<10){
month = '0' + new String(month);
} else {
month = new String(month);
}
var day =  Dt.getDate();
if(day<10){
day = '0' + new String(day);
} else {
day = new String(day);
}
var hour =  Dt.getHours();
if(hour<10){
hour = '0' + new String(hour);
} else {
hour = new String(hour);
}
var min =  Dt.getMinutes();
if(min<10){
min = '0' + new String(min);
} else {
min = new String(min);
}
var sec =  Dt.getSeconds();
if(sec<10){
sec = '0' + new String(sec);
} else {
sec = new String(sec);
}
return (year + month + day + hour + min + sec);
}
function openSpotDetail(prm){
new NTWindow.Modal({x:700, y: 500, data:{uri:'/pcnavi/mjx/spotDetail.jsp', param:prm}});
};
function openMail(lat, lon){
if(lat && lon){
location.href='mailto:?body=http://'+location.host + '/map/%3fdatum%3d1%26unit%3d0%26lat%3d%2b'+lat+'%26lon%3d%2b'+lon+'%26back%3dpc';
} else {
location.href='mailto:?body=http://'+location.host + '/map/%3fdatum%3d1%26unit%3d0%26lat%3d%2b'+ntmap.getPos().getDmsLatitude()+'%26lon%3d%2b'+ntmap.getPos().getDmsLongitude()+'%26back%3dpc';
}
};
function openPrintWindow(palette,lon,lat) {
if ($('routeSearchPanel').style.display == 'block' && $('TNPrintParam')){
var vehicleFlg = eval('$(\'vehicleFlg' + (TotalNavi.routeidx-1) + '\').value');
if(vehicleFlg == 'false'){
window.open(common_uri + "/?ctl=0361"+$('TNPrintParam').value+'&num='+(TotalNavi.routeidx-1),'print'+(TotalNavi.routeidx-1),"width=700,height=900,scrollbars=yes");
} else {
window.open(common_uri + "/?ctl=0360"+$('TNPrintParam').value+'&num='+(TotalNavi.routeidx-1),'print'+(TotalNavi.routeidx-1),"width=700,height=900,scrollbars=yes");
}
} else if ($('routeSearchPanel').style.display == 'block' && $('drivePrintParam')){
window.open(common_uri + "/?ctl=0660"+$('drivePrintParam').value,'',"width=700,height=900,scrollbars=yes,status=yes");
} else if ($('routeSearchPanel').style.display == 'block' && $('TNFreePrintParam')){
var vehicleFlg = eval('$(\'vehicleFlg' + (TotalNavi.routeidx-1) + '\').value');
if(vehicleFlg == 'false'){
window.open(common_uri + "/?ctl=0366"+$('TNFreePrintParam').value+'&num='+(TotalNavi.routeidx-1),'print'+(TotalNavi.routeidx-1),"width=700,height=900,scrollbars=yes,status=yes");
} else {
window.open(common_uri + "/?ctl=0365"+$('TNFreePrintParam').value+'&num='+(TotalNavi.routeidx-1),'print'+(TotalNavi.routeidx-1),"width=700,height=900,scrollbars=yes,status=yes");
}
}else{
var scale, around, poi, vics, mlon, mlat;
var param = "";
param += "&lon=" + ntmap.getPos().getLongitude();
param += "&lat=" + ntmap.getPos().getLatitude();
param += "&spot="+EscapeUTF8(NTPoiCurrent.name)+"&scale="+ntmap.getZoom().scale+"&zoom="+ntmap.getZoom().zoom+"&palette="+palette;
param += (NTPoiCurrent.address)?"&address="+ EscapeUTF8(NTPoiCurrent.address):"";
param += (NTPoiCurrent.tel)?"&tel="+ NTPoiCurrent.tel:"";
if(ntmap.getRouteList() && (ntmap.getRouteList()[0].method||0) == 255){
var route = ntmap.getRouteList()[0];
param += "&slon=" + route.orv.getLongitude() + "&slat=" + route.orv.getLatitude();
param += "&elon=" + route.dnv.getLongitude() + "&elat=" + route.dnv.getLatitude();
if(route.tollroad != null && (route.tollroad == 8 || route.tollroad == 16 || route.tollroad == 32)){
param += "&Tollroad=" + route.tollroad;
}else{
param += "&Tollroad=" + 0;
}
}
param += (NTPoiCurrent.provId)?"&provId="+NTPoiCurrent.provId:"";
param += (NTPoiCurrent.spotId)?"&spotId="+NTPoiCurrent.spotId:"";
param += (NTPoiCurrent.advId)?"&advId="+NTPoiCurrent.advId:"";
param += (NTPoiCurrent.detailProvId)?"&detailProvId="+NTPoiCurrent.detailProvId:"";
window.open(common_uri + "/?ctl=0192"+param,"","width=700,height=900,scrollbars=yes");
return;
}
};
function openAdvPrintWindow(pId,sId,aId,dpId) {
var org_p = NTPoiCurrent.provId;
var org_s = NTPoiCurrent.spotId;
var org_a = NTPoiCurrent.advId;
var org_nm = NTPoiCurrent.name;
var org_ad = NTPoiCurrent.address;
var org_tl = NTPoiCurrent.tel;
NTPoiCurrent.provId = pId;
NTPoiCurrent.spotId = sId;
NTPoiCurrent.advId = aId;
NTPoiCurrent.detailProvId = dpId;
NTPoiCurrent.name = '';
NTPoiCurrent.address = '';
NTPoiCurrent.tel = '';
openPrintWindow('pcnavitime');
NTPoiCurrent.provId = org_p;
NTPoiCurrent.spotId = org_s;
NTPoiCurrent.advId = org_a;
NTPoiCurrent.name = org_nm;
NTPoiCurrent.address = org_ad;
NTPoiCurrent.tel = org_tl;
};
var m_maplink_form = null;
function gotoMapLink(){
m_maplink_form = document.createElement("form");
m_maplink_form.action="/pcnavi/index.jsp";
m_maplink_form.method="post";
m_maplink_form.target="_blank";
$("mainframe").appendChild(m_maplink_form);
var cha = function(b,c){
var param = document.createElement("input");
param.type = "hidden";
param.name = b;
param.value =c;
m_maplink_form.appendChild(param);
}
cha("ctl","0191");
cha("lat",ntmap.getPos().getLatitude());
cha("lon",ntmap.getPos().getLongitude());
cha("name",NTPoiCurrent.name);
m_maplink_form.submit();
};
var m_atmap_form = null;
function gotoMyPoiAtMap(lon, lat, poistatus){
if(!m_atmap_form){
m_atmap_form = document.createElement("form");
m_atmap_form.action="/pcnavi/index.jsp";
m_atmap_form.method="post";
$("mainframe").appendChild(m_atmap_form);
}
var cha = function(b,c){
var param = document.createElement("input");
param.type = "hidden";
param.name = b;
param.value =c;
m_atmap_form.appendChild(param);
}
cha("ctl","0510");
cha("lat",lat);
cha("lon",lon);
cha("name",poistatus.name);
cha("address",poistatus.address? poistatus.address:"");
cha("phone",poistatus.tel? poistatus.tel:"");
cha("SCode",poistatus.id? poistatus.id:"");
cha("LCode",poistatus.categoryId? poistatus.categoryId:"");
cha("provId",poistatus.provId? poistatus.provId:"");
cha("spotId",poistatus.spotId? poistatus.spotId:"");
cha("groupId",poistatus.groupId? poistatus.groupId:"");
cha("sbm","ins");
m_atmap_form.submit();
};
function createPoiSample(poistatus){
var image = new NTImage("/pcstorage/img/map/poiPoi.png", 25,38);
var shadow = new NTImage("/pcstorage/img/map/poiShadow.png", 40,30);
var icon = new NTIcon(ntmap.getPos(),image,"",shadow);
if(poistatus.address || poistatus.tel || poistatus.note){
icon.addEvent("click",function(){
createAdvMsgSample(poistatus, icon.getPos());
});
createAdvMsgSample(poistatus, icon.getPos());
}
ntmap.addIcon(icon);
};
function createAdvMsgSample(poistatus,pos){
var div = document.createElement("div");
var text = "";
if(poistatus.catchCopy) text+= '<p style="border-bottom:1px dashed #CCCCCC;padding: 2px; font-size: 80%; margin-bottom: 2px; font-weight:bold; color: #666666;">' + poistatus.catchCopy + '</p>';
text+= '<div style="float: left; width: 200px; ">';
text+= poistatus.name + '<br>';
if(poistatus.address) text += poistatus.address + '<br>';
if(poistatus.tel)     text += "TEL:" + poistatus.tel + '<br>';
if(poistatus.note)    text += poistatus.note + '<br>';
if(poistatus.provId && poistatus.spotId && poistatus.advId){
text+= '<a href="javascript:;" onclick="new NTWindow.Modal(';
text+= '{x:800, y: 640, data:{';
text+= 'uri:\'advdetail.jsp\',';
text+= 'param:\'provId='+poistatus.provId + '&spotId='+ poistatus.spotId + '&advId='+ poistatus.advId +'\'';
text+= '}}); return false;">詳細情報</a><br>';
}
if(poistatus.navi){
text+= '<a href="#">乗物徒歩+車ルート</a>';
}
text+= '</div>';
if(poistatus.img) text+= '<div style="float: right;"><img src="' + poistatus.img + '" width="100" alt="' + poistatus.name + '"></div>';
text+= '<div class="clear"><div></div></div>';
div.innerHTML = text;
ntmap.openMsg(pos, {max:{x:350,y:300}, content:div});
};
var mapResizer = {
isResized: false,
moveRange: 200,
sizer: null,
resize: function(range){
if(range && !this.isResized ){
this.moveRange = range;
}
if(!this.sizer)this.sizer = new NTAgis.MarginResizer($("mainmap"), {interval:-1});
if(!this.isMoved){
ntmap.moveMapPlate(-this.moveRange/2);
this.sizer.setOption({speed:3,
startx:s("mainmap","width"),
starty:s("mainmap","height"),
startMgnL: s("mainmap","marginLeft"),
endx: s("mainmap","width") - this.moveRange ,
endy: s("mainmap","height"),
endMgnL: s("mainmap","marginLeft") + this.moveRange,
func:ntmap.reload.bind(ntmap)});
this.sizer.run();
this.isMoved = true;
}
else {
ntmap.moveMapPlate(this.moveRange/2);
this.sizer.setOption({speed:3,
startx:s("mainmap","width"),
starty:s("mainmap","height"),
startMgnL: s("mainmap","marginLeft"),
endx: s("mainmap","width") + this.moveRange ,
endy: s("mainmap","height"),
endMgnL: s("mainmap","marginLeft") - this.moveRange,
func:ntmap.reload.bind(ntmap)});
this.sizer.run();
this.isMoved = false;
}
}
};
var greater = function(value, minimum) {
return value > minimum ? value : minimum;
};
var MapAdjuster = {
getClientWidth:function() {
if (document.documentElement && document.documentElement.clientWidth) {
return document.documentElement.clientWidth;
}
else if (document.body.clientWidth) {
return document.body.clientWidth;
}
else if (window.innerWidth) {
return window.innerWidth;
}
return 0;
},
getClientHeight:function() {
if (isOpera || isSafari) {
return window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
return document.documentElement.clientHeight;
}
else if (document.body.clientHeight) {
return document.body.clientHeight;
}
else if (window.innerHeight) {
return window.innerHeight;
}
}
return 0;
},
resizable:true,
initialized:false,
doResize:function() {
var top = 0;
for (var elm = $("mainmap"); elm; elm = elm.offsetParent) {
top += elm.offsetTop;
}
var baseHeight = 30;
var height = this.getClientHeight() - top - 12;
if (isIe) {
height -= 15;
}
if (isSafari && !this.initialized) {
height += 50;
}
$("mainmap").style.height = greater(height - baseHeight,1) + "px";
var width = this.getClientWidth()- 15;
for (var ele=$("mainmap"); ele; ele=ele.offsetParent) {
width -= ele.offsetLeft;
}
if (isIe) {
width -= 5;
}
if (isSafari && !this.initialized) {
width -= 25;
}
$("mainmap").style.width = greater(width > $("map-frame").offsetWidth ? $("map-frame").offsetWidth - 8: width, 1) + "px";
SubMapInnerFrame.moveCenter();
NTWindow.Control.adjust({height:height - baseHeight});
this.initialized = true;
this.resizable = true;
},
/**
* resizeイベント
*/
resize:function() {
if (this.resizable) {
this.resizable = false;
var a = this;
setTimeout((function() {
a.doResize();
ntmap.reload();
adjustActionWinTrigger();
}),500);
}
},
/**
* 画面サイズに合わせる。
* 地図のリロードはしない
*/
adjust:function() {
this.doResize();
}
};
function chgMyRegistDisp(){
if( $('myTrigger_OFF').style.display == 'none'){
mapOverLayClose();
$('myTrigger_ON').style.display = 'none';
$('myTrigger_OFF').style.display = 'block';
NTWindow.Control.acquireSimpleAction({name:'myRegist', uri:'/pcnavi/mjx/listSelector.jsp', param:arguments[0]});
NTWindow.Control.openSimpleAction({name:'myRegist', height:$('mainmap').offsetHeight});
} else{
$('myTrigger_OFF').style.display = 'none';
$('myTrigger_ON').style.display = 'block';
NTWindow.Control.closeSimpleAction({name:'myRegist', height:$('mainmap').offsetHeight});
}
}
function closeMyRegistDisp(){
if( $('myTrigger_OFF')!= undefined && $('myTrigger_OFF')!= null && $('myTrigger_ON') != undefined && $('myTrigger_ON') != null && $('myTrigger_OFF').style.display == 'block' ){
$('myTrigger_OFF').style.display = 'none';
$('myTrigger_ON').style.display = 'block';
NTWindow.Control.closeSimpleAction({name:'myRegist', height:$('mainmap').offsetHeight});
}
}
function onSearch(){
if(document.map_head.keyword.value==""){
alert('検索文字を入力してください。');
document.map_head.keyword.focus();
return false;
} else {
NTWindow.Control.getActionWindow().srchKwd = document.map_head.keyword.value;
NTWindow.Control.acquireAction({process:'kwdSearch', uri:'/pcnavi/mjx/nd060403.jsp', method:'get'});
}
}
function onMapContext(a,b,c) {
if (c === ntmap) {
var div = document.createElement("div");
var stl = div.style;
stl.borderTop = '1px solid #CCCCCC';
stl.borderLeft = '1px solid #CCCCCC';
stl.width = "100px";
stl.zIndex = 1000;
stl.cursor = 'pointer';
NTEvent.add(div, "blur", function(){
ntmap.closeContext();
});
var directionTo = createMenu("ここへ行く");
var directionFrom= createMenu("ここを出発");
var addLdmk= createMenu("経由地に指定");
var around = createMenu("周辺を検索");
var sendMail = createMenu("ケータイに送る");
var registPoi = createMenu("My地点登録");
NTEvent.add(directionTo,"click",function(){
ntmap.closeContext();
var param = "lon=" + a.getLongitude() + "&lat=" + a.getLatitude();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){setNaviPoiFromContext(res, 'dnv', a)}});
});
NTEvent.add(directionFrom,"click",function(){
ntmap.closeContext();
var param = "lon=" + a.getLongitude() + "&lat=" + a.getLatitude();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){setNaviPoiFromContext(res, 'orv', a)}});
});
NTEvent.add(addLdmk,"click",function(){
ntmap.closeContext();
var param = "lon=" + a.getLongitude() + "&lat=" + a.getLatitude();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){setNaviPoiFromContext(res, 'ldmk', a)}});
});
NTEvent.add(around,"click",function(){
ntmap.closeContext();
NTPoiCurrent.reset();
mapMove(a, true);
NTWindow.Control.acquireAction({process:'around', uri:'/pcnavi/mjx/around.jsp', method:'get'});
});
NTEvent.add(sendMail,"click",function(){
ntmap.closeContext();
openMail(a.getDmsLatitude(), a.getDmsLongitude());
});
NTEvent.add(registPoi,"click",function(){
ntmap.closeContext();
var param = "lon=" + a.getLongitude() + "&lat=" + a.getLatitude();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){registPoiFromContext(res, a)}});
});
NTEvent.add(div,"contextmenu",function(e){
CancelBubble(e);
return false;
});
div.appendChild(directionTo);
div.appendChild(directionFrom);
div.appendChild(addLdmk);
div.appendChild(around);
if(NTPoiCurrent.navi == 'totalnavi' || NaviSetting.userType=='drive'){
div.appendChild(registPoi);
} else {
div.appendChild(sendMail);
}
ntmap.openContext(div,getContextPos(b,100,103));
}
};
function registPoiFromContext(res, pos){
var poiVal;
eval("poiVal=" + res.responseText);
MyPoi.openRegistWin({name:poiVal.name, lon:pos.getLongitude(), lat:pos.getLatitude()});
}
function setNaviPoiFromContext(res, type, pos){
var poiVal;
eval("poiVal=" + res.responseText);
poistatus = new NTPoiStatus({navi:NTPoiCurrent.navi});
poistatus.name = poiVal.name + ' 付近';
param = '';
var image = null;
var iconGroup = 'navi_' + type;
if(type == 'orv'){
param = {orv:PoiCommon.getVertex(poistatus, pos) , orvAdd:PoiCommon.getAdditional(poistatus)};
} else if(type == 'dnv'){
param = {dnv:PoiCommon.getVertex(poistatus, pos) , dnvAdd:PoiCommon.getAdditional(poistatus)};
} else if(type == 'ldmk'){
iconGroup += Math.random(50000);
param = {ldmk:PoiCommon.getVertex(poistatus, pos) , ldmkAdd:PoiCommon.getAdditional(poistatus)};
}
setNaviPoi(param)
}
function setNaviPoi(addPrm){
var param = {};
if(NaviSetting.exeName && NaviSetting.exeName[0]){
param.orv = NaviSetting.exeLon[0]+"."+NaviSetting.exeLat[0]+"."+NaviSetting.exeCode[0]+"."+NaviSetting.exeName[0].replace(/<wbr>|<WBR>/g,'');
param.orvAdd = NaviSetting.exeAddress[0]+"."+NaviSetting.exeTel[0]+"."+NaviSetting.exeCatcode[0]+"."+NaviSetting.exeMapid[0]+"."+NaviSetting.exeSpotid[0]+".."+NaviSetting.exeGroupid[0]+"."+NaviSetting.exeAdvid[0];
}
if(NaviSetting.exeName && NaviSetting.exeName[1]){
param.dnv = NaviSetting.exeLon[1]+"."+NaviSetting.exeLat[1]+"."+NaviSetting.exeCode[1]+"."+NaviSetting.exeName[1].replace(/<wbr>|<WBR>/g,'');
param.dnvAdd = NaviSetting.exeAddress[1]+"."+NaviSetting.exeTel[1]+"."+NaviSetting.exeCatcode[1]+"."+NaviSetting.exeMapid[1]+"."+NaviSetting.exeSpotid[1]+".."+NaviSetting.exeGroupid[1]+"."+NaviSetting.exeAdvid[1];
}
for(var i = 2; i < NaviSetting.getThrNo(); i++){
eval(
'param.ldmk' + (i-1) + '=\'' + NaviSetting.exeLon[i]+"."+NaviSetting.exeLat[i]+"."+NaviSetting.exeCode[i]+"."+NaviSetting.exeName[i].replace(/<wbr>|<WBR>/g,'') + '\''
);
eval(
'param.ldmkAdd' + (i-1) + '=\'' + NaviSetting.exeAddress[i]+"."+NaviSetting.exeTel[i]+"."+NaviSetting.exeCatcode[i]+"."+NaviSetting.exeMapid[i]+"."+NaviSetting.exeSpotid[i]+".."+NaviSetting.exeGroupid[i]+"."+NaviSetting.exeAdvid[i] + '\''
);
}
var process = NTPoiCurrent.navi;
if(addPrm.orv){
param.orv = addPrm.orv;
param.orvAdd = addPrm.orvAdd;
if ( NaviSetting.naviType == '3' ){
process = 'totalnavi_f';
}
} else if(addPrm.dnv){
param.dnv = addPrm.dnv;
param.dnvAdd = addPrm.dnvAdd;
} else if(addPrm.ldmk){
if(NaviSetting.getThrNo()-2 < NaviSetting.throughMax){
eval(
'param.ldmk' + (NaviSetting.getThrNo()-1) + '=\'' + addPrm.ldmk + '\''
);
eval(
'param.ldmkAdd' + (NaviSetting.getThrNo()-1) + '=\'' + addPrm.ldmkAdd + '\''
);
} else {
alert('設定できる経由地は最大' + NaviSetting.throughMax + '個までです');
return false;
}
}
NTWindow.Control.acquireAction({
process:process,
uri:'/pcnavi/mjx/totalnaviCondition1.jsp',
method:'post',
isReload:true,
param:param
});
return true;
}
function getContextPos(a,w,h) {
var x=a.x + 2;
var y=a.y + 2;
if (x + w > $('mainmap').offsetWidth) {
x-=w+4;
}
if (y + h > $('mainmap').offsetHeight) {
y-=h+4;
}
return {top:y, left:x};
};
function createMenu(msg) {
var div = document.createElement("div");
var txt = document.createTextNode(msg);
div.appendChild(txt);
setMenuStyle(div);
return div;
};
function setMenuStyle(a) {
var stl = a.style;
stl.fontSize='10pt';
stl.backgroundColor='#FFFFFF';
stl.padding = '2px 2px 2px 2px';
stl.width = '100%';
stl.borderBottom = '1px solid #CCCCCC';
stl.borderRight = '1px solid #CCCCCC';
NTEvent.add(a,"mouseover",function(){
var stl = a.style;
stl.backgroundColor='#C3D3FF';
});
NTEvent.add(a,"mouseout",function(){
var stl = a.style;
stl.backgroundColor='#FFFFFF';
});
};
function CancelBubble(e){
if(NTUserAgent.type==1){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
e.cancelBubble=true;
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
}
}
function onIconClick(poiPrm, pos){
NTPoiCurrent = new NTPoiStatus({navi:NTPoiCurrent.navi});
NTPoiCurrent.set(poiPrm);
createMsg(NTPoiCurrent, pos);
mapMove(pos);
}
function addSubMap(lat, lon, u){
var subMapButton = document.createElement("img");
subMapButton.setAttribute("id", "subMapButton");
subMapButton.src = '/pcstorage/img/map/minimap_close2.gif';
NTEvent.add(subMapButton, "click", function(){
onSubMapBarClick();
});
$('mainmap').appendChild(subMapButton);
var subArea = document.createElement("div");
subArea.setAttribute("id", "subarea");
$('mainmap').appendChild(subArea);
var subMap = document.createElement("div");
subMap.setAttribute("id", "submap");
subMap.innerHTML= lat + ',' + lon;
subArea.appendChild(subMap);
submap = new NTMap(
"submap",
{
mouse:2,
image:'/pcstorage/img/map/item1.2.png',
url: u,
load:'auto',
copyrightInfo:{
text:' ',
right:2,
bottom:2,
id:'cpsub'
}
}
);
submap.setZoom(3,2);
submap.setPalette("pcnavitime");
submap.addParam("AntiAlias","1");
submap.addParam("MapColor","c256");
submap.addBackground(new NTImage("/pcstorage/img/map/map_bg.gif",100,100));
SubMapInnerFrame.initialize(subMap);
}
function onSubMapBarClick(){
if($('subarea').style.display == 'none'){
$('subarea').style.display = 'block';
$('subMapButton').src = '/pcstorage/img/map/minimap_close2.gif';
onMapZoom(ntmap.getZoom(), ntmap);
SubMapInnerFrame.moveCenter();
} else {
$('subarea').style.display = 'none';
$('subMapButton').src = '/pcstorage/img/map/minimap_open2.gif';
}
}
function mapMove(pos, nmUpdateFlg){
mapOverLayClose();
if(ntmap.getPos().getLongitude() != pos.getLongitude() || ntmap.getPos().getLatitude() != pos.getLatitude()){
ntmap.moveTo(pos);
submap.moveTo(pos);
} else {
ntmap.reload();
submap.reload();
}
var url = "http://" + location.host + "/map/?datum=1&unit=0&lat=%2b" + pos.getDmsLatitude() + "&lon=%2b" + pos.getDmsLongitude();
if(document.maplink != undefined && document.maplink != null){
document.maplink.mapurl.value = url ;
}
var param = "lon=" + pos.getLongitude() + "&lat=" + pos.getLatitude();
new Ajax.Request( "/pcnavi/mjx/xy.jsp" ,{method:"get", parameters: param, onComplete: function(res){setPos(res, nmUpdateFlg)}});
NTPoiCurrent.longitude = pos.getLongitude();
NTPoiCurrent.latitude = pos.getLatitude();
}
ListSelectorCtl = {
select: function(listId){
for(var i = 0; i < $('listContents').childNodes.length; i++){
if($('listContents').childNodes[i].style){
$('listContents').childNodes[i].style.display = 'none';
}
}
for(var i = 0; i < $('listSelector').childNodes.length; i++){
if($('listSelector').childNodes[i].style){
$('listSelector').childNodes[i].style.backgroundColor = '#FFF';
}
}
$('listContent_'+listId).style.display = 'block';
$('listSelectorElem_'+listId).style.backgroundColor = '#FFE295';
}
}
SubMapInnerFrame = {
movingContainer: null,
icon: null,
showStatus: true,
initialize: function(subMap){
for(var i = 0; i < subMap.childNodes.length; i++){
if(subMap.childNodes[i].id == "MovingContainer"){
this.movingContainer = subMap.childNodes[i];
break;
}
}
},
moveCenter: function(){
if(submap == null || !this.showStatus) return;
if(this.icon){
this.movingContainer.appendChild(this.icon.getCather());
submap.clearIcon("innerFrame");
}
var frame = new NTImage("/pcstorage/img/map/sm_frame_bg.png", ($("mainmap").offsetWidth / 10), ($("mainmap").offsetHeight / 10));
this.icon = new NTIcon(ntmap.getPos(),frame,"",null);
this.icon.setGroup("innerFrame");
this.icon.setIconPosition(4);
submap.addIcon(this.icon);
submap.buildIcon();
this.movingContainer.removeChild(this.icon.getCather());
},
show: function(){
this.showStatus = true;
this.moveCenter();
},
hide: function(){
if(this.icon){
this.movingContainer.appendChild(this.icon.getCather());
submap.clearIcon("innerFrame");
}
this.showStatus = false;
}
}
function clearInitText(){
if( arguments[0].className == "initExampleText" ){
arguments[0].value = "";
arguments[0].className = "exampleText";
}
}
function mapOverLayClose(){
closeMyRegistDisp();
DocControl.closeArea();
}
function openRouteMail(frm) {
window.open('', 'winRouteMail',"width=500,height=600,scrollbars=yes");
frm.submit();
}
function searchAroundRankSpot(){
var param = {lon:ntmap.getPos().getLongitude(), lat:ntmap.getPos().getLatitude()};
new Ajax.Request( "/pcnavi/mjx/aroundRankList2.jsp" ,{method:"get", parameters: param, onComplete: onSearchAroundRankSpot});
}
function onSearchAroundRankSpot(res){
$('aroundRankList').innerHTML = res.responseText;
Around.rankCenterPoi = Object.clone(NTPoiCurrent);
}
var openFId = "";
function openMyFolder(){
if( $(arguments[0].target) != null && $(arguments[0].target) != undefined){
dispNoneAllMyFolder();
$(arguments[0].folderDis).style.display = 'block';
$(arguments[0].folderEne).style.display = 'none';
$(arguments[0].dispArea).style.display = 'block';
$(arguments[0].target).style.display = 'block';
$(arguments[0].rtnTrigger).style.display = 'block';
openFId = arguments[0].folderId;
}
}
function dispNoneAllMyFolder(){
var elms = document.getElementsByClassName("MyFolderArea");
for(var n = 0; n < elms.length; n++){
elms[n].style.display = 'none';
}
}
function dispAllMyFolder(){
$(arguments[0].targetP + openFId).style.display  ='none';
$(arguments[0].folderDisP + openFId).style.display = 'none';
$(arguments[0].folderEneP + openFId).style.display = 'block';
elms = document.getElementsByClassName("MyFolderArea");
for(var n = 0; n < elms.length; n++){
elms[n].style.display = 'block';
}
$(arguments[0].rtnTrigger).style.display = 'none';
}
function getWalkRouteWithMultiLonLat(){
var func = (function(param){
return function(res){
var pos = eval('('+res.responseText+')');
var r = (param.r||255);
var g = (param.g||0);
var b = (param.g||0);
var method = (param.g||255);
Around.walkRoute(pos.dep.lat,pos.dep.lon,pos.arv.lat,pos.arv.lon,r,g,b,method);
};
})(arguments[0]);
var orv = String(arguments[0].olon) + "." +  String(arguments[0].olat) + ".." +  String((arguments[0].oName||''));
var dnv = String(arguments[0].dlon) + "." +  String(arguments[0].dlat) + ".." +  String((arguments[0].dName||''));
var orvAdd = String("..." +  String((arguments[0].oMapId||''))+"." + String((arguments[0].oSpotId||'')) + "...");
var dnvAdd = String("..." +  String((arguments[0].dMapId||''))+"." + String((arguments[0].dSpotId||'')) + "...");
new Ajax.Request("/pcnavi/mjx/getWalkLonLat.jsp", {method:"get", parameters: {'orv':orv,'dnv':dnv,'orvAdd':orvAdd,'dnvAdd':dnvAdd}, onComplete: func});
}
var changeDms_Map = function(milsec){
var m= milsec<0?"-":"";
milsec = Math.abs(milsec);
var degree=(milsec-milsec%3600000)/3600000;
var minute=((milsec-degree*3600000)-(milsec-degree*3600000)%60000)/60000;
var second=((milsec-degree*3600000-minute*60000)-((milsec-degree*3600000-minute*60000)%1000))/1000;
var milliSecond=milsec-degree*3600000-minute*60000-second*1000;
return m + degree + "." + minute + "." + second + "." + milliSecond;
};
MyPoi = {
myW:null,
popup:null,
isAtMap:false,
setPOI:function(lon,lat,cd,nm,ad,tl,ct,mp,sp,gr,tf,id,aid,detail,note){
PoiCommon.setPOI(lon,lat,cd,nm,ad,tl,ct,mp,sp,gr,tf,aid);
ntmap.clearIcon("my");
var poistatus = new NTPoiStatus({navi:NTPoiCurrent.navi});
poistatus.id = cd;
poistatus.name = nm;
poistatus.address = ad;
poistatus.tel = tl;
poistatus.categoryId = ct;
poistatus.provId = mp;
poistatus.spotId = sp;
poistatus.groupId = gr;
poistatus.vics = tf;
poistatus.advId = aid;
poistatus.hasDetail = detail;
poistatus.isRegistPoi = true;
poistatus.note = note;
var icon = new NTIcon(new NTLatLng(lat,lon), new NTImage("/pcstorage/img/map/poiMy.png",25,30),"",new NTImage("/pcstorage/img/map/poiMyShadow.png",40,30));
icon.setGroup("my");
icon.addEvent("click",function(){
onIconClick(poistatus, new NTLatLng(lat,lon));
});
ntmap.addIcon(icon);
createMsg(poistatus, new NTLatLng(lat,lon));
searchAroundRankSpot();
},
openDetail:function(sp,pr,gr){
if(!sp) sp="";
if(!pr) pr="";
if(!gr) gr="";
var param = {spotId:sp,provId:pr,groupId:gr};
new NTWindow.Modal({x:780, y: 500, data:{uri:"/pcnavi/mjx/detail.jsp",param:param}});
},
openDetailAdv:function(pr,sp,ad){
if(!sp) sp="";
if(!pr) pr="";
if(!ad) ad="";
var param = {spotId:sp,provId:pr,advId:ad};
new NTWindow.Modal({x:800, y: 640, data:{uri:"/pcnavi/mjx/detail.jsp",param:param}});
},
openRegistWin:function(prm){
if(this.isAtMap){
poistatus = new NTPoiStatus({navi:NTPoiCurrent.navi});
poistatus.name = prm.name;
poistatus.address = prm.address;
poistatus.tel = prm.phone;
poistatus.categoryId = prm.LCode;
poistatus.provId = prm.provId;
poistatus.spotId = prm.spotId;
poistatus.groupId = prm.groupId;
gotoMyPoiAtMap(prm.lon, prm.lat, poistatus);
} else {
if(NTWindow.Control.modal){
NTWindow.Control.modal.onCloseFunc = function(){
MyPoi.openRegistWin(prm);
};
NTWindow.Control.modal.close();
} else {
var param;
if(prm){
param = prm;
} else {
param = {sbm:"ins",name:NTPoiCurrent.name,address:NTPoiCurrent.address,phone:NTPoiCurrent.tel,lon:ntmap.getPos().getLongitude(),lat:ntmap.getPos().getLatitude(),advId:NTPoiCurrent.advId};
}
this.myW = new NTWindow.Modal({x:500,y:400,data:{uri:"/pcnavi/mjx/mypoi2.jsp",param:param}});
}
}
},
callDelete:function(nm, prm){
if(confirm('選択したMy地点を削除してよろしいですか？')){
var param = new Object();
param.sbm = "del";
param.oldname = nm;
param.name = NTPoiCurrent.name;
param.address = NTPoiCurrent.address;
param.phone = NTPoiCurrent.tel;
param.lon = ntmap.getPos().getLongitude();
param.lat = ntmap.getPos().getLatitude();
param.SCode = NTPoiCurrent.id;
param.LCode = NTPoiCurrent.categoryId;
param.provId = NTPoiCurrent.provId;
param.spotId = NTPoiCurrent.spotId;
param.groupId = NTPoiCurrent.groupId;
param.advId = NTPoiCurrent.advId;
if(prm.name)param.name = prm.name;
if(prm.address)param.address = prm.address;
if(prm.phone)param.phone = prm.phone;
if(prm.lon)param.lon = prm.lon;
if(prm.lat)param.lat = prm.lat;
if(prm.SCode)param.SCode = prm.SCode;
if(prm.LCode)param.LCode = prm.LCode;
if(prm.provId)param.provId = prm.provId;
if(prm.spotId)param.spotId = prm.spotId;
if(prm.groupId)param.groupId = prm.groupId;
if(prm.advId)param.advId = prm.advId;
this.myW.get({uri:"/pcnavi/mjx/mypoi3.jsp",param:param});
}
},
callRegist:function(prm){
if(!this.checkRegist()){
return false;
}
var param = new Object();
param.sbm = "ins";
param.name = document.mp_frmPoint.name.value;
param.address = document.mp_frmPoint.address.value;
param.phone = document.mp_frmPoint.phone.value;
param.lon = ntmap.getPos().getLongitude();
param.lat = ntmap.getPos().getLatitude();
param.SCode = NTPoiCurrent.id;
param.LCode = NTPoiCurrent.categoryId;
param.provId = NTPoiCurrent.provId;
param.spotId = NTPoiCurrent.spotId;
param.groupId = NTPoiCurrent.groupId;
param.advId = NTPoiCurrent.advId;
if (prm) {
if(prm.lon)param.lon = prm.lon;
if(prm.lat)param.lat = prm.lat;
if(prm.SCode)param.SCode = prm.SCode;
if(prm.LCode)param.LCode = prm.LCode;
if(prm.provId)param.provId = prm.provId;
if(prm.spotId)param.spotId = prm.spotId;
if(prm.groupId)param.groupId = prm.groupId;
if(prm.advId)param.advId = prm.advId;
}
if(document.mp_frmPoint.icon){
for(i=0; i<document.mp_frmPoint.icon.length; i++ ){
if(document.mp_frmPoint.icon[i].checked){
param.icon = document.mp_frmPoint.icon[i].value;
}
}
}
if(document.mp_frmPoint.note){
param.note = document.mp_frmPoint.note.value;
}
if(document.mp_frmPoint.folderId){
param.folderId = document.mp_frmPoint.folderId.value;
}
this.myW.get({uri:"/pcnavi/mjx/mypoi3.jsp",param:param});
},
checkRegist:function(){
var name = document.mp_frmPoint.name.value;
while(name.indexOf("　") >= 0){
name = name.replace("　","");
}
while(name.indexOf(" ") >= 0){
name = name.replace(" ", "");
}
if(name==''){
window.alert('名前を入力してください。');
return false;
}
if(isNaN(document.mp_frmPoint.phone.value)){
window.alert('半角数字で入力してください。');
return false;
}
return true;
},
closeWin:function(){
this.myW.close();
}
};
MyRoute = {
callResult:function(rowid,myflg,crsname){
new NTWindow.List({title:"トータルナビ",width:400,height:400,x:100,y:60,data:{param:{rowid:rowid,myroute:myflg,crsname:crsname},uri:"/pcnavi/mjx/totalnavi1.jsp"}});
},
callRegist:function(obj){
if(this.checkRegist()){
var form = document.forms['mr_frmCourse'];
var myW = NTWindow.Control.self(obj);
myW.get({uri:"/pcnavi/mjx/myroute3.jsp",form:form});
}
},
callDelete:function(obj,onm,oid,name){
if(confirm('選択したMyルートを削除してよろしいですか？')){
var myW = NTWindow.Control.self(obj);
var param = "oldname="+onm+"&oldid="+oid+"&sbm=del"+"&name="+name;
myW.get({uri:"/pcnavi/mjx/myroute3.jsp",param:param});
}
},
closeWindow:function(obj){
var myW = NTWindow.Control.self(obj);
myW.close();
},
checkRegist:function(){
var name = document.mr_frmCourse.newname.value;
while(name.indexOf("　") >= 0){
name = name.replace("　","");
}
while(name.indexOf(" ") >= 0){
name = name.replace(" ", "");
}
if(name==''){
window.alert('名称を入力してください。');
return false;
}
return true;
}
};
PoiCommon = {
setPOI:function(lon,lat,cd,nm,ad,tl,ct,mp,sp,gr,tr,aid,votable){
mapMove(new NTLatLng(lat,lon));
NTPoiCurrent.reset();
if(cd) NTPoiCurrent.id = cd;
if(nm) NTPoiCurrent.name = nm;
if(ad) NTPoiCurrent.address = ad;
if(tl) NTPoiCurrent.tel = tl;
if(ct) NTPoiCurrent.categoryId = ct;
if(mp) NTPoiCurrent.provId = mp;
if(sp) NTPoiCurrent.spotId = sp;
if(gr) NTPoiCurrent.groupId = gr;
if(tr) {NTPoiCurrent.vics = tr}else{NTPoiCurrent.vics = "-1"};
if(aid)NTPoiCurrent.advId = aid;
if(votable != null && votable) NTPoiCurrent
},
setAdvInfo:function(ad,cc,im,nv){
if(ad){
NTPoiCurrent.advId = ad;
if(nv)NTPoiCurrent.navi = nv;
if(cc)NTPoiCurrent.catchCopy = cc;
if(im)NTPoiCurrent.img = im;
}
},
getVertex:function(poistatus, pos){
if(poistatus && pos){
return (pos.getLongitude()||"")+'.'+(pos.getLatitude()||"")+'.'+(poistatus.id||"")+'.'+(poistatus.name||"");
} else {
return (ntmap.getPos().getLongitude()||"")+'.'+(ntmap.getPos().getLatitude()||"")+'.'+(NTPoiCurrent.id||"")+'.'+(NTPoiCurrent.name||"");
}
},
getAdditional:function(poistatus){
if(poistatus){
return (poistatus.address||"")+'.'+(poistatus.tel||"")+'.'+(poistatus.categoryId||"")+'.'+(poistatus.provId||"")+'.'+(poistatus.spotId||"")+'.'+(poistatus.vics||"-1")+'.'+(poistatus.groupId||"")+'.'+(poistatus.advId||"");
} else {
return (NTPoiCurrent.address||"")+'.'+(NTPoiCurrent.tel||"")+'.'+(NTPoiCurrent.categoryId||"")+'.'+(NTPoiCurrent.provId||"")+'.'+(NTPoiCurrent.spotId||"")+'.'+(NTPoiCurrent.vics||"-1")+'.'+(NTPoiCurrent.groupId||"")+'.'+(NTPoiCurrent.advId||"");
}
}
};
TotalNavi = {
myW: null,
setRoute: new Array(),
info: false,
driveinfo: false,
chgRoute: new Array(),
reDrawRoute: new Array(),
callMyRoute:function(){
new Ajax.Request("mjx/myroute1.jsp",{method:"get",parameters:"", onComplete:this.expandMyRoute.bind(this)});
},
expandMyRoute: function(a){
$('mn_tab3form').innerHTML = NTWindow.Control.analyzeHTML(a.responseText);
},
checkSet:function(){
if(document.mn_navi['orv'].value==''){
alert('出発地をセットしてください');
return false;
}else if(document.mn_navi['dnv'].value==''){
alert('目的地をセットしてください');
return false;
}
var arLon = new Array();
var arLat = new Array();
var idx = 0;
arLon[0] = document.mn_navi['orv'].value.split('.')[0];
arLat[0] = document.mn_navi['orv'].value.split('.')[1];
idx++;
for(i=0;i<8;i++){
if(document.mn_navi['ldmk'+(i+1)]){
if(document.mn_navi['ldmk'+(i+1)].value != ''){
arLon[idx] = document.mn_navi['ldmk'+(i+1)].value.split('.')[0];
arLat[idx] = document.mn_navi['ldmk'+(i+1)].value.split('.')[1];
idx++;
}
}
}
arLon[idx] = document.mn_navi['dnv'].value.split('.')[0];
arLat[idx] = document.mn_navi['dnv'].value.split('.')[1];
for(i=0;i<idx;i++){
if(arLon[i]==arLon[i+1]&&arLat[i]==arLat[i+1]){
if(idx==1){
alert('出発地・目的地に同一地点がセットされています');
}else{
alert('出発地・経由地・目的地に同一地点がセットされています');
}
return false;
}
}
return true;
},
/* 2007/10 地図改善によりコメントアウト
set:function(target){
document.mn_navi[target].value = PoiCommon.getVertex();
var add = target;
var img = target;
if(target.indexOf('ldmk') != -1){
var index = target.substr(4);
add = 'ldmkAdd' + index;
img = 'ldmk';
}else{
add = target+'Add';
}
document.mn_navi[add].value = PoiCommon.getAdditional();
$('mn_' + target).innerHTML = NTPoiCurrent.name;
if(target.indexOf('ldmk') != -1){
var msg = '<a href="javascript:;" onclick="TotalNavi.clear(\'' + target + '\'); return false;"><img src="/pcstorage/img/map/navi/btn_crear.gif" witdh="50" height="20"></a>';
$('mn_'+target+'setting').innerHTML = msg;
}
},
*/
/* 2007/10 地図改善によりコメントアウト
clear:function(target){
document.mn_navi[target].value = "";
var add = target;
var img = target;
var status = "";
if(target.indexOf('ldmk') != -1){
var index = target.substr(4);
add = 'ldmkAdd' + index;
img = 'ldmk';
status = "未設定(任意)"
}else{
add = target+'Add';
status = "未設定(必須)"
}
document.mn_navi[add].value = "";
$('mn_' + target).innerHTML = status;
var msg = '<a href="javascript:;" onclick="TotalNavi.set(\'' + target + '\'); return false;"><img src="/pcstorage/img/map/navi/btn_' + img + '.gif" witdh="50" height="20"></a>';
$('mn_'+target+'setting').innerHTML = msg;
},
*/
checkTransCtl:function(){
if(!document.mn_navi.transwalk.checked){
document.mn_navi.taxi.checked = false;
}
return;
},
checkBoxCtl:function(){
if(document.mn_navi.taxi.checked){
document.mn_navi.transwalk.checked = true;
}
if(document.mn_navi.vics.checked){
document.mn_navi.car.checked = true;
}
if(document.mn_navi.tollroad.checked){
document.mn_navi.car.checked = true;
}
return;
},
checkCarCtl:function() {
if(!document.mn_navi.car.checked)  {
document.mn_navi.vics.checked = false;
document.mn_navi.tollroad.checked = false;
return;
}
},
removeToll:function() {
document.mn_navi.tollroadLdmk.checked = false;
document.mn_navi.vicsLdmk.checked = false;
return;
},
checkCarLdmk:function() {
if(document.mn_navi.tollroadLdmk.checked || document.mn_navi.vicsLdmk.checked){
document.mn_navi.way[1].checked = true;
return;
}
},
removeToll2:function() {
document.mn_navi.tollroad.checked = false;
return;
},
checkCar:function() {
document.mn_navi.way[1].checked = true;
return;
},
checkTransWalk:function() {
document.mn_navi.way[0].checked = true;
return;
},
/* 2007/10 地図改善によりコメントアウト
availableWalkonly:function(){
var distance = 0;
var lonArray = new Array();
var latArray = new Array();
if(document.mn_navi['orv'].value.split('.').length > 2){
var lon = document.mn_navi['orv'].value.split('.')[0];
var lat = document.mn_navi['orv'].value.split('.')[1];
lonArray.push(lon);
latArray.push(lat);
}
if(document.mn_navi['dnv'].value.split('.').length > 2){
var lon = document.mn_navi['dnv'].value.split('.')[0];
var lat = document.mn_navi['dnv'].value.split('.')[1];
lonArray.push(lon);
latArray.push(lat);
}
var ldmkIdx = this.getLdmkIdx();
if(lonArray.length + ldmkIdx.length < 2){
return true;
}
for(i = 0;i < ldmkIdx.length;i++){
if(document.mn_navi['ldmk'+ldmkIdx[i]].value.split('.').length > 2){
var lon = document.mn_navi['ldmk'+ldmkIdx[i]].value.split('.')[0];
var lat = document.mn_navi['ldmk'+ldmkIdx[i]].value.split('.')[1];
}
lonArray.push(lon);
latArray.push(lat);
}
for(i = 0;i < lonArray.length;i++){
var distanceTmp = 0;
for(j = 0; j < lonArray.length; j++){
if(i==j){
continue;
}
distanceTmp = this.getDistance(lonArray[i],latArray[i],lonArray[j],latArray[j]);
if(distance < distanceTmp){
distance = distanceTmp;
}
}
}
if(distance > 10000){
return false;
}else{
return true;
}
},
*/
availableWalkonly:function(){
var distance = 0;
var lonArray = new Array();
var latArray = new Array();
if(NaviSetting.exeLon[0] != "" && NaviSetting.exeLat[0] != "" ){
lonArray.push(NaviSetting.exeLon[0]);
latArray.push(NaviSetting.exeLat[0]);
}
if(NaviSetting.exeLon[1] != "" && NaviSetting.exeLat[1] != "" ){
lonArray.push(NaviSetting.exeLon[1]);
latArray.push(NaviSetting.exeLat[1]);
}
var ldmkIdx = this.getLdmkIdx();
if(lonArray.length + ldmkIdx.length < 2){
return true;
}
for(i = 2;i < ldmkIdx.length + 2;i++){
if(NaviSetting.exeLon[i] != "" && NaviSetting.exeLat[i] != "" ){
lonArray.push(NaviSetting.exeLon[i]);
latArray.push(NaviSetting.exeLat[i]);
}
}
for(i = 0;i < lonArray.length;i++){
var distanceTmp = 0;
for(j = 0; j < lonArray.length; j++){
if(i==j){
continue;
}
distanceTmp = this.getDistance(lonArray[i],latArray[i],lonArray[j],latArray[j]);
if(distance < distanceTmp){
distance = distanceTmp;
}
}
}
if(distance > 10000){
return false;
}else{
return true;
}
},
getDistance:function(lon1,lat1,lon2,lat2){
var ix = lon1-lon2;
var iy = lat1-lat2;
var distance = (Math.sqrt(ix*ix+iy*iy)*5.0/2.0)/100.0+0.5;
return Math.round(distance);
},
/*　200807 maprenewal hoshi
tabExchange: function(nm){
if(!$("mn_tab1"))return;
$("mn_tab1").src = "/pcstorage/img/map/navi/tab/tab1off.gif";
$("mn_tab2").src = "/pcstorage/img/map/navi/tab/tab2off.gif";
$("mn_tab3").src = "/pcstorage/img/map/navi/tab/tab3off.gif";
$("mn_tab4").src = "/pcstorage/img/map/navi/tab/tab4off.gif";
$("mn_"+nm).src = "/pcstorage/img/map/navi/tab/"+nm+"on.gif";
$("naviInpArea_Point").style.display="none";
$("naviInpArea_Condition").style.display="none";
$("mn_tab3form").style.display="none";
$("mn_tab4form").style.display="none";
$("mn_"+nm+"form").style.display = "block";
if(nm=='tab2'){
this.chengeMethodDisp();
}
},
*/
/* 2007/10 地図改善によりコメントアウト
getLdmkIdx: function(){
var ary = new Array();
for(i=1;i<=8;i++){
if(document.mn_navi['ldmk'+i]){
if(document.mn_navi['ldmk'+i].value != ''){
ary.push(i);
}
}
}
return ary;
},
*/
getLdmkIdx: function(){
var ary = new Array();
for(var i=2;i<=(NaviSetting.exeLon.length - 1);i++){
if ( NaviSetting.exeLon[i] != "" || NaviSetting.exeLat[i] != "" || NaviSetting.exeCode[i] != "" || NaviSetting.exeName[i] != "" ) {
ary.push(i - 1);
}
}
return ary;
},
deleteNoneParam:function(){
if(this.info){
if(this.getLdmkIdx().length == 0){//経由地なし
document.mn_navi.way[0].value = null;
document.mn_navi.way[1].value = null;
document.mn_navi.way[2].value = null;
document.mn_navi.tollroadLdmk.value = null;
document.mn_navi.vicsLdmk.value = null;
document.mn_navi.transwalk.value = 1;
document.mn_navi.taxi.value = 1;
document.mn_navi.car.value = 1;
document.mn_navi.walk.value = 1;
document.mn_navi.vics.value = 1;
document.mn_navi.tollroad.value = 1;
}else{//あり
document.mn_navi.transwalk.value = null;
document.mn_navi.taxi.value = null;
document.mn_navi.car.value = null;
document.mn_navi.walk.value = null;
document.mn_navi.way[0].value = 0;
document.mn_navi.way[1].value = 1;
document.mn_navi.way[2].value = 2;
if(document.mn_navi.vicsLdmk.checked){
document.mn_navi.vics.value = '1';
document.mn_navi.vicsLdmk.value = '1';
}else{
document.mn_navi.vics.value = '0';
document.mn_navi.vicsLdmk.value = '0';
}
if(document.mn_navi.tollroadLdmk.checked){
document.mn_navi.tollroad.value = '1';
document.mn_navi.tollroadLdmk.value = '1';
}else{
document.mn_navi.tollroad.value = '0';
document.mn_navi.tollroadLdmk.value = '0';
}
}
}
if(!this.availableWalkonly()){
if(this.info){
document.mn_navi.walk.value = '0';
}
}
},
chengeMethodDisp: function(){
var ldmkIdx = this.getLdmkIdx();
if(arguments[0] && arguments[0].clearInd && arguments[0].clearInd >= 2){
var n = new Number(arguments[0].clearInd) - 1;
while(ldmkIdx.length >= n){
eval('document.mn_navi.stay' + n + '.value = document.mn_navi.stay' + (n + 1) + '.value');
eval('document.mn_navi.fromhour' + n + '.value = document.mn_navi.fromhour' + (n + 1) + '.value');
eval('document.mn_navi.frommin' + n + '.value = document.mn_navi.frommin' + (n + 1) + '.value');
eval('document.mn_navi.tohour' + n + '.value = document.mn_navi.tohour' + (n + 1) + '.value');
eval('document.mn_navi.tomin' + n + '.value = document.mn_navi.tomin' + (n + 1) + '.value');
$('kei_Name' + n).innerHTML = $('kei_Name' + (n + 1)).innerHTML;
n++;
}
eval('document.mn_navi.stay' + n + '.value = \'30\'');
eval('document.mn_navi.fromhour' + n + '.value = \'\'');
eval('document.mn_navi.frommin' + n + '.value = \'\'');
eval('document.mn_navi.tohour' + n + '.value = \'\'');
eval('document.mn_navi.tomin' + n + '.value = \'\'');
$('kei_Name' + n).innerHTML = '';
while( n <=  NaviSetting.throughMax){
$('ldmkstay'+ n).style.display='none';
n++;
}
} else {
var ldmkCnt = 0;
while(ldmkCnt < ldmkIdx.length){
$('ldmkstay'+ ldmkIdx[ldmkCnt]).style.display='block';
$('kei_Name' + ldmkIdx[ldmkCnt]).innerHTML = NaviSetting.exeName[ldmkCnt+2];
ldmkCnt++;
}
while( ldmkCnt <  NaviSetting.throughMax){
$('ldmkstay'+ (new Number(ldmkCnt) + 1)).style.display='none';
$('kei_Name' + (new Number(ldmkCnt) + 1)).innerHTML = '';
ldmkCnt++;
}
}
if(!this.info && this.driveinfo){
if(ldmkIdx.length>0){//経由地あり
$('mn_method-normal').style.display='block';
}else{
$('mn_method-normal').style.display='block';
for(i = 1; i <= 8; i++){
$('ldmkstay'+i).style.display='none';
}
}
}else{
if(ldmkIdx.length>0){//経由地あり
if(document.mn_navi.basis.options[3]) document.mn_navi.basis.removeChild(document.mn_navi.basis.options[3]);
if(document.mn_navi.basis.options[2]) document.mn_navi.basis.removeChild(document.mn_navi.basis.options[2]);
if(this.info){
$('mn_method-normal').style.display='none';
$('inside10000').style.display='none';
$('outside10000').style.display='none';
$('mn_method-ldmk').style.display='block';
$('inside10000-ldmk').style.display='block';
$('outside10000-ldmk').style.display='block';
if(this.availableWalkonly()){
$('outside10000-ldmk').style.display='none';
}else{
$('inside10000-ldmk').style.display='none';
if(!document.mn_navi.transwalk.checked && !document.mn_navi.car.checked && document.mn_navi.walk.checked){
document.mn_navi.way[2].checked = false;
document.mn_navi.way[0].checked = true;
if(document.mn_navi.transwalk)document.mn_navi.transwalk.checked = false;
if(document.mn_navi.car)document.mn_navi.car.checked = false;
if(document.mn_navi.walk)document.mn_navi.walk.checked = false;
}
}
if( document.mn_navi.transwalk.checked ||
document.mn_navi.car.checked ||
document.mn_navi.walk.checked){
document.mn_navi.way[0].checked = false;
document.mn_navi.way[1].checked = false;
document.mn_navi.tollroadLdmk.checked = false;
document.mn_navi.vicsLdmk.checked = false;
document.mn_navi.way[2].checked = false;
if (document.mn_navi.transwalk.checked){
document.mn_navi.way[0].checked = true;
} else if (document.mn_navi.car.checked){
document.mn_navi.way[1].checked = true;
document.mn_navi.tollroadLdmk.checked = document.mn_navi.tollroad.checked;
document.mn_navi.vicsLdmk.checked = document.mn_navi.vics.checked;
} else if (document.mn_navi.walk.checked){
document.mn_navi.way[2].checked = true;
} else {
document.mn_navi.way[0].checked = true;
}
document.mn_navi.transwalk.checked = false;
document.mn_navi.taxi.checked = false;
document.mn_navi.car.checked = false;
document.mn_navi.tollroad.checked = false;
document.mn_navi.vics.checked = false;
document.mn_navi.walk.checked = false;
}
}else{
if(this.availableWalkonly()){
$('inside10000').style.display='block';
$('outside10000').style.display='none';
}else{
$('inside10000').style.display='none';
$('outside10000').style.display='block';
if(document.mn_navi.way[2].checked){
document.mn_navi.way[2].checked = false;
document.mn_navi.way[0].checked = true;
}
/*
document.mn_navi.way[2].checked = false;
if(!document.mn_navi.way[0].checked && !document.mn_navi.way[1].checked){
document.mn_navi.way[0].checked = true;
}
*/
}
}
}else{//経由地なし
if(!document.mn_navi.basis.options[2]){
var opt = document.createElement("option");
opt.value = '4';
opt.text = '始発';
document.mn_navi.basis.appendChild(opt);
}
if(!document.mn_navi.basis.options[3]){
var opt = document.createElement("option");
opt.value = '3';
opt.text = '終電';
document.mn_navi.basis.appendChild(opt);
}
for(i = 1; i <= 8; i++){
$('ldmkstay'+i).style.display='none';
}
if(this.info){
$('mn_method-normal').style.display='block';
$('inside10000').style.display='block';
$('outside10000').style.display='block';
$('mn_method-ldmk').style.display='none';
$('inside10000-ldmk').style.display='none';
$('outside10000-ldmk').style.display='none';
if(this.availableWalkonly()){
$('outside10000').style.display='none';
}else{
$('inside10000').style.display='none';
document.mn_navi.walk.checked = false;
if(!document.mn_navi.transwalk.checked && !document.mn_navi.car.checked){
document.mn_navi.transwalk.checked = true;
/*
document.mn_navi.car.checked = true;
document.mn_navi.vics.checked = true;
document.mn_navi.tollroad.checked = true;
*/
}
}
var n = 0;
while(n < document.mn_navi.way.length){
if(document.mn_navi.way[n].checked == true){
break;
}
n++;
}
if( n != document.mn_navi.way.length ){
document.mn_navi.transwalk.checked = document.mn_navi.way[0].checked;
document.mn_navi.taxi.checked = false;
document.mn_navi.car.checked = document.mn_navi.way[1].checked;
document.mn_navi.tollroad.checked = document.mn_navi.tollroadLdmk.checked;
document.mn_navi.vics.checked = document.mn_navi.vicsLdmk.checked;
document.mn_navi.walk.checked = document.mn_navi.way[2].checked;
document.mn_navi.way[0].checked = false;
document.mn_navi.way[1].checked = false;
document.mn_navi.tollroadLdmk.checked = false;
document.mn_navi.vicsLdmk.checked = false;
document.mn_navi.way[2].checked = false;
}
}else{
if(this.availableWalkonly()){
$('inside10000').style.display='block';
$('outside10000').style.display='none';
}else{
$('inside10000').style.display='none';
$('outside10000').style.display='block';
if(document.mn_navi.way[2].checked){
document.mn_navi.way[2].checked = false;
document.mn_navi.way[0].checked = true;
}
/*					document.mn_navi.way[2].checked = false;
if(!document.mn_navi.way[0].checked && !document.mn_navi.way[1].checked){
document.mn_navi.way[0].checked = true;
}
*/
}
}
}
}
},
tabExchangeF: function(nm){
$("mn_tab1").src = "/pcstorage/img/map/navi/tab/tab1off.gif";
$("mn_tab2").src = "/pcstorage/img/map/navi/tab/tab2off.gif";
$("mn_tab4").src = "/pcstorage/img/map/navi/tab/tab4off.gif";
$("mn_"+nm).src = "/pcstorage/img/map/navi/tab/"+nm+"on.gif";
$("naviInpArea_Point").style.display="none";
$("naviInpArea_Condition").style.display="none";
$("mn_tab4form").style.display="none";
$("mn_"+nm+"form").style.display = "block";
if(nm=='tab2'){
if(this.availableWalkonly()){
$('inside10000').style.display='block';
$('outside10000').style.display='none';
}else{
$('inside10000').style.display='none';
$('outside10000').style.display='block';
if(document.mn_navi.way[2].checked){
document.mn_navi.way[0].checked = true;
document.mn_navi.way[1].checked = false;
document.mn_navi.way[2].checked = false;
}
}
}
},
deleteNoneParamF:function(){
if(!this.availableWalkonly()){
if(document.mn_navi.way[2].checked){
document.mn_navi.way[0].checked = true;
document.mn_navi.way[1].checked = false;
document.mn_navi.way[2].checked = false;
}
}
},
routeidx:1,
sctidx:1,
tagClick:function(i){
if(this.routeidx==i){return;}
this.reset();
document.getElementById("mn_result_tab" + i).src='/pcstorage/img/map/navi/tab_route'+i+"on.gif";
this.setRoute[i](false);
this.routeidx = i;
this.sctidx = 1;
},
reset:function(){
var index = 1;
while(document.getElementById("route" + index) != null){
document.getElementById("mn_result_tab" + index).src='/pcstorage/img/map/navi/tab_route'+index+"off.gif";
document.getElementById("route" + index).style.display='none';
index++;
}
},
callMyRouteRg:function(sbm,name){
new NTWindow.Modal({x:500,y:380,data:{uri:"/pcnavi/mjx/myroute2.jsp",param:{sbm:sbm,name:name}}});
},
setCondition:function(){
var aForm = document.mn_navi;
var rForm = document.retry;
for(var i = 0 ; rForm != null && i < rForm.length ; i++ ){
var rElm = rForm.elements[i];
if(aForm[rElm.name] != null){
var aElm = aForm[rElm.name];
if(aElm.type == 'hidden'){
aElm.value = rElm.value;
}else if(aElm.type == 'select-one'){
for(var el = 0; el < aElm.length ; el++){
if(aElm[el].value == rElm.value){
aElm.selectedIndex = el;
break;
}
}
}else if(aElm.type == 'checkbox'){
if(rElm.value == '1'){
aElm.checked = true;
}else{
aElm.checked = false;
}
}else{
for(var el = 0; el < aElm.length ; el++){
if(aElm[el].value == rElm.value){
aElm[el].checked = true;
}else{
aElm[el].checked = false;
}
}
}
}
}
}
}
Traffic = {
lon:0,
lat:0,
reload:false,
move:function(lon,lat,poi,reload){
this.lon = lon;
this.lat = lat;
this.reload = reload != null && reload;
NTPoiCurrent.reset();
poi.name = (poi.name||"").split("→")[0];
NTPoiCurrent.name = poi.name;
new Ajax.Request("http://" + location.host + "/pcnavi/mjx/scaleCheck.jsp" ,{method:"get", parameters:"lon="+lon+"&lat="+lat, onComplete: this.complete.bind(this)});
},
complete:function(originalRequest){
var res = eval("(" + originalRequest.responseText + ")");
ntmap.setProperty('autoload',false);
ntmap.setZoom(res.scale,3);
ntmap.setProperty('autoload',true);
NTPoiCurrent.reset();
isMainLoaded = false;
isSubLoaded = false;
mapMove(new NTLatLng(this.lat,this.lon), true);
if (this.reload) {
var trafficTimer = setInterval(function(){
if (isMainLoaded && isSubLoaded) {
if (ntmap.getPos().getLatitude() == submap.getPos().getLatitude() &&
ntmap.getPos().getLongitude() == submap.getPos().getLongitude()) {
clearInterval(trafficTimer);
}
isMainLoaded = false;
isSubLoaded = false;
submap.moveTo(ntmap.getPos());
}
},100);
}
},
viewList:function(id){
$('mv_sub1i').src = "/pcstorage/img/map/traffic/tab1off.gif";
$('mv_sub2i').src = "/pcstorage/img/map/traffic/tab2off.gif";
$('mv_sub3i').src = "/pcstorage/img/map/traffic/tab3off.gif";
$('mv_sub'+id+'i').src = "/pcstorage/img/map/traffic/tab"+id+"on.gif";
$('mv_sub1').style.display="none";
$('mv_sub2').style.display="none";
$('mv_sub3').style.display="none";
$('mv_sub'+id).style.display="block";
},
changeTitle: function(dom){
NTWindow.Control.self(dom).setTitle("道路交通情報："+dom.innerHTML);
},
reTraffic:function(dom){
if( document.traffic_form.month != undefined && document.traffic_form.month != null ){
if(!this.checkDate(document.traffic_form.month.value.substring(0.4),document.traffic_form.month.value.substring(4.6),document.traffic_form.day.value)){
alert('指定された日付が不正です');
return;
}
}
NTWindow.Control.acquireAction(dom);
},
checkDate: function(year, month, day){
var dt = new Date(year, month - 1, day);
if(dt == null || dt.getFullYear() != year || dt.getMonth() + 1 != month || dt.getDate() != day) {
return false;
}
return true;
}
};
DocControl = {
bg: null,
content: null,
currentItem: new Array(),
currentCnt: 0,
candiItem: new Array(),
presetArray: new Array(),
mode: null,
auth: '0',
lock: false,
timeOutId: null,
effectTarget: null,
effectKeepId: null,
presetProcess: false,
presetAddIDArr: null,
logDir: null,
imgColDir: null,
imgGryDir: null,
presetDir: null,
holePath: null,
stagePath: null,
upPath: null,
downPath: null,
init: function(){
this.bg = document.createElement("div");
this.bg.style.position = 'absolute';
this.imgColDir = arguments[0].imgDir + "map/doc/icon/png_2line_color/";
this.imgGryDir = arguments[0].imgDir + "map/doc/icon/png_2line_gry/";
this.presetDir = arguments[0].imgDir + "map/doc/icon/preset/";
this.holeImg = arguments[0].imgDir + "map/doc/icon/icon_hole.png";
this.stageImg = arguments[0].imgDir + "map/doc/icon/stage_37.png";
this.upImg = arguments[0].imgDir + "map/doc/icon/icon_arrow_u.png";
this.downImg = arguments[0].imgDir + "map/doc/icon/icon_arrow_d.png";
this.lockImg = arguments[0].imgDir + "map/doc/icon/icon_bigkey.png";
this.logDir = arguments[0].logDir;
this.bg.style.top = arguments[0].top - 5 + 'px';
this.bg.style.left = arguments[0].left + 'px';
this.content = arguments[0].src;
this.bg.appendChild(this.content);
this.auth = arguments[0].auth;
$('mainframe').appendChild(this.bg);
this.mode = 'Execute';
},
addCurItem: function(param){
if(!isNaN(param.id)){
this.currentItem[param.id] = this.createDocItem(param,{fldPre:'docCurrent-', cusSts:'set'});
this.currentCnt++;
}
},
addCandi: function(){
var cusSts = 'nouse';
if(!(this.currentItem[arguments[0].id] == undefined || this.currentItem[arguments[0].id] == null)){
cusSts = 'use';
}
var item = this.createDocItem(arguments[0],{fldPre:arguments[0].prefix, cusSts:cusSts});
if (item != null){
this.candiItem[arguments[0].id] = item;
}
},
createDocItem: function(param, option){
var item = null;
switch(param.id){
case '1':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 0, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'station', uri:'/pcnavi/mjx/station.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '2':
if( this.auth == '0'){
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'drive', uri:'/pcnavi/mjx/totalnaviCondition1.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
} else if (this.auth == '200' || this.auth == '300' ){
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 2, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'totalnavi', uri:'/pcnavi/mjx/totalnaviCondition1.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:(this.auth!=0)?true:false, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
} else if (this.auth == 'drive'){
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'drive', uri:'/pcnavi/mjx/totalnaviCondition1.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
}
break;
case '3':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 3, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'bus', uri:'/pcnavi/mjx/bus.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '4':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 4, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'traffic', uri:'/pcnavi/mjx/traffic.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:(this.auth==300||this.auth=='drive')?true:false, disClickFunc:function(){goAuthInfo();}, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '5':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 5, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'parking', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '6':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 6, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet', uri:'/pcnavi/mjx/gourmetlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '7':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 7, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'hotel', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '8':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 8, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'around', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '9':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 9, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:function(){openPrintWindow('postal')}, id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '10':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 10, imgRowInd: 0, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:function(){openMail();}, id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '11':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 0, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gas', uri:'/pcnavi/mjx/aroundSpotDetail.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '12':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'hospital', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '13':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 2, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'convenience', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '14':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 3, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'bank', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '15':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 4, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'supermarket', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '16':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 5, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'wifi', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '17':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 6, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'weather', uri:'/pcnavi/mjx/weather.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '18':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 7, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'leisure', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '19':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 8, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'cafe', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '20':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 9, imgRowInd: 1, image:this.imgColDir + "dc_line001v01.png", gsImage:this.imgGryDir + "dg_line001v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'pub', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '21':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 0, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'firstfood', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '22':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'ramen', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '23':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 2, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'pasta', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '24':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 3, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'organic', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '25':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 4, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'cosmetic', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '26':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 5, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'nail', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '27':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 6, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'healing', uri:'/pcnavi/mjx/around.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '28':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 7, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'foreignlang', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '29':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 8, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gym', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '30':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 9, imgRowInd: 0, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:function(){MyPoi.openRegistWin();}, id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:(this.auth==300 || this.auth==200 || this.auth=='drive')?true:false, disClickFunc:function(){goAuthInfo();}, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '31':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 0, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_france', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '32':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_italia', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '33':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 2, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_india', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '34':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 3, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_china', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '35':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 4, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_spain', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '36':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 5, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_mexico', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '37':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 6, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'gourmet_thai_viet', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '38':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 7, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'jpnoodle', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '39':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 8, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'cake', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '40':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 9, imgRowInd: 1, image:this.imgColDir + "dc_line002v01.png", gsImage:this.imgGryDir + "dg_line002v01.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'ceremony', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '41':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 0, imgRowInd: 0, image:this.imgColDir + "dc_line003v02.png", gsImage:this.imgGryDir + "dg_line003v02.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'crab', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom.bind(this), mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '42':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 1, imgRowInd: 0, image:this.imgColDir + "dc_line003v02.png", gsImage:this.imgGryDir + "dg_line003v02.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'globefish', uri:'/pcnavi/mjx/aroundlist.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
case '43':
item = new docItem($(option.fldPre + param.id), {alt:this.getAlt(param), imgClmInd: 2, imgRowInd: 0, image:this.imgColDir + "dc_line003v02.png", gsImage:this.imgGryDir + "dg_line003v02.png", click:NTWindow.Control.acquireAction.bind(NTWindow.Control, {process:'aroundRank', uri:'/pcnavi/mjx/aroundRankList.jsp', method:'get'}), id:param.id, cusSts:option.cusSts, cusClickFunc:this.clickCustom, mode:this.mode, isUse:true, holeImg:this.holeImg, stageImg:this.stageImg, upImg:this.upImg, downImg:this.downImg, lockImg:this.lockImg});
break;
default:
break;
}
return item;
},
getAlt: function(param){
var alt = null;
switch(param.id){
case '1':
alt = "最寄駅を3ヵ所ピックアップして地図上に表示します。<br>時刻表や乗換案内をすることができます。";
break;
case '2':
if( this.auth == '0' ){
alt = "車ルートを検索することができます。有料道路優先や渋滞考慮ルートの検索が可能です。<br>※有料会員専用の機能です";
} else if (this.auth == '200' || this.auth == '300' ){
alt = "さまざまな交通手段を組み合わせて、ドアtoドアの最適な<br>ルートを検索することができます。";
} else if (this.auth == 'drive' ){
alt = "車ルートを検索することができます。有料道路優先や渋滞考慮ルートの検索が可能です。";
}
break;
case '3':
alt = "最寄のバス停を地図上に表示します。時刻表や路線図を<br>確認することができます。";
break;
case '4':
if( this.auth == '0' || this.auth == '200'){
alt = "地図上で発生している渋滞を赤い線で表示します。<br>また、周辺の道路交通情報を確認することができます。<br>※有料会員専用の機能です";
} else if(this.auth == 'drive' || this.auth == '300'){
alt = "地図上で発生している渋滞を赤い線で表示します。<br>また、周辺の道路交通情報を確認することができます。<br>";
}
break;
case '5':
alt = "周辺の駐車場を地図上に表示します。<br>収容台数や料金、一部駐車場はリアルタイム満空情報を表示します。";
break;
case '6':
alt = "周辺のグルメスポットを表示します。クチコミ情報や★の数、クーポンを<br>比較しながら、地図上でお店選びができます。";
break;
case '7':
alt = "周辺のホテルを地図上に表示します。提携先リンクから、<br>料金情報や空室確認、予約をすることが可能です。";
break;
case '8':
alt = "検索したい施設・店舗を入力すると、周辺の施設を検索し、<br>地図上に表示することができます。";
break;
case '9':
alt = "表示している地図をA4用紙に印刷するのに最適な大きさで表示します。";
break;
case '10':
alt = "地図のURLをメールで送ることができます。<br>ケータイ/PC共通でご利用いただけます。";
break;
case '11':
alt = "周辺のガソリンスタンドを地図上に表示します。<br>ガソリン販売価格や洗車の価格、ブランドなどの詳細情報を<br>確認することができます。";
break;
case '12':
alt = "周辺の病院を検索します。診療科目や診察時間を確認することができます。<br>また、救急指定病院を探すことも可能です。";
break;
case '13':
alt = "周辺のコンビニエンスストアを地図上に表示します。";
break;
case '14':
alt = "周辺の銀行・信用金庫・ATMを地図上に表示します。";
break;
case '15':
alt = "周辺のスーパーを地図上に表示します。";
break;
case '16':
alt = "周辺の無線LANスポットを地図上に表示します。<br>ベンダー別に検索することができます。";
break;
case '17':
alt = "表示している地域の週間天気予報を表示します。<br>降水確率や最高/最低気温を確認することができます。";
break;
case '18':
alt = "周辺の公園やキャンプ場、動植物園、美術館、博物館<br>などを地図上に表示します。";
break;
case '19':
alt = "周辺のカフェを地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '20':
alt = "周辺の居酒屋・バー・スナックを地図上に表示します。";
break;
case '21':
alt = "周辺のファーストフード店を地図上に表示します。<br>チェーン別に検索することができます。";
break;
case '22':
alt = "周辺のラーメン店を地図上に表示することができます。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '23':
alt = "周辺のスパゲティ専門店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '24':
alt = "周辺の自然食カフェ・レストランを地図上に表示します。";
break;
case '25':
alt = "周辺のコスメ販売店やコスメ関連施設を地図上に表示します。";
break;
case '26':
alt = "周辺のネイルサロンを地図上に表示します。";
break;
case '27':
alt = "周辺のマッサージやアロマテラピー店舗を地図上に表示します。";
break;
case '28':
alt = "周辺の外国語スクールを地図上に表示します。";
break;
case '29':
alt = "周辺のスポーツジムを地図上に表示します。";
break;
case '30':
if( this.auth == '0'){
alt = "地図の中心点をMy地点に登録します。<br>※有料会員専用の機能です";
} else {
alt = "地図の中心点をMy地点に登録します。<br>";
}
break;
case '31':
alt = "周辺のフランス料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '32':
alt = "周辺のイタリア料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '33':
alt = "周辺のインド料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '34':
alt = "周辺の中華料理・飲茶料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '35':
alt = "周辺のスペイン料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '36':
alt = "周辺のメキシコ料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '37':
alt = "周辺のタイ料理・ベトナム料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '38':
alt = "周辺のうどん・そば店を地図上に表示することができます。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '39':
alt = "周辺のケーキ・洋菓子店を地図上に表示します。";
break;
case '40':
alt = "周辺の懐石料理店・割烹を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '41':
alt = "周辺のかに料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '42':
alt = "周辺のふぐ料理店を地図上に表示します。<br>一部店舗ではクチコミ情報を提供しています。";
break;
case '43':
alt = "周辺の人気スポットを地図上で表示します。";
break;
default:
alt = '';
break;
}
return alt;
},
clickCustom: function(){
if(arguments[0].getCusSts() == 'set' || arguments[0].getCusSts() == 'use'){
DocControl.setLock(true);
DocControl.effectTarget = DocControl.currentItem[arguments[0].getId()].getImageSrc();
DocControl.effectKeepId = arguments[0].getId();
DocControl.downEffect();
}else if(arguments[0].getCusSts() == 'nouse'){
if(!DocControl.isAdd()){
alert('追加できるアイコンは１０個までです。');
return;
}
DocControl.setLock(true);
var fld = document.createElement("div");
fld.className = 'doc-item';
fld.setAttribute("id", "docCurrent-" + arguments[0].getId());
$('docCurrentStage').appendChild(fld);
DocControl.addCurItem({id:arguments[0].getId()});
DocControl.effectKeepId = arguments[0].getId();
DocControl.effectTarget = DocControl.currentItem[arguments[0].getId()].getImageSrc();
DocControl.effectKeepId = arguments[0].getId();
DocControl.upEffect();
}
},
setLock: function(lock){
this.lock = lock;
},
getLock: function(){
return this.lock;
},
downEffect: function(){
DocControl.testHeight = 1;
DocControl.timeOutId = setTimeout("DocControl.downEffectExe()",10);
DocControl.currentItem[DocControl.effectKeepId].displayHole();
DocControl.currentItem[DocControl.effectKeepId].noneStage();
},
downEffectExe: function(){
DocControl.testHeight = Math.floor(DocControl.testHeight * 2.5);
DocControl.effectTarget.style.top = this.testHeight + 'px';
if( this.testHeight < 37 ){
DocControl.timeOutId = setTimeout("DocControl.downEffectExe()",10);
} else {
clearTimeout(DocControl.timeOutId);
$('docCurrentStage').removeChild(DocControl.currentItem[DocControl.effectKeepId].getSrc());
delete DocControl.currentItem[DocControl.effectKeepId];
this.currentCnt--;
DocControl.candiItem[DocControl.effectKeepId].setCusOption({cusSts:'nouse'});
if (DocControl.presetProcess){
DocControl.searchPreDownTarget();
}else {
DocControl.addCookie();
DocControl.setLock(false);
}
}
},
upEffect: function(){
DocControl.curHeight = 37;
DocControl.distance = 52;
DocControl.dif = DocControl.distance - DocControl.curHeight;
DocControl.effectTarget.style.top = DocControl.curHeight + 'px';
DocControl.testflg = true;
DocControl.currentItem[DocControl.effectKeepId].noneStage();
DocControl.currentItem[DocControl.effectKeepId].displayHole();
DocControl.timeOutId = setTimeout("DocControl.upEffectExe()", 10);
},
upEffectExe: function(){
DocControl.distance = Math.floor(DocControl.distance / 2);
DocControl.curHeight = DocControl.curHeight - DocControl.distance;
if( DocControl.distance < DocControl.dif ){
DocControl.curHeight = DocControl.curHeight - DocControl.dif;
}
if( DocControl.distance > 1 ){
DocControl.effectTarget.style.top = DocControl.curHeight  + 'px';
DocControl.timeOutId = setTimeout("DocControl.upEffectExe()",10);
} else {
DocControl.currentItem[DocControl.effectKeepId].noneHole();
DocControl.currentItem[DocControl.effectKeepId].displayStage();
clearTimeout(DocControl.timeOutId);
DocControl.effectTarget.style.top = '-20px';
DocControl.testHeight = -10;
DocControl.testflg = true;
DocControl.timeOutId = setTimeout("DocControl.shake()",10);
}
},
shake: function(){
if( DocControl.testflg ){
if( DocControl.testHeight >= -2){
clearTimeout(DocControl.timeOutId);
DocControl.effectTarget.style.top = '0px';
DocControl.candiItem[DocControl.effectKeepId].setCusOption({cusSts:'use'});
if (DocControl.presetProcess){
DocControl.searchPreUpTarget();
} else {
DocControl.addCookie();
DocControl.setLock(false);
}
} else {
DocControl.effectTarget.style.top = this.testHeight + 'px';
DocControl.testHeight = Math.floor(DocControl.testHeight / 2);
DocControl.timeOutId = setTimeout("DocControl.shake()", 10);
DocControl.testflg = false;
}
} else {
DocControl.effectTarget.style.top = '0px';
DocControl.testflg = true;
DocControl.timeOutId = setTimeout("DocControl.shake()", 10);
}
},
openArea: function(){
mapOverLayClose();
this.content.style.height='540px';
$('docOpenArea').style.display='block';
$('OpenDoc').style.display='none';
$('CloseDoc').style.display='block';
$('docExpArea').style.display='block';
this.resetDocExp();
$('docModeControl').style.display='block';
$('chgDocExecute').style.display='none';
$('chgDocCustom').style.display='block';
$('docDefArea').style.display='none';
$('docPresetArea').style.display='none';
var logElm = document.createElement('img');
logElm.src = this.logDir + '?ctl=docOpen'
},
closeArea: function(){
if ( $('docOpenArea').style.display == 'block' ){
this.mode = 'Execute';
for(var id = 1; id < this.candiItem.length; id++){
this.candiItem[id].changeMode({mode:this.mode});
}
for(var id = 1; id < this.currentItem.length; id++){
if( this.currentItem[id] != undefined && this.currentItem[id] != null ) {
this.currentItem[id].changeMode({mode:this.mode});
}
}
this.bg.style.backgroundColor = '';
this.content.style.backgroundColor='';
this.content.style.height='0px';
this.bg.style.zindex='1';
this.content.style.zindex='2';
$('docOpenArea').style.display='none';
$('OpenDoc').style.display='block';
$('CloseDoc').style.display='none';
$('docExpArea').style.display='none';
$('docModeControl').style.display='none';
}
},
changeMode: function(){
if(this.mode == 'Execute'){
this.mode = 'Custom';
$('chgDocExecute').style.display='block';
$('chgDocCustom').style.display='none';
$('docDefArea').style.display='block';
$('docPresetArea').style.display='block';
var logElm = document.createElement('img');
logElm.src = this.logDir + '?ctl=docCustom'
} else if(this.mode == 'Custom'){
this.mode = 'Execute';
$('chgDocExecute').style.display='none';
$('chgDocCustom').style.display='block';
$('docDefArea').style.display='none';
$('docPresetArea').style.display='none';
var logElm = document.createElement('img');
logElm.src = this.logDir + '?ctl=docExecute'
}
for(var id = 1; id < this.candiItem.length; id++){
this.candiItem[id].changeMode({mode:this.mode});
}
for(var id = 1; id < this.currentItem.length; id++){
if( this.currentItem[id] != undefined && this.currentItem[id] != null ) {
this.currentItem[id].changeMode({mode:this.mode});
}
}
this.resetDocExp();
},
getMode: function(){
return this.mode;
},
createCandiDocs: function(){
var targets = document.getElementsByClassName(arguments[0].classname);
for(var n = 0; n < targets.length; n++){
if(targets[n].id != undefined && targets[n].id != null && targets[n].id.substring(0, arguments[0].prefix.length) == arguments[0].prefix){
var id = targets[n].id.substring(arguments[0].prefix.length);
this.addCandi({id:id, prefix:arguments[0].prefix});
}
}
},
createPreset: function(){
var businessAlt = 'ビジネスシーンに役立つアイコンセットです。';
var moveAlt = '引越しのときに調べたい周辺施設のアイコンセットです。';
var wldFoodAlt = '各国料理を検索できるアイコンセットです。';
var womanAlt = '女性に人気のスポットを検索できるアイコンセットです。';
var settaiAlt = '接待や宴会の予定を立てるときに便利なアイコンセットです。';
var noodleAlt = '各種麺類のお店を探すのに便利なアイコンセットです。';
var driveAlt = 'ドライブの計画を立てるのに便利なアイコンセットです。';
this.presetArray['business'] = new presetItem($('docPre-business'), {alt:businessAlt, image:this.presetDir + "biz.png", click:DocControl.setPreset.bind(DocControl), idArray:['1','3','16','19','7','5','13','14','8']});
this.presetArray['move'] = new presetItem($('docPre-move'), {alt:moveAlt, image:this.presetDir + "move.png", click:DocControl.setPreset.bind(DocControl), idArray:['1','3','13','15','12','6','14']});
this.presetArray['wldFood'] = new presetItem($('docPre-wldFood'), {alt:wldFoodAlt, image:this.presetDir + "wldFood.png", click:DocControl.setPreset.bind(DocControl), idArray:['31','32','33','34','35','36','37','28','1','3' ]});
this.presetArray['women'] = new presetItem($('docPre-women'), {alt:womanAlt, image:this.presetDir + "women.png", click:DocControl.setPreset.bind(DocControl), idArray:['6','24','19','39','27','25','26','29']});
this.presetArray['settai'] = new presetItem($('docPre-settai'), {alt:settaiAlt, image:this.presetDir + "settai.png", click:DocControl.setPreset.bind(DocControl), idArray:['20','6','42','41','40','14','22']});
this.presetArray['noodle'] = new presetItem($('docPre-noodle'), {alt:noodleAlt, image:this.presetDir + "noodle.png", click:DocControl.setPreset.bind(DocControl), idArray:['22','38','23','34','37','1','3','5']});
this.presetArray['drive'] = new presetItem($('docPre-drive'), {alt:driveAlt, image:this.presetDir + "drive.png", click:DocControl.setPreset.bind(DocControl), idArray:['11','5','4','13','8','7','17']});
},
setPreset: function(){
DocControl.setLock(true);
DocControl.presetProcess = true;
DocControl.presetAddIDArr = new Array();
for(var n = 0; n < arguments[0].getIdArray().length; n++){
DocControl.presetAddIDArr[n] = arguments[0].getIdArray()[n];
}
DocControl.searchPreDownTarget();
},
setPreset: function(){
DocControl.setLock(true);
DocControl.presetProcess = true;
DocControl.presetAddIDArr = new Array();
for(var n = 0; n < arguments[0].getIdArray().length; n++){
DocControl.presetAddIDArr[n] = arguments[0].getIdArray()[n];
}
DocControl.searchPreDownTarget();
},
setDefault: function(){
if(!DocControl.getLock()){
DocControl.setLock(true);
DocControl.presetProcess = true;
DocControl.presetAddIDArr = new Array('1','2','3','4','5','6','7','8','9');
DocControl.searchPreDownTarget();
}
},
searchPreDownTarget: function(){
var flg = false;
for( var id = 1; id < DocControl.currentItem.length; id++ ){
if( DocControl.currentItem[id] != undefined && DocControl.currentItem[id] != null ) {
DocControl.effectTarget = DocControl.currentItem[id].getImageSrc();
DocControl.effectKeepId = id;
DocControl.downEffect();
flg = true;
break;
}
}
if( !flg ){
DocControl.currentItem = new Array();
DocControl.searchPreUpTarget();
}
},
searchPreUpTarget: function(){
if( DocControl.presetAddIDArr.length > 0 ){
var fld = document.createElement("div");
fld.className = 'doc-item';
fld.setAttribute("id", "docCurrent-" + DocControl.presetAddIDArr[0]);
$('docCurrentStage').appendChild(fld);
DocControl.addCurItem({id:DocControl.presetAddIDArr[0]});
DocControl.effectTarget = DocControl.currentItem[DocControl.presetAddIDArr[0]].getImageSrc();
DocControl.effectKeepId = DocControl.presetAddIDArr.shift();
DocControl.upEffect();
} else {
DocControl.addCookie();
DocControl.presetProcess = false;
DocControl.setLock(false);
}
},
addCookie: function(){
var docItem = $('docCurrentStage').firstChild;
var value = '';
while(docItem != undefined && docItem != null){
if( docItem.className != undefined && docItem.className != null && docItem.className == 'doc-item' ){
value += docItem.id.substring('docCurrent-'.length) + '\;';
}
docItem = docItem.nextSibling;
}
var exp=new Date();
exp.setTime(exp.getTime()+1000*60*60*24*365);
document.cookie = 'NTJDocCustom_cur_v1=' + escape(value) + '; expires=' + exp.toGMTString();
},
setDocExp: function(){
if( this.mode == 'Execute' ){
$('docExpMoverExe').style.display = 'block';
$('docExpMoverExe').innerHTML = arguments[0].getAlt();
$('docExpMoutExe').style.display = 'none';
$('docExpMoverCustom').style.display = 'none';
$('docExpMoutCustom').style.display = 'none';
} else if( this.mode == 'Custom' ){
$('docExpMoverCustom').style.display = 'block';
$('docExpMoverCustom').innerHTML = arguments[0].getAlt();
$('docExpMoverExe').style.display = 'none';
$('docExpMoutExe').style.display = 'none';
$('docExpMoutCustom').style.display = 'none';
}
},
resetDocExp: function(){
if( this.mode == 'Execute' ){
$('docExpMoutExe').style.display = 'block';
$('docExpMoverExe').innerHTML = '';
$('docExpMoverExe').style.display = 'none';
$('docExpMoverCustom').style.display = 'none';
$('docExpMoutCustom').style.display = 'none';
} else if( this.mode == 'Custom' ){
$('docExpMoutCustom').style.display = 'block';
$('docExpMoverCustom').innerHTML = '';
$('docExpMoutExe').style.display = 'none';
$('docExpMoverCustom').style.display = 'none';
$('docExpMoverExe').style.display = 'none';
}
},
isAdd: function(){
return this.currentCnt>=10?false:true;
},
createImage: function(u,w,h){
var r = document.createElement("img");
if(u!=null && u!="")r.src = u;
if(w!=null) r.width = w;
if(h!=null)r.height = h;
return r;
},
loadPng: function(url,b){
var a;
if(NTUserAgent.type==1 && NTUserAgent.version<7){
a = (b && b.src)?b.src:document.createElement("div");
var s = a.style;
s.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="+url+")";
if(b && b.width) s.width = b.width+"px";
if(b && b.height) s.height = b.height+"px";
if(b && b.classNm) a.className = b.classNm;
if(b && b.id) a.id = b.id;
}else{
a = this.createImage(url,(b.width||null),(b.height||null));
if(b && b.classNm) a.className = b.classNm;
if(b && b.id) a.id = b.id;
if(b && b.src){
b.src.appendChild(a);
b.src.style.width = "auto";
b.src.style.height = "auto";
if(NTUserAgent.type==4){
b.src.style.display = "inline";
}
}
}
return a;
},
createImageIcon: function(u,w,h){
var r = document.createElement("img");
if(u!=null && u!="")r.src = u;
return r;
},
loadPngIcon: function(url,b){
var a = this.createImageIcon(url,(b.width||null),(b.height||null));
if(isIe && !(typeof document.body.style.maxHeight != "undefined")){
a.className = 'docImg_Ie6';
} else {
if(b && b.classNm) a.className = b.classNm;
}
a.style.left = b.imgClmInd * 37 * -1 + 'px';
a.style.top = b.imgRowInd * 37 * -1 + 'px';
var d = document.createElement("div");
d.className = 'docImgClip';
d.appendChild(a);
return d;
}
}
var cProvId = "";
function changeLinkage(target, url, code){
var reqUrl = '../index.jsp';
if(url) reqUrl = url;
cProvId = target.value;
new Ajax.Request(reqUrl ,{method:"get", parameters:"ctl=020001&code="+cProvId, onComplete: function(res){completeLinkage(res); selectAirport(code)}});
}
function completeLinkage(response){
eval("var res = " + response.responseText);
createOption("d_place",res);
createOption("a_place",res);
}
function createOption(id,json){
var f = document.getElementById(id);
if(f.childNodes!=null){
var c = f.childNodes.length;
for(var i=c-1; i>=0; i--){
f.removeChild(f.childNodes[i]);
}
}
if(navigator.userAgent.toLowerCase().indexOf("msie")){
for(var i=0; i<json.length; i++){
f.options[i] = new Option(json[i].name,json[i].code,"");
}
}else{
for(var i=0; i<json.length; i++){
var o = document.createElement('option');
o.value = json[i].code;
o.text = json[i].name;
f.appendChild(o);
}
}
}
function checkRailroad(form){
if(form.orvStationName.value == "" && form.dnvStationName.value == ""){
alert("出発駅,到着駅を入力して下さい。");
return false;
}
if(form.orvStationName.value == ""){
alert("出発駅を入力して下さい。");
form.orvStationName.focus();
return false;
}
if(form.dnvStationName.value == ""){
alert("到着駅を入力して下さい。");
form.dnvStationName.focus();
return false;
}
}
function checkTicket(form){
var isProv = false;
if(form.provCode.length!=null){
for(var i=0; i<form.provCode.length; i++){
if(form.provCode[i].checked){
isProv = true;
}
}
}else{
isProv=true;
}
if(!isProv){
alert("航空会社を選択して下さい。");
return false;
}
if(form.d_place.value==""){
alert("出発を選択して下さい。");
form.d_place.focus();
return false;
}
if(form.a_place.value==""){
alert("到着を選択して下さい。");
form.a_place.focus();
return false;
}
if(form.d_place.value==form.a_place.value){
alert("出発と到着は別の空港を選択して下さい。");
form.a_place.focus();
return false;
}
}
function checkDiagram(form){
if(form.keyword.value==""){
alert("駅名を入力して下さい。");
form.keyword.focus();
return false;
}
}
function checkGourmet(form){
if(form.name.value==""){
alert("駅名を入力して下さい。");
form.name.focus();
return false;
}
}
function checkHotel(form){
if(form.name.value==""){
alert("駅名を入力して下さい。");
form.name.focus();
return false;
}
}
function setTicketOnload(){
window.onload = ticketOnload;
}
var ticketOnload = function(){
if(document.fticket.provCode.length == null){
var rdo = document.fticket.provCode;
rdo.checked = true;
changeLinkage(rdo);
}
}
function selectAirport(code){
if(!code) return;
for(var i = 0; i < $('d_place').childNodes.length; i++){
if($('d_place').childNodes[i].value == code){
$('d_place').childNodes[i].selected = true;
}
}
for(var i = 0; i < $('a_place').childNodes.length; i++){
if($('a_place').childNodes[i].value == code){
$('a_place').childNodes[i].selected = true;
}
}
}

