function setBalloon(){
	
	aboutLink = document.getElementById("about-link");
	balloonAbout = document.getElementById("about");
	
	aboutLink.onmouseover = function (){
		balloonAbout.style.visibility = "visible";	
		}
	aboutLink.onmouseout = function (){
		balloonAbout.style.visibility = "hidden";	
		}	
	}
	
function previewComment(){
	
	previewButton = document.getElementById("preview-comment");
	
	if(previewButton!=null){
	previewButton.onclick = function () {
		
		commentList = document.getElementById("commentlist");
		commentAuthor = document.getElementById("author");
		commentText = document.getElementById("comment");
		previewHTML = "<p class=\"comment-byline\"><cite>"+commentAuthor.value+"</cite> said... </p><p>"+commentText.value+"</p>";

		commentPreview = document.getElementById("preview-post");
		if(commentPreview==null){
			commentList.innerHTML += "<li id=\"preview-post\">"+previewHTML+"</li>";
			}else{
			commentPreview.innerHTML = previewHTML;
			}		
		}
	}	
	}
	
function inputFocus(){
	mySendForm = document.getElementById("sendtofriendform");

	if(mySendForm!=null){	
		myInputs = mySendForm.getElementsByTagName("input");
		myDefValue = new Array();
		for(i=0;i<myInputs.length;i++){
			if(myInputs[i].type == "text"){
				myInputs[i].title = myInputs[i].value 
				myInputs[i].onfocus = function(){
					if (this.value == this.title) this.value = "";
					}					
				}
				myInputs[i].onblur = function(){
					if (this.value == "") this.value = this.title; ;
					}
			}
		}
	}

function lead_load(){
	setBalloon();
	previewComment();
	inputFocus();
	}	
	
window.onload = lead_load;
