/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
		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 */ ["USA Wholesale Framing Supplies","1500 Independence Blvd. Suite 100","Sarasota","FL","34234","US","941-923-3681","800-749-5656","941-925-1483","www.usaframing.net",27.37017,-82.53902],
	/*  2 */ ["Designer Profile","141 Don Park Road, Unit #1","Markham","ON","L3R 1C2 ","CA","905-477-0372 ","888-864-7232","905-477-6957 ","www.designerprofile.com",43.82456,-79.34587],
	/*  3 */ ["National Art","5426 Portland Place","Halifax","NS","B3K 1A1","CA","902-423-7117","800-465-3726","902-423-9844","www.nationalart.ca",44.6518,-63.58134],
	/*  4 */ ["Image Fusion","1042 Topsail Rd","Mount Pearl","NF","A1N 5E6","CA","709-745-6663","","709-745-6668","",47.52695,-52.81905],
	/*  5 */ ["House of Frames","11603, 160 Street NW","Edmonton","AB","T5M 4B9","CA","780-436-4991","800-854-9541","780-435-4521","",53.5666,-113.59716],
	/*  6 */ ["Art Pro","2666 Rue Principale","Tracadie-Sheila","NB","E1X 1A1","CA","506-395-6590 ","800-561-6202 ","800-561-6505 ","www.artproframe.com",47.55231,-64.92383],
	/*  7 */ ["Crossroads Distributors","4783, I-55 South","Jackson","MS","39212","US","601-373-5172","800-237-7488","888-824-0043","",32.22672,-90.2234],
	/*  8 */ ["Apres L'Image","3872 Boul. Leman","Laval","QC","H7E 1A1 ","CA","450-661-0200 ","800-387-8481","877-664-4265 ","www.apreslimage.ca",45.61214,-73.67284],
	/*  9 */ ["Wallack Wholesales","231 Bank Street","Ottawa","ON","K2P 1W9","CA","613-234-1800","888-817-6035","613-234-5320 ","www.wallacks.com",45.41673,-75.69754],
	/* 10 */ ["Shenandoah Framing inc.","215 Greenhouse Road","Lexington","VA","24450","US","540-463-3252","800-368-2171","800-368-2171","www.shenandoahframing.com",37.80221,-79.42115]);

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 + "Local Phone: " + lst[' + numb + '][6] + "<br>";' +
			'wContent = wContent + "Toll Free: " + lst[' + numb + '][7] + "<br>";' +
			'wContent = wContent + "Fax: " + lst[' + numb + '][8] + "<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;
}

