<%@ page contentType="text/html"
	 import="olstore.entity.*"
     import="olstore.session.helper.*"
	 import="olstore.framework.EJBHomeFactory"
     import="java.util.Collection"
     import="javax.naming.*"
     import="javax.ejb.*"
          %>

<%-- Get the home item --%>
<%
    EJBHomeFactory factory = EJBHomeFactory.getInstance();
%>

<h2> Populating Items</h2>
<p> Connecting to ItemLocalHome </p>
<%
    ItemLocalHome home = (ItemLocalHome)factory.getLocalHome (EJBHomeFactory.ITEM);
    PropertyLocalHome propertyHome = (PropertyLocalHome)factory.getLocalHome (EJBHomeFactory.PROP);
    PictureLocalHome picHome = (PictureLocalHome)factory.getLocalHome (EJBHomeFactory.PIC);
    ItemHelperLocalHome helperHome = (ItemHelperLocalHome)factory.getLocalHome (EJBHomeFactory.ITEM_HELPER);

%>

<p> Adding  new items to the database</p>

<!-- TO FIX: Need to figure out the proper way to handle transactions here.
If we fail to add a property or a picture, we need to fail on the whole add
item. The easiest way to do this is if the item add command is on method
then an failure inside the method will automatically rollback everything else
However, then the method signiture would become obscenly long.
Any way to do this with getting and using UserTransaction? -->

    <!-- Adding a Computer -->
<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item = Helper.createItem(
                                "Averatec Laptop", "1300",
                                "A very nice small laptop",
                                "This laptop is perfect for the highly mobile dude. A mere 12 inches" +
                                "4lbs and less than 1&quot; thick, it still packs a serious punch",
                                "Computer");
        Collection pics = item.getPictures();
        pics.add ( picHome.create ( "images/comp.jpg", 0 ) );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Cpu Speed", "AMD 2000+ XP") );
        props.add ( propertyHome.create ( "Harddrive Storage", "40 Gb") );
        props.add ( propertyHome.create ( "Memory", "1 gig") );
        props.add ( propertyHome.create ( "CD ROM", "50x CDROM and 12x DVD burner") );
        item.setProperties ( props );
        
	} catch (CreateException e) {
		out.println("Create exception: " + e.getMessage());
	} catch (NamingException e) {
		out.println("Naming exception: " + e.getMessage());
    } catch (Exception e) {
        out.println("Cannot create Item: " + e.getMessage() );
        out.println(e);
    }
%>

    <!-- Adding a Book -->
<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "The Da Vinci Code", "40.99", "An awesome book","","Book");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/book.jpg", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Title", "The Da Vinci Code") );
        props.add ( propertyHome.create ( "Author", "Some Dude") );
        props.add ( propertyHome.create ( "ISBN", "1111100000") );
        props.add ( propertyHome.create ( "Number of Pages", "300") );
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Catuber AS14 CRT Monitor", "89.99", "A Basic CRT Monitor","The Catuber 14 in CRT Monitor is an excellent monitor with its low radiation levels and its high resoltion","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/CRT1.jpg","Catuber AS14 CRT Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Catuber" ) );
	props.add ( propertyHome.create ( "Model", "AS14" ) );
	props.add ( propertyHome.create ( "Type", "CRT" ) );
	props.add ( propertyHome.create ( "Screen Size", "14 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setSpecialOffer(Boolean.TRUE);
	item.setMainPage (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Catuber AS17 CRT Monitor", "135.99", "A Basic 17 inch CRT Monitor","The Catuber 17 in CRT Monitor is an excellent monitor with its low radiation levels and its high resoltion. This monitor is great for everyday computer activities and is an economical choice for those on a budget","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/CRT1.jpg","Catuber AS17 CRT Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Catuber" ) );
	props.add ( propertyHome.create ( "Model", "AS17" ) );
	props.add ( propertyHome.create ( "Type", "CRT" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1280 by 1024" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Catuber AS21 CRT Monitor", "213.99", "A large 21 inch CRT Monitor","The Catuber AS21 monitor is an excellent monitor for its sheer screen size. Perfect for those with a large reinforced desk who have space to fill. This monitor is perfect for people for whom size matters.","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/CRT1.jpg","Catuber AS21 CRT Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Catuber" ) );
	props.add ( propertyHome.create ( "Model", "AS21" ) );
	props.add ( propertyHome.create ( "Type", "CRT" ) );
	props.add ( propertyHome.create ( "Screen Size", "21 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1280 by 1024" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>


<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Baskview BK19C CRT Monitor", "214.98", "A high quality CRT Monitor","The Baskview BK19C 19 inch monitor is an excellent monitor for the advid gamer. It has a large, very bright, 19 inch monitor and has a superb 1280 by 1024 resolution. It even comes with a build-in tv tuner so you can watch tv while you surf the internet","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/CRT3.jpg", "Baskview BK19C CRT Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Baskview" ) );
	props.add ( propertyHome.create ( "Model", "BK19C" ) );
	props.add ( propertyHome.create ( "Type", "CRT" ) );
	props.add ( propertyHome.create ( "Screen Size", "19 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1280 by 1024" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Baskview BKa17 CRT Monitor", "238.98", "An economical 17 inch CRT Monitor","The Baskview BKa17 17 inch monitor is a bargain for its price. It has an 1024 by 768 resolution, and is perfect for surfing on the internet, word processing or playing video games.","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/CRT2.jpg","Baskview BKa17 CRT Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Baskview" ) );
	props.add ( propertyHome.create ( "Model", "BKa17" ) );
	props.add ( propertyHome.create ( "Type", "CRT" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Neupton TD14 LCD Monitor", "538.98", "An excellent small LCD Monitor","The Neupton TD14 14 inch monitor maybe a small monitor, but looks can be deceiving. This monitor has a maximum resolution that would put larger monitors to shame, has a built in tv tuner, and features one of the clearest screens available.","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD6.jpg", "Neupton TD14 LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Neupton" ) );
	props.add ( propertyHome.create ( "Model", "TD14" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "14 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Neupton TD17 LCD Monitor", "799.98", "An excellent 17 inch LCD Monitor","The Neupton TD17 17 is one of the best monitors on the market. It has one of the highest resolutions that you can find anywhere on an LCD monitor, it comes with a built-in TV tuner, and it has a 3 three year waranty","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD6.jpg","Neupton TD17 LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Neupton" ) );
	props.add ( propertyHome.create ( "Model", "TD17" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Neupton TD21W LCD Monitor", "1769.98", "You wont find a better monitor anywhere","This is it, the one you have been looking for. This 12 inch monitor is the highest quality monitor available from this site. The TD21W has an unbelievable 1900 by 1480 maximum resolution, it comes with dual built in tv tuners so you can have picture in picture, and comes with one of the highest quality speakers available. All in a small compact design. If you have to have the best, this is it ","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD3.jpg","Neupton TD21W LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Neupton" ) );
	props.add ( propertyHome.create ( "Model", "TD21W" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "21 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1900 by 1480" ) );
        props.add ( propertyHome.create ( "Widescreen", "yes" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "Dual"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>
<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Neupton MN19W LCD Monitor", "1369.98", "An excellent 19 inch widescreen monitor from Neupton"," The Neupton MN19W is a great 19 inch widescrren LCD monitor. This monitor is great for everyday computer needs as well as being able to display high quality images from the latest games. It even comes with stereo speakers built right in for great audio output. A highly recommended monitor.","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD2.jpg", "Neupton MN19W LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Neupton" ) );
	props.add ( propertyHome.create ( "Model", "MN19W" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "19 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "yes" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setMainPage (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Livizion LS12K LCD Monitor", "188.98", "An excellent small LCD Monitor","The Livizion LS12K 12 inch monitor is a small one, but that is the point. This monitor is for those who don't have a lot of deskspace to spare, and this monitor takes hardly any at all. It even comes with a mounting bracket so you can hang if off the wall. With its built-in tv tuner you can also use this unit as just a tv instead of a monitor","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD7.jpg", "Livizion LS12K LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Livizion" ) );
	props.add ( propertyHome.create ( "Model", "LS12K" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "12 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Livizion LS15M LCD Monitor", "650.98", "An excellent LCD Monitor","The Livizion LS15M 15 inch monitor is a great monitor for the professional. The screen is very sharp and has high resolution making it easier on the eyes for those long business day. The screen is also great for playing video games while the boss is not looking","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD8.jpg", "Livizion LS15M LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Livizion" ) );
	props.add ( propertyHome.create ( "Model", "LS15M" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "15 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1280 by 1024" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
	item.setMainPage(Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Livizion KN15s LCD Monitor", "763.98", "15 inch LCD monitor with tv tuner","The Livizion KN15s 15 inch monitor doubles as a tv. The monitor comes with built-in speakers and a built-in tv card. Use it to watch tv while you type, or to just watch tv. A great choice for those with a small apartment","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD1.jpg","Livizion KN15s LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Livizion" ) );
	props.add ( propertyHome.create ( "Model", "KN15s" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "15 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Livizion LS19M LCD Monitor", "1504.98", "A Large 19 inch LCD Monitor","The Livizion LS19M 15 inch monitor is a great monitor for the professional. The screen is very sharp, large, and has high resolution making it easier on the eyes for those long business day. It also comes with a tv tuner and built-in speakers, allowing you to sneak a peak at the game when your boss is not around","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD8.jpg","Livizion LS19M LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Livizion" ) );
	props.add ( propertyHome.create ( "Model", "LS19M" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "19 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Lazarma CV14WX LCD Monitor", "1604.98", "Widescreen 14 inch Monitor","The Lazarma CV14WX is an excellent monitor for what ever your purpose. It features a 14 inch widescreen display and built in speakers. The widescreen display is perfect for playing video games, and it gives you more room on your desktop to display applications. It like getting a monitor and a half!","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD2.jpg","Lazarma CV14WX LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Lazarma" ) );
	props.add ( propertyHome.create ( "Model", "CV14WX" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "14 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "yes" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Lazarma CV17WX LCD Monitor", "1904.98", "A large Widescreen Monitor","The Lazarma CV17WX is an excellent monitor for what ever your purpose. It features a 17 inch widescreen display and built in speakers. Everything on this monitor appears crisp and clear. The widescreen display is perfect for playing video games, and it gives you more room on your desktop to display applications. It like getting a monitor and a half!","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD2.jpg","Lazarma CV17WX LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Lazarma" ) );
	props.add ( propertyHome.create ( "Model", "CV14WX" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "yes" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Lazarma CV10SD LCD Monitor", "304.98", "A very small Monitor","The Lazarma CV10WX is a very small monitor and is not recommended to be used as the sole or main monitor of your computer, although it can be if you want it to. Its real purpose is to be used as a second monitor. This monitor can be placed on your desk to be used separetly to display whatever you want. It even comes with software to allow you to use it as a picture frame that will cycle through all of your photos. It can also be used to display tv (tv tuner card sold separetly) or to just always have a place to have your planner open.","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD5.jpg","Lazarma CV10SD LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Lazarma" ) );
	props.add ( propertyHome.create ( "Model", "CV10SD" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Lazarma XL19y LCD Monitor", "694.98", "An great monitor from Lazarma ","The Lazarma XL19y is an excellent monitor for whatever computing purpose you have in mind. Excellent for use with word processing, surfing the internet or playing video games. Overall an excellent monitor","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD2.jpg","Lazarma XL19y LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Lazarma" ) );
	props.add ( propertyHome.create ( "Model", "XL17y" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "19 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "no"));
	props.add ( propertyHome.create ( "Tv Tuner", "no"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Murkor VA14j LCD Monitor", "394.98", "A 14 inch Murkor LCD Monitor","The Murkor VA14j 14 inch LCD monitor is an great monitor for the price. It comes with a built in tv tuner and speaker. Great for gamers and excellent for web browsing","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD1.jpg", "Murkor VA14j LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Murkor" ) );
	props.add ( propertyHome.create ( "Model", "VA14j" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "14 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Murkor VA17j LCD Monitor", "594.98", "A 17 inch Murkor LCD Monitor","The Murkor VA17j 17 inch LCD monitor is an great monitor for the price. It comes with a built in tv tuner and speaker. Great for gamers and excellent for web browsing","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD1.jpg","Murkor VA17j LCD Monitor", 0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Murkor" ) );
	props.add ( propertyHome.create ( "Model", "VA17j" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "17 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1024 by 768" ) );
        props.add ( propertyHome.create ( "Widescreen", "no" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
	item.setSpecialOffer (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

<%
    try {
        ItemHelperLocal Helper = helperHome.create();
        ItemLocal item =  Helper.createItem ( "Murkor BH20K LCD Monitor", "1894.98", "Murkor's Best LCD Monitor. 20 inch Widescreen","The Murkor BH20K is a 20 inch widescreen lcd monitor that is one of the best out there. For those that just have to have the latest and greatest this is for you. It comes with built in stereo speaker and a built in tv tuner. And with a 1400 by 1280 maximum resolution what more could you ask for?","Monitor");
        Collection pics = item.getPictures();
        PictureLocal picLocal = picHome.create ( "images/LCD3.jpg", "Murkor BH20K LCD Monitor",0 );
        pics.add ( picLocal );
        item.setPictures ( pics );
        Collection props = item.getProperties ();
        props.add ( propertyHome.create ( "Brand", "Murkor" ) );
	props.add ( propertyHome.create ( "Model", "BH20k" ) );
	props.add ( propertyHome.create ( "Type", "LCD" ) );
	props.add ( propertyHome.create ( "Screen Size", "20 in" ) );
        props.add ( propertyHome.create ( "Maximum Resolution", "1400 by 1280" ) );
        props.add ( propertyHome.create ( "Widescreen", "yes" ) );
	props.add ( propertyHome.create ( "Built in Speakers", "yes"));
	props.add ( propertyHome.create ( "Tv Tuner", "yes"));
        item.setProperties ( props );
	item.setMainPage (Boolean.TRUE);
    } catch (Exception e) {
        out.println("Cannot create Item: " + e);
    }
%>

    <jsp:include page="../views/viewAllItems.jsp" />
