// SpamVaccine version 1.2

function spam_vaccine( theHREFArray, theTextArray, theQBulletPath) {
	var theHREF, theText, extraAttributes ;
	extraAttributes = "";
	if( theHREFArray.length == 1 ) {
		theHREF = theHREFArray[0] ;
	}
	else if (theHREFArray.length > 1 ) {
		theHREF = "mailto:" + theHREFArray[0] + "@" + theHREFArray[2] + "." + theHREFArray[4] + theHREFArray[3] ;
		extraAttributes = theHREFArray[5];
	}
	else {
		theHREF = "";
	}
	
	if( theTextArray.length == 1 ) {
		theText = theTextArray[0];
	}
	else if (theTextArray.length> 1 ) {
		theText = theTextArray[1] + theTextArray[0] + "@" + theTextArray[2] + "." + theTextArray[4] + theTextArray[3] ;
	}
	else {
		theText = theHREFArray[0] + "@" + theHREFArray[2] + "." + theHREFArray[4] ;
	}

	if(theHREF) {
		theText = "<a href=\"" + theHREF + "\"" + extraAttributes + ">" + theText ;
		if(theQBulletPath) {
			theText += '<img width="14" height="10" border="0" align="absmiddle" hspace="1" alt="" src="' + theQBulletPath + 'mailto.gif">' ;
		}
		theText += "</a>";
	}
	document.write(theText);
}




// ImageReady Preload Script

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		b1_home_over = newImage("_images/b1_home-over.gif");
		b2_about_over = newImage("_images/b2_about-over.gif");
		b3_services_over = newImage("_images/b3_services-over.gif");
		b4_portfolio_over = newImage("_images/b4_portfolio-over.gif");
		b5_clients_over = newImage("_images/b5_clients-over.gif");
		b6_contact_over = newImage("_images/b6_contact-over.gif");
		preloadFlag = true;
	}
}


