png.blank = 'graphics/blank.gif';

function fgf_preview(name, email, message)
{
	if (
			name
			&&
			email
			&&
			message
	)
	{
			
		var url = "/tell_your_friends_preview.php?";
		url += "name=" + escape(name) + "&";
		url += "email=" + escape(email) + "&";
		url += "message=" + escape(message);
		
		window.open(url, "preview", "menubar=false,status=false,toolbar=false,height=600,width=700,scrollbars=1,resizable=true");
	}
	else
	{
		alert("Please fill in your name, email address and message before you can preview your email.");
	}
}


$(document).ready( 
	function() 
	{
		$("img.roll_over").mouseover(function()
			{
				if (this.style.filter)
				{
					if(this.style.filter.match(/png/))
					{
						match = this.style.filter.match(/([a-z0-9\_\-]+\.png)/);
						this.src =  '/graphics/left_bar/'+match[0];
					}
				}
				this.src = this.src.replace(/\.([a-z0-9]+)$/, '_over.$1');
				png.enable();	

			}
		);
		
		$("img.roll_over").mouseout(function()
			{
				if (this.style.filter)
				{
					if(this.style.filter.match(/png/))
					{
						match = this.style.filter.match(/([a-z0-9\_\-]+\.png)/);
						this.src = '/graphics/left_bar/'+match[0];
					}
				}
				this.src = this.src.replace(/_over\./, '.');
				png.enable();	
			}
		);			
		
	}
);
			
		
