/**** FLASH ****/
function FlashObject(target,src,w,h,ver) { this.target=target; this.src=src; this.width=w; this.height=h; this.version=ver; this.id="themovie"; this.insert=FlashObject_Insert; }
function FlashObject_Insert() { var ver=(this.version)?this.version:7;  if (!this.target) return; var div=document.getElementById(this.target); if (!div)return; if (!this.src) return; if (!this.width) return; if (!this.height) return; var html='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+',0,0,0" width="'+this.width+'" height="'+this.height+'" id="'+this.id+'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+this.src+'" /><param name="quality" value="high" /><param name="bgcolor" value="#A2542D" />'+((this.wmode)?'<param name="wmode" value="'+this.wmode+'">':'')+'<embed src="'+this.src+'" flashvars="intro_link=/public/swf/intro.swf&amp;map_link=/public/swf/map.swf" quality="high" bgcolor="#A2542D" width="'+this.width+'" height="'+this.height+'" name="'+this.id+'" align="middle"'+((this.wmode)?' wmode="'+this.wmode+'"':'')+' allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'; div.innerHTML = html; }
function InsertFlash(target,src,w,h,ver) { var flash=new FlashObject(target,src,w,h,ver); flash.insert(); }
/***************/

function building_selector(value)
{
	new Ajax.Updater("building_id", site_base_url+"/admin/select_buildings", { method:"post", parameters:"area_id="+value });
	
	return false;
}

/* /////////////////////////////////////////////////////////////// */

/* Colorbox */
$(document).ready(function() {
	$(".colorbox").colorbox();
});
function colorbox_iframe(link, w, h, title)
{
	$.fn.colorbox({ href: link, width: w, height: h, title: title, iframe: true, open: true });
}

//onClosed:function(){ alert('onClosed: colorbox has completely closed'); }