
// ---------------------------
// function to prevent email being spidered
function noEspam(theName, theDomain, theLink, theExtras) {
	if (theLink.length ==0){
		theLink = theName + '@' + theDomain
    }

    document.write('<a href="mailto:' + theName + '@' + theDomain + theExtras + '">' + theLink + '</a>');
}


// FCKEditor now supports this, using this funcion
function mto(domain,name,subject,body) {
  location.href = 'mailto:' + name + '@' + domain + '?subject=' + subject + '&body=' + body;
}


function Rotate() {
    var pages = $$("div.pages ul li");
    var fireMe = -1;
    for (ii = 0; ii < pages.length; ii++) {
        if (pages[ii].hasClass("highlighted")) {
            if (ii == pages.length - 1)
                fireMe = 0;
            else
                fireMe = ii + 1;
        }
    }

    if (fireMe > -1) {
        pages[fireMe].fireEvent("click");
        setTimeout(Rotate, 4500);
    }
}