/**********************************************************************
Booking Displays
***********************************************************************/ 

//alert ('booking');
    

// create a new menu entry
function entry (theID,theGenre,theName,theImage,theText) {
    this.ID	= theID
    this.genre = theGenre;
    this.name = theName;
    this.image = theImage;
    this.text = theText
}


// ******************************************
// * menu constructor creates a new menu
// ******************************************
function booking () {
    this.numberEntries = 0;                               // No menu entries when first created
    this.entries = new Array();  
    this.addEntry = booking_addEntry;                     // Specify method for adding menu entries
    this.smallgenre = booking_smallgenre;
    this.largegenre = booking_largegenre;
}


// ******************************************
// menu_addEntry adds an item to the gallery
// ******************************************
function booking_addEntry (eID, eGenre,eName, eImage, eText) {
    this.numberEntries += 1;
    this.entries[this.numberEntries-1] = new entry(eID, eGenre, eName, eImage, eText);    

}

// *********************************************
// * booking_largegenre
// *********************************************
function booking_largegenre (theKids, theStage, theCloseup, theMentalism, theIllusion, theComedy) {
//alert ('la ' + theKids);

    var strdisplay = ""
    
    document.write ('<table class="defaulttext" border="0" cellpadding="0" cellspacing="0" align="center">');
    document.write ('<tr>');

    strdisplay = largeimage(theKids, "kids","Childrens Magic and Entertainment");
    document.write (strdisplay);;
	
	strdisplay = largeimage(theStage, "stage","Stage, Parlour and Cabaret");
    document.write (strdisplay);;

	strdisplay = largeimage(theCloseup, "closeup","Close Up, Table Hopping and Street Magic");
    document.write (strdisplay);;

	strdisplay = largeimage(theMentalism, "mentalism","Mentalism and Mind Reading");
    document.write (strdisplay);;
	 
	strdisplay = largeimage(theIllusion, "illusion","Large stage Illusions");
    document.write (strdisplay);;
	 
	strdisplay = largeimage(theComedy, "comedy","Comedy");
    document.write (strdisplay);;

    document.write ('</tr>');
    document.write ('</table>');
	 

}

// *********************************************
// * booking_smallgenre
// *********************************************
function booking_smallgenre (theName, thePage, theKids, theStage, theCloseup, theMentalism, theIllusion, theComedy) {
//alert ('sm ' + theKids);

    var strdisplay = ""
    
    document.write ('<tr>');
    document.write ('<td width=30 align="center"><img src="images/bullet_up.jpg" border="0"></td>');
    document.write ('<td width="150">');
    
    document.write ('<a href="' + thePage + '">');
    document.write (theName + '</a></td>');

    strdisplay = smallimage(theKids, "kids","Childrens Magic and Entertainment");
    document.write (strdisplay);;
	
	strdisplay = smallimage(theStage, "stage","Stage, Parlour and Cabaret");
    document.write (strdisplay);;

	strdisplay = smallimage(theCloseup, "closeup","Close Up, Table Hopping and Street Magic");
    document.write (strdisplay);;

	strdisplay = smallimage(theMentalism, "mentalism","Mentalism and Mind Reading");
    document.write (strdisplay);;
	 
	strdisplay = smallimage(theIllusion, "illusion","Large stage Illusions");
    document.write (strdisplay);;

	strdisplay = smallimage(theComedy, "comedy","Comedy");
    document.write (strdisplay);;
	 
    document.write ('</tr>');
	 

}
function largeimage(theDisplay, theImage, theAlt) {
//alert ('smd ' + theDisplay);

  var strreturn = ""
  var colstring='&nbsp;';
	
	strreturn = '<TD width=85 height=85>';
    colstring='&nbsp;';
  
    if (theDisplay.toLowerCase() == 'y') {
		colstring = '<img src="images/menus/la_genre_' + theImage + '.jpg" ';
		colstring += ' height="85" width="85" border="0" ';
		colstring += ' alt="' + theAlt + '">';
	}

  strreturn += colstring + '</TD>';		 
  return strreturn;

}

function smallimage(theDisplay, theImage, theAlt) {
//alert ('smd ' + theDisplay);

  var strreturn = ""
  var colstring='&nbsp;';
	
	strreturn = '<TD width=43 height=43>';
    colstring='&nbsp;';
  
    if (theDisplay.toLowerCase() == 'y') {
		colstring = '<img src="images/menus/sm_genre_' + theImage + '.jpg" ';
		colstring += ' height="43" width="43" border="0" ';
		colstring += ' alt="' + theAlt + '">';
	}

  strreturn += colstring + '</TD>';		 
  return strreturn;

}

// *****************************************
// * Create an instance of the Menu object
// *****************************************
var Booking = new booking();

