function ShareEmail() {
	var objShadow = document.getElementById('ShadeBox');
	var objContent = document.getElementById('EmailForm');
	var docHeight = docWidth = 0;
	
	if (window.innerWidth || window.innerHeight){
    docWidth = window.innerWidth;
    docHeight = window.innerHeight;
  }
  if (document.body.clientWidth || document.body.clientHeight){
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
  }
	
	objShadow.style.display = "block";
	objShadow.style.width = docWidth + "px";
	objShadow.style.height = docHeight + "px";
	
	objContent.style.display = "block";
	objContent.style.left = ((docWidth / 2) - (600 / 2)) + "px";
	objContent.style.top = "10%";
}

function Void(el) {
	switch (el.value) {
	  case "Send":
			parent.document.getElementById('EmailForm').style.height = "150px";
	    break;
	  case "Close":  
		case "Cancel":
			parent.document.getElementById('ShadeBox').style.display = "none";
			parent.document.getElementById('EmailForm').style.display = "none";
			break;
		default:
			document.getElementById('ShadeBox').style.display = "none";
			document.getElementById('EmailForm').style.display = "none";
			break;
	}
}

function Letters(el) {
	var objSpan = document.getElementById('Left');
	el = el.value.length;
	
	if (el == 300) {
		el = "<span style='font-weight:bold;'>" + el + "</span>"
	} else if (el > 300) {
		el = "<span style='font-weight:bold;color:#f00;'>" + el + "</span>"
	}
		objSpan.innerHTML = el;
}
