
/*******************
*
*	Writes correct Flash file to page.
*
*******************/

function writeFlash(location)
{
	var file;
	var width;
	var height;

	if (location == "index")
	{
		file = "h_index.swf";
		width = "500";
		height = "188";
	}
	else
	{
		file = "h_alt.swf";
		width = "500";
		height = "75";
	}

	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"" + width + "\" height=\"" + height + "\">");
	document.write("<param name=\"movie\" value=\"./flash/" + file + "\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<param name=\"bgcolor\" value\"#000000\">");
	document.write("<embed src=\"./flash/" + file + "\" quality=\"high\" wmode=\"transparent\" bgcolor=\"#000000\"  width=\"" + width + "\" height=\"" + height + "\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">");
	document.write("</embed>");
	document.write("</object>");
}

/*******************
*
*	Writes correct menu file to page.
*
*******************/

function writeMenu(location)
{
	var menuId;

	if(location == "index")
	{
		menuId = "m-index";
	} 
	else
	{
		menuId = "m-alt";
	}

	document.write("<div class=\"menu\" id=\"" + menuId + "\">");
	document.write("<div id=\"menu-l\">");
	document.write("<div><a href=\"index.html\">home</a></div>");
	document.write("<div><a href=\"proofing.html\" id=\"proofing\">view your photos</a></div>");
	document.write("<div><a href=\"thanks.html\">thanks</a></div>");
	document.write("<div class=\"hide\">spacer</div>");
	document.write("</div>");

	document.write("<div id=\"menu-r\">");
	document.write("<div><a href=\"galleries.html\">galleries</a></div>");
	document.write("<div><a href=\"about.html\">about the artist</a></div>");
	document.write("<div><a href=\"contact.html\">contact</a></div>");
	document.write("<div class=\"hide\">spacer</div>");
	document.write("</div>");

	document.write("</div>");
}

/****************
*
*	Write out email and addresses in JS to discourage spam.
*
****************/

function writeEmail()
{
	var name = "marieconstantin";
	var server = "cox.net";

	document.write("<address>");
	document.write("Marie Constantin<br />");
	document.write("657 Spanish Town Road<br />");
	document.write("Baton Rouge, LA 70802<br />");
	document.write("Phone: 225.405.5204<br />");
	document.write("<a href=\"mailto:" + name + "@" + server + "\">Email Marie.</a>");
	document.write("</address>");
}

/****************
*
*	Write out copyright.
*
****************/


function writeCopyright(imgName)
{
	document.write("<img src=\"./images/" + imgName + "\" /><br />");
	document.write("&copy;Copyright 2005, 2006");
}


/****************
*
*	Write out image popup.
*
****************/


function popUp(image_url, width, height) 
{
   // Check for standardized global width and height.
   globalWidthType = typeof globalWidth;
   globalHeightType = typeof globalHeight;

   if( globalWidthType != 'undefined' && 
       globalHeightType != 'undefined' ) {

        // Set width and height to globals.
        width = globalWidth;
	height = globalHeight;
   }

   var view_width = parseInt(width) + 40;
   var view_height = parseInt(height) + 60;

   var view_width = view_width.toString();
   var view_height =  view_height.toString();

   var pop_url = "./popup.php?image=" + image_url + "&width=" + width + "&height=" + height;
   var look="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=" + view_width + ",height=" + view_height;

	popwin=window.open( pop_url,"",look);
}
