function initialize(loc_id,input,display) {

directions = '<table cellpadding=\"5\"></table>';

if (loc_id == 82) {
address = '3300 SW 42nd St Gainesville Florida 32608';
directions = '<table cellpadding=\"5\"><tr><td><b><span class=\"directions\">From the North:</span></b> Go South on I-75, take Archer Rd. exit head East, under overpass, turn left at first red light at McDonalds onto 40th Blvd. Turn right onto 42nd St. We are on the left across from Scrubs carwash.</td></tr>	<tr><td><b><span class=\"directions\">From the South:</span></b> Go north on I-75, take Archer Rd. exit head east. Turn left at first red light at McDonalds onto 40th Blvd. Turn right onto 42nd St. We&#039;re on the left across from Scrubs carwash.</td></tr>	<tr><td><b><span class=\"directions\">From the East:</span></b> Go West on Archer Rd.. Turn right onto 40th Blvd. (at McDonalds) Turn right on 42nd St. we are on the left across from Scrubs car wash.</td></tr>	<tr><td><b><span class=\"directions\">From the West:</span></b> Go East on Archer Rd. (under I-75) turn left on 40th Blvd. (at McDonalds). Turn right on 42nd St. we are on left across from Scrubs car wash.</td></tr></table>';
lat ='29.6238718';
lng ='-82.3868693';

}

if (loc_id == 81) {
address = '4500 SW 41st Blvd Gainesville Florida 32608';
directions = '<table cellpadding=\"5\"><tr><td><b><span class=\"directions\">From the North:</span></b> Take I-75 to exit 384 and head West. Go to 2nd traffic light which is SW 41st Blvd (also named Fred Bear Dr.) and make left. Follow around approx. 1/2 mile up on the right. Between Beach Construction and Bear Archery.</td></tr>	<tr><td><b><span class=\"directions\">From the South:</span></b> Take I-75 to exit 384 and head West. Go to 2nd traffic light which is SW 41st Blvd (also named Fred Bear Dr.) and make left. Follow around approx. 1/2 mile up on the right. Between Beach Construction and Bear Archery</td></tr>	<tr><td><b><span class=\"directions\">From the East:</span></b> Head West on Archer Rd. under I-75 to 2nd traffic light. Make left onto SW 41st Blvd (also named Fred Bear Dr.) and make left. Follow around approx. 1/2 mile up on the right. Between Beach Construction and Bear Archery.</td></tr>	<tr><td><b><span class=\"directions\">From the West:</span></b> Head East on Archer Rd. 2 lights before I-75 make right onto SW 41st Blvd. (also named Fred Bear Dr.) . Follow around approx. 1/2 mile up on the right. Between Beach Construction and Bear Archery.</td></tr></table>';
lat ='29.6129108';
lng ='-82.3836660';
}

if (loc_id == 80) {
address = '6505 SW Archer Rd Gainesville Florida 32608';
directions = '<table cellpadding=\"5\"><tr><td><b><span class=\"directions\">From the North:</span></b> Take exit #384. Go West on Archer Rd. 1.7 miles. We are located on the left (South) across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the South:</span></b> Take exit #384. Go West on Archer Rd. 1.7 miles. We are located on the left (South) across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the East:</span></b> Go West on Archer Rd. 1.7 miles past I-75. We are located on the left (South) across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the West:</span></b> Go South to the intersecion of Tower Rd and Archer Rd. Go 0.4 mile east (towards UF). We are located on your right (south) across from Kanapaha Station.  (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr></table>';
lat ='29.6030990';
lng ='-82.4121420';
}

if (loc_id == 79) {
address = '1725 Lakeside Ave St. Augustine Florida 32084';
directions = '<table cellpadding=\"5\"><tr><td><b><span class=\"directions\">From the North:</span></b> Coming down US 1 make right onto SR 312, go to 2nd traffice light, make right into 312 Business Park. We are located in the back.</td></tr>	<tr><td><b><span class=\"directions\">From the South:</span></b> Take US 1 to SR 312, make left, go to 2nd traffice light, make right into 312 Business Park.</td></tr>	<tr><td><b><span class=\"directions\">From the East:</span></b> Go over the 132 bridge, cross over US 1, go to 3rd traffic light, make right into 312 Business Park.</td></tr>	<tr><td><b><span class=\"directions\">From the West:</span></b> Coming off of SR207, make right onto 312, go to 1st traffic light and make left into 312 Business Park. We are located in the back.</td></tr></table>';
lat ='29.8700385';
lng ='-81.3319353';
}

if (loc_id == 78) {
address = '6505 SW Archer Rd Gainesville Florida 32608';
directions = '<table cellpadding=\"5\"><tr><td><b><span class=\"directions\">From the North:</span></b> Take exit #384. Go West on Archer Rd. 1.7 miles. We are located on the left across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the South:</span></b> Take exit #384. Go West on Archer Rd. 1.7 miles. We are located on the left across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the East:</span></b> Go west on Archer Rd. 1.7 miles past I-75.  We are located on the left across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr>	<tr><td><b><span class=\"directions\">From the West:</span></b> Go east on Archer Rd. (1/4 of a mile east from Tower Rd.)  We are located on your right  across from Kanapaha Station. (Beef O&#039;Brady&#039;s &amp; Cloud 9 Spa)</td></tr></table>';
lat ='29.6030990';
lng ='-82.412142';
}


var map = new GMap2(document.getElementById("map_canvas"));
map.setMapType(G_NORMAL_MAP);

if (display == 1) { map.addControl(new GSmallMapControl()); }
else { map.disableDragging(); }


 
var tinyIcon = new GIcon();
tinyIcon.image = "/templates/1/images/map_marker.gif";

tinyIcon.iconSize = new GSize(17, 32);
tinyIcon.shadowSize = new GSize(19, 32);
tinyIcon.iconAnchor = new GPoint(8, 30);
tinyIcon.infoWindowAnchor = new GPoint(5, 1);


markerOptions = { icon:tinyIcon };

if (input !== 0) {
document.getElementById("clear").style.display="inline";
document.getElementById("route").innerHTML = '';
directionsPanel = document.getElementById("route");
directions = new GDirections(map, directionsPanel);
directions.load(input +" to "+ address)

}


var point = new GLatLng(lat, lng);
map.setCenter(point,13);
var marker = new GMarker(point,markerOptions);
map.addOverlay(marker);
}

function clearDirections() {
	var route = document.getElementById("route");
	var clearTXT = directions;

	route.innerHTML = clearTXT;
	document.getElementById("clear").style.display="none";
}



	var gmarkers = [];

	
	function myclick(i) {
		
        	GEvent.trigger(gmarkers[i], "click");
		
      	}


      function createMarker(point,name,html) {

        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        
        gmarkers.push(marker);
       

         return marker;
      }


function func_state_map() {

      
      var side_bar_html = "";




var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(0,0),0);
var bounds = new GLatLngBounds();
map.addControl(new GSmallMapControl()); 




var html = '';

html = '<div style="width:300px"><table>';
html += '<tr><td colspan="2"><b>Archer Road Business Park, Inc. - Gainesville</b></td></tr>';
html += '<tr><td width="100" valign="top"><img src="/images/gallery/78/pic1.jpg" alt="Archer Road Business Park, Inc. - Gainesville FL 32608" width="100" alt="" border="1"/></td>';
html += '<td valign="top">6505 SW Archer Rd<br/>Gainesville FL. 32608<br/>(352) 371-4296<br/><a href="Gainesville-Florida-32608-78.html">More Information</a></td>';
html += '</tr></table><\/div>';

var point = new GLatLng(29.6030990, -82.4121420);
var marker = createMarker(point,'this place',html)
map.addOverlay(marker);
bounds.extend(point);


var html = '';

html = '<div style="width:300px"><table>';
html += '<tr><td colspan="2"><b>Archer Road Self Storage, Inc. - Gainesville</b></td></tr>';
html += '<tr><td width="100" valign="top"><img src="/images/gallery/80/pic1.jpg" alt="Archer Road Self Storage, Inc. - Gainesville FL 32608" width="100" alt="" border="1"/></td>';
html += '<td valign="top">6505 SW Archer Rd<br/>Gainesville FL. 32608<br/>(352) 371-4296<br/><a href="Gainesville-Florida-32608-80.html">More Information</a></td>';
html += '</tr></table><\/div>';

var point = new GLatLng(29.6030990, -82.4121420);
var marker = createMarker(point,'this place',html)
map.addOverlay(marker);
bounds.extend(point);


var html = '';

html = '<div style="width:300px"><table>';
html += '<tr><td colspan="2"><b>I-75 Business Park & Self Storage, Inc. - Gainesville</b></td></tr>';
html += '<tr><td width="100" valign="top"><img src="/images/gallery/81/pic1.jpg" alt="I-75 Business Park & Self Storage, Inc. - Gainesville FL 32608" width="100" alt="" border="1"/></td>';
html += '<td valign="top">4500 SW 41st Blvd<br/>Gainesville FL. 32608<br/>(352) 375-7955<br/><a href="Gainesville-Florida-32608-81.html">More Information</a></td>';
html += '</tr></table><\/div>';

var point = new GLatLng(29.6129108, -82.3836660);
var marker = createMarker(point,'this place',html)
map.addOverlay(marker);
bounds.extend(point);


var html = '';

html = '<div style="width:300px"><table>';
html += '<tr><td colspan="2"><b>South West Self Storage, Inc. - Gainesville</b></td></tr>';
html += '<tr><td width="100" valign="top"><img src="/images/gallery/82/pic1.jpg" alt="South West Self Storage, Inc. - Gainesville FL 32608" width="100" alt="" border="1"/></td>';
html += '<td valign="top">3300 SW 42nd St<br/>Gainesville FL. 32608<br/>(352) 374-4444<br/><a href="Gainesville-Florida-32608-82.html">More Information</a></td>';
html += '</tr></table><\/div>';

var point = new GLatLng(29.6238718, -82.3868693);
var marker = createMarker(point,'this place',html)
map.addOverlay(marker);
bounds.extend(point);


var html = '';

html = '<div style="width:300px"><table>';
html += '<tr><td colspan="2"><b>312 Self Storage, Inc. - St. Augustine</b></td></tr>';
html += '<tr><td width="100" valign="top"><img src="/images/gallery/79/pic1.jpg" alt="312 Self Storage, Inc. - St. Augustine FL 32084" width="100" alt="" border="1"/></td>';
html += '<td valign="top">1725 Lakeside Ave<br/>St. Augustine FL. 32084<br/>(904) 808-1312<br/><a href="St.-Augustine-Florida-32084-79.html">More Information</a></td>';
html += '</tr></table><\/div>';

var point = new GLatLng(29.8700385, -81.3319353);
var marker = createMarker(point,'this place',html)
map.addOverlay(marker);
bounds.extend(point);

map.setZoom(map.getBoundsZoomLevel(bounds)-1);
map.setCenter(bounds.getCenter());

}



function func_all_locations_map() {

      
var map = new GMap2(document.getElementById("map_canvas"));
map.setMapType(G_NORMAL_MAP);
map.setCenter(new GLatLng(0,0),0);
var bounds = new GLatLngBounds();


map.disableDragging();


 
var tinyIcon = new GIcon();
tinyIcon.image = "/templates/1/images/map_marker.gif";

tinyIcon.iconSize = new GSize(17, 32);
tinyIcon.shadowSize = new GSize(19, 32);
tinyIcon.iconAnchor = new GPoint(8, 30);
tinyIcon.infoWindowAnchor = new GPoint(5, 1);


markerOptions = { icon:tinyIcon };


var point = new GLatLng(29.6030990, -82.4121420);


var marker = new GMarker(point,markerOptions);

map.addOverlay(marker);
bounds.extend(point);


var point = new GLatLng(29.8700385, -81.3319353);


var marker = new GMarker(point,markerOptions);

map.addOverlay(marker);
bounds.extend(point);


var point = new GLatLng(29.6030990, -82.4121420);


var marker = new GMarker(point,markerOptions);

map.addOverlay(marker);
bounds.extend(point);


var point = new GLatLng(29.6129108, -82.3836660);


var marker = new GMarker(point,markerOptions);

map.addOverlay(marker);
bounds.extend(point);


var point = new GLatLng(29.6238718, -82.3868693);


var marker = new GMarker(point,markerOptions);

map.addOverlay(marker);
bounds.extend(point);

map.setZoom(map.getBoundsZoomLevel(bounds)-1);
map.setCenter(bounds.getCenter());

}	








var slideshow2_noFading = false;
var slideshow2_timeBetweenSlides = 2000;	// Amount of time between each image(1000 = 1 second)
var slideshow2_fadingSpeed = 10;	// Speed of fading	(Lower value = faster)


var slideshow2_stats = new Array();

var slideshow2_slideIndex = new Array();	// Index of current image shown
var slideshow2_slideIndexNext = new Array();	// Index of next image shown
var slideshow2_imageDivs = new Array();	// Array of image divs(Created dynamically)
var slideshow2_currentOpacity = new Array();	// Initial opacity
var slideshow2_imagesInGallery = new Array();	// Number of images in gallery
var Opera = navigator.userAgent.indexOf('Opera')>=0?true:false;
function createParentDivs(imageIndex,divId)
{
	if(imageIndex==slideshow2_imagesInGallery[divId]){	
		showGallery(divId);
	}else{
		var imgObj = document.getElementById(divId + '_' + imageIndex);	
		if(Opera)imgObj.style.position = 'static';
		if(!slideshow2_imageDivs[divId])slideshow2_imageDivs[divId] = new Array();
		slideshow2_imageDivs[divId][slideshow2_imageDivs[divId].length] =  imgObj;

		imgObj.style.visibility = 'hidden';	
		imageIndex++;
		createParentDivs(imageIndex,divId);	
	}		
}

function showGallery(divId)
{
	if(slideshow2_slideIndex[divId]==-1)slideshow2_slideIndex[divId]=0; else slideshow2_slideIndex[divId]++;	// Index of next image to show
	if(slideshow2_slideIndex[divId]==slideshow2_imageDivs[divId].length)slideshow2_slideIndex[divId]=0;
	slideshow2_slideIndexNext[divId] = slideshow2_slideIndex[divId]+1;	// Index of the next next image
	if(slideshow2_slideIndexNext[divId]==slideshow2_imageDivs[divId].length)slideshow2_slideIndexNext[divId] = 0;

	
	slideshow2_currentOpacity[divId]=100;	// Reset current opacity

	// Displaying image divs
	slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.visibility = 'visible';
	if(Opera)slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.display = 'inline';
	if(navigator.userAgent.indexOf('Opera')<0){
		slideshow2_imageDivs[divId][slideshow2_slideIndexNext[divId]].style.visibility = 'visible';
	}
	
	if(document.all){	// IE rules
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.filter = 'alpha(opacity=100)';
		slideshow2_imageDivs[divId][slideshow2_slideIndexNext[divId]].style.filter = 'alpha(opacity=1)';
	}else{
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
		slideshow2_imageDivs[divId][slideshow2_slideIndexNext[divId]].style.opacity = 0.01;
	}		
	

	setTimeout('revealImage("' + divId + '")',slideshow2_timeBetweenSlides);		
}

function revealImage(divId)
{

	if(slideshow2_noFading){
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.visibility = 'hidden';
		if(Opera)slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.display = 'none';
		showGallery(divId);
		return;
	}
	slideshow2_currentOpacity[divId]--;
	if(document.all){
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.filter = 'alpha(opacity='+slideshow2_currentOpacity[divId]+')';
		slideshow2_imageDivs[divId][slideshow2_slideIndexNext[divId]].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity[divId])+')';
	}else{
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.opacity = Math.max(0.01,slideshow2_currentOpacity[divId]/100);	// Can't use 1 and 0 because of screen flickering in FF
		slideshow2_imageDivs[divId][slideshow2_slideIndexNext[divId]].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity[divId]/100)));
	}
	if(slideshow2_currentOpacity[divId]>0){
		setTimeout('revealImage("' + divId + '")',slideshow2_fadingSpeed);
	}else{
		slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.visibility = 'hidden';	
		if(Opera)slideshow2_imageDivs[divId][slideshow2_slideIndex[divId]].style.display = 'none';		
		showGallery(divId);
	}
}

function initImageGallery(divId)
{
	var slideshow2_galleryContainer = document.getElementById(divId);
	
	
	slideshow2_slideIndex[divId] = -1;
	slideshow2_slideIndexNext[divId] = false;
	
	var galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');
	for(var no=0;no<galleryImgArray.length;no++){
		galleryImgArray[no].id = divId + '_' + no;
	}
	
	slideshow2_imagesInGallery[divId] = galleryImgArray.length;
	createParentDivs(0,divId);		
	
}







function func_coupon (id) {

	window.open("coupon-"+id+".html","coupon","menubar=no,width=630,height=700,toolbar=no,scrollbars=no");

}



function print_coupon(str,location)
{
window.print();
}



var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}



function addEvents() {
//onmouseover="mcancelclosetime()" onmouseout="mclosetime()
document.getElementById("m1").onmouseover = mcancelclosetime;
document.getElementById("m1").onmouseout = mclosetime;


document.getElementById("state1").onmouseover = function() {
//document.getElementById("FL").style.visibility='visible';
//document.getElementById("state1").style.backgroundColor='yellow';
}
document.getElementById("state1").onmouseout = function() {
//document.getElementById("FL").style.visibility='hidden';
document.getElementById("state1").style.backgroundColor='#0996aa';
}

/*document.getElementById("FL").onmouseover = function() {
//document.getElementById("FL").style.visibility='visible';
}*/
/*document.getElementById("FL").onmouseout = function() {
document.getElementById("FL").style.visibility='hidden';
}*/



}






