/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		lst array
		
 0 	Distributor			string
 1 	Address				string
 2 	City				string
 3 	State/Prov			string
 4 	Zip/Postal Code		string
 5 	Country				string
 6 	Local Phone			string
 7 	Toll Free			string
 8 	Fax					string
 9 	Website				string
10 	Latitude			numeric
11 	Longitude			numeric
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

var lst = new Array(

	/*  0 */ ["","","","","","","","","","",,],
 	/*  1 */ ["CYG International Inc.","9650, Trans-Canada Highway","Montreal","Quebec","","Canada  H4S 1V9","(514)745-0300","(514)745-0706","","www.cygintl.com",45.48974,-73.7535]

	);



function goMAP(numb)
{
	var popContent = '<ht' + 'ml><he' + 'ad>' +
		'<scr' + 'ipt type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></scr' + 'ipt>' +
		'<scr' + 'ipt type="text/javascript" src="mapping.js"></scr' + 'ipt>' +
		'<scr' + 'ipt type="text/javascript">' +
		'function Close()' +
		'{' +
		'self.close();' +
		'}' +
		'function initialize()' +
		'{' +
		'document.title = lst[' + numb + '][0];' +
		'var latlng = new google.maps.LatLng(lst[' + numb + '][10], lst[' + numb + '][11]);' + 
		'var myOptions = { ' +
			'mapTypeControl: true, ' +
			'mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, ' +
			'navigationControl: true, ' +
			'navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, ' +
			'zoom: 15, ' +
			'center: latlng, ' +
			'mapTypeId: google.maps.MapTypeId.ROADMAP};' +   
		'var map = new google.maps.Map(document.getElementById("map_window"), myOptions);' +
		'var wContent = "<b>" + lst[' + numb + '][0] + "</b><br>";' +
			'wContent = wContent + lst[' + numb + '][1] + "<br>";' +
			'wContent = wContent + lst[' + numb + '][2] + " " + lst[' + numb + '][3] + " " + lst[' + numb + '][4] + "<br>";' +
			'wContent = wContent + lst[' + numb + '][5] + "<br>";' +
			'wContent = wContent + "Tel : " + lst[' + numb + '][6] + "<br>";' +
			'wContent = wContent + "Fax : " + lst[' + numb + '][7] + "<br>";' +
			'wContent = wContent + "<a href=" + String.fromCharCode(34) + "javascript:window.open(" + String.fromCharCode(39) + "http://" + lst[' + numb + '][9] + String.fromCharCode(39) + "); void(0)" + String.fromCharCode(34) + ">" + lst[' + numb + '][9] + "</a>";' +     
		'var infowindow = new google.maps.InfoWindow({' +
		'position: map.center,' +
		'content: wContent' +
		'});' +
		'google.maps.event.addListener(infowindow, "closeclick", function(){marker.set_visible(true);});' +
		'var marker = new google.maps.Marker({map: map, position: map.center, visible:false, title:lst[' + numb + '][0]});' +
		'google.maps.event.addListener(marker, "click", function(){marker.set_visible(false);infowindow.open(map);});' +
		'infowindow.open(map);' +
		'}' +
		'</scr' + 'ipt>' +
		'<\/he' + 'ad><bo' + 'dy topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="initialize()">' +
		'<div id="map_window" style="width:100%; height:95%"></div>' +
		'<center><input type="button" value="Close" onclick="Close();"></center>' +
		'<\/bo' + 'dy><\/ht' + 'ml>';

	var popWidth = 800;
	var popHeight = 560;
	var popLeft = parseInt((window.screen.width - popWidth)/2);
	var popTop = parseInt((window.screen.height - popHeight)/2);
	var popParam = "width=" + popWidth + ",height=" + popHeight + ",left=" + popLeft + ",top=" + popTop;
	popParam += ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,resizable=1";
	
	var popWindow = window.open('','popMap',popParam);
	popWindow.document.write(popContent);
	popWindow.document.close();
	popWindow.window.location.reload();
	if (window.focus){popWindow.focus();}
	//return false;
}
