/***********************************************
* Clear field "value" on INITIAL click.
***********************************************/
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}

/***********************************************
* Disable form "enter" key.
***********************************************/
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

/**************************************************
* FORM tooltips (dyn-web.com from dynamicdrive.com)
**************************************************/

/* IMPORTANT: Put script after tooltip div or put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= false;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 280;
var offX= 20;	// how far from mouse to show tip
var offY= 0; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "1em";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays), but don't have to
var tipFontColor= "#333";
var tipBgColor= "#FFF"; 
var tipBorderColor= "#AA0000";
var tipBorderWidth= 1;
var tipBorderStyle= "dotted";
var tipPadding= 4;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('','What will you use it for? You might also incorporate any features you need into your answer, i.e., newsletter, forum, gallery, event calendar, etc.',"");
messages[1] = new Array('','Why should customers choose you? What do YOU offer that no one else in your industry can?',"");
messages[2] = new Array('','Please list 2 or 3 primary avenues you will use ONLINE, if applicable, to generate clients. Examples: Pay-per-click search engines, forums, article writing, etc.',"");
messages[3] = new Array('','Consider things like age group, gender, personality traits, Web browsing habits, buying habits, and so on.','');
messages[4] = new Array('','Please answer not about your specific product, i.e., how they feel about your selection or offer, but instead answer regarding your *industry*, i.e., how they feel about Real Estate, Auto Insurance, etc.','');
messages[5] = new Array('','Ex: To sell full coverage, auto insurance policies.','');
messages[6] = new Array('','This is usually something like, *To get non-customers to sign up for our newsletter.*','');
messages[7] = new Array('','Think UNwanted colors, *personality* or vibe of the website, image you want to portray, etc.','');
messages[8] = new Array('','If this is a completely new business, please select *Create*. If this is an *existing* business adding on an online presence, or a redesign or upgrade of an existing online presence, one of the other options would apply.','');
messages[9] = new Array('','Your domain name is an important part of your brand. I would love to help you create a unique, brandable identity that will be attractive ONLINE as well as off.','');
messages[10] = new Array('','A Content Management System -- or CMS -- is the behind-the-scenes functionality that allows you to easily add new pages, images, articles, upcoming events, or other content to your website. We will discuss the exact type of CMS you need, if applicable, when I call you.','');
messages[11] = new Array('','More complex than logo designs. For examples, see the \"Il Montre\", \"Survivor\", and \"King\" designs in the \"Logos & Other Designs\" section of the portfolio.','');
messages[12] = new Array('','You provide the copy for each page.','');
messages[13] = new Array('','I write and provide all short copy for each page.','');
messages[14] = new Array('','This order confirmation page is what your customers will see after they\'ve ordered your product/service, and will contain download or other instructions for claiming their purchase.','');
messages[15] = new Array('','A knowledge base is a higher-end, robust type of FAQ consisting of pre-written support docs for your products/services. This one lets clients rate those documents/answers to help you determine whether they\'re doing their job. This knowledge base can also show relevant help to users *before* they submit a trouble ticket, to eliminate time-consuming administrative work on your part. The knowledge base and trouble ticket system is designed to make it much easier for you to offer your clients intuitive, relevant, and timely support.','');
messages[16] = new Array('','The blogging script installed will typically be b2evolution or WordPress. Though of course, if you have a favorite, you\'re free to request another.','');
messages[17] = new Array('','Integration with FeedBurner will help you get the word out about your new blog; standardize your feed to ensure it\'s accessible to any type of feed reader; and keep track of how many readers you have, which articles they\'re reading, and even where your content is syndicated to. You\'ll also be able to explore monetization options once you get a handle on blogging fundamentals.','');
messages[18] = new Array('','You won\'t be thrown to the wolves the moment your website goes live. Should you need any marketing advice, such as the best resource to use for \"_____\", help getting your marketing campaign on the road, how to keep track of your ROI, etc., I\'ll only be an e-mail away - for one full week. I\'ve been marketing online since 1998, and converted my business to full-time in less than a year - at 19 years old. I know what it takes to build a lasting, successful business on the Web.','');
messages[19] = new Array('','What if you run into technical problems using your new website, or you\'re not yet comfortable with all the functionality at your fingertips? No worries. Should something go awry - or if you need answers before it does - I\'ll be there to help walk with you for your first 7 days online.','');
messages[20] = new Array('','Instead of the server standard, white "404 File Not Found" eye-sore page, you\'ll have an integrated error page designed to look *exactly* like the rest of your website. It will inform visitors that they\'re still on your site and that the page they tried to access doesn\'t exist. The page will also direct them to choose another page from your site\'s navigational system.','');
messages[21] = new Array('','The very moment your visitor lands on the custom error page above, you\'ll ALSO receive an e-mail alerting you of the exact page address that\'s missing - so you can fix it right away.','');
messages[22] = new Array('','Prevent 404 pages in the first place by quickly scanning your website for dead links, broken images, or other unprofessional errors with this easy-to-use included software application.','');
messages[23] = new Array('','Easily download a copy of your website on your hard drive to have as a backup in case your Web host\'s server crashes.','');
messages[24] = new Array('','ggggggggggggggggggggg','');

////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = mouseX-(tpWd+offX)+"px";
	else tipcss.left = mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = winHt-(tpHt+offY)+"px";
	else tipcss.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')
