var MARKER_TYPE = '';
var map;
var MARKER = new Array();
var nMARKER = new Array();
var MKP = new Array();
var RK;
var mLat = 0;
var mLng = 0;
var mapStat = 0;
var count = 0;
var mCount = 0;
var MapWidth = 0;
var MapHeight = 0;
waitimg = new Image();
waitimg.src="imgs/wait.gif";
waitimg2 = new Image();
waitimg2.src="imgs/wait2.gif";
AB1 = new Image();
AB1.src="imgs/AddButton1.png";
AB2 = new Image();
AB2.src="imgs/AddButton2.png";
AB3 = new Image();
AB3.src="imgs/AddButton3.png";
AB4 = new Image();
AB4.src="imgs/AddButton4.png";
window.addEvent('domready', function() { StartMT(); });
function apost(divs,vals) {
rndv=Math.random();
$(divs).set('html','
');
$('wimg'+rndv).set('src',waitimg2.src);
nww = new Request.HTML({
async: false,
method: 'post',
data: vals,
url: '../inc/javaset.php',
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
$(divs).set('html',responseHTML);
}
}).send();
}
function bpost(divs,vals) {
rndv=Math.random();
$(divs).set('html','
');
$('wimg'+rndv).set('src',waitimg2.src);
nww = new Request.HTML({
async: true,
method: 'post',
data: vals,
url: '../inc/javaset.php',
onSuccess: function(responseTree, responseElements, responseHTML, responseJavaScript) {
$(divs).set('html',responseHTML);
}
}).send();
}
function xpost(vals) {
nww = new Request.HTML({
method: 'post',
data: vals,
url: '../inc/javaset.php'
}).send();
}
function StartMT() {
window.addEvent('domready', function() {
var size = $('SpbNuBody').getSize();
MapWidth = size.x - 300;
MapHeight = size.y - 8;
$('YMapsID').setStyle('width', MapWidth + 'px');
$('YMapsID').setStyle('height', MapHeight + 'px');
});
map = new YMaps.Map(document.getElementById("YMapsID"));
var StartPoint = new YMaps.GeoPoint(30.31605044379832,59.93898858875901);
map.setCenter(StartPoint,15);
map.addControl(new YMaps.TypeControl());
map.addControl(new YMaps.ToolBar());
map.addControl(new YMaps.Zoom());
map.addControl(new YMaps.ScaleLine());
map.addControl(new YMaps.SearchControl());
// ============ Маркеры ==============================================================================
for (i=1; i<=317; i++) { //>
MARKER[i] = new YMaps.Style();
MARKER[i].iconStyle = new YMaps.IconStyle();
MARKER[i].iconStyle.href = "/imgs/markers/mark" + i + ".png";
MARKER[i].iconStyle.size = new YMaps.Point(16, 16);
MARKER[i].iconStyle.offset = new YMaps.Point(-8, -8);
YMaps.Styles.add("MARKER["+i+"]",MARKER[i]);
}
for (i=1; i<=2; i++) { //>
nMARKER[i] = new YMaps.Style();
nMARKER[i].iconStyle = new YMaps.IconStyle();
nMARKER[i].iconStyle.href = "/imgs/markers/marker" + i + ".png";
nMARKER[i].iconStyle.size = new YMaps.Point(10, 10);
nMARKER[i].iconStyle.offset = new YMaps.Point(-5, -5);
YMaps.Styles.add("nMARKER["+i+"]",nMARKER[i]);
}
// ===================================================================================================
map.addControl(new PointAdder());
$('ABI').addEvent('mouseover',function() { $('ABI').set('class', 'AB2'); });
$('ABI').addEvent('mouseout',function() { $('ABI').set('class', 'AB1'); });
$('ABI2').addEvent('mouseover',function() { $('ABI2').set('class', 'AB2'); });
$('ABI2').addEvent('mouseout',function() { $('ABI2').set('class', 'AB1'); });
// ===================================================================================================
}
function PointAdder() {
this.onAddToMap = function (map, position) {
this.container = YMaps.jQuery("
Авторизация | ![]() | Регистрация |
");
var wimg = $("wimg"+rndv);
wimg.set("src", waitimg.src);
new Event(e).stop();
this.set('send', {
update: resID,
onComplete: function(html) {
container.set('html', html);
}
}).send();
});
return false;
}
function RegCheck() {
rndv=Math.random();
$('RegResultDiv').set('html', '
');
$('wimg['+rndv+']').set('src', waitimg.src);
if ($('username').get('value') != "") {
if ($('password1').get('value') != "") {
if ($('password1').get('value') == $('password2').get('value')) {
err = '22';
} else if ($('password2').get('value') == "") {
err = '