var curTipBubble = 'yname';var is_enabled_bubble = true;var showCurTipBubble = function(){showTipBubble(curTipBubble);}
var myOnload = function(){document.document.reg.yname.focus();
showCurTipBubble();}
function showTipBubble(strInput){
if (!is_enabled_bubble) {
strInput = "";}
curTipBubble = strInput;
var f = document.reg;
var bubble = document.getElementById('bubble');
var bubbleContent = document.getElementById('bubbleContent');
var oInput;
var strText;
switch(strInput){
case 'yname':
oInput = f.yname;
strText = 'Welcome to Link Kerala. Enter your name to get started.';
break;
case 'email':
oInput = f.email;
strText = '<span style="font-size:12px;">Used only to retrive password if you forgot it. <b>We will never spam you</b>, and your email is always kept private.</span>';
break;
case 'pass':
oInput = f.pass;
strText = "Pick a password that is at least 4 letters long. (We'd recommend a bit longer though)";
break;
default:
strText = '';}
if(!strText){
bubble.style.display = 'none';
} else {
var pos = findPos(oInput);
bubble.style.top = pos.top + 'px';
bubble.style.left = pos.right + 'px';
bubbleContent.innerHTML = strText;
bubble.style.display = 'block';
}}
function findPos(obj) {
var curleft = curtop = 0;
var curWidth = obj.offsetWidth;
var curHeight = obj.offsetHeight;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop}}
return {left:curleft,top:curtop,right:curleft+curWidth, bottom:curleft+curHeight};}
window.onresize = showCurTipBubble;// JavaScript Document
//vishmax.com
