// JavaScript Document



function show_client(client_id) {
link_name = 'link_client_name'+client_id;
div_name = 'div_clients_links'+client_id;
img_name = 'arrow-client'+client_id;
show_hide_div(div_name);
	if (document.getElementById(div_name).style.display != "none") {
	document.getElementById(link_name).className = 'link_client_name_on';
	document.images[img_name].src = img_dir+'/clients/arrow-client-on.gif';
	} else {
	document.getElementById(link_name).className = 'link_client_name';
	document.images[img_name].src = img_dir+'/clients/arrow-client.gif';
	}
}



function swap_project_image(project_id,img_file,img_num,img_amt) {
//img_num_array = img_file.split('.');
//img_num = img_num_array[0];

document.getElementById('project_img').src = img_dir+'/projects/'+project_id+'/'+img_file;

	for (i=0;i<img_amt;i++) {
	document.getElementById('thumb_'+i).className = 'img_project_thumb div_common';
	}
document.getElementById('thumb_'+img_num).className = 'img_project_thumb_on div_common';	

}



function swap_gallery_image(gallery_id,image_id,img_file,img_num,img_amt,img_caption) {

document.getElementById('gallery_img').src = img_dir+'/gallery/'+gallery_id+'/images/'+image_id+'/'+img_file;

	for (i=0;i<img_amt;i++) {
	document.getElementById('thumb_'+i).className = 'img_gallery_thumb div_common';
	}
document.getElementById('thumb_'+img_num).className = 'img_gallery_thumb_on div_common';

document.getElementById('gallery_caption').innerHTML = img_caption;	

}




function loadmap() {
if (contact_sub_on == 'directions') {
  if (GBrowserIsCompatible()) {
	var map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(40.749954,-73.978437), 16);
	var marker = new GMarker(new GLatLng(40.748854,-73.979037));
	map.addOverlay(marker);	
	var html="<span class=\"maptext\">Janko Rasic Architects<br/>" +
         "109 E. 37th Street, New York, NY 10016<br/><a href=\"http:\/\/maps.google.com/maps?f=d&hl=en&geocode=&saddr&q=109+E 37th+Street,+New+York,+NY+10016&sll=40.749143,-73.979402&sspn=0.010241,0.022252&ie=UTF8&ll=40.750085,-73.973179&spn=0.020482,0.044503&z=15&iwloc=A\" target=\"_blank\" class=\"link_underlined\">Get Directions</a></span>";
	marker.openInfoWindowHtml(html);
	map.addControl(new GSmallZoomControl());	
	}
}
}
