function quick_modal(modal_type) {
	var modal_content = '';
	var modal_div = 'wide_modal';
	if (modal_type == 'login') {
		modal_content = '<h1>Already have an Arlo/Artists account?</h1><div id=\'find_site_form\'><p>If so, enter your account subdomain below and we\'ll take you to your site\'s login screen.</p><form action=\'/spine/redirect_to_artists_login\' method=\'get\'><p><input id=\'subdomain\' name=\'subdomain\' type=\'text\' /></p><p><input id=\'app\' name=\'app\' type=\'hidden\' value=\'artists\' /></p><p><input name=\'commit\' type=\'submit\' value=\'Take me to the login\' /></p></form></div><div id=\'tip\'><p>Your subdomain is the first part of your Arlo/Artists URL (ie, \'dylan\' if your URL is http://dylan.arloartists.com/)</p><p>Don\'t have an account? <a href=\'http://arlosites.com/artists/signup\'>Sign up here.</a></div>'
		modal_div = 'narrow_modal';
	} else if (modal_type == 'video') {
		//modal_content = '<h1>Arlo/Artists - Quick Tour</h1><object width=\'640\' height=\'480\'><embed src=\'http://s3.amazonaws.com/arlo.artists.videos/player.swf\' width=\'640\' height=\'480\' allowfullscreen=\'true\' allowscriptaccess=\'always\' flashvars=\'&displayheight=480&file=http://assets.arlosites.com/demo/artists-overview-with-sound.m4v&width=640&height=480&controlbar=over&autostart=true\' /></object>'
		modal_content = '<h1>Arlo/Artists - Quick Tour</h1><object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0\' data=\'/swfs/arlo_player.swf?file=http://assets.arlosites.com/demo/artists-overview-with-sound.m4v&amp;controlbar=over&amp;skin=/swfs/bekle.swf&amp;width=640&amp;height=480&amp;autostart=true\' style=\'margin-bottom:0px; padding-bottom:0px\' width=\'640\' height=\'480\' wmode=\'transparent\'><param name=\'movie\' value=\'/swfs/arlo_player.swf?file=http://assets.arlosites.com/demo/artists-overview-with-sound.m4v&amp;controlbar=over&amp;skin=/swfs/bekle.swf&amp;width=640&amp;height=480&amp;autostart=true\'><param name=\'quality\' value=\'high\'><param name=\'bgcolor\' value=\'#FFFFFF\'><param name=\'allowfullscreen\' value=\'true\'><embed src=\'/swfs/arlo_player.swf?file=http://assets.arlosites.com/demo/artists-overview-with-sound.m4v&amp;controlbar=over&amp;skin=/swfs/bekle.swf&amp;width=640&amp;height=480&amp;autostart=true\' style=\'margin-bottom:0px; padding-bottom:0px\' quality=\'high\' bgcolor=\'#FFFFFF\' width=\'640\' height=\'480\' name=\'movie\' align=\'\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' allowfullscreen=\'true\'></object>'
		modal_div = 'wide_modal';
	} else if (modal_type == 'bands') {
		modal_content = '<h1>Leave us your email to be notified when Arlo/Bands launches</h1><div id=\'email-form\'><form action=\'http://iamstillalive.createsend.com/t/y/s/itkyli/\' method=\'post\'><div><p><label for=\'name\'><strong>Name</strong>:</label><br /><input type=\'text\' name=\'cm-name\' id=\'name\' /><br /><p><label for=\'itkyli-itkyli\'><strong>Email</strong>:</label><br /><input type=\'text\' name=\'cm-itkyli-itkyli\' id=\'itkyli-itkyli\' /></p><p><label for=\'Occupation\'><strong>I am interested in staying updated about</strong>:</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69822\' value=\'69822\' /> <label for=\'cm69822\'>Artists</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69824\' value=\'69824\' /> <label for=\'cm69824\'>Galleries</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69825\' value=\'69825\' /> <label for=\'cm69825\'>Bands</label></p><p><input type=\'submit\' value=\'Subscribe\' /></p></div></form></div></div>'
		modal_div = 'narrow_modal';
	} else if (modal_type == 'artists_discount') {
		modal_content = "<div id=\"discount-form-wrap\"><div id=\"discount-form\"><p>Type your discount code in the field below and then click 'apply'.</p><p><input id=\"payment_discount_token\" name=\"payment[discount_token]\" type=\"text\" />&nbsp;&nbsp;&nbsp;<a class=\"active\" href=\"#\" onclick=\"new Ajax.Request('/artists/verify_discount', {asynchronous:true, evalScripts:true, method:'get', parameters:'payment%5Bdiscount_token%5D='+$F('payment_discount_token')}); return false;\">apply</a></p></div></div>"
		modal_div = 'narrow_modal';
	} else if (modal_type == 'galleries') {
		modal_content = '<h1>Leave us your email to be notified when Arlo/Galleries launches</h1><div id=\'email-form\'><form action=\'http://iamstillalive.createsend.com/t/y/s/itkyli/\' method=\'post\'><div><p><label for=\'name\'><strong>Name</strong>:</label><br /><input type=\'text\' name=\'cm-name\' id=\'name\' /><br /><p><label for=\'itkyli-itkyli\'><strong>Email</strong>:</label><br /><input type=\'text\' name=\'cm-itkyli-itkyli\' id=\'itkyli-itkyli\' /></p><p><label for=\'Occupation\'><strong>I am interested in staying updated about</strong>:</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69822\' value=\'69822\' /> <label for=\'cm69822\'>Artists</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69824\' value=\'69824\' /> <label for=\'cm69824\'>Galleries</label><br /><input type=\'checkbox\' name=\'cm-fo-jlkjdh\' id=\'cm69825\' value=\'69825\' /> <label for=\'cm69825\'>Bands</label></p><p><input type=\'submit\' value=\'Subscribe\' /></p></div></form></div></div>'
		modal_div = 'narrow_modal';
	};
	
	
	
	var close_link = new Element('a').writeAttribute('href','#').writeAttribute('onclick','return false;').writeAttribute('id','close-modal').update('close (x)');//.setStyle({'float':'right','font-size':'32px','font-weight':'bold','line-height':'32px'});
	var layer = new Element('div').writeAttribute('id', 'overlay');
	var help = new Element('div').writeAttribute('id',modal_div).insert({
		bottom: modal_content
	});
	
	help.insert({
		top:close_link
	});
	
	layer.reposition = function(){
		layer.setStyle({
			width: (document.viewport.getWidth() + document.viewport.getScrollOffsets().left) + 'px', 
			height: (document.viewport.getHeight() + document.viewport.getScrollOffsets().top) + 'px'
		}).setOpacity(0.75);
	};
	layer.reposition();
    
	help.reposition = function(){
		help.setStyle({
			left: ((document.viewport.getWidth() / 2) + document.viewport.getScrollOffsets().left - (help.getWidth() / 2)) + 'px',
			top: ((document.viewport.getHeight() / 2) + document.viewport.getScrollOffsets().top - (help.getHeight() / 2)) + 'px'
		});
	};
	help.reposition();

	$('doc3').insert({
		after: layer
	}).insert({
		after: help
	});
	
	var o = $('overview');
	if(o){
		o.hide();
	}
	
	var close_modal = function(){
		layer.remove();
		help.remove();
		if(o){
			o.show();
		}
	};
	var reposition_all = function(){
		layer.reposition();
		help.reposition();
	};
	
	help.reposition();
	close_link.observe('click', close_modal);
	layer.observe('click', close_modal);
	Event.observe(window, 'resize', reposition_all);
	Event.observe(window, 'scroll', reposition_all);
}