window.onload = function () {
	setChatLinks();
}

function startChat() {
	chat = window.open("https://manage.systeminplace.net/livechat/", "liveChatWindow", "scrollbars=no,resizable=no,width=450,height=370", title="Live support chat");
}

function setChatLinks() {
	var ChatLinks = document.getElementsByTagName("a");

	for(var i=0; i<ChatLinks.length; i++)
	{
		if((ChatLinks[i].getAttribute("id") == "supportchat") || (ChatLinks[i].getAttribute("idName") == "supportchat"))
		{
			ChatLinks[i].setAttribute("onclick", "startChat(this.form); return false;");
		}
	}
}

function clearText(thefield) {
	if (thefield.defaultValue == thefield.value)
		thefield.value = ""
} 

