// if the user is on an iPhone, iPod or Android
//	send them to index_iphone.html
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/android/i))) {
	if (document.cookie.indexOf("iphone_redirect=false") == -1)
		window.location = "index_iphone.html"; 
}

aSmartphones = new Array (
	"<p>Predictions are that within 4 years, 80% of all computers sold will have the form factor of a tablet like Apple's iPad. In many parts of the world, more people access the Internet on a cell phone than on the traditional computer.</p>\
							<p>The significance of all this is that any website you build today, must consider that visitors will come to your website through these devices. And, unless you want to ignore them, you must design the site so that their experience reflects well on you.</p>\
							<p class='links'><a href='javascript:ReadMore (\"smartphones\");'>More ...</a></p>",
	"<p>Predictions are that within 4 years, 80% of all computers sold will have the form factor of a tablet like Apple's iPad. In many parts of the world, more people access the Internet on a cell phone than on the traditional computer.</p>\
							<p>The significance of all this is that any website you build today, must consider that visitors will come to your website through these devices. And, unless you want to ignore them, you must design the site so that their experience reflects well on you.</p>\
							<p>The problem is that most websites do not work well on a small screen commonly found on an iPhone or Android phone.  The text is too small to see clearly and the buttons and links are also too small.  The site becomes too frustrating for the visitor.</p>\
							<p>True, the visitor can always find your site when they get back to their computer, but more likely than not, they are trying to find your site from their smartphone, they have a different reason than when they are trying find your site from their computer.</p>\
							<p>They are mobile and perhaps they need to find your address or your phone number.  Or perhaps, they have an immediate need for your service and if they can't navigate your site, they will find your competitor's site that is smartphone friendly and you have just lost a sale.</p>\
							<p>In the end, most sites built for the smartphone are significantly different from the site that is offered to the visitor on a desktop.  In many cases, smartphone sites offer a limited subset of the bigger site and will target the anticipated needs of a mobile visitor.</p>\
							<p>Whereas a visitor might want detailed information while in front of their computer, a visitor on a smartphone might only want basic information.  The first visitor might want to spend 10-15 minutes reading about your business philosophy, the mobile visitor might only want to know the latest price of one of your products.</p><p>The bottom line is that smart businesses will not ignore the smartphone or tablet visitors for a number of reasons.</p><p>First, today most businesses today will ignore these visitors for the next 3-4 years.  You will have a significant advantage over your competitors if your site caters to these visitors.</p><p>Second, you will have a leg up on your competition in terms of experience.  By paying close attention to these users, you will know what works and what does not work.  You will be able to refine your site and target these visitors.</p>\
							<p>Third, this segment of visitors is growing exponentially and will soon surpass your traditional visitors.</p>\
							<p class='links'><a href='javascript:ReadLess (\"smartphones\");'>Less ...</a></p>"
);

aPrinciples = new Array (
	"<p>There are three principles that are the hallmarks of any good computer application.  These principles also hold true for websites:</p>\
		<ul>\
			<li>Responsiveness</li>\
			<li>Consistency</li>\
			<li>Forgiveness</li>\
		</ul>\
		<p class='links'><a href='javascript:ReadMore (\"principles\");'>More ...</a></p>",
	"<p>There are three principles that are the hallmarks of any good computer application.  These principles also hold true for websites:</p>\
		<ul>\
			<li>Responsiveness</li>\
			<li>Consistency</li>\
			<li>Forgiveness</li>\
		</ul>\
		<h3>Responsiveness</h3>\
		<p>A responsive website does not leave the visitor guessing. A link is obvious and actions taken meet expecations. If a visitor clicks on a link, they should be quickly taken to the next page. If, for some reason, this is not possible, then the site must give the visitor an indication that they will be take to that page in a resonable amount of time.</p>\
		<h3>Consistency</h3>\
		<p>An application must be consistent for the platform.  An application that runs on a Macintosh should not look like a Windows application and vice versa.</p>\
		<p>Web sites are a little trickier because of the many variety of sites that are found on the Internet.  However, most popular sites share certain features that you can use as your model when building a site.</p>\
		<p>Consistency in your site is even more important.  If you choose to remove the underline for your links on a page, all pages on your site should be consistent and not have underlines for their links.  As I write this, Apple chooses to use blue for their links without an underline.</p>\
		<h3>Forgiveness</h3>\
		<p>This characteristic is more important if you building a web application, but should also be kept in mind for other sites as well.</p>\
		<p>As they say in Japan, \"Even monkeys fall from trees\".  We all make mistakes and this is also true for your visitors.  You should make every effort to allow your visitors to correct their mistakes.</p>\
		<p class='links'><a href='javascript:ReadLess (\"principles\");'>Less ...</a></p>"
);

aWebApps = new Array (
	"<p>By far, the web application is the most time consuming to develop and requires a skill set far beyond what the average web developer has.</p><p>Web applications usually have a database element and require a sophisticated knowledge of Javascript and server development.</p><p>An example of a web application would be Amazon. Another would be Craigslist. Amazon is in the business of selling you something, and Craigslist primarily in the business of providing a service.</p>\
		<p class='links'><a href='javascript:ReadMore (\"webapps\");'>More ...</a></p>",
	"<p>By far, the web application is the most time consuming to develop and requires a skill set far beyond what the average web developer has.</p><p>Web applications usually have a database element and require a sophisticated knowledge of Javascript and server development.</p><p>An example of a web application would be Amazon. Another would be Craigslist. Amazon is in the business of selling you something, and Craigslist primarily in the business of providing a service.</p>\
		<p>A web application offers the benefit platform independence for the the user.  For instance if your application runs on any HTML5 browser, you can purchase an inexpensive and less sophisticated computer.  Not only will you save on the initial purchase, you will also save in support costs as well.</p>\
		<p class='links'><a href='javascript:ReadLess (\"webapps\");'>Less ...</a></p>"

);

$(document).ready(function(){ 
	$("#smartphones").html (aSmartphones[0]);
	$("#principles").html (aPrinciples[0]);
	$("#webapps").html (aWebApps[0]);
	$( 'html, body' ).animate( { scrollTop: 0 }, 'slow' );
}); 

function ReadMore (szID) {
	switch (szID) {
		case "smartphones":
			$("#smartphones").html (aSmartphones[1]);
			window.location.hash="SmartPhonesAndTablets"; 
			break;
		case "principles":
			$("#principles").html (aPrinciples[1]);
			window.location.hash="WebsitePrinciples"; 
			break;
		case "webapps":
			$("#webapps").html (aWebApps[1]);
			window.location.hash="WebApplications"; 
			break;
	}
}

function ReadLess (szID) {
	switch (szID) {
		case "smartphones":
			$("#smartphones").html (aSmartphones[0]);
			window.location.hash="SmartPhonesAndTablets"; 
			break;
		case "principles":
			$("#principles").html (aPrinciples[0]);
			window.location.hash="WebsitePrinciples"; 
			break;
		case "webapps":
			$("#webapps").html (aWebApps[0]);
			window.location.hash="WebApplications"; 
			break;
	}
}

