/*Email Instructions display code.  Opens TXT file with necessary code.  */
var quote ="'";

var storm2HTML = '<style type="text/css"><!-- #emailInstructions { width:400px;} --></style><p>To configure your email accounts directly from your BlackBerry smartphone, refer to the Getting Started Guide   included in your smartphone box documentation or <a href="http://demos.blackberry.com/emailsetup_st/na/us/gen/"  onclick="window.open(this.href,'+quote+quote+','+quote+'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=950,height=680,status/'+quote+'); return false">view the BlackBerry&reg; Storm2&trade; smartphone email setup   demo</a>.</p><div class="clear"></div>';

var stormHTML = '<style type="text/css"><!-- #emailInstructions { width:400px;} --></style><p>To configure your email accounts directly from your BlackBerry smartphone, refer to the Getting Started Guide   included in your smartphone box documentation or <a href="http://demos.blackberry.com/emailsetup_st/na/us/gen/"  onclick="window.open(this.href,'+quote+quote+','+quote+'resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=950,height=680,status/'+quote+'); return false">view the BlackBerry&reg; Storm&trade; smartphone email setup   demo</a>.</p><div class="clear"></div>';

var otherHTML='<p>To configure your email accounts   directly from your BlackBerry smartphone, refer to the Getting Started Guide   included in your smartphone box documentation or <a href="http://demos.blackberry.com/emailsetup/na/us/gen/" target="_blank">view the email setup demo</a>.    You can also follow these   instructions:</p><ol type="1">  <li>To   get to the email setup site:     <ul>        <li>If   there&rsquo;s an <strong>Email   Setup</strong> option on your smartphone&rsquo;s home screen, click   it         <li>Alternately, there is a setup wizard   on the device which will either start automatically the first time you turn on   your smartphone, or will be featured as an icon on the home screen of your   smartphone. When you reach the email setup screen of the setup wizard, select <strong>I want to create or   add an email address</strong> </li>      </ul>  <li>Click <strong>Next</strong>  <li>To   accept the terms of the license agreement, select the <strong>I have read and understand the End   User Agreement</strong> option or check box. Click <strong>I   Agree</strong>   <li>To   integrate an email address you already use, enter your full email address and   the password for that email account   <li>Click <strong>Next</strong>. The   site will confirm if the email address has been successfully added. Then click <strong>OK</strong>   <li>If   you want to create a new email address for your BlackBerry smartphone (e.g.   username@carrier.blackberry.com), you will need to do one of the following,   depending on your smartphone:      <ul>        <li>Click <strong>Create a BlackBerry email   address</strong><br /><br /><p>OR</p></li>  <li>Click <strong>I would like to create a new   BlackBerry email address</strong><br /><br />      Then, type the user   name that you want to appear before the @ sign in your new BlackBerry email   address. Click <strong>Next</strong>, followed by <strong>OK</strong> </li>  </ul>  <li>To   return to the setup wizard, click <strong>Log Out</strong> or <strong>Close</strong> </li></ol>';

function deviceSelect(selection){
	
	storm2Image="Storm2.jpg";
	stormImage="Storm.jpg";
	boldImage="Bold.jpg";
	curveImage="8900_device_new.jpg";
	pearlImage="Pearl+flip.jpg";
	bb8800Image="8800.jpg";
	
	
	switch (selection.value) {
		case "Storm2":
			deviceImage=storm2Image;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry Storm2 smartphone" /></div>'+storm2HTML;	
			break;

		case "Storm":
			deviceImage=stormImage;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry Storm smartphone" /></div>'+stormHTML;	
			break;
		case "Bold":
			deviceImage=boldImage;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry Bold series smartphone" /></div>'+otherHTML;	
			break;
		case "Curve":
			deviceImage=curveImage;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry Curve series smartphone" /></div>'+otherHTML;	
			break;
		case "Pearl":
			deviceImage=pearlImage;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry Pearl series smartphone" /></div>'+otherHTML;	
			break;
		case "8800":
			deviceImage=bb8800Image;
			codeHTML='<div class="emailDeviceImage"><img src="'+deviceImage+'" alt="BlackBerry 8800 series smartphone" /></div>'+otherHTML;	
			break;
	   default:
			codeHTML=otherHTML;	
			
	}

	document.getElementById("emailInstructions").innerHTML = codeHTML;
 }