// JavaScript Document
var altNav = '<img src="/assets/images/alt_header.jpg" border="0" usemap="#Map" />\n' + 
			'<map name="Map">\n' + 
			'<area shape="rect" coords="73,121,130,138" href="http://www.macromedia.com/go/getflashplayer/" target="_blank">\n' + 
			'<area shape="rect" coords="1,2,293,109" href="/index.php?page=home"></map>'

FlashObject = 
{
	writeObject: function( url, w, h, bg, trans, altImage, altLink, menu, nav )
	{
		if ( trans )	{	var trans = 'transparent';		} else {			var trans = 'window';		}
		if ( menu )		{	var menu = 'true';				} else {			var menu = 'false';			}
		document.writeln( '<object type="application/x-shockwave-flash" data="' + url + '" width="' + w + '" height="' + h + '">' );
		document.writeln( '<param name=quality value=high>' );
		document.writeln( '<param name=wmode value="' + trans + '">' );
		document.writeln( '<param name=menu value="' + menu + '">' );
		document.writeln( '<param name=movie value="' + url + '">' );
		if ( bg != null ) {
			document.writeln( '<param name=bgcolor value=#' + bg + '>' );
		}
		if ( nav ) {
			document.writeln( altNav );
		} else {
			if ( !altLink ) {
				document.writeln( '<img src="/assets/images/' + altImage + '" />' );
			} else {
				document.writeln( '<a href="' + altLink + '"><img src="/assets/images/' + altImage + '" /></a>' );
			}
		}
		document.writeln( '</object>' );
	},
	emailLink: function( mailbox, color, width )
	{
		this.writeObject( '/assets/flash/email.swf?mailbox=' + escape( mailbox ) + '&color=' + escape( color ), 210, 13, true );
	}
}

function openNewWindow(theURL, winName, winWidth, winHeight){
	var width
	var height
	var leftdist
	var topdist
	width = screen.width;
	height = screen.height;
	leftdist = Math.round((width - winWidth) / 2);
	topdist = Math.round((height - winHeight) / 2);
	window.open(theURL, winName,'width='+winWidth+',height='+winHeight+',top='+topdist+',left='+leftdist+',noresize,resize=0,menubar=0,location=0,scrollbars=0')
	}

function closeWindow(){
	window.close;
	}
