var startTag = "<table border=\"0\" cellpadding=\"0\" width=\"220\" cellspacing=\"0\"  height=\"1\">  <tr>    <td width=\"11\" align=\"right\" valign=\"top\" height=\"1\"><img name=\"c2_r1_c2\" src=\"/m4marry/images/tooltip/c2_r1_c2.gif\" width=\"4\" height=\"4\" border=\"0\" ></td>    <td  valign=\"top\" align=\"left\" background=\"/m4marry/images/tooltip/c2_r1_c4.gif\" height=\"1\"><img name=\"c2_r1_c4\" src=\"/m4marry/images/tooltip/c2_r1_c4.gif\" width=\"155\" height=\"4\" border=\"0\" ></td>    <td width=\"4\" height=\"1\"><img name=\"c2_r1_c5\" src=\"/m4marry/images/tooltip/c2_r1_c5.gif\" width=\"4\" height=\"4\" border=\"0\" ></td>  </tr><tr>    <td width=\"11\"  align=\"left\" valign=\"top\" background=\"/m4marry/images/tooltip/arrow_line.gif\"><img name=\"c2_r2_c1\" src=\"/m4marry/images/tooltip/c2_r2_c1.gif\" width=\"11\" border=\"0\" ></td>    <td   bgcolor=\"#FEFBF5\" valign=\"top\" align=\"left\">	  	<table border=\"0\" cellpadding=\"10\" cellspacing=\"0\" width=\"100%\">		<tr>			<td width=\"100%\" bgcolor=\"#FEFBF5\"  valign=\"top\" align=\"left\" style=\"line-height: 105%\" class=helpnotes >   ";
  
  
 var endTag = " </td></tr></table>  </td> </td>   <td width=\"4\"  background=\"/m4marry/images/tooltip/c2_r2_c5.gif\"><img name=\"c2_r2_c5\" src=\"/m4marry/images/tooltip/c2_r2_c5.gif\" width=\"4\" border=\"0\" >   </td> </tr>    <tr>   <td width=\"11\" height=\"1\" valign=\"bottom\" align=\"right\"><img name=\"c2_r5_c2\" src=\"/m4marry/images/tooltip/c2_r5_c2.gif\" width=\"4\" height=\"4\" border=\"0\" ></td>   <td height=\"1\" valign=\"bottom\" background=\"/m4marry/images/tooltip/c2_r5_c4.gif\"><img name=\"c2_r5_c4\" src=\"/m4marry/images/tooltip/c2_r5_c4.gif\"  height=\"4\" border=\"0\" ></td>   <td width=\"4\" height=\"1\" valign=\"bottom\" align=\"left\"><img name=\"c2_r5_c5\" src=\"/m4marry/images/tooltip/c2_r5_c5.gif\" width=\"4\" height=\"4\" border=\"0\" ></td> </tr></table>";

//Window Title Start
var titleArray = new Array();
titleArray[0] = "Malayalee Brides And Grooms"; //Search Pages Title
titleArray[1] = "Malayalee Matrimonial Site"; //Profile Pages Title
titleArray[2] = "Kerala's Biggest Malayalee Matrimonial Site"; //Other Pages Title

function setWindowTitle(index) {
	//if(index==1) document.title = titleArray[index];
	 document.title = titleArray[index];
}

//Window Title End
// position of the tooltip relative to the mouse in pixel //
var offsetx = 12;
var offsety =  8;

function newelement(newid)
{ 
    if(document.createElement)
    { 
        var el = document.createElement('div'); 
        el.id = newid;     
        with(el.style)
        { 
            display = 'none';
            position = 'absolute';
        } 
        el.innerHTML = '&nbsp;'; 
        document.body.appendChild(el); 
    } 
} 
var ie5 = (document.getElementById && document.all); 
var ns6 = (document.getElementById && !document.all); 
var ua = navigator.userAgent.toLowerCase();
var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0);

function getmouseposition(e)
{
    if(document.getElementById)
    {
        var iebody=(document.compatMode && 
        	document.compatMode != 'BackCompat') ? 
        	document.documentElement : document.body;
        pagex = (isapple == 1 ? 0:(ie5)?iebody.scrollLeft:window.pageXOffset);
        pagey = (isapple == 1 ? 0:(ie5)?iebody.scrollTop:window.pageYOffset);
        mousex = (ie5)?event.x:(ns6)?clientX = e.clientX:false;
        mousey = (ie5)?event.y:(ns6)?clientY = e.clientY:false;
			if( document.body){
			try{
				  wHeight = document.body.clientHeight ;
				  wWidth = document.body.clientWidth;
			}catch(error){ wHeight = wWidth = 0 ;}
		}

        var m4m_tooltip = document.getElementById('mmtooltip');
		if( m4m_tooltip ){
			leftP = mousex+pagex+offsetx ;
			topP = mousey+pagey+offsety ;
			if( wWidth > 0 && ( (leftP + 220) > wWidth ) ) leftP = leftP-150 ;
			//if( wHeight > 0 && ( (topP + 120) > wHeight ) ) topP = topP-40 ;
			m4m_tooltip.style.left = (leftP) + 'px';
			m4m_tooltip.style.top = (topP) + 'px';
			//m4m_tooltip.style.left = (mousex+pagex+offsetx) + 'px';
			//m4m_tooltip.style.top = (mousey+pagey+offsety) + 'px';
		 }
    }
}
function mmtooltip(tip)
{
	if( tip == null || tip == "" ) return ;
	if( ie5 && document.readyState !='complete' ) return;
    if(!document.getElementById('mmtooltip')) newelement('mmtooltip');
    var m4m_tooltip = document.getElementById('mmtooltip');
	if( m4m_tooltip ){
		m4m_tooltip.innerHTML = startTag+ tip +endTag ;
		m4m_tooltip.style.display = 'block';
		document.onmousemove = getmouseposition;
  }
}
function exit()
{
	try {
    document.getElementById('mmtooltip').style.display = 'none';
	}catch(error){}
}

document.ondragstart = function () { return false; };
