function Detect_WebMate_MozillaPlugin() {
    // allow for multiple checks in a single pass
    var daPlugins = "WebMate";
    // consider pluginFound to be false until proven true
    var pluginFound = false;
    // if plugins array is there and not fake
    if (navigator.plugins && navigator.plugins.length > 0) {
	var pluginsArrayLength = navigator.plugins.length;
	// for each plugin...
	for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {
	    // loop through all desired names and check each against the current plugin name
		// if desired plugin name is found in either plugin name or description
		if( ((navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins) >= 0) || 
		    (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins) >= 0)) ) {
    		pluginFound = true;
			break;

		}   
    }
    }	
    return pluginFound;
} // detectPlugin

function getServerName() {
	var str = window.location.protocol + '//' + window.location.host + window.location.pathname;
	str = str.substr(0, str.lastIndexOf('/')+1);
	return str;
}
