/**
 * map.js
 * Skrypt obslugi sciezki zamowienia synaptis.eu
 * Autor: Arkadiusz Lisiecki (ark[]data.pl)
 * Wlasnosc: synaptis.eu, wszelkie prawa zastrzezone
 * (c) Copyright SynapTis.eu
 */
 

var maps = [];

function map(obj_target) {

	// assigning methods
	this.popup    = map_popup;

	// validate input parameters
	if (!obj_target)
		return cal_error("Error calling the map: no target control specified");
	if (obj_target.value == null)
		return cal_error("Error calling the map: parameter specified is not valid target control");
	this.target = obj_target;

	this.SID = SID;
	
	// register in global collections
	this.id = maps.length;
	maps[this.id] = this;
}


//IDCity - aktywne miasto
//IDProdField 
function map_popup (IDCity,IDProdField,IDLang ) {

	var obj_mapwindow = window.open(
		'map.php?id=' + this.id + '&IDCity='+IDCity+'&IDProdField='+IDProdField+'&IDLang='+IDLang,
		'Calendar', 'width=689,height=375' +
		',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
	);
	
	//z orderStep2.js, nalezy odswiezyc przejscie do nast podpunku
	obj_mapwindow.onbeforeunload = submitIDCityChange;
	//obj_mapwindow.onbeforeclose = submitIDCityChange;
	
	obj_mapwindow.opener = window;
	obj_mapwindow.focus();
}

