var browser_name = navigator.appName;
 /////////////////////////////////////////////////////
 //WEDDING/PIECES: show individual pieces
 /////////////////////////////////////////////////////
 /*
 Author: Michele
 Date: 02/2/2005 
 Description: Pieces Show
 */
 function piecesShow(piece) {
 	//text for each of 8 pieces
 	pieceInvitationstext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Invitations</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	pieceAnnouncementstext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Announcements</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	pieceSavetext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Save-the-Date</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	pieceCustomtext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Custom Programs</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	piecePlacetext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Place Cards and Favors</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	pieceMenustext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Menus</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	pieceMapstext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Maps</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
  	pieceThanktext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Thank Yous</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	//buttons for scrolling through examples under each piece
 	pieceInvitationsbutton = '<a href="#" onClick="piecePrev(\'Invitations\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Invitations\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceAnnouncementsbutton = '<a href="#" onClick="piecePrev(\'Announcements\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Announcements\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceSavebutton = '<a href="#" onClick="piecePrev(\'Save\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Save\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceCustombutton = '<a href="#" onClick="piecePrev(\'Custom\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Custom\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	piecePlacebutton = '<a href="#" onClick="piecePrev(\'Place\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Place\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceMenusbutton = '<a href="#" onClick="piecePrev(\'Maps\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Maps\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceMapsbutton = '<a href="#" onClick="piecePrev(\'Menus\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Menus\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 	pieceThankbutton = '<a href="#" onClick="piecePrev(\'Thank\');" border=0><img src="images/greenarrowleft.gif" border=0></a><a href="#" onClick="pieceNext(\'Thank\');" border=0><img src="images/greenarrowright.gif" border=0></a>';
 
	var newpiece=piece.split(" ");
	if (browser_name == "Netscape") {
		document.getElementById('piecesname').innerHTML = piece;
		document.getElementById('piecestext').innerHTML = eval("piece" + newpiece[0] + "text");
		document.getElementById('piecesbuttons').innerHTML = eval("piece" + newpiece[0] + "button");
		
	} else {
	   	document.all('piecesname').innerHTML = piece;
	   	document.all('piecestext').innerHTML = eval("piece" + newpiece[0] + "text");
	   	document.all('piecesbuttons').innerHTML = eval("piece" + newpiece[0] + "button");
	} 
	imgVal = "images/pieces_" + newpiece[0] + ".jpg";
	document.images.piecespicture.src = imgVal;

 }


 	var pieceInvitationsNum;
 	var pieceInvitationsMax = 3;
 	pieceInvitations0 = "Arbor";
 	pieceInvitations1 = "Blossom";
	pieceInvitations2 = "Wave";
	pieceInvitations3 = "Trellis";
 	var pieceAnnouncementsNum;
 	var pieceAnnouncementsMax = 3;
 	pieceAnnouncements0 = "Etoile";
	pieceAnnouncements1 = "Trellises";
	pieceAnnouncements2 = "Waves";
	pieceAnnouncements3 = "Vineyard";
 	var pieceSaveNum;
 	var pieceSaveMax = 1;
 	pieceSave0 = "Arbor";
	pieceSave1 = "Blossom";
 	var pieceCustomNum;
 	var pieceCustomMax = 1;
 	pieceCustom0 = "Arbor";
	pieceCustom1 = "Blossom";
  	var piecePlaceNum;
 	var piecePlaceMax = 0;
 	piecePlace0 = "Arbor";
 	var pieceMapsNum;
 	var pieceMapsMax = 0;
 	pieceMaps0 = "Arbor";
 	var pieceMenusNum;
 	var pieceMenusMax = 0;
 	pieceMenus0 = "Arbor";
 	var pieceThankNum;
 	var pieceThankMax = 0;
 	pieceThank0 = "Arbor";
 	Arbortext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Arbor</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Blossomtext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Blossom</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Trellistext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Trellis</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Wavetext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Wave</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Etoiletext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Etoile</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Trellisestext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Trellises</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	Wavestext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Waves</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
 	Vineyardtext = '<img src="images/doodle.gif"><span class="bdkbluetext10">&nbsp;Vineyard</span><br>There are many pieces involved and available to communicate a theme for your event. Dauphine Press is well-versed in the etiquette of weddings and our talented designers are available to help you coordinate and design pieces your wedding package. Select from the menu above for information and examples. Contact us when you are ready to create your own invitation package.';
	

 function pieceNext(name) {
 	pieceNum = eval("piece" + name + "Num");
 	if(isNaN(pieceNum)) {pieceNum = -1;} 
 	pieceMax = eval("piece" + name + "Max");
 	startingpieceNum = pieceNum;
 	if (pieceNum == pieceMax) {
 		newpieceNum = 0;
 	} else {
 		newpieceNum = pieceNum + 1;
 	}
 	newpiece = eval("piece" + name + newpieceNum);
	imgVal = "images/p_" + name + "_" + newpiece + ".jpg";
	document.images.piecespicture.src = imgVal;
	newpiecename = name + " > " + newpiece;	
	if (browser_name == "Netscape") {
		document.getElementById('piecesname').innerHTML = newpiecename;
		document.getElementById('piecestext').innerHTML = eval(newpiece + "text");		
	} else {
	   	document.all('piecesname').innerHTML = newpiecename;
	   	document.all('piecestext').innerHTML = eval(newpiece + "text");
	}     	
 	if (name == "Invitations") {
 		pieceInvitationsNum = newpieceNum;
 	} else if (name == "Announcements") {
 		pieceAnnouncementsNum = newpieceNum;
	} else if (name == "Save") {
		pieceSaveNum = newpieceNum;
	} else if (name == "Custom") {
		pieceCustomNum = newpieceNum;
	} else if (name == "Place") {
		piecePlaceNum = newpieceNum;
	} else if (name == "Maps") {
		pieceMapsNum = newpieceNum;
	} else if (name == "Menus") {
		pieceMenusNum = newpieceNum;
	} else if (name == "Thank") {
		pieceThankNum = newpieceNum;
	}
}

 function piecePrev(name) {
	pieceNum = eval("piece" + name + "Num");
 	if(isNaN(pieceNum)) {pieceNum = 1;} 
 	pieceMax = eval("piece" + name + "Max");
 	startingpieceNum = pieceNum;
  	if (pieceNum == 0) {
  		newpieceNum = pieceMax;
  	} else {
  		newpieceNum = pieceNum - 1;
 	}
 	newpiece = eval("piece" + name + newpieceNum);
	imgVal = "images/p_" + name + "_" + newpiece + ".jpg";
	document.images.piecespicture.src = imgVal;
	newpiecename = name + " > " + newpiece;
	if (browser_name == "Netscape") {
		document.getElementById('piecesname').innerHTML = newpiecename;
		document.getElementById('piecestext').innerHTML = eval(newpiece + "text");		
	} else {
	   	document.all('piecesname').innerHTML = newpiecename;
	   	document.all('piecestext').innerHTML = eval(newpiece + "text");
	} 
 	if (name == "Invitations") {
 		pieceInvitationsNum = newpieceNum;
 	} else if (name == "Announcements") {
 		pieceAnnouncementsNum = newpieceNum;
	} else if (name == "Save") {
		pieceSaveNum = newpieceNum;
	} else if (name == "Custom") {
		pieceCustomNum = newpieceNum;
	} else if (name == "Place") {
		piecePlaceNum = newpieceNum;
	} else if (name == "Maps") {
		pieceMapsNum = newpieceNum;
	} else if (name == "Menus") {
		pieceMenusNum = newpieceNum;
	} else if (name == "Thank") {
		pieceThankNum = newpieceNum;
	}
}
