var pools = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development</b> - " +
				  "PHP, MySQL, Zen Cart - Complete summary pending</p>" +
				  "<p><a href='http://www.perfectpoolsupplies.com/' target='_blank'>www.perfectpoolsupplies.com</a></p>" +
				  "</div>";
var mdhm = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development</b> - " +
				  "PHP, MySQL, PayPal IPN, AJAX, WordPress - Complete summary pending</p>" +
				  "<p><a href='http://www.mdhalfmarathon.com/' target='_blank'>www.mdhalfmarathon.com</a></p>" +
				  "</div>";
var ctb = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development</b> - " + 
				  "PHP, MySQL, CSV, AJAX, WordPress - Complete summary pending</p>" +
				  "<p><a href='http://www.contourbedcatalog.com/' target='_blank'>www.contourbedcatalog.com</a></p>" +
				  "</div>";				  
var connections = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development</b> - " +
				  "Designed and developed web application for gathering, storing and editing user and event registration information.  Web application also includes administrative features and PayPal integration.</p>" +
				  "<p><a href='http://www.makemoreconnections.com' target='_blank'>www.makemoreconnections.com</a></p>" +
				  "</div>";
var mpvw = "<div class='clientsum'>" +
		   "<p><b>Web Application and Database Development</b> - " +
		   "Designed and developed discounting group and newsletter registration functionality for e-commerce site.</p>" +
		   "<p><a href='http://www.mpvw.com.au/' target='_blank'>www.mpvw.com.au</a></p>" +
		   "</div>";
var medifast = "<div class='clientsum'>" +
			   "<p><b>Web Application and Database Development, IT Consulting</b> - " +
			   "Designed and developed data encryption architecture for secure automated customer transaction processing.  Moved (i.e. migrated) all web applications from a small hosting provider to a robust hosting solution.</p>" +
			   "<p><a href='http://www.medifast1.com' target='_blank'>www.medifast1.com</a></p>" +
			   "</div>";
var joneshomes = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development, IT Consulting</b> - " +
				  "Designed and developed web application for gathering, storing and editing customer information.  Web application also includes administrative features and an interactive photo management system.</p>" +
				  "<p><a href='http://www.joneshomesgroup.com' target='_blank'>www.joneshomesgroup.com</a></p>" +
				  "</div>";
var tracymorris = "<div class='clientsum'>" +
				  "<p><b>Web Application and Database Development</b> - " +
				  "Designed and developed web application for gathering, storing and editing customer information.  Web application also includes administrative features and an interactive photo management system.</p>" +
				  "<p><a href='http://www.tracyamorris.com/' target='_blank'>www.tracyamorris.com</a></p>" +
				  "</div>";
var budding = "<div class='clientsum'>" +
			  "<p><b>Web Application and Database Development</b> - " +
			  "Designed and developed web application for gathering, storing and editing RSVP event information.  Web application also includes administrative features.</p>" +
			  "<p><a href='http://www.buddingprofessionals.com' target='_blank'>www.buddingprofessionals.com</a></p>" +
			  "</div>";
var lindenmeyr = "<div class='clientsum'>" +
		    	 "<p><b>Web Application and Database Development</b> - " +
				 "Designed and developed web application for gathering, storing and editing RSVP event information.  Web application also includes administrative features.</p>" +
				 "</div>";
var mci = "<div class='clientsum'>" +
		  "<p><b>Web Application and Database Development</b> - " +
		  "Designed and developed web application for gathering, storing and editing customer information.  Web application also includes administrative features.</p>" +
		  "<p>Pre-Launch</p>" +
		  "</div>";


function email(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}

function show(div) {
	document.getElementById(div).style.visibility = 'visible';
}

function hide(div) {
	document.getElementById(div).style.visibility = 'hidden';
}

function updateClientSum(div,jsvar) {
	document.getElementById(div).innerHTML = jsvar;
}

function clientover(img,src) {
	img.src = src;
}
function clientout(img,src) {
	img.src = src;
}


function AJAXvalidate(input, elmtId) {
    var url    = 'common/AJAXValidate.php';
    var params = 'text='+input.value+'&field='+input.name+'&id='+elmtId;
    var myAjax = new Ajax.Request(url,{method: 'get', parameters: params, onComplete: showResponse}); 
}

function showResponse(ajaxObj) {
	var resp  = ajaxObj.responseText;
	var bool  = resp.substring( 0, resp.indexOf(',') ); 
	var id    = resp.substring( resp.indexOf(',') + 1, resp.lastIndexOf(',') );
	var field = resp.substring( resp.lastIndexOf(',') + 1 ); 

	//alert(resp+'\n'+bool+'\n'+id+'\n'+field+'\n');
	
	if (bool == 'false') {
		document.getElementById(field).style.background = '#FAAFBA';
		document.getElementById(id).style.color = '#CC0000';
		document.getElementById(id).innerHTML = 'Invalid';
	} else {
		document.getElementById(field).style.background = '#C3FDB8';
		document.getElementById(id).style.color = '#347235';
		document.getElementById(id).innerHTML = 'Valid';	
	}				
}