
function endsWith(obj, end)
{
 if (obj.length == 0 || end.length == 0) return false;
 return obj.toLowerCase().substr(obj.length - end.length, end.length) == end.toLowerCase();  
}
 


// definitions for Linguatec Voice Reader Web

vrweb_icon = '01';
vrweb_iconcolor = 'red';
vrweb_guilang = 'de';
vrweb_lang = 'de-de';
vrweb_srctype = 'html';
vrweb_readcontent = 'text';
vrweb_srccharset = 'iso-8859-1';
vrweb_sitetopic = '';
vrweb_simpleparse = '0';
vrweb_readelementsname = '';
vrweb_readelementsclass = '';
vrweb_exclelementsname = '';
vrweb_exclelementsclass = '';
vrweb_customerid = '11017';
vrweb_cache = '0';
vrweb_sndtype = '1';
vrweb_sndquality = '4';
vrweb_sndspeed = '100';
vrweb_sndpitch = '100';
vrweb_sndgender = 'W';


function setLinguatecButtonVisibility(value)
{
	var anchorarray = document.getElementsByTagName("a");

	for (var i = 0; i < anchorarray.length; i++) {
		if (anchorarray[i].className == "vrweb_a") {
			if (value == true) {
				anchorarray[i].style.visibility = "visible";
			} else {
				anchorarray[i].style.visibility = "hidden";
			}
		}
	}
}



// convenience init function triggered by body/onload

function init()
{
	window.scrollTo(0,1); // iphone adaption

	if (endsWith(window.location.hostname, "speech-experts.de")) {
		setLinguatecButtonVisibility(true);
	}
	if (endsWith(window.location.hostname, "speech-experts.com")) {
		setLinguatecButtonVisibility(true);
	}
}



