// Static page HTML arrays.// (The arrays may be converted to XML files pending access time testing).// Arrays are ordered according to pageNames array.// Each entry corresponds to a particular static page.// When the visitor selects a static page on the site to visit, a pagename string is// passed as an argument to a javascript function.  The function then uses these arrays// to get the text for the pagename and content sections of index.php// (HTML for individual team/school pages are in lib.php as they are built with php functions)//// pagenames:  strings indicating which static page to displayvar pageNames = ['home','irish','login','wearables','promotional','teams',				 'fund','soon','quote','order'];//// pTitles:  strings for title text of id=pagename section of index.phpvar pTitles = ['<h6>Home page title</h6>',			   '<h6>Embroidered Irish Step Dancing Dresses</h6>',			   '<h6>Customer Login</h6>',			   '<h6>Personalize clothing and accessories with your team, school or corporate logo!</h6>',			   '<h6>Unique gifts with your logo on our promotional products!</h6>',			   '<h6>Custom Team and School Outfits and Accessories</h6>',			   '<h6>Raise money for your team or school!</h6>',			   '<h6>This page coming soon...</h6>',			   '<h6>Request a quote for your order</h6>',			   '<h6>Place an order</h6>'];//// pContentHTML:  HTML code for id=content section of index.phpvar pContentHTML =['<div class="subcontent"><h1>Home page content</h1></div>',// irish step dancing					'<div class="teamcontainer">'+						'<br>'+						'<img src="images/sarahextracts.jpg" width="140" height="312" align="right" alt="" >'+						'<p>Irish Step Dancing schools are filled with beautiful girls and beautiful music.  But what really catches everyone'+"'"+'s eye '+						'are the fabulously embroidered dresses.  Each school has its own signature <i>school dress</i>, worn with pride and passed down ' +						'carefully from dancer to dancer.</p>'+						'<img src="images/pgneedle.jpg" width="200" height="153" align="left"alt="" >'+						'<p>Until now the complexity of the design embroidered on the school dress has been limited by the high cost of hand '+						'embroidery.  With our computerized equipment we are able to significantly lower this obstacle and produce gorgeous dresses '+						'quickly and cost-effectively.</p>'+						'<p>We work directly with the school'+"'"+'s seamstress and embroider each panel of the dress before construction.  We are able to '+						'accurately resize the panel designs for multiple dress sizes, preserving the integrity of the design in the process.</p>'+					'</div>',// login page					'<div id="loginpg">'+						'<p>Please enter your email address and password to access your account.</p>'+						'<br>'+						'<form action="index.php">'+  // next step:  action=account.php - will check validity, redirect to previous page, now logged in							'<div class="loginentry">'+								'<table> '+								'<tr><td><p>Email address:</p></td><td><p><input type="text" size="50" name="email"></p></td></tr>'+								'<tr><td><p>Password:</p></td><td><p><input type="password" name="custpw"></p></td></tr>'+								'<tr><td><p><input type="submit" value="Login" >'+								'<input type="reset" /></p></td></tr>'+								'</table>' +							'</div>' +						'</form>'+					'</div>',// wearables					'<div class="subcontent">'+						'<iframe '+ //						'onload="stretchtarget()"' +						'name="target1" src="http://companycasuals.com/capromo" width="100%" height="800" frameborder="0" scrolling="auto" id="target"></iframe>'+					'</div>',// promotional					'<div class="subcontent">'+						'<iframe ' + //						'onload="stretchtarget()"' +						'name="target2" src="http://linkdemo.logomall.com/ProductSearch/ProductSearchHome.aspx?DPSV_Id=27769&nav=no" width="100%" height="800" frameborder="0" scrolling="auto" id="target"></iframe>'+					'</div>',// teams and schools					'<div id="teams">'+					  '<img src="images/nor_sting_duffel.gif" width="200" height="153" border="0" align="left" alt="" >'+					  '<p>We provide team and school uniforms for many different organizations.  Clothing, accessories '+					  'and promotional items can be embroidered or screen printed with your logo.</p>'+					  '<p>Many groups simplify '+					  'the process by choosing a selection of suggested items ahead of time.  Please contact us for '+					  'information about listing your organization here.</p>'+					  '<br>'+					  '<p>Choose your team or school from the menu below:</p>'+					  '<br>'+					  '<form action="#" onchange="javascript:loadStaticPage(this.options[this.selectedIndex].value)">'+  					  		'<select name="teamname">' +								'<option selected="selected" value="">Choose your team or school</option>' +								'<option value="norwoodsoccer">Norwood Soccer</option>' +								'<option value="stcatherines">St. Catherine School</option>' +							'</select>'+							'<input type="submit" value="Go" />' +					  '</form>'+					'</div>',// Fundraising					'<div class="teamcontainer">' +						'<br>'+						'<p>Selling items with your team or school logo can be a fun way to advertise your group and earn money at the same time.</p>'+						'<p>From inexpensive gifts like pencils and notepads to customized accessories like embroidered fleece blankets and polo shirts, '+						'we have wide range of items to fit every taste and budget.</p>'+						'<p>Some of our recent bestsellers have been embroidered beach chairs, lightweight mesh soccer bags to hold all those cleats, shin '+						'guards and water bottles, and insulated coolers.  With the holiday season approaching, now is the time to order personalized '+						'gifts for all your favorite players.</p>'+						'<p>Personalized gifts make great presents for teachers and coaches too!  Call or email us to discuss how we can help your '+						'group meet their fundraising goals.</p>'+					'</div>',// Coming soon					'<div class="subcontent">' +						'<h1>Content for this page coming soon</h1>' +					'</div>',// Quote					'<div id="teams">' +					 '<div class="teamcontainer">'+					  	'<img src="images/heavey3.jpg" width="200" height="153" border="0" align="left" alt="" >'+						'<br>'+					  	'<p>We would be happy to prepare a quote for your next project.</p>'+						'<p>Please fill out ' +					  	'the information below, and add any other questions or comments.  We '+					  	'will contact you shortly with our response.</p>'+					  	'<div class="clear"></div>'+					 '</div> <!-- teamcontainer -->'+					 '<br><br>'+					 '<form action="mlist.php" method="post">' +					    '<fieldset>'+						 '<label for="name">Name</label>'+					 	 '<input class="formInputField" type="text" name="name" tabindex="1" size="50"/><br/>'+						 '<label for="customeremail">Email Address</label>'+					 	 '<input class="formInputField" type="text" name="customeremail" tabindex="2" size="50"/><br/>' +						 '<label for="name">Phone</label>'+					 	 '<input class="formInputField" type="text" name="phone" tabindex="3"size="50" /><br/>' +						 '<label for="fax">Fax</label>'+					 	 '<input class="formInputField" type="text" name="fax" tabindex="4"size="50" /><br/>' +						 '<label for="contact">Preferred Contact</label>'+						 '<select class="quoteSelect" name="contact">'+						 	'<option selected="selected" value="phoneme" tabindex="5" >Phone</option>'+							'<option value="emailme">Email</option>'+							'<option value="faxme">Fax</option>' +						 '</select><br/><br/>' +						 '<label for="description">Job Description</label>'+						 '<textarea class="formInputField" name="description" tabindex="6" cols="40" rows="9"/>'+						 '</textarea>'+						 '<br/>' +//						 '<div style="clear:both;"><label>&nbsp</label>'+					 	 '<input class="formInputButton" type="submit" name="submit" value="Send" />' +						 '</div>'+						'</fieldset>'+					 '</form>' +				'</div>',// order					'<div class="teamcontainer">'+						'<br>'+						'<img src="images/johndd.jpg" width="160" height="197" align="right" alt="" >'+						'<p>Please look through our catalog of clothing and promotional products.  These list our most popular items. '+						' If you do not see what you are looking for, just call or email us and we will do our best to find it.</p>'+						'<p>Orders can be placed <a href="index.php?teamname=placeorder">online</a>, through email, or by telephone.  '+						'We accept Mastercard and Visa.  As email is not secure, we will follow up '+						'all orders received with a phone call for the credit card name, number and expiration date.</p>'+						'<p>To process your order, we will need the following information:  your name, address, phone number and email, the item name and '+						'number, size, color, quantity, your logo, and '+						'whether the design will be embroidered or screenprinted.  The easiest way to send us your logo is '+						'by attaching it to an email.</p>'+						'<img src="images/mets.jpg" width="200" height="153" align="left"alt="" >'+						'<p>We are happy to quote orders ahead of time, and will make adjustments '+						'to the price for larger quantities.  No minimum quantity required.</p>'+						'<p>If you are ordering team or school merchandise from one of our team pages, note the item number, size, color if appropriate, '+						'and quantity. '+						'You do not need to send us the logo.</p>'+						'<p>We look forward to serving you.</p>'+					'</div>'];////// loadStaticPage(pnstring)//  function: load the new page requested.  Replace the appropriate sections of//			  the HTML code in the document object with the newly chosen page's info.//  args:	  pnstring - static page name string for selecting particular page//	globals:  pageNames array, pTitles array, pContentHTML array//  Note:	  use the php fallback in case no javascript (will require a new page load)function loadStaticPage(pnstring) {	var numStatPages = pageNames.length;//	document.getElementById("pageName").innerHTML = pTitles[0];//	document.getElementById("pagecell1").innerHTML = document.getElementById("pagecell1").innerHTML;	var foundpage = false;	for (i=0;i<numStatPages;i++) {		if (pageNames[i] == pnstring) {			document.getElementById("pageName").innerHTML = pTitles[i];			document.getElementById("content").innerHTML = pContentHTML[i] + '<div class="clear"></div>';			foundpage = true;		}	}	if (!foundpage) {			document.getElementById("pageName").innerHTML = pTitles[0];			document.getElementById("content").innerHTML = pContentHTML[0];	}//// refresh the page since resetting the nested div 	document.getElementById("pagecell1").innerHTML = document.getElementById("pagecell1").innerHTML;}//if we are on a page with an iframe (clothing/promotional page), and we are in Firefox,// we need to enlarge the iframe for the updated content// based on code from dynamicdrive.comfunction stretchtarget() {if (document.getElementById('target').contentWindow){	document.getElementById('target').height = document.getElementById('target').contentWindow.document.body.scrollHeight;}else if (document.getElementById('target').contentDocument) { // ne6 syntax		document.getElementById('target').height = document.getElementById('target').contentDocument.body.offsetHeight;	}	else if (document.getElementById('target').document) { //ie5+ syntax		document.getElementById('target').height = document.getElementById('target').Document.body.scrollHeight;	}}function stretchtarget1() {//	var strframe=document.getElementById('target');//	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];//	var FFextraHeight=getFFVersion>=0.1? 800 : 0; //extra height in px to add to iframe in FireFox 1.0+ browsers		document.getElementById('target').height = document.getElementById('target').contentWindow.document.body.offsetHeight; //	if (strframe && !window.opera) {//				document.getElementById('target').style.display="block";//				if (strframe.contentDocument && strframe.contentDocument.body.offsetHeight) {//ns6 syntax//						document.getElementById('target').height = document.getElementById('target').contentDocument.body.offsetHeight; //				}//				else if (document.getElementById('target').Document && document.getElementById('target').Document.body.scrollHeight) { //ie5+ syntax//						document.getElementById('target').height = document.getElementById('target').Document.body.scrollHeight;//				}//	}}
