var hasBeenShown = false;function showForm(cur, max){	if (cur < max -30){		document.getElementById("contactMe").style.height = cur + "px";		cur += 30;		setTimeout("showForm(" + cur + "," + max + ")",0);	}	else if (cur < max){		document.getElementById("contactMe").style.height = max + "px";	}}function startShowForm(){	document.getElementById("contactMe")["fromURI"].value = document.location.href;	if(document.getElementById("contactMe")["concerning"] && !hasBeenShown)		document.getElementById("contactMe")["concerning"].value = document.title.substring(10);	if (self.scrollTo)		self.scrollTo(0,0);	setTimeout("showForm(1,405)",250);		hasBeenShown = true;	lastChangedTo = "";	return false;}var lastChangedTo;function startShowFormAlt(msg){	document.getElementById("contactMe")["fromURI"].value = document.location.href;	if(document.getElementById("contactMe")["concerning"] && lastChangedTo != msg)		document.getElementById("contactMe")["concerning"].value = msg;	document.getElementById("contactMe").style.height = "1px";	if (self.scrollTo)		self.scrollTo(0,0);	setTimeout("showForm(1,405)",250);		lastChangedTo = msg;	return false;}function cancelForm(cur){	if (cur > 10){		document.getElementById("contactMe").style.height = cur + "px";		cur -= 30;		setTimeout("cancelForm(" + cur + ")",0);	}	else{		document.getElementById("contactMe").style.height = "1px";	}}function startCancelForm(){	setTimeout("cancelForm(405)",0);}function trimStr(str){	var str2 = new String(str);	while(str2.length && str2.substring(0,1) == " ")		str2 = str2.substring(1);	while(str2.length && str2.substring(str2.length - 1) == " ")		str2 = str2.substr(0, str2.length - 1);	return str2}function markValid(id, valid){	document.getElementById(id).className = (valid)? "":"error";		return valid;}function validMail(str){	if(str.length == 0)		return true;	var firstAt = str.indexOf('@');	if(firstAt < 0)		return false;	if(str.indexOf('@', firstAt + 1) != -1)		return false;	if(str.indexOf('.', firstAt) == -1)		return false;	return true;}function compare(strX, strY){	var strA = strX.toLowerCase();	var strB = strY.toLowerCase();	var len = strX.length;	if (len != strY.length)		return false;	for (var i = 0; i != len; ++i)		if (strA.charCodeAt(i) != strB.charCodeAt(i))			return false;	return true;}function valForm(frm){		var hasErr = false;		var name = frm["name"].value = trimStr(frm["name"].value);	var phone = frm["phone"].value = trimStr(frm["phone"].value);		if(!markValid("contactMeNameOuter",name.length != 0))		hasErr = true;	if(!markValid("contactMePhoneOuter", phone.length != 0))		hasErr = true;				if (!document.location.href.indexOf('/business/'))	{		var conPhone = frm["phoneConfirm"].value = trimStr(frm["phoneConfirm"].value);		var email = frm["email"].value = trimStr(frm["email"].value);				if(!markValid("contactMePhoneConfirmOuter", compare(phone, conPhone)))			hasErr = true;		if(!markValid("contactMeEmailOuter", validMail(email)))			hasErr = true;	}		return !hasErr;}function adjustText(ta){	var oldRows = parseInt(ta.getAttribute("rows"));	var txt = ta.value;	if (txt.length == 0)		rows = 3;	else{		rows = 2;		var lines = ta.value.replace("\r\n","\n").replace("\r","\n").split("\n");		for (var iter = 0; iter != lines.length; ++iter)			rows += (Math.floor(lines[iter].length/60) + 1);	}/*	var rows = Math.floor(len/38) + 3;	for (var iter = 0; iter != len; ++iter){		if (txt.charCodeAt(iter) == 10 || (iter == 0 && txt.charCodeAt(iter			alert(++rows);	}*/	ta.setAttribute("rows",rows);	var frm = document.getElementById("contactMe");	frm.style.height = parseInt(frm.style.height) + (rows - oldRows) * 15 + "px";}function adjustReqText(ta){	var oldRows = parseInt(ta.getAttribute("rows"));	var txt = ta.value;	if (txt.length == 0)		rows = 3;	else{		rows = 2;		var lines = ta.value.replace("\r\n","\n").replace("\r","\n").split("\n");		for (var iter = 0; iter != lines.length; ++iter)			rows += (Math.floor(lines[iter].length/38) + 1);	}	ta.setAttribute("rows",rows);}var colors = new Array();colors['yellow'] = new Array('#FEF4BD', '#FEF4C1', '#FEF6C9', '#FEF7D0', '#FEF8D8', '#FFFAE0', '#FFFBE8', '#FFFCEF', '#FFFEF7', '#FFFFFF');function highlight(element, counter, colorSet)	{		if (counter < colors[colorSet].length)	{		showColor = colors[colorSet][counter];		document.getElementById(element).style.backgroundColor = showColor;		counter++;				if (counter == 1)			timeout = 500;		else			timeout = 50;					setTimeout("highlight(" + "'" + element + "'" + "," + counter + "," + "'" + colorSet + "'" + ")",timeout);				}	}