// JavaScript Document
num = 0;
var timerID = 0;
var timerID2 = 0;
var banner = "";
var end = false;

function MSTester()
{
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		document.getElementById('msonly').innerHTML = "<br />"
		document.getElementById('msonly2').innerHTML = "<br />"
	}
}
function getIt(what_link)
{
	if(timerID) clearInterval(timerID);
	    timerID = setInterval(function(){updateTimer(what_link);},40);	
	
}
function updateTimer(what_link)
{
	
	//getting the image and caption elements
	var world = document.getElementById("world");
	if(world != null)
	{
		//opacity variable for IE only and FF
		var opac = "alpha(opacity=0)";
		var FFopac = 0;
		
	
		//handling IE
		if(navigator.appName == "Microsoft Internet Explorer")
		{
			num += 5;
				//diminishing image opacity
			if(num<101) 
				opac = "alpha(opacity=" + (100-num) + ")";
		
			if(num>100)
			{
				clearInterval(timerID); //stopping the current time
				timer2(what_link);
			}
			world.style.filter = opac;
		}
		//handling firefox
		else if(navigator.appName == "Netscape")
		{
			num += .05;
			if(num < 1)
				opac = 1-num;
			
			if(num > 1)
			{
				clearInterval(timerID);
				timer2(what_link);
			}
			world.style.MozOpacity = opac;
		}
		//handling others (opera)
		else
		{
			num += .05;
			if(num < 1)
				FFopac = 1-num;
			
			if(num > 1)
			{
				clearInterval(timerID);
				timer2();
			}
				
			world.style.opacity = opac;	
		}
	}
	else
		timer2(what_link)
}

function timer2(what_link)
{
	if(what_link<6)
	{
		document.getElementById('infohome').innerHTML="<br />";
		num=0;
	
		if(timerID) clearInterval(timerID);
	
		timerID = setInterval(function(){updateTimer2(what_link);},30);	
	}
	else
	{
		if(timerID) clearInterval(timerID);
		getSite(what_link);
	}
}

function updateTimer2(what_link)
{
	writeup = "";
	if(end)
	{
		end = false;
		clearInterval(timerID);
		writeup = "<br /><br />" + getInfo(what_link);
	}
	
	document.getElementById('infohome').innerHTML += getLetter(what_link) + writeup;
}

function getLetter(what_link)
{
	switch(what_link)
	{
		case 0:
			string = "Welcome to M.I.S.";
			return returnLetter(string);
			break;
		case 1:			
			string = "What can a website offer you?";
			return returnLetter(string)
			break;
		case 2:
			string = "Why should you go with M.I.S.?";
			return returnLetter(string)
			break;
		case 3:
			string = "How can you procure a design solution?";
			return returnLetter(string)
			break;
		case 4:
			string = "What can you expect with a design solution?";
			return returnLetter(string)
			break;
		case 5:
			string = "Still have questions?";
			return returnLetter(string)
			break;
		default:
			return "";
			break;
	}
}

function returnLetter(string)
{
	num++;
	if(num+1 == string.length)
		end=true;
		
	return string.charAt(num-1);
}

function getInfo(what_link)
{				
	info = "<div style='width:400px;text-align: justify; font-weight: 100; font-size: 18px; font-family: \"Times New Roman\",serif;'>";
	switch (what_link)
	{
		case 0:
			info +="Do you want professionalism combined with affordability in your design solution?<br /><br />";
			info += "Do you want a functional and yet aesthetically pleasing design solution?<br /><br />";
			info += "Are you looking for a company that will work with you even as it works for you?<br /><br />";
			info += "Then look no further...";
			break;
		case 1:
			info += "For many businesses, a website can be A, if not THE, primal method of communication between the business and ";
			info += "potential customers. A well-developed website can be just the thing to tip the target market scales in your business' ";
			info += "favor. For many non-business oriented people, a website can be just the thing to display and share photos and information ";
			info += "with their loved ones or the world at large. Galleries of baby pictures and family photos to be shared, sending a message ";
			info += "to the masses or expressing a personal manifesto, allowing the world to give you a piece of its mind or giving the world a ";
			info += "piece of yours - a website is an optimal way to give your ideas and desires some direction and focus. For a look at some ";
			info += "past accomplishments and to get an idea of M.I.S. capabilities, go to the <a href='./html/portfolio.html'>Portfolio</a> section. ";
			info += "</div>";
			break;
		case 2:
			info += "There are a lot of reasons, not the least of which is price. For a fraction of what some of the larger name design ";
			info += "companies charge for much the same service, M.I.S. can provide you with what you are looking for in an online presence. ";
			info += "Also, being an independent design company, M.I.S. can work to provide that extra level of service without having to get ";
			info += "approval for the extra effort it might entail. Read more about the M.I.S. theory in the <a href='html/about.html'>About Us</a> section. ";
			info += "</div>";
			break;
		case 3:
			info += "The fact that you are here means step one has been completed. M.I.S. can offer you package deals with straight-forward ";
			info += "customization or a complete custom design with a lot more flexibility to address specialized needs. Select the ";
			info += "<a href='html/quote.html'>Get A Quote</a> option and, at the risk of sounding cliche, \"pick your poison.\" You ";
			info += "can choose from the package deals or fill out the quote form to get a specialized website quote. And the journey begins... ";
			info += "</div>";
			break;
		case 4:
			info += "First and foremost, a quality website.  Other than that, it really depends on what you select:";
			info += "<ul id='expect'><li>Package deals offer straight-forward web pages featuring text and/or pictures with what might be considered ";
			info += "standard extras (mouseover events, tab menus, etc.). </li><li>";
			info += "Customized designs offer a mix of functionality and design tooled to meet the specialized needs of the client ";
			info += "(administrative pages for content upload, specialized gallery pages, etc.). </li></ul>";
			info += "A more in-depth description of what to expect and what is potentially included can be ascertained by perusing the ";
			info += "<a href='html/phases.html'>Phases of Development</a> section. ";
			info += "</div>";
			break;
		case 5:
			info += "If you have questions about what is offered, check out the Contact Us section where you can fill out and submit ";
			info += "the M.I.S. <a href='html/contact.html'>Contact Form</a> and you will receive a reply back without delay. <br /><br />";
			info += "If you are in the postion where you know what you want already, ";
			info += "go to the <a href='php/quote.php'>Get A Quote</a> section and start the process in earnest. ";
			info += "</div>";
			break;
	}
	return info;
}

function msover(what,where)
{
	if(where==2) src="../";
	else src = "";
	document.getElementById(what).src=src+"images/buttons/gry_" + what + ".png";	
}

function msout(what,where)
{
	if(where==2) src="../";
	else src = "";
	document.getElementById(what).src= src+"images/buttons/wht_" + what + ".png";	
}

function getSite(sitenum)
{
	var site = document.getElementById('infohome');
	var html = "";
	var br = "";
	
	if(navigator.appName=="Microsoft Internet Explorer")
		br = "<br />";
	
	switch(sitenum)
	{
		case 11:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table><tr><td>";
			html += "<center>"+br+"<h2>Words In Vinyl<br />";
			html += "<span style='font-size:14px;'>(Custom Order)</span></h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/wiv.jpg' onMouseover=\"ddrivetip('<center>Owner: Peter Anderson</center><br />";
			html += "The overall site I cannot speak for but the custom order page is my design.  Using a combination of PHP, "
			html += "JavaScript, xhtml, and css, it allows the user to select ";
			html += "the options they are interested in and then that information is sent to a script that generates an image ";
			html += "based on those options (text, color, font) which is then rendered on the page.  The prospective client selection information is ";
			html += "displayed on the page (along with the cost of purchase) and there is an option at the bottom to add this to a paypal cart for purchase. ";
			html += "Additionally, there is an administrative page that allows for the uploading of colors/fonts as well as ";
			html += "the changing of the minium purchase amount and pricing.  The overall effect provides for a very user friendly ";
			html += "way for potential clients to get a glimpse of their potential design and order it, as well as allowing an ";
			html += "easy way for the site owner to change content without having to change any code.";
			html += "','#506473', 300);\" onMouseout=\"hideddrivetip();\" /></center></td></tr><td>";

			html += "<center><strong>URL:</strong> <a href='http://www.wordsinvinyl.com/' target='_blank'>www.wordsinvinyl.com</a>";
			html += "&nbsp;&nbsp;<span style='font-size:11px'>(click on the Custom Designs link)</span></center><br />";
   			html += "<strong><center>Implementations:</center></strong>";
			html += "HTML/PHP/JavaScript website, Dynamic Content, Dynamic Image Generation, Content Deployment System";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
		case 10:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table><tr><td>";
			html += "<center>"+br+"<h2>Allied Tool &amp; Die</h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/atd.jpg' onMouseover=\"ddrivetip('<center>Owner: Allied Tool & Die</center><br />";
			html += "This site uses a combination of html, PHP, and JavaScript to provide an online presence for this ";
			html += "Phoenix company.  Job Openings and Applications, Order Requests, Surveys, Information, and more is ";
			html += "available to past, present, and future customers.  Mouseover effects, slide-show galleries, form ";
			html += "submissions, content manipulation, and more make up the features this high-end professional website has to offer.";
			html += "','#506473', 300);\" onMouseout=\"hideddrivetip();\" /></center></td></tr><td>";
			
			html += "<center><strong>URL:</strong> <a href='http://www.alliedtool.com/' target='_blank'>www.alliedtool.com</a></center><br />";
   			html += "<strong><center>Implementations:</center></strong>";
			html += "HTML/PHP/JavaScript website, Dynamic Content, Photo Gallery, Email forms, Content Deployment System";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
		case 9:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table><tr><td>";
			html += "<center>"+br+"<h2>Mrs. Monson's School Site</h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/mmonson.jpg' onMouseover=\"ddrivetip('<center>Owner: Mrs. Myriah Monson</center><br />";
			html += "This school site uses a combination of html and JavaScript to provide students and parents with access to the curriculum, ";
			html += "forms, notes, and information of various sorts.  Notable features include: a changing intro picture with changing caption ";
			html += "on the home page, customized buttons that are links to the site content, dynamic content loading, and since the server has ";
			html += "no PHP, the pages that require updating were created to allow it to be easily done using a WYSIWYG IDE like MS Front ";
			html += "Page.','#506473', 300);\" onMouseout=\"hideddrivetip();\" /></center></td></tr><td>";
			
			html += "<center><strong>URL:</strong> <a href='http://www.kyrene.org/staff/mmonson/' target='_blank'>www.kyrene.org/staff/mmonson";
			html += "</a></center><br /><strong><center>Implementations:</center></strong>";
			html += "HTML/JavaScript website, Dynamic Content, Rolling Photo Gallery, Easily Updated";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
		case 8:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table style='width:500px;'><tr><td>";
			html += "<center>"+br+"<h2>Asylum Imagery</h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/asylum.jpg' onMouseover=\"ddrivetip('<center>Owner: Asylum Graphics</center><br />";
			html += "This media site uses a combination of html and PHP to provide the target audience with, amongst other things, ";
			html += "rock news, rock and video game reviews, and a gallery for displaying concert photos taken from the concert floor. ";
			html += "Notable features include: administrative pages that allow for easy uploading of data that will be populated within ";
			html += "the various pages and a feature that allows for thumbnails to be created in batch for the gallery pages to save on ";
			html += "load time','#506473', 300);\" onMouseout=\"hideddrivetip();\" />";
			
			html += "</center><center><strong>URL:</strong> <a href='http://www.asylumimagery.com' target='_blank'>www.asylumimagery.com";
			html += "</a></center><br /><strong><center>Implementations:</center></strong>";
			html += "PHP/HTML website, Multiple 3-Tier'd Thumbnail Photo Galleries, Scheduling Calendar, Content Deployment System ";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
		case 7:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table><tr><td>";
			html += "<center>"+br+"<h2>Primal Scream Tattoos</h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/primal.jpg' onMouseover=\"ddrivetip('<center>Owner: Monson Internet Solutions</center><br />";
			html += "Although the client eventually decided not to go with a website at all due to the belief that it would stir ";
			html += "up trouble with another tattoo artist who took competition seriously (in all seriousness - that was the reasoning) ";
			html += "the site and features implemented seemed worthy of display.  To that end this site uses a combination of html and ";
			html += "PHP to sell the service - tattooing.  A three-tiered tattoo gallery, a scheduling calendar, and password ";
			html += "protected administrative pages were what made it worthy of listing.','#506473', 300);\" onMouseout=\"hideddrivetip();\" />";
			
			html += "</center><center><strong>URL:</strong> <a href='http://www.monsonsolutions.com/tattoo' target='_blank'>www.monsonsolutions.com/tattoo";
			html += "</a></center><br /><strong><center>Implementations:</center></strong>";
			html += "PHP/HTML website, 3-Tier\'d Thumbnail Photo Gallery, Scheduling Calendar, Content Deployment System ";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
			
		case 6:
			html += "<div style='font-family: \"Times New Roman\",serif; text-align:left;font-size:18px;'><table><tr><td>";
			html += "<center>"+br+"<h2>Add Your Site to Our List!!!</h2></center></td></tr><tr><td><center>";
			html += "<img src='../images/sitepics/yours.jpg' onMouseover=\"ddrivetip('<center>Owner: You you and YOU!</center><br />";
			html += "The site can be what you want it to be.  Have some ideas?  Include them in the quote request.  Want some ideas? ";
			html += "Look at some of our examples or look at other sites and point them out to us.  We work with you and for you ";
			html += "and our goal is to have you look at your new site and think...<br /><center> EXACTLY!</center>','#506473', 300);\" ";
			html += "onMouseout=\"hideddrivetip();\" />";
			
			html += "</center><center><strong>URL:</strong> <span style='cursor: pointer' onmouseover='this.style.color=\"#CCCCCC\"' ";
			html += "onmouseout='this.style.color=\"#47327A\"'>www.yoursite.com</span>";
			html += "</a></center><br /><strong><center>Implementations:</center></strong>";
			html += "PHP/HTML/JavaScript websites, Galleries, Scheduling Calendars, Email Forms, Content Deployment Systems, and so much more!";
			html += "</td></tr></table><div><br />";
			site.innerHTML = html;
			break;
	}
}

function phoneTest(fieldno)
{
	next = Number(fieldno) + 1;
	
	phonenum = document.getElementById(fieldno).value;
//	alert(phonenum.length)
	if(phonenum.length==3)
		document.getElementById(next).focus();
}