// JavaScript Document
num = 0;
count = 0;
counter=0;

var timerID = 0;
var timerID2 = 0;
var end=false;
current="";
clearNav = 0;

function Accordian(which)
{
	current=which;
	
	if(timerID) 
		clearInterval(timerID);
	
	timerID = setInterval(function(){updateQTimer();},80);
}

function updateQTimer()
{
	if(document.getElementById("expanded").value == "yes")
	{
		for(i=1;i<5;i++)
		{
			if(document.getElementById(i).innerHTML != "&nbsp;")
			{
				clearNav=i;
				i=10;
			}
				
			
		}
		if(i!=10 && !document.getElementById('fpic'))
		{		
			//html = "<h2><center>Click on a Features Menu Option<br />to Learn More</center></h2>";
			document.getElementById('head').innerHTML = '<div id="head"><h2><center>Click on a Features Menu Option<br />to Learn More</center></h2></div>';
			html = "<center><div id='fpic'><img src='../images/features.jpg' alt='Features Offered!' /></div>";
			html += "</center>";
			
			document.getElementById('development').innerHTML = html;
			
			if(navigator.appName=="Microsoft Internet Explorer")
				document.getElementById('fpic').style.filter = "alpha(opacity=0)";
			else
				document.getElementById('fpic').style.MozOpacity=0;
			
			timerID2=setInterval(function() { fadeInPic();},40);
		}
		
		
		
		clearingHTML = getHTML2(clearNav);
		sections = clearingHTML.split('@');
		document.getElementById(clearNav).innerHTML = accordionClose(sections);
	}
	else
	{
		newHTML = getHTML2(current);
		document.getElementById(current).innerHTML = accordionOpen(newHTML);
		
	}
}

function accordionClose(sections)
{
	i=0;
	html = "";
	
	do{
		html += sections[i];
		i++;
	}while(i<counter)
	
	count++;
	counter--;
	//alert(counter);
	if((count+1)>=sections.length)
	{
		
		if(clearNav==parseInt(current))
		{
			clearInterval(timerID);
/*			html += "<h2><center>Click on a Features Menu Option<br />to Learn More</center></h2>";
			html += "<center><img src='../images/features.png' alt='Features Offered!' /> ";
			html += "</center>";*/
		}
		count=0;
		//clearInterval(timerID);
		document.getElementById("expanded").value="no";
		html="&nbsp;";
	}
	else
		html += "</ul>";

	return html;
}

function accordionOpen(newHTML)
{
	htmlArray = newHTML.split('@');
	section = "";
	i=0;
	do{
		section += htmlArray[i];
		i++;
	}while(i<=count)
	
	section += "</ul>";
	count++;
	
	if(count==htmlArray.length)
	{
		counter=count;
		count=0;
		end = true;
		clearInterval(timerID);
		document.getElementById('expanded').value="yes";
	}
	return section;
}

function getHTML2(which)
{
	html = "";
	switch(which)
	{
		case "1":
			html = "<ul style=\"text-align:left;\">";
            html += getFill("Graphics",0) + "@";
			html += getFill("Text",1)+"@";
			html += getFill("Navigational Elements/Links",2)+"@";
            html += getFill("Simple Mouseover Events",3)+"@";
			break;
		case "2":
			html = "<ul style=\"text-align:left; \">";
            html += getFill("Thumbnail Galleries/Slideshows",4)+"@";
            html += getFill("Specialized Forms",5)+"@";
			html += getFill("Advanced Mouse/Page Events",6)+"@";
            html += getFill("Dynamic Content/Loading Effects",7)+"@";
            html += getFill("Site Content Admin Pages",8)+"@";
			html += getFill("More...",9);
			break;
		case "3":
			html = "<ul style=\"text-align:left;\">";
            html += getFill("Simple Contact Forms/Links",10)+"@"
			html += getFill("Favicon",11);
			break;
		case "4":
			html = "<ul style=\"text-align:left;\">";
            html += getFill("Cost List",12);
			break;
	}
	return html;
}
function getFill(field, devno)
{
	html = "<li><div class=\"featurelinks\" onclick=\"getDev("+devno+");\"";
	html += "onmouseover=\"this.style.color='#CCCCCC';\"";
	html += "onmouseout=\"this.style.color='#47327A';\"";
	html += ">";
	html += field+"</div></li>";
	return html;
}

function getDev(devno)
{
	var html = "";
	
	switch (devno)
	{
		case 0:
			html = "</center><h2 style='text-align:left'>Standard Web Features:<br /></h2><h2 style='text-align:center'>";
			html += "Graphics <br /></h2><h3>This includes the visual stimulus (other than text) ";
			html += "on the website pages:</h3>";
			html += "<ul class='features'><li> Standard pictures (client provided)</li>";
			html += "<li>Created graphics (client provided)</li>";
			html += "<li>Masthead graphic on first page (simple custom graphic incorporating company logo)</li>";
			html += "<li>Possible top-of-page graphic for all other pages</li>";
			html += "<li>Colorful lines, bullets, and colored/textured background</li>"
			html += "<li>Simple custom graphics such as \"get a quote\" and \"information\" bubbles</li></ul></center>";
			break;
		case 1:	
			html = "</center><h2 style='text-align:left'>Standard Web Features:<br /></h2><h2 style='text-align:center'>";
			html += "Text <br /></h2><h3>The site text, or verbiage, is any and all written words that are ";
			html += "to be included on the pages of the website. In most cases, it will be supplied by the client:</h3>";
			html += "<ul class='features'><li>300 words per page approximate maximum if not supplied electronically</li>";
			html += "<li>Web pages of more than 1,200 words of text may be subject to additional fees ";
			html += "especially if they require a great deal of formatting</li>";
			html += "<li>Consultation guides and/or manuals</li>";
			html += "<li>General Internet site orientation education</li>";
			html += "<li>Web design consultation/updates</li>";
			html += "<li>Literary aids for helping clients learn to use their site and/or web page editor(s) provided</li>";
			break;
		case 2:	
			html = "</center><h2 style='text-align:left'>Standard Web Features:<br /></h2><h2 style='text-align:center'>";
			html += "Navigational Elements/Links</h2><h3>These are the the buttons, links, images, etc. that allow for easy "; 
			html += "navigation to other pages internally within the site or externally to another site:</h2>";
			html += "<ul class='features'><li>Buttons</li>";
			html += "<li>Text</li>";
			html += "<li>Images</li>";
			html += "<li>Navigation bars</li>";
			html += "<li>Site Maps</li></ul></center>";
			break;
		case 3:	
			html = "</center><h2 style='text-align:left'>Standard Web Features:<br /></h2><h2 style='text-align:center'>";
			html += "Simple Mouseover Events</h2><h3>These are the things that occur when your mouse hovers over a ";
			html += "particular part of the page (eg. an image, text, link, etc.):";
			html += "<ul class='features'><li>Links that Change Colors</li>";
			html += "<li>Changing Pictures</li>";
			html += "<li>Changing/Appearing Text</li>";
			html += "<li>more...</li></ul></center>";
			break;
		case 4:	
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Thumbnail Galleries/Slideshows</h2><h3>Used to display and/or showcase pictures/graphics:</h3>";
			html += "<ul class='features'><li>Thumbnails opening in same window</li>";
			html += "<li>Thumbnails opening in different window</li>";
			html += "<li>Thumbnails opening over the top of everything</li>";
			html += "<li>Rotating picture sets</li>";
			html += "<li>User advancing via Next/Previous buttons</li>";
			html += "<li>Links to pictures in-site or external</li></ul></center>";
			break;
		case 5:	
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Specialized Forms</h2><h3>Essentially, any forms that fulfill specialized needs:</h3>";
			html += "<ul class='features'><li>Quote Forms</li>";
			html += "<li>Survey Forms</li>";
			html += "<li>Applications</li>";
			html += "<li>Order Request Forms</li>";
			html += "<li>Data Collection Forms</li>";
			html += "<li>Guest Books</li>";
			html += "<li>Data Error Checking Included (if required)</li></ul></center>";
			break;
		case 6:	
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Advanced Mouse/Page Events</h2><h3>More complex (and impressive) page and mouse effects:</h3>";
			html += "<ul class='features'><li>Form Auto-Tabbing</li>";
			html += "<li>Informational Pop-Ups</li>";
			html += "<li>User-Determined Page Actions</li>";
			html += "<li>Fading Images</li>";
			html += "<li>Varying Element Opacity</li>";
			html += "<li>Page/Image Loading Events</li></ul></center>";
			break;
		case 7:	
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Dynamic Content/Loading Effects</h2><h3>dynamic content and effects</h3>";
			html += "<ul class='features'><li>On-Click/Mouseover Content Loading</li>";
			html += "<li>Changing Page Content</li>";
			html += "<li>Cyclical Graphics Presentation</li>";
			html += "<li>Multiple Use/Purpose Pages</li>";
			html += "<li>Interactive Page Content</li>";
			html += "<li>timer effects</li>";
			html += "<li>More...</li></ul></center>";
			break;
		case 8:
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Site Content Admin Pages</h2><h3>Administrative Pages for Changing Site Content</h3>";
			html += "Pages designed to allow for the changing of site content without ";
			html += "having to alter the code itself.  PHP is required on your webserver for this feature to be implemented.";
			break;
		case 9:	
			html = "</center><h2 style='text-align:left'>Premium Extras:<br /></h2><h2 style='text-align:center'>";
			html += "More...</h2><h3>Got some ideas?</h3>";
			html += "<div class='features' style='text-align:justify'>If you can think it up - I can probably do it. ";
			html += "Feel free to challenge me. ";
			html += "See something you like, ask me about it.  Chances are I can do it.  Please note that I am not, at ";
			html += "this time, offering flash or any intensive database driven sites, but other than that, ";
			html += "in most cases I can fulfill your needs.</div></center>";
			break;
		case 10:	
			html = "</center><h2 style='text-align:left'>Free Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Simple Contact Forms/Links</h2><h3>Receiving email from your site</h3>";
			html += "<center><div style='text-align:justify'>If your webhosting is PHP enabled then a simple contact ";
			html += "form allows users to email you without your having to post your email address.  Visitors can fill the form out ";
			html += "and simply click a button and an email will be generated and sent to you.  If your webhosting ";
			html += "doesn't not have PHP enabled, email links can be placed for contact purposes on any or all of ";
			html += "you pages.</div></center>";
			break;
		case 11:
			html = "</center><h2 style='text-align:left'>Free Extras:<br /></h2><h2 style='text-align:center'>";
			html += "Favicon</h2><h3>Favorites Icon</h3>";
			html += "<center><div class='features' style='text-align:justify'>A Favicon is a small graphical icon ";
			html += "that is used by browsers to ";
			html += "identify entries on your Bookmark/Favorites list. Favicons also display in the URL address ";
			html += "bar in your browser and are good way to brand your company (e.g. my favicon that is currently in your ";
			html += "address bar).</div></center>";
			break;
		case 12:	
			html = "</center><h2 style='text-align:left'>Tentative Pricing and Fees:<br /></h2><h2 style='text-align:center'>";
			html += "Cost List</h2><h3>A breakdown of common charged services and items</h3>";
			html += "<ul class='features'><li>Standard HTML Web Pages - $50/page</li>";
			html += "<li>Premium Pages - $75/page</li>";
			html += "<li>Premium Implements - $25-$100/Implementation</li>";
			html += "<li>Graphics Research/Development - $10-$50/Graphic</li>";
			html += "<li>Domain Name Research &amp; Registration - $15</li>";
			html += "<li>Web Hosting Procurment - $200/2 yr contract</li>";
			html += "<li>Ad Hoc Maintenance - $25/hr - 2 hour minimum </li>";
			html += "<li>Any additional specialized education and consultation is at our hourly rate of ";
			html += "$25/hr - 2 hour minimum.</li></ul></center>";
			break;
	}
	
	document.getElementById('development').innerHTML = html;
	document.getElementById('head').innerHTML = "";
}

function fadeOutPic()
{
	//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) + ")";
		
		//changing to increasing image opacity
		else 
		{
			clearInterval(timerID2);
			num=0;
		}
	       
        //assigning new opacity
        document.getElementById('fpic').style.filter = opac;
    }    
	
    //firefox(netscape)
    else
    {
        num += .05;
		if(num>1)
			FFopac = 1-num;
		else
		{
			num=0;
			FFopac = 1;
			clearInterval(timerID); //stopping the current time
		}
	
		
		//setting opacity
		document.getElementById('fpic').style.MozOpacity = FFopac;
    }

}

function fadeInPic()
{
	//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=" + num + ")";
		else 
		{
			clearInterval(timerID2);
			opac = "alpha(opacity=100)";
			num=0;
		}
	       
        //assigning new opacity
        document.getElementById('fpic').style.filter = opac;
    }    
	
    //firefox(netscape)
    else
    {
        num += .05;
		if(num<1)
			FFopac = num;
		else
		{
			FFopac = 1;
			num = 0;
			clearInterval(timerID2); //stopping the current time
		}
	
		
		//setting opacity
		document.getElementById('fpic').style.MozOpacity = FFopac;
    }
}

function submitForm()
{
	temp=document.getElementById('getAquote');
	alert(temp.value);
	if(temp.value=="qte" || temp.value=="pkg")
		document.getElementById('form').submit();
}