<!-- Begin

function popUp(URL) {
day = new Date();
id = 1; //day.getTime();
eval("prosperb" + id + " = window.open(URL, '" + id + "', 'titlebar=0,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=no,width=540,height=600,left=0,top=0').focus();");
}

// End -->
// 0,menubar=0,resizable=no,width=260,height=308,left=388,top=240').focus();");



<!-- Start of StatCounter Code http://www.statcounter.com -->
var sc_project=1436094; 
var sc_invisible=0; 
var sc_partition=13; 
var sc_security="f2f50670"; 
var sc_text=2; 
<!-- end of StatCounter Code -->


function Store(name, left, top, low, high) {
	this.name = name;
	this.left = left;
	this.top = top;
	this.low = low;	   // image low range
	this.high = high;  // image high range
}

var stores = null;
var map_left = 40;
var map_top = 100;
var loopers = null;

function getStores() {
	if (stores == null) {
		stores = new Array();
		stores['store_newark_ranch99'] = new Store("Newark Ranch 99", map_left+315, map_top+135, 2, 3);
		stores['store_fremont_ranch99'] = new Store("Fremont Ranch 99", map_left+325, map_top+105, 2, 3);
		stores['store_union_city_marina'] = new Store("Union City Marina Food", map_left+336, map_top+80, 1, 3);
		stores['store_milpitas_lion'] = new Store("Milpitas City Square Lion Supermarket", map_left+418, map_top+215, 2, 2);
		stores['store_tully_lion'] = new Store("San Jose Tully Rd Lion Supermarket", map_left+480, map_top+332, 2, 2);
		stores['store_saratoga_lion'] = new Store("San Jose Saratoga Rd Lion Plaza", map_left+375, map_top+345, 2, 2);
		stores['store_newark_lion'] = new Store("Newark Lion Shopping Center", map_left+350, map_top+150, 2, 2);
		stores['store_mission_lion'] = new Store("Mission Square Lion Supermarket", map_left+400, map_top+175, 2, 2);
		stores['store_capitol_lion'] = new Store("San Jose Capitol Expressway Lion Plaza", map_left+473, map_top+357, 2, 2);
		stores['store_cupertino_marina'] = new Store("Cupertino Marina Food", map_left+335, map_top+335, 2, 2);
		stores['store_san_mateo_marina'] = new Store("San Mateo Marina Food", map_left+135, map_top+135, 2, 2);
	}
}

function showMap(store) {
	var coverage_map = document.getElementById('coverage_map');
	if (store == 'coverage') {
		coverage_map.innerHTML = "<img src='Images/map_coverage.JPG' onclick='closeMap()' />";
		coverage_map.style.display = '';
		coverage_map.style.left = map_left;
		coverage_map.style.top = document.body.scrollTop + map_top;

		return;
	}
	
	getStores();

	var down_arrow = document.getElementById('down_arrow');
	down_arrow.style.left = stores[store].left;
	down_arrow.style.top = document.body.scrollTop + stores[store].top;
	down_arrow.style.display = '';
	down_arrow.children.item(0).alt = stores[store].name;
	
	coverage_map.innerHTML = "<img src='Images/map_coverage_blank.JPG' onclick='closeMap()' />";
	coverage_map.style.top = document.body.scrollTop + map_top;
	coverage_map.style.display = '';
	coverage_map.children.item(0).alt = stores[store].name;
}

function closeMap() {
	document.getElementById('coverage_map').style.display='none';
	document.getElementById('down_arrow').style.display='none';
}


function looper(store, index) {
	getStores();
	
	if (index == -1) {
		return;
	}
	document.getElementById('looper').innerHTML= "<img src='Images/" + store + ((index==0 || index==1)?"":index) + ".JPG' width='320' height='240'/>";
	if (stores[store].low == stores[store].high) {
		return;
	}
	
	if (index == stores[store].high) {
		index = stores[store].low - 1;  //loop back
	}
	
	var index = index + 1;	
	if (stores[store].high != '' && index <= stores[store].high) {
		setTimeout("looper('"+store+"', "+index+")", 3000);
	}
}


// The <div> tag must not have space in front of it
// Format:
// <a onClick="Toggle(this)"><img src="Images/sym_minus.gif"/></a><a href="lightbox.html">Lightbox</a><div></div>
//
function Toggle(node)
{
	// Unfold the branch if it isn't visible
	if (node.nextSibling.nextSibling.style.display == 'none')	// check the 'DIV'
	{
		// Change the image (if there is an image)
		if (node.children.length > 0)
		{
			if (node.children.item(0).tagName == "IMG")
			{
				node.children.item(0).src = "Images/sym_minus.JPG";
			}
		}

		node.nextSibling.nextSibling.style.display = '';
	}
	// Collapse the branch if it IS visible
	else
	{
		// Change the image (if there is an image)
		if (node.children.length > 0)		
		{
			// tagName must be in Uppercase
			if (node.children.item(0).tagName == "IMG")
			{
				node.children.item(0).src = "Images/sym_plus.JPG";
			}
		}

		node.nextSibling.nextSibling.style.display = 'none';
	}

}

// Turn on name1, turn off name2 and name3
function TurnOnOff(id1, id2, id3)
{
	var div1 = document.getElementById(id1);
	if (div1.style.display == '') {
		div1.style.display = 'none';
	} else {
		div1.style.display = '';
	}
	if (id2 != null) {
		var div2 = document.getElementById(id2);
		if (div2 != null) {
			div2.style.display = 'none';
		}
	}
	if (id3 != null) {
		var div3 = document.getElementById(id3);
		if (div2 != null) {
			div3.style.display = 'none';
		}
	}
}

// Turn on name1
function TurnOn(id1)
{
	if (id1 == null) {
		return;
	}
	document.getElementById(id1).style.display = '';
}

function displayPicture(name) {
	document.getElementById('picture').innerHTML="<img src='Images/"+name+"'/>";
	document.getElementById('pic_name').innerHTML="<span id='bold'>Picture code:</span> " + name;
	document.getElementById('item_name').value="Free Picture - " + name;
	document.getElementById('item_name'+'_text').value="Free Picture w/ Text - " + name;
	document.getElementById('item_name'+'_logo').value="Free Picture w/ Logo - " + name;
}

function mod(num1, num2) {
	return Math.floor(num1/num2);
}

function remainder(num1, num2) {
	return num1-num2*Math.floor(num1/num2);
}

var page_size=6;
// page starts from 0, no is the pic numbers of the category
function display(page, category, no) {

	var begin = page*page_size;
	var end = ((no/page_size>(page+1))?(page+1):(no/page_size))*page_size;
	
	var name = "";
	var rem_i = 0;
	
	for (i = begin; i < end; i++) {
		name = "pic_"+category+"_"+i+".JPG";
		rem_i = remainder(i, page_size);
		document.getElementById("pic_chooser"+rem_i).innerHTML = "<img src='Images/pic_"+category+"_"+i+"_thumb.JPG' width='100' height='100' style=\"border:1px solid orange\" onclick=\"TurnOn('larger_view');displayPicture('"+name+"')\">";
	}
	// clear out the rest of the unused spots
	for (j = rem_i+1; j < page_size; j++) {
		document.getElementById("pic_chooser"+j).innerHTML = "&nbsp;";
	}		
	document.getElementById("container").style.display = '';
	if (page <= 0) {
		document.getElementById("larrow").innerHTML = "<img src='Images/sym_leaf.JPG' width='18' height='9'/>";
	}else {
		document.getElementById("larrow").innerHTML = "<input type='image' onclick='page=prev(page,\""+category+"\", "+no+")' src='Images/sym_minus.JPG' width='18' height='9' alt='previous page'/>";
	}
	
	if (page >= Math.floor(no / page_size)) {
		document.getElementById("rarrow").innerHTML = "<img src='Images/sym_leaf.JPG' width='18' height='9' />";
	} else {
		document.getElementById("rarrow").innerHTML = "<input type='image' onclick='page=next(page,\""+category+"\", "+no+")' src='Images/sym_plus.JPG' width='18' height='9' alt='next page'/> ";
	}
	return page;
}

function prev(page, category, no) {

	page = page==0?page:page-1;

	display(page, category, no);
	return page;
}

function next(page, category, no) {
	
	page = Math.min(Math.floor(no/page_size), page+1);
	display(page, category, no);
	return page;
}

var doc = "";
function loadContent(url) {

	// try loading the faster MS XMLHTTP object for IE 6.0 first
	try	{
		http_request=new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		// false back for IE 5.5
		try	{
			http_request=new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e1) {}
	}
	// for non-MS browswers
	if (http_request==null)	{
		http_request=new XMLHttpRequest();
	}
	http_request.onreadystatechange=processRequest;
	http_request.open('GET', url, false);			// not allowed by name secure server
	http_request.send();
	
	return doc;
}

function processRequest() {
	if (http_request.readyState==4) {
		doc = http_request.responseText;
	}
}

// Used by the content iframe to get to a navigation link, by going thru the parent's content iframe (again ;)
// e.g. in lightbox_1sided_1825.html, <a onclick="gotoParent('lightbox_picture.html#1825')>18"x25" picture</a>

function gotoParent(loc) {
	//parent.document.getElementById('content').src=loc;
	//document.getElementById('content').innerHTML=loadContent(loc);
	gotoContent(loc);
}

// Used by the navigation links to get to the content in the content iframe
// e.g. in lightbox.html, <a onclick="gotoContent('lightbox_1sided_1825.html')
function gotoContent(loc) {

	var size = getStringParameter(loc, "size");
	var type = getStringParameter(loc, "type");
	
	document.getElementById('content').innerHTML = getContent(loc, type, size);
	document.getElementById('right').innerHTML = faqsale(type, size);
	window.scrollTo(0,0);
}



function getContent(loc, type, size) {

	if (loc.indexOf('lightbox') == 0) {
		return lightbox(type, size);
	} else if (loc.indexOf('details') == 0) {
		return details();
	} else if (loc.indexOf('picture') == 0) {
		return picture();
	} else if (loc.indexOf('submit') == 0) {
		//return submit();
	} else if (loc.indexOf('faq.html') == 0) {
		return faq();
	} else if (loc.indexOf('sales') == 0) {
		return form_generator('sales');
	} else if (loc.indexOf('status') == 0) {
		return form_generator('status');
	} else if (loc.indexOf('support') == 0) {
		return form_generator('support');
	} else if (loc.indexOf('rma') == 0) {
		return form_generator('rma');
	} else if (loc.indexOf('warranty') == 0) {
		return form_generator('warranty');
	} else {
		return loadContent(loc);  // s.a. faq.html, shipping.html
	}
	return "";
}

function form_obj(middle_link, middle_name, form_link, form_name, form_title, description, required_fields) {
	this.middle_link = middle_link;
	this.middle_name = middle_name;
	this.form_link = form_link;
	this.form_name = form_name;
	this.form_title = form_title;
	this.description = description;
	this.required_fields = required_fields;
}

var form_objects = new Array();
form_objects["sales"] = new form_obj("care.html", "Customer Care", "sales", "Sales, Pre-Sales Questions", 
	"Please use this form <span id='bold'>only</span> for volume discount, government order or custom order inquiries.",
	"Provide details on the volume needed, government order, or custom order.", 
	"realname,email,description");
form_objects["rma"] = new form_obj("return.html", "Exchange, Return, Warranty and Life After", 
	"rma", "RMA Requester", 
	"Please use this form <span id='bold'>only</span> for exchange or return.",
	"Describe the reason for a return or exchange.", "realname,email,onumber,odate,description");
form_objects["warranty"] = new form_obj("return.html", "Exchange, Return, Warranty and Life After", 
	"warranty", "Warranty Repair Requester", 
	"Please use this form <span id='bold'>only</span> for warranty repair.",
	"Describe the reason for a return or exchange.", "realname,email,onumber,odate,description");
form_objects["status"] = new form_obj("care.html", "Customer Care", "status", "Order Status Inquiry", 
	"Please use this form <span id='bold'>only</span> for order status inquiry.",
	"Specify related information if needed", "realname,email,onumber,odate");
form_objects["support"] = new form_obj("care.html", "Customer Care", "support", "Tech Support Questions", 
	"Please <span id='bold'>only</span> use this form for technical support or trouble shooting questions.",
	"Describe your problem here.", "realname,email,onumber,odate,description");


function s(kind) {
	var v = false;
	
	clear_fields();
	if ('sales' == kind) {
		v = verify_name() && verify_email() && verify_description(kind);
	} else if ('rma' == kind) {
		v = verify_name() && verify_email() && verify_onumber() && verify_odate(kind) && verify_description(kind);
	} else if ('warranty' == kind) {
		v = verify_name() && verify_email() && verify_onumber() && verify_odate(kind) && verify_description(kind);
	} else if ('status' == kind) {
		v = verify_name() && verify_email() && verify_onumber() && verify_odate(kind);
	} else if ('support' == kind) {
		v = verify_name() && verify_email() && verify_description(kind);
	} 
	
	if (v == true) {
		document.getElementById('subject').value = kind + ': ' + 
			(document.getElementById('onumber')!=undefined?document.getElementById('onumber').value+' - ':'')
			 + document.getElementById('realname').value;	
	}
	return v;
}

function clear_fields() {

	document.getElementById('error').innerHTML = '';
	document.getElementById('realname').style.backgroundColor = '';
	document.getElementById('email').style.backgroundColor = '';
	if (document.getElementById('onumber') != undefined) {
		document.getElementById('onumber').style.backgroundColor = '';
	}
	if (document.getElementById('odate') != undefined) {
		document.getElementById('odate').style.backgroundColor = '';
	}
}

function verify_name() {
	var value =document.getElementById('realname').value;
	if (value == '' || value.length > 40) {
		document.getElementById('error').innerHTML = "\""+value+"\" is not a valid name.";		
		document.getElementById('realname').style.backgroundColor = 'yellow';
		return false;
	}
	return true;
}

function verify_email() {
	var value = document.getElementById('email').value;
	if (value.indexOf('@') < 2 || value.indexOf('.') < 5 || value.length < 7) {
		document.getElementById('error').innerHTML = "\""+value+"\" is not a valid email.";
		document.getElementById('email').style.backgroundColor = 'yellow';
		return false;
	}
	return true;
}
function verify_onumber() {
	var value = document.getElementById('onumber').value;
	if (value.indexOf('88PM-') != 0 || value.length != 10) {
		document.getElementById('error').innerHTML = "\""+value+"\" is not a valid order number.";
		document.getElementById('onumber').style.backgroundColor = 'yellow';
		return false;
	}
	return true;
}

// must be a valid date between 11/1/2006 and today
function verify_odate(kind) {
	var value = document.getElementById('odate').value;
	
	if (value == 'mm/dd/2006') {
		document.getElementById('error').innerHTML = "Please enter a valid order date.";
		document.getElementById('odate').style.backgroundColor = 'yellow';
		return false;	
	}
	var time = Date.parse(value);
	var order = new Date();
	order.setTime(time);
	
	time = Date.parse('777777');
	var fake = new Date(NaN);
	if (order.toString() == fake.toString()) {
		document.getElementById('error').innerHTML = "Please enter a valid order date.";
		document.getElementById('odate').style.backgroundColor = 'yellow';
		return false;	
	}

	time = Date.parse('11/01/2006');
	var begin = new Date();
	begin.setTime(time);
	begin.setHours(9);  // 8am
	var now = new Date();
	now.setHours(9);

	if (order < begin || order > now) {
		document.getElementById('error').innerHTML = (order.getMonth()+1)+'/'+order.getDate()+'/'+order.getFullYear()+' is not a valid order date.';
		document.getElementById('odate').style.backgroundColor = 'yellow';
		return false;
	}
	if (kind == 'rma') {
		if (now.getTime() - order.getTime() > 30*24*3600*1000) { // 30 days
			document.getElementById('error').innerHTML = 'Your return/exchange period has expired.';
			document.getElementById('odate').style.backgroundColor = 'yellow';
			return false;
		}
	}
	document.getElementById('odate').value = (order.getMonth()+1)+'/'+order.getDate()+'/'+order.getFullYear();
	
	return true;
}

function verify_description(kind) {

	if (form_objects[kind].description == document.getElementById('description').innerHTML) {
		document.getElementById('error').innerHTML = 'Please enter a description.';
		document.getElementById('description').style.backgroundColor = 'yellow';
		return false;
	}
	return true;
}

function f(elem){
	elem.style.backgroundColor='white';
	elem.select();
	elem.style.color = 'black';
}

function form_generator(kind) {
	var str = "\
	<table width='100%' border='0'>\
		<tr><td colspan='3'><a href='lightbox.html' id='navigation_blue'>Home</a> >>\
			<a href=\"javascript:gotoContent('"
			+ form_objects[kind].middle_link + "')\" id='navigation_blue'>" + form_objects[kind].middle_name + " </a>>>\
			<a href=\"javascript:gotoContent('" + form_objects[kind].form_link + "')\" id='navigation_blue'>"
			+ form_objects[kind].form_name + " Form</a> \
		</td></tr>\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr> \
			<td id='underlined' colspan='2' width='70%'>" + form_objects[kind].form_name + " </td>\
			<td id='underlined'>Related Forms</td>\
		</tr>\
		<tr width='100%'>\
			<td colspan='2' width='80%'>\
				" + form_objects[kind].form_title + "\
			</td>\
			<td valign='top' rowspan='4' width='20%'>\
				<a href=\"javascript:gotoContent('sales')\">Sales Questions</a><br/>\
				<a href=\"javascript:gotoContent('status')\">Order Status</a><br/>\
				<a href=\"javascript:gotoContent('support')\">Tech Support</a><br/>\
				<a href=\"javascript:gotoContent('rma')\">RMA Requester</a><br/>\
				<a href=\"javascript:gotoContent('warranty')\">Repair Requester</a><br/>\
			</td> \
		</tr>\
		<tr>\
			<td colspan='3' id='error' style='color:red;font-weight:bold'></td>\
		</tr>\
		<tr>\
			<form method='post' action='http://prosperb.com/cgi-bin/formmail.pl'>\
				<INPUT TYPE='hidden' NAME='recipient' VALUE='service@prosperb.com'>\
				<INPUT TYPE='hidden' NAME='subject' VALUE='" + form_objects[kind].form_subject + "'>\
				<INPUT TYPE='hidden' NAME='redirect' VALUE='http://prosperb.com/submitted.html'>\
				<INPUT TYPE='hidden' NAME='required' VALUE='" + form_objects[kind].required_fields + "'>\
			<td>\
				Your name<span style='color:red'>*</span>:\
			</td>\
			<td>\
				<input type='text' id='realname' name='realname' \
					onfocus=\"f(this)\" value='' size='25' maxlength='25'/>\
			</td>\
		</tr>\
		<tr>\
			<td>Your email<span style='color:red'>*</span>:</td>\
			<td><input type='text' id='email' name='email' \
				onfocus=\"f(this)\" value='' size='25' maxlength='25'/>\
			</td>\
		</tr>\
		";
	if (kind != 'sales') {
		str += "\
		<tr>\
			<td>Order number<span style='color:red'>*</span>:</td>\
			<td><input type='text' id='onumber' name='onumber' \
				onfocus='f(this)' value='' size='25' maxlength='12'/>\
			</td>\
			<td>&nbsp;</td>\
		</tr>\
		<tr>\
			<td>Order date<span style='color:red'>*</span>:</td>\
			<td><input type='text' id='odate' name='odate' \
				style='color:gray' onfocus='f(this)' value='mm/dd/2006' size='25' maxlength='10'/>\
			</td>\
			<td>&nbsp;</td>\
		</tr>\
		";
	}
	str += "\
		<tr>\
			<td>Description<span style='color:red'>"
				+ (form_objects[kind].required_fields.indexOf('description')>-1?"*":"")
				+"</span>:</td>\
			<td colspan='2'>\
				<textarea id='description' name='description' rows='5' cols='40' maxlength='200' \
					wrap valign='top' style='color:gray' onfocus=\"f(this)\">"
				+ form_objects[kind].description + "</textarea>\
			</td>\
		</tr>\
		<tr><td colspan='3'><span style='color:red'>*</span>: required fields</td></tr>\
		<tr>\
			<td colspan='2' align='center'>\
				<input type='submit' value='send' onclick=\""+"return s('"+kind+"')\">\
			<td>&nbsp;</td>\
		</tr>\
		</form>\
	</table>\
		";
	return str;
}

function picture(type, size) {
/*
	if (cat == null) {
		cat = loadAll();
	}
	str = "\
		<table align='center' width='100%' border='0'>\
		  <tr><td colspan=2>&nbsp;</td></tr>\
		  <tr>\
		    <td align='left' valign='top' id='underlined' width='65%'>\
			<span id='attention_black'>\
		" + product.name + "\
			</span>\
				</td>\
				<td>\
					<span id='attention_black'>		\
		" + (size != null?(product.w +"x"+product.h):"") + "\
					</span>\
						</td>\
					  </tr>\
					  <tr><td colspan='2'>&nbsp;</td></tr>\
					  <tr>\
					    <td colspan='2'>\
						      A lightbox picture is a film digitally printed in a\
						      semi-translucent ink, made to allow back light to project vibrant colors. You can choose from the\
						      following 50 existing pictures, or send in your own (additional charges apply). <br/>\
						      <br/>\
						      Your free lightbox picture will be <span id='bold'>voided</span> if:\
						      <li> <span id='bold'>no matching lightbox</span> is placed in the same order. </li>\
						      <li> you have choosen to <span id='bold'>submit artwork</span> for the lightbox. </li>\
						      </span>\
						</td>\
					  </tr>\
					  <tr><td colspan='2'>&nbsp;</td></tr>\
					  <tr>\
					    <td id='underlined' colspan='2'>\
		" + (size != null?"Choose A Category":"Categories Of Free Pictures" + "\
					</td>\
				  </tr>\
				  <tr>\
				    <td align='center'  colspan='2'>\
					      <table width='90%' align='center' border='0'>\
						<tr><td> \
		";
		if (size != null) {
			str += "<a href=\"#\" onclick=\"javascript:display(0, 'scenary', no['scenary'])\">Scenary</a>";
		}
		str += "</td><td>";
		if (size != null) {
			str += "<a href=\"#\" onclick=\"javascript:display(0, 'people', no['people'])\">People</a>";
		}
		str += "</td><td>";
		if (size != null) {
			str += "<a href=\"#\" onclick=\"javascript:display(0, 'food', no['food'])\">Food</a>";
		}
		str += "</td></tr> \
			        <tr valign='bottom'>\
	        		  <td><img src='Images/pic_scenary_0_thumb.JPG'";
	        if (size != null) {
			str += "onclick=\"display(0, 'scenary',no['scenary'])\" style=\"border:1px solid orange\" ";
		}
		str += "/> \
	          </td>\
	          <td>\
	          	<img src='Images/pic_people_0_thumb.JPG' ";
	          

*/    

}


function faqsale(type, size) {
	if (cat == null) {
		cat = loadAll();
	}
	str = "\
	<table border='0' width='190px' height='100%' style='border-left:10px solid white;background-image:url(Images/sym_background3.JPG);background-repeat:repeat-y'>\
		";
		if (size != null) {
			str += "\
		<tr><td id='underlined' colspan='2'><span id='attention'>FAQ</span></td></tr> \
		<tr><td colspan='2'><img src='Images/sym_greyline.GIF'/></td></tr>\
				";
			var product = cat.products[type];
			for (i in product.faqs) {
				str += "\
		<tr><td colspan='2'>&nbsp;</td></tr>\
		<tr><td colspan='2'><a id='navigation_blue'>" + product.faqs[i].q + "</a></td></tr>\
		<tr><td colspan='2' align='right'><a href='"+product.faqs[i].link+"'>read more...</a></td></tr>\
		<tr><td colspan='2'>&nbsp;</td></tr>\
		<tr><td colspan='2'><img src='Images/sym_greyline.GIF'/></td></tr>\
					";
			}
			str += "\
		<tr><td colspan='2'>&nbsp;</td></tr>\
				";
		}
		str += "\
		<tr><td id='underlined' colspan='2' style='padding-left:10px'>\
			<span id='attention'>Popular Items</span></td></tr>\
		<tr><td colspan='2'><img src='Images/sym_greyline.GIF'/></td></tr>\
			";
				
		for (i in cat.populars) {
			str += "\
		<tr><td colspan='2'>&nbsp;</td></tr>\
		<tr><td colspan='2' style='padding-left:10px;'><a id='navigation_blue'>\
			" + cat.populars[i].name + "</a></td></tr>\
		<tr>\
			<td style='padding-left:10px;'>On Sale: <span id='sale'>\
				" + cat.populars[i].price + "</span></td>\
			<td><a id='button' style='font-size:10px;line-height:12px' href='\
				" + cat.populars[i].link + "'>Buy Now</a></td>\
		</tr>\
		<tr><td colspan='2'>&nbsp;</td></tr>\
		<tr><td colspan='2'><img src='Images/sym_greyline.GIF'/></td></tr>\
				";
		}
		
		str += "\
		<tr><td colspan='2' height='100%'>&nbsp;</td></tr>\
  	</table>\
  	";
	return str;
}

function lightbox(type, size) {
	var product = lookup2(type, size);

	var str = "\
	<table border='0'> \
		<tr><td colspan='3'><a href='lightbox.html' id='navigation_blue'>Home</a> ";
	if (product.parent != null && product.parent.name != undefined) { // a top product parented by a catalog
		str += "\
			>> <a href='" + product.parent.link + "'id='navigation_blue'>" + product.parent.name + "</a>\
			";
	}
	str += "\
			>> <a href='" + product.link + "'id='navigation_blue'>" + product.name + "</a></td></tr>\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr>\
			<td align='left' valign='top' id='underlined' colspan='2'>\
				<span id=\"attention_black\">" + (size != null? product.parent.name : product.name) +"</span>\
			</td>\
			<td width='37%'><span id=\"attention_black\">" + (size != null?product.name:"")+"</span></td>\
		</tr>\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr>\
			<td align='center' valign='top' width='25%'>" +	product.image + " <br/>\
				<span id=\"attention\">" + product.caption + "</span>\
			</td>\
			<td valign='top' colspan='2'>\
				<table>";

	if (size != null) {
		str += "\
					<tr><td id=\"underlined\">Description</td></tr>\
					<tr><td>" + product.parent.long_description + " " + product.add_desc + "\
						<br/><br/>\
					</td></tr>";
	}

	str += "\
					<tr><td id='underlined'>Features</td></tr>\
					<tr><td>\
						<ul>\
						<li>Slim, Lightweight and Portable</li>\
						<li>Convenient, ready to hang</li>\
						<li>Bright and even distribution of lighting</li>\
						<li>Energy Efficient</li>\
						<li>Easy to service</li>\
						<li>Comes with "+product.caption+"</li>\
						</ul>\
						<br/>\
					</td></tr>";

	if (size == null) {
		str += "\
					<tr><td id='underlined'>Sizes</td></tr> \
					<tr><td> \
						<ul>";
		var psize = null;
		for (i in product.sizes) {
			psize = product.sizes[i];
			str += "\
							<li>" + psize.code+ " size: " + psize.long_name + "</li> ";
		}
		str += "\
						</ul> \
					</td></tr> ";
	}

	str += "\
					<tr><td id='underlined'>Colors</td></tr> \
					<tr><td> \
						Stylish aluminum casing in various colors, suitable for indoor use.";

	if (size != null) {
		str += "\
						<table id=\"borderized_blue\" align=\"center\">\
							<tr>";
		for (i in product.colors) {
			str += "				<td id='borderized_blue'>" + product.colors[i].name + "</td>";
		}
		str += "				</tr><tr>";
		for (i in product.colors) {
			str += "				<td id='borderized_blue'>" + product.colors[i].img + "</td>";
		}
		str += "  				</tr>\
						</table>";
	}
	str += "\
					</td></tr>\
	    				<tr><td>&nbsp;</td></tr>\
				</table>\
   			</td>\
		</tr>\
		";

	if (size != null && type != "led") {
		str += "\
		<tr><td id='underlined' colspan='3'>Free Picture</td></tr>\
		<tr><td colspan='3'>\
			This lightbox comes with 1 free lightbox picture!  There are over 50 free\
			pictures to choose from. You can even add text and logo to the free picture (additional charges apply).\
		</td></tr> \
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr><td id=\"underlined\" colspan='3'>Create Picture From Your Art Work</td></tr>\
		<tr><td colspan='3'>\
			If you must use your own art work, please go to the Submit Artwork menu, and follow the instructions.  \
		</td></tr>";
	}
	str += "\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr><td colspan='3' id='underlined'>Specs</td></tr>\
		<tr><td colspan='3'>"; 
	if (size == null) {
		str += "\
			<table id=\"borderized_blue\" width=\"100%\"> \
				<tr> \
					<td id=\"borderized_blue\">Model</td> \
					<td id=\"borderized_blue\">Dimensions</td> \
					<td id=\"borderized_blue\">Weight</td> \
					<td id=\"borderized_blue\">Power consumption </td> \
					<td id=\"borderized_blue\">Read More</td> \
				</tr>\
			";

			var psize = null;
			for (i in product.sizes) {
				psize = product.sizes[i];
				str += "\
				<tr>\
					<td id=\"borderized_blue\">\
						<a href='" + psize.link + "' id=\"blue\">"+psize.model+"</a>\
					</td>\
					<td id=\"borderized_blue\">" + psize.dimension + "</td>\
					<td id=\"borderized_blue\">" + psize.weight + "</td>\
					<td id=\"borderized_blue\">" + psize.power + "</td>\
					<td id=\"borderized_blue\">\
						<a href='" + psize.link + "' id=\"blue\">more...</a></td>\
				</tr>\
					";
			}
			str += "\
			</table>\
				";
	} else {
			str += "\
			<table id=\"borderized_blue\" width=\"100%\">\
				<tr>\
					<td id=\"borderized_blue\">Dimensions</td>\
					<td id=\"borderized_blue\">Visible Window</td>\
					<td id=\"borderized_blue\">Weight</td>\
					<td id=\"borderized_blue\">Power consumption </td>\
				</tr>\
				<tr>\
					<td id=\"borderized_blue\">"+product.w+"x"+product.h+"x"+product.d+"</td>\
					<td id=\"borderized_blue\">"+product.vw+"x"+product.vh+"</td>\
					<td id=\"borderized_blue\">"+product.weight+"</td>\
					<td id=\"borderized_blue\">"+product.power+"</td>\
				</tr>\
			</table>\
		</td></tr>\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr><td colspan='3' id=\"underlined\">Order</td><tr>\
		<tr><td colspan='3'><span id='bold'>1. &nbsp; Add A Lightbox Model To Cart: </span></td><tr>\
		<tr><td colspan='3'>\
			<table id=\"borderized_blue\" width=\"100%\">\
				<tr>\
					<td id=\"borderized_blue\">Model</td>\
					<td id=\"borderized_blue\">Color</td>\
					<td id=\"borderized_blue\">Price</td>\
					<td id=\"borderized_blue\">Add To Cart</td>\
				</tr>\
				";

		for (i in product.colors) {
			str += "\
				<tr>\
					<td id=\"borderized_blue\">\
						" + product.model + "-" + product.colors[i].code + "\
					</td>\
					<td id=\"borderized_blue\">" + product.colors[i].name + "</td>\
					<td id=\"borderized_blue\">\
					";

			if (product.colors[i].price.list_price > product.colors[i].price.our_price) {
					str += "\
						<span id=\"mark4sale\">\
							" + product.colors[i].price.list_price + "\
						</span><br/>\
						<span id=\"sale\">\
							" + product.colors[i].price.our_price + "\
						</span>\
						";
			} else {
				str += product.colors[i].price.our_price;
			}
			str += "\
					</td>\
					<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\
					<td id=\"borderized_blue\" valign=\"middle\">\
						<input type=\"image\" src=\"https://www.paypal.com//en_US/i/btn/sc-but-03.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal, fast, free and secure!\">\
						<img border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">\
						<input type=\"hidden\" name=\"add\" value=\"1\">\
						<input type=\"hidden\" name=\"cmd\" value=\"_cart\">\
						<input type=\"hidden\" name=\"business\" value=\"cashier@prosperb.com\">\
						<input type=\"hidden\" name=\"item_name\" value=\"\
						" + product.name + ", Color: " + product.colors[i].name + ", Size: " + product.code + "\">\
						<input type=\"hidden\" name=\"item_number\" value=\"\
						" + product.model+"-"+product.colors[i].code + "\">\
						<input type=\"hidden\" name=\"amount\" value=\"\
						" + product.colors[i].price.our_price + "\">\
						<input type=\"hidden\" name=\"no_shipping\" value=\"2\">\
						<input type=\"hidden\" name=\"return\" value=\"http://prosperb.com/thankyou.html\">\
						<input type=\"hidden\" name=\"cancel_return\" value=\"http://prosperb.com/cancel.html\">\
						<input type=\"hidden\" name=\"no_note\" value=\"1\">\
						<input type=\"hidden\" name=\"currency_code\" value=\"USD\">\
						<input type=\"hidden\" name=\"lc\" value=\"US\">\
						<input type=\"hidden\" name=\"bn\" value=\"PP-ShopCartBF\">\
					</td>\
					</form>\
				</tr>\
	  			";
		}
		str += "\
			</table>";
	}
	str += "\
		</td></tr>\
			";
	if (size != null && type != "led") {
      		str += "\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr>\
			<td><span id='bold'>2. &nbsp;Get Free Picture</span></td>\
			<td colspan='2'><a id='button' href=\"javascript:gotoParent('picture.html?size="+size+"')\">\
				&nbsp;Get Free Picture &nbsp;</a> \
			</td>\
		</tr>\
		<tr>\
			<td><span id='bold'>Or Submit Custom Picture Artwork</span></td>\
			<td colspan='2'><a id='button' href=\"javascript:gotoParent('submit.html?size="
				+ size + "')\">&nbsp; Submit Artwork &nbsp;</a> \
			</td>\
		</tr>\
			";
	}
		
	str += "\
	</table>\
	";
	return str;
}

function details() {
	if (cat == null) {
		cat = loadAll();
	}
	
	var str = "\
	<table width='100%' height='100%' align='center' border='0'>\
		<tr><td colspan='3'>&nbsp;</td></tr>\
		<tr>\
			<td style='font-weight:bold;font-style:italic;color:blue;font-size:15px'>Welcome!</td>\
			<td colspan='2' style='font-weight:bold;font-style:italic;color:orange;font-size:15px'>\
				Great Deals Every Day!\
			</td>\
		</tr>\
		<tr valign='top'>\
			<td align='left'>\
				We provide the most trendy electronic signs, billboards and displays, direct from factory!\
				Great for your business appeal and your advertisement needs, increase name recognition and maximize revenue.\
				<br/><br/>\
			</td>\
			<td><a href='javascript:gotoParent(\"picture\")'><img src='Images/sym_shipping.JPG' border='0'/></a></td>\
			<td>\
				Over 50 types of light boxes, LED signs, electronic displays and accessories.  Our scrolling light box\
				is one-of-a-kind! <br/>\
				<br/>\
				<a href='javascript:gotoParent(\"picture.html\")' id='navigation_blue'>Free Pictures with Lightbox</a> <br/>\
				<a href='javascript:gotoParent(\"lightbox?type=led\")' id='navigation_blue'>Free Software with LED Sign</a> <br/>\
				<a href='javascript:gotoParent(\"shipping.html\")' id='navigation_blue'>Free DHL Upgrade</a> <br/>\
				<a href='javascript:gotoParent(\"submit\")' id='navigation_blue'>Free Installation of Custom Pic w/ Lightbox</a> <br/>\
				<a href='javascript:gotoParent(\"lightbox?type=scroll\")' id='navigation_blue'>Awesome Scrolling Lightboxes</a> <br/>\
				<a href='javascript:gotoParent(\"picture\")' id='navigation_blue'>50 Free Pics to Choose From</a> <br/>\
			</td>\
		</tr>\
		<tr>\
			<td colspan='3' style='font-weight:bold;font-style:italic;color:blue;font-size:15px' valign='bottom'>\
				Product Categories<br/>\
				<hr valign='top' style='color:blue' width='100%'/>\
			</td>\
		</tr>\
		";

	var product;
	var j = 0;
	for (i in cat.products) {
		if (remainder(j, 3) == 0) {
			str += "\
		<tr align='center'>\
			";
		}
		product = cat.products[i];
		str += "\
			<td id='underlined' width='30%' valign='top'> \
				<a href='"+product.link+"' style='font-size:11px;font-weight:bold;color:black'>"+product.name+"</a><br/>\
				<a href='"+product.link+"'>"+getImageTag(product.code, product.name, "width='"+(product.img_ratio<1?product.img_ratio*140:140)+"' height='"+(product.img_ratio<1?140:140/product.img_ratio)+"'")+"</a><br/>\
				<span style='font-weight:normal'>" + product.description + "</span>\
			</td>\
				";
		if (remainder(j, 3) == 2) {
			str += "\
		</tr>\
			";
		}
		j++;
	}
	fillRow(j, 3);

	str += "\
	</table>\
			";
	return str;
}

function faq() {
	if (cat == null) {
		cat = loadAll();
	}
	
	var str = "\
	<table border='0'>\
		<tr><td colspan='2'><a href='lightbox.html' id='navigation_blue'>Home</a> >>\
			<a href=\"javascript:gotoContent('care.html')\" id='navigation_blue'>Customer Care</a> >>\
			<a href=\"javascript:gotoContent('faq.html')\" id='navigation_blue'>FAQ</a>\
		</td></tr>\
		<tr><td colspan='2'>&nbsp;</td></tr>\
		<tr><td width='50%' id='underlined'>Introduction</td>\
			<td rowspan='2' colspan='2' id='underlined'><a name='top'></a>Index Of Frequently Asked Questions<br/>\
			<ul>\
				<li><a href='#intro'>Introduction</a></li>\
		";
	var product = null;
	var faq = null;
	var k = 0;
	for (i in cat.products) {
		product = cat.products[i];
		str += "<li><a href=\"#lightbox_" + k + "\">FAQs For " + product.name + "</a></li>";
		k++;
	}
	str += "	</ul>\
		</td></tr>\
		<tr><td valign='top'>\
			Prosperb Media highly cares about your shopping experience and the satisfaction of your lightbox products.\
			This FAQ is furnished to answer some most anticipated questions.  If you still have more questions, please\
			direct them to customer service and we will include the answers to the most frequently asked questions here.\
		</td></tr>\
		";

	k = 0;
	for (i in cat.products) {
		product = cat.products[i];
		str += "\
		<tr><td id='header' colspan='3'><a name='lightbox_" + k + "'>FAQs For " + product.name + "</a></td></tr>\
			";

		for (j in product.faqs) {
			faq = product.faqs[j];
			str += "\
		<tr><td id='underlined' colspan='2'>" + faq.q + "</td>\
			<td align='center' width='20%'><a href='#top'>top</a></td></tr>\
		<tr><td colspan='3'>" + faq.a + "<br/><br/></td></tr>\
			";
		}
		k++;
	}

	str += "\
		<tr><td colspan='3'></td></tr>\
	</table>\
		";
	return str;
}


// Limitation: the URL can <span id='bold'>only</span> contains 2 request parameters:
//  ?type=1sided&size=A2
function getRequestParameter(name) {

	var url=new String(window.location);
	return getStringParameter(url, name);
}

function getStringParameter(str, name) {
	var index = str.indexOf(name+"=");
	var value = null;
	if (index> 0) {
		var start = index+name.length+1;
		var amp = str.lastIndexOf("%26");
		var end = (amp > 0 && start < amp) ? amp : str.length;
		value=str.substring(start, end);
	}
	if (value == "null" || value == "") {
		value = null;
	}
	return value;
}

function FAQ(q, a) {
	this.q = q;
	this.a = a;
	this.link;
	this.parent;  	// the product object, assigned in addFAQ()
}

function addFAQ(faq) {
	this.faqs[faq.q] = faq;
	faq.parent = this;
	faq.link = "javascript:gotoParent(\"faq.html#" + this.code + "\")";
}

function Price(list_price, our_price) {
	this.list_price = "$" + list_price;
	this.our_price = "$" + our_price;
}

var count = 0;

function setPrice(price, addToPopulars) {
	this.price = price;  // adding a price to a color object
	price.parent = this;
	if (addToPopulars == 1 && price.list_price > price.our_price) {
		var color = price.parent;
		var size = color.parent;
		var product = size.parent;
		cat.populars[count++] = new Popular(product.name + " " + size.name + 
			" <span style=\"color:"+color.name+"\">" + color.name + "</span> w/ " + size.caption, 
			price.our_price, size.link);
	}
}

function Color(code, name) {
	this.code = code;
	this.parent;  // the size object
	this.name = name=="Original"?"Matte Silver":name;
	this.img = getImageTag(name, name, "");
	this.price;  // the price object
	
	this.setPrice = setPrice;
}

function addColor(color) {
	this.colors[color.code] = color;
	color.parent = this;
}

function Size(code, model_prefix, w, h, d, vw, vh, weight, power, add_desc, img_size, caption) {

	this.code = code;
	this.parent;  // the product object

	this.model = model_prefix + "-" + code;
	this.name = w + "\"" + "x" + h + "\"";
	this.long_name = this.name + " (" + Math.round(w/12*10)/10 + "'" + "x" + Math.round(h/12*10)/10 + "')";
	this.dimension = this.name + "x" + d + "\"";
	this.area = Math.ceil(w * h / 144); // area in square inches
	this.link; 

	this.w = w;
	this.h = h;
	this.d = d;
	this.vw = vw;
	this.vh = vh;
	this.weight = weight + " lb";
	this.power = power + " W";
	this.add_desc = add_desc;
	this.img_size = img_size;
	this.image;
	this.img_src;
	this.caption = caption;
	
	this.colors = new Array();
	this.addColor = addColor;
}


function Popular(name, price, link) {
	this.name = name;
	this.price = price
	this.link = link;
}

function addSize(size) {
	this.sizes[size.code] = size;
	size.parent = this;
	size.link = "javascript:gotoParent(\"lightbox" + "?type=" + this.code + "&size=" + size.code +"\")";
	size.image = getImageTag(this.code, this.name, size.img_size);
}

function printProduct() {
	var str = new String(this.code + ": ");
	for (i in this.sizes) {
		str += " Size:" + this.sizes[i].code;
	}
	alert(str);
}

// use 'code' for lightbox type:  lightbox_1sided.JPG
// use 'name' for color type: lightbox_Black.JPG
function getImageTag(code, name, img_size) {
	var str = "";
	if (name.indexOf('croll') != -1) { // 392 x 487
		str = "\
		<object	type='application/x-shockwave-flash' data='prosperb.swf' " + img_size + ">\
			<param name='movie' value='prosperb.swf' />\
			<img src='Images/lightbox_scroll.JPG' " + img_size + " alt='scrolling lightbox - please install Macromedia Flash for an animated experience.' />\
		</object>\
			";
	} else {
		str = "<img src=\"Images/lightbox_" + code +".JPG\" border=\"0\"" + img_size + " alt=\"" + name+"\" />";
	}	
	return str;
}

function Product(code, name, long_name, description, caption, img_src, img_w, img_h, long_description) {
	this.code = code;
	this.parent;
	
	this.name = name;
	this.long_name = long_name;
	this.description = description;
	if (img_src) {
		this.img_src = img_src;
	} else {
		this.img_src = "Images/lightbox_" + code +".JPG";
	}
	this.img_w = img_w;
	this.img_h = img_h;
	this.img_ratio = img_w / img_h;
	this.image = getImageTag(code, name, "");
	this.caption = caption;
	this.add_desc = "";
	this.long_description = long_description;
	
	this.sizes = new Array();
	this.addSize = addSize;

	this.faqs = new Array();	
	this.addFAQ = addFAQ;

	this.link = "javascript:gotoParent(\"lightbox?type=" + code + "\")";
	this.print = printProduct;
}

// adding a product to a catalog
function addProduct(product) {
	this.products[product.code] = product;
	product.parent = this;
}


function printCatalog() {
	var str = new String();
	
	for (i in this.products) {
		str += " "+this.products[i].code + " ";
	}
	alert(str);
}

function Catalog() {
	this.products = new Array();
	this.populars = new Array();
	
	this.addProduct = addProduct;
	this.print = printCatalog;
}


var cat = null;

function loadAll() {
	if (cat == null) {
		cat = new Catalog();
	}

	// 1sided
	var aProduct = new Product("1sided", "Ultra-Slim Lightbox", "Ultra-Slim Indoor Lightbox", 
			"Super light-weight and portable. <span id='bold'>only</span> 1.77\" thick and weights from 10.5 pounds!", 
			"Free picture value up to $150", "", 96, 142,
			"This light panel is ultra slim at less than 2 inches thick! It is brightly and evenly \
			lit by light-weight super-thin internal T5 lights. T5 lights are known to be long lasting, \
			bright, and energy efficient. Comes with wall-mount rings, ready to hang. Suitable for indoor \
			use at office reception, restaurants, hotel lobby and retail stores. It is an advertising light\
			panel, use it as a menu board, or to hold enticing pictures of food in a restaurant, \
			or as a picture frame for the office Teamwork pictures, or to display latest fashion trend in\
			a retail store, or to use it as a graphic window store sign.  It is an attention-getting\
			signage for your store or office for a very low price.");
	cat.addProduct(aProduct);

	var aSize = new Size("A2", "SBPM", 18, 24, 1.77, 15.2, 21.3, 10.5, 42, 
		"This model is <span id='bold'>only</span> 10.5 pounds! You can virtually bring it anywhere with you.",
		"width='122px' height='198px'", "Free picture of $45");	
	aProduct.addSize(aSize);
		
	var grey = new Color("GRY", "Gray");
	var blue = new Color("BLU", "Blue");
	var black = new Color("BLK", "Black");
	var ori = new Color("ORI", "Original");
	
	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);

	grey.setPrice(new Price(279.99, 279.99), 1);
	blue.setPrice(new Price(279.99, 279.99), 1);
	black.setPrice(new Price(279.99, 259.99), 1);
	ori.setPrice(new Price(279.99, 279.99), 1);
	
	var faq1 = new FAQ("How Do I Care For My " + aProduct.name + "?", 
		"The " + aProduct.name + "es are super robust when used with care. They are not waterproofed.  \
		Please keep them for indoor use <span id='bold'>only</span>. <br/><br/> \
		Also, turn off the lights for just a few hours a day will give extra long-life to the lights.");
	var faq2 = new FAQ("How Do I Replace The Picture In My " + aProduct.name + "?",
		"Replacing pictures in a " + aProduct.name + " is very simple. Just open the lightbox cover \
		with the provided key, remove the old picture, and replace the new picture.  If the pictures are \
		ordered from Prosperb Media, the sizes will fit perfectly without trimming.");
	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);

	
	aSize = new Size("A1", "SBPM", 25, 36, 1.77, 22.24, 33.1, 20, 84, "",
		"width='154px' height='250px'", "Free picture valued at $94");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");
	
	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);

	grey.setPrice(new Price(369.99, 349.99), 1);
	blue.setPrice(new Price(369.99, 369.99), 1);
	black.setPrice(new Price(369.99, 369.99), 1);
	ori.setPrice(new Price(369.99, 369.99), 1);
	
	aSize = new Size("A0", "SBPM", 32, 48, 1.77, 29.33, 44.88, 33, 168, "",
		"", "Free picture valued at $150");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);
	
	grey.setPrice(new Price(442.99, 442.99), 1);
	blue.setPrice(new Price(442.99, 424.99), 1);
	black.setPrice(new Price(442.99, 442.99), 1);
	ori.setPrice(new Price(442.99, 442.99), 1);


	// 2sided
	var aProduct = new Product("2sided", "Double-Sided Lightbox", "Double-Sided Slim Indoor Lightbox", 
			"Holds 2 backlit pictures, one on each side. Stylish aluminum casing. <span id='bold'>only</span> 2.36\" thick!", 
			"Free picture value up to $300", "", 286, 239,
			"Double the display, double the impression!  This bright and slim lightbox is great\
			for retail stores, restaurants, offices, shopping centers, hotel lobbies, hair salons and tradeshow booth\
			display.  Use it as a divider, place it above hallways or lobbies, and can be viewed by traffic\
			from both sides.  Lit by internal T5 lights, lightweight, bright, long lasting and energy efficient.");
	cat.addProduct(aProduct);
	var aSize = new Size("A2", "SDPM", 18, 25, 2.36, 14.4, 20.9, 16, 42, "",
		"width='180px' height='150px'", "Free picture valued at $90");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);	

	faq1 = new FAQ("How Do I Care For My " + aProduct.name + "?", 
		"The " + aProduct.name + "es are super robust when used with care. They are not waterproofed.  \
		Please keep them for indoor use <span id='bold'>only</span>. <br/><br/> \
		Also, turn off the lights for just a few hours a day will give extra long-life to the lights.");
	faq2 = new FAQ("How Do I Replace The Pictures In My " + aProduct.name + "?",
		"Replacing pictures in a " + aProduct.name + " is very simple. Just open the lightbox front and back covers \
		with the provided key, remove the old pictures, and replace the new pictures.  If the pictures are \
		ordered from Prosperb Media, the sizes will fit perfectly without trimming.");
	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);
	
	grey.setPrice(new Price(465.99, 449.99), 1);
	blue.setPrice(new Price(465.99, 465.99), 1);
	black.setPrice(new Price(465.99, 465.99), 1);
	ori.setPrice(new Price(429.99, 465.99), 1);
	

	aSize = new Size("A1", "SDPM", 25, 36.6, 2.36, 20.9, 30.7, 30.5, 84, "",
		"width='240px' height='190px'", "Free picture valued at $188");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);
	
	grey.setPrice(new Price(649.99, 649.99), 1);
	blue.setPrice(new Price(649.99, 599.99), 1);
	black.setPrice(new Price(649.99, 649.99), 1);
	ori.setPrice(new Price(649.99, 649.99), 1);
	

	aSize = new Size("A0", "SDPM", 32.7, 48.4, 2.36, 28.74, 44.5, 50, 168, "", "", "Free picture valued at $300");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);
	
	grey.setPrice(new Price(929.99, 929.99), 1);
	blue.setPrice(new Price(929.99, 929.99), 1);
	black.setPrice(new Price(929.99, 899.99), 1);
	ori.setPrice(new Price(929.99, 929.99), 1);	
	

	// scroll
	var aProduct = new Product("scroll", "Scrolling Lightbox", "Scrolling Lightbox", 
			"The coolest lightbox ever! Holds 2 to 3 backlit pictures, each is scrolled into view and displayed momentarily.", 
			"Free picture value up to $450", "", 120, 144,
			"This lightbox is THE attention getter! It contains 2 to 3 pictures, each picture is scrolled into \
	  		view and displayed momentarily in a looping fashion.  This kind of lightbox is new, innovative and classy,\
	  		and is used by luxury brands in upscale settings like the Union Square at San Francisco downtown.\
	  		Not only will your vistors praise it, but it will also attract new patrons!  We have seen customers come\
	  		to our scrolling lightbox locations to see it scroll!  Your store will be the coolist attraction of\
	  		in blocks. <br/> \
	  		<br/> \
	  		The lightbox comes with a hightech controller to set how long each individual picture should stay.\
	  		It also has 2 buttons, one to turn on or off the scrolling, so it will stay at one picture.  The \
	  		other button is to turn on/off the internal lights to conserve electricity.  When you close up shop at \
	  		night, you can leave the lightbox off at your favoriate picture. <br/> \
	  		<br/>\
	  		The lightbox is brightly and evenly lit by light-weight\
	  		super-thin internal T5 lights.  T5 lights are known to be long lasting, bright, and energy efficient.\
	  		The lightbox comes with wall-mount rings, and is ready to hang.  Suitable for indoor use at office reception, \
	  		hallways, hotel lobby and retail stores. ");

	cat.addProduct(aProduct);
	var aSize = new Size("0608", "JLPM", 24.8, 31.5, 4.53, 20.9, 30.7, 33, 84, "",
		"width='240px' height='190px'", "Free picture valued at $225");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);	

	faq1 = new FAQ("How Do I Care For My " + aProduct.name + "?", 
		"The " + aProduct.name + " is very robust when used correctly, and can last many years. \
		However, since the lightbox is not waterproofed and the pictures are not weatherproofed, \
		please keep them strictly for indoor use. <br/><br/> \
		Please do not place the lightbox under direct sunlight, as the sunlight will fade the \
		colors of the picture. In addition, excessive heat will also damage the lightbox pictures \
		by making them expand and sag, and will affect the movement of the drum.\
		<br/><br/>\
		Turning off the lightbox and its lights for at least 8 hours a day will drastically \
		prolong the life of the lightbox pictures and the lightbox itself. Also, setting the \
		scrolling to a reasonable amount will reduce mechanical problem to a minimum. Suggest \
		to leave the \"picture showing interval\" at 20 seconds or more for each picture. \
		If used correctly, the lightbox pictures can resist fading and sagging for at least \
		1 year without replacement. ");
	faq2 = new FAQ("How Do I Care For The Pictures In My " + aProduct.name + " Pictures?",
		"The " + aProduct.name + " pictures are designed for indoor use. Do not allow excessive\
		heat and sunlight on the pictures. Excessive heat and sunlight will make the pictures\
		expand and sag, and will affect the movement of the lightbox drums.  Turn off the lightbox\
		lights for 8 hours a day will drastically prolong the life of the lightbox pictures.");
	var faq3 = new FAQ("How Do I Replace The Picture In My " + aProduct.name + "?",
		"Replacing pictures in a Scrolling Lightbox is a 5-step process:\
		<ul>\
		<li>1. Open the lightbox cover with the key provided, and unload \
			the old strip of pictures by unwinding the 2 drums.</li>\
		<li>2. Align and tape the new strip of pictures to the silver guide at the top drum, \
			using 3 sections of 2\"-wide tapes to tape at the middle, the left edge, the \
			right edge.</li>\
		<li>3. Plug the \"program controller\" to the parallel port of the lightbox, and hit \
			the \"Reset\" button.  The top drum will start moving and scroll in the picture strip.  \
			Make sure the picture strip is straight while scrolling.</li>\
		<li>4. When the picture strip is scrolled up to the bottom, release the \"Reset\" button, \
			and use 3 sections of 2\"-wide tapes to tape the bottom edge of the picture strip \
			to the silver guide of the lower drum. </li>\
		<li>5. Affix silver labels to the left and right edges of each pictures according to \
			instructions in the User's Manual. These silver labels signal to the lightbox \
			when to stop on a picture, and when to change the scrolling direction.</li>\
		</ul>\
		You can read more about this and other settings in the User's Manual.");

	
	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);
	aProduct.addFAQ(faq3);
	
	grey.setPrice(new Price(1469.99, 1399.99), 1);
	blue.setPrice(new Price(1469.99, 1469.99), 1);
	black.setPrice(new Price(1469.99, 1469.99), 1);
	ori.setPrice(new Price(1469.99, 1469.99), 1);
	

	aSize = new Size("0710", "JLPM", 27.6, 39.4, 4.53, 28.74, 44.5, 38, 168, "",
		"width='280px' height='223px'", "Free picture valued at $312");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);
	
	grey.setPrice(new Price(2199.99, 2199.99), 1);
	blue.setPrice(new Price(2199.99, 1999.99), 1);
	black.setPrice(new Price(2199.99, 2199.99), 1);
	ori.setPrice(new Price(2199.99, 2199.99), 1);
	

	aSize = new Size("1208", "JLPM", 31.5, 47.3, 4.53, 28.74, 44.5, 46.5, 168, "", 
		"width='315px' height='283px'", "Free picture valued at $450");	
	aProduct.addSize(aSize);

	grey = new Color("GRY", "Gray");
	blue = new Color("BLU", "Blue");
	black = new Color("BLK", "Black");
	ori = new Color("ORI", "Original");

	aSize.addColor(grey);
	aSize.addColor(blue);
	aSize.addColor(black);
	aSize.addColor(ori);
	
	grey.setPrice(new Price(2499.99, 2499.99), 1);
	blue.setPrice(new Price(2499.99, 2499.99), 1);
	black.setPrice(new Price(2499.99, 2459.99), 1);
	ori.setPrice(new Price(2499.99, 2499.99), 1);	



	// free picture
	var aProduct = new Product("picture", "Free Lightbox Picture", "Free Lightbox Picture", 
			"Receive up to 3 free lightbox pictures for each lightbox you order from us! Valued up to $450! ", 
			"Free picture value up to $450", "", 130, 130, "");
	cat.addProduct(aProduct);
	//aProduct.link = "javascript:gotoContent(\"picture\")";
	aProduct.link = "picture.html";

	var aSize = new Size("A2", "PIC", 18, 25, 0, 18, 25, 2, 0, "",
		"width='80px' height='80px'", "Free picture valued at $45");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;
	ori = new Color("ORI", "Original");
	aSize.addColor(ori);	
	ori.setPrice(new Price(45, 0), 0); // not add to sale

	faq1 = new FAQ("How Do I Get " + aProduct.name +"?",
		"You can get free lightbox pictures by ordering the matching lightbox.  For example, if you order\
		a 18\"x25\" Ultra-Slim Lightbox, you will get a free lightbox picture of the same size valued at $45.\
		If you order a 1208 Scrolling Lightbox, you will get 3 free lightbox picture of 32\"x48\" valued at\
		$450.  Make sure you place the matching lightbox and its pictures in the shopping cart when you\
		order.  <br/>\
		Any of the followings will <span id='bold'>void</span> your free picture offer: \
		<ul>\
		  <li>Ordering free pictures alone; or</li>\
		  <li>Ordering free pictures without the matching lightbox; or</li>\
		  <li>Submitting artwork for customized pictures of the same size</li>\
		</ul>\
		");
	faq2 = new FAQ("Can I Customize The " + aProduct.name + "?",
		"Yes, you can customize the free lightbox picture by adding text and uploading a logo. \
		Additional charges apply.\
		Be sure to specify formatting instructions for the text and logo, such as font size, color,\
		font family, and placements.  There maybe delay if the instruction is not clear. \
		An online proof (not a printed proof) will be provided before printing. \
		");
	faq3 = new FAQ("Will You Provide Proof For My Free Pictures?",
		"If you you have not customized the free picture, what you see online will be printed, no \
		additional online or printed proof will be provided. <br/><br/> \
		If you have customized the free picture, we will provide an online proof thru email for you\
		to confirm the text and logo layout.  There will not be a printed proof. <br/><br/>\
		");
	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);
	aProduct.addFAQ(faq3);
	
	aSize = new Size("A1", "PIC", 25, 36, 0, 25, 36, 4.5, 0, "",
		"width='320px' height='320px'", "Free picture valued at $94");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;
	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(94, 0), 0); // not add to sale
	

	aSize = new Size("A0", "PIC", 32, 48, 0, 32, 48, 6.5, 0, "", "", "Free picture valued at $150");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(150, 0), 0); // not add to sale	
	
	aSize = new Size("0608", "PIC", 24.8, 31.5, 0, 24.9, 31.5, 4, 0, "", "", "Free picture valued at $75");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(75, 0), 0); // not add to sale

	aSize = new Size("0710", "PIC", 27.6, 39.4, 0, 27.6, 39.4, 5, 0, "", "", "Free picture valued at $104");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(104, 0), 0); // not add to sale

	aSize = new Size("1208", "PIC", 32, 48, 0, 32, 48, 6.5, 0, "", "", "Free picture valued at $150");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"picture?size="+aSize.code+"\")";
	aSize.link = "picture.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(150, 0), 0); // not add to sale
	
	
	// submit artwork
	var aProduct = new Product("submit", "Submit Artwork", "Submit Artwork For Custom Picture", 
			"Upload your graphics and get your custom picture installed and shipped with the lightbox! ", 
			"Free installation valued at $50", "", 130, 130, "");
	cat.addProduct(aProduct);
	aProduct.link = "submit.html";

	var aSize = new Size("A2", "ART", 18, 25, 0, 18, 25, 2, 0, "",
		"width='80px' height='80px'", "Free installation valued at $40");	
	aProduct.addSize(aSize);
	ori = new Color("ORI", "Original");
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;
	aSize.addColor(ori);	
	ori.setPrice(new Price(45, 45), 1);

	faq1 = new FAQ("",
		"\
		");
	faq2 = new FAQ("",
		"\
		");
	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);
	
	aSize = new Size("A1", "ART", 25, 36, 0, 25, 36, 4.5, 0, "",
		"width='320px' height='320px'", "Free installation valued at $45");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(94, 94), 1);
	

	aSize = new Size("A0", "ART", 32, 48, 0, 32, 48, 6.5, 0, "", "", "Free installation valued at $50");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(150, 150), 1);	
	
	aSize = new Size("0608", "ART", 24.8, 31.5, 0, 24.9, 31.5, 4, 0, "", "", "Free installation valued at $40");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(75, 75), 1);	

	aSize = new Size("0710", "ART", 27.6, 39.4, 0, 27.6, 39.4, 5, 0, "", "", "Free installation valued at $45");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(104, 104), 1);	

	aSize = new Size("1208", "ART", 32, 48, 0, 32, 48, 6.5, 0, "", "", "Free installation valued at $50");	
	aProduct.addSize(aSize);
//	aSize.link = "javascript:gotoContent(\"submit?size="+aSize.code+"\")";
	aSize.link = "submit.html?size="+aSize.code;

	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(150, 150), 1);	
	


	// led
	var aProduct = new Product("led", "LED Sign", "Programmerable LED Sign", 
			"Sharp and attention getting! Displays moving text in many languages. Instantly re-programmable! Free software. <span id='bold'>only</span> 2.76\" thick.", 
			"Free software valued at $70", "", 231, 62, 
			"Sharp and attention getting! Displays moving text in many languages. Instantly re-programmable!\
			Free software. <span id='bold'>only</span> 2.76\" thick. Can hold 4086 characters, and up to\
			100 pages. Several scrolling effects.");
	cat.addProduct(aProduct);

	var aSize = new Size("MS", "LED", 18, 16, 2.76, 18, 16, 13, 25, "This compact metal sign can fit into smaller display space at a retail store.",
		"width='180px' height='84px'", "Free software valued at $70");	
	aProduct.addSize(aSize);
	black = new Color("BLK", "Black");
	aSize.addColor(black);	
	black.setPrice(new Price(529.99, 499.99), 1);

	aProduct.addFAQ(faq1);
	aProduct.addFAQ(faq2);
	
	aSize = new Size("SS", "LED", 18, 16, 2.76, 18, 16, 9, 25, 
		"This compact stainless steel portable sign is light, shiny and has a luxury look.  It is a great tradeshow companion, makes you look cool!",
		"width='180px' height='84px'", "Free software valued at $70");	
	aProduct.addSize(aSize);
	ori = new Color("ORI", "Original");
	aSize.addColor(ori);
	ori.setPrice(new Price(759.99, 759.99), 1);
	

	aSize = new Size("ML", "LED", 40, 6.5, 2.76, 38, 5, 20, 25, 
		"This model is suitable for programmerble displays at retail stores", 
		"", "Free software valued at $70");	
	aProduct.addSize(aSize);
	black = new Color("BLK", "Black");
	aSize.addColor(black);	
	black.setPrice(new Price(529.99, 499.99), 1);
	
	aSize = new Size("SL", "LED", 40, 5.5, 1, 38, 5, 6, 10, 
		"This stainless steel model is super thin at only 1\" and super light at only 5lbs. Its awesome features include a remote control and USB port! No need to climb up a chair to upload new messages, or to worry about your new laptop not having a RS232 port any more. Use it at your retail store above the entrance or inside the window to introduce your services, or use it inside the store to promote hot items.  It is also very easy to carry to a tradeshow.", 
		"", "Free software valued at $70");	
	aProduct.addSize(aSize);
	black = new Color("BLK", "Black");
	aSize.addColor(black);	
	black.setPrice(new Price(759.99, 759.99), 1);
	
	aSize = new Size("SL2C", "LED", 40, 5.5, 1, 38, 5, 6, 10, 
		"This colorful stainless steel model can display 3 colors: red, green and yellow.  It makes your message much more attractive and interesting.  It is super thin at only 1\" and super light at only 5lbs. Its awesome features include a remote control and USB port! No need to climb up a chair to upload new messages, or to worry about your new laptop not having a RS232 port any more. Use it at your retail store above the entrance or inside the window to introduce your services, or use it inside the store to promote hot items.  It is also very easy to carry to a tradeshow, and your colorful LED sign will receive much more attention than the papers and posters at your competitors booth.",	
		"", "Free software valued at $70");	
	aProduct.addSize(aSize);
	black = new Color("BLK", "Black");
	aSize.addColor(black);	
	black.setPrice(new Price(859.99, 859.99), 1);
	
	return cat;
}


function lookup2(product_code, size_code) {
	if (cat == null) {
		cat = loadAll();
	}
	if (size_code == null) {
		return cat.products[product_code];  // returning a product 
	}
	return cat.products[product_code].sizes[size_code];  // returning a product w/ the size
}

function load() {
	if (cat == null) {
		cat = loadAll();
	}
	return cat;
}


function fillRow(start, colsize) {
	if (remainder(start, colsize) == 0) {
		return;
	}
	for (k = start; k < (mod(start, colsize) + 1) * colsize; k++) {
		document.write("<td>&nbsp;na</td>");
		if (remainder(k,colsize) == colsize - 1) {
			document.write("</tr>");
		}
	}
}
