﻿function alertMsgLength()
{ var strLength; var strMsg; if(document.getElementById('txtSMS').value.length>120)
{ strMsg=document.getElementById('txtSMS').value; document.getElementById('txtSMS').value=strMsg.substring(0,120); document.getElementById('txtSMS').focus(); return false;}
strLength=document.getElementById('txtSMS').value.length; document.getElementById('lblMaxChar').innerHTML=120-strLength+"/120";}
function explainProfileMatch(vCtr,vWhat)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,toolbar=no,height=500,width=600,resizable=no'; window.open('profileMatchExplained.aspx?id='+vWhat,vCtr,mybars)
}
function crispProfileMatch(vCtr,vWhat)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=yes,toolbar=no,height=450,width=558,resizable=yes'; window.open('crispProfileMatch.aspx?id='+vWhat,vCtr,mybars)
}
function doCustomize(strOption,displaypanel,notdisplaypanel)
{ var strURL; strUrl = "viewcustomize.aspx?customize="; var strHeight; strHeight = "415"; var strWidth; strWidth = "540"; strUrl = strUrl + strOption; strUrl = strUrl + "&displaypanel=" + displaypanel; strUrl = strUrl + "&notdisplaypanel=" + notdisplaypanel; window.open(strUrl,"mywindow","menubar=0,resizable=0,width=540,height=415");}
function plzLogin()
{ openNewWin('../../logIn.aspx','200','428','no');}
function openNewWin(whichPage,strHeight,strWidth,strResize)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,toolbar=no,height=' + strHeight + ',width=' + strWidth + ',resizable=' + strResize; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function openPromptNew(whichPage,strHeight,strWidth)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,toolbar=no,resizable=yes'; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function openPromptNew1(whichPage,strHeight,strWidth)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=yes,toolbar=no,resizable=yes'; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function openPhoto(vCtr,vWhat)
{ window.focus(); var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=yes,toolbar=no,height=780,width=710,resizable=yes'; window.open('../../vivah_matrimonials/user/openPhoto.aspx?photo='+vWhat,vCtr,mybars)
}
function plzLogin()
{ openNewWin('../../logIn.aspx','176','428','no');}
function doConfirm_Accept(id)
{ var strQueryVars = new String(""); strQueryVars = "id=" + id + "&type=photoContact"; var strPath
strPath = "../../vivah_matrimonials/introContact/confirmRequest.aspx?" + strQueryVars; var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,srollbars=no,toolbar=no,height=225,width=300,resizable=no'; var newWin = open(strPath,'confirmpwd',mybars); newWin.focus();}
function doConfirm_pwd(id)
{ var strQueryVars = new String(""); strQueryVars = "id=" + id; var strPath
strPath = "../../vivah_matrimonials/introContact/confirmpassword.aspx?" + strQueryVars; var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,srollbars=no,toolbar=no,height=225,width=300,resizable=no'; var newWin = open(strPath,'confirmpwd',mybars); newWin.focus();}
function addToFav(id)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=no,titlebar=no,width=300,height=150,resizable=no'; var newWin = open('AddtoFav.aspx?screenName='+id,'fav',mybars);}
function openNotes(whichPage)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,scrollbars=no,titlebar=no,width=300,height=150,resizable=no'; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function eMailProfile(id,username)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,srollbars=yes,toolbar=no,height=260,width=280,resizable=no'; window.open('emailProfile.aspx?id='+id+'&username='+username,id+id,mybars)
}
function up_launchWM( userID, destinationUserID )
{ window.open( "chatinitrequest.aspx?strDestinationUserID=" + destinationUserID, "WMWindow_" + up_replaceAlpha(userID) + "_" + up_replaceAlpha(destinationUserID), "width=427,height=150,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1" );}
function up_replaceAlpha( strIn )
{ var strOut = ""; for( var i = 0 ; i < strIn.length ; i++ )
{ var cChar = strIn.charAt(i); if( ( cChar >= 'A' && cChar <= 'Z' ) || ( cChar >= 'a' && cChar <= 'z' ) || ( cChar >= '0' && cChar <= '9' ) )
{ strOut += cChar;}
else
{ strOut += "_";}
}
return strOut;}
function doConfirm(id,type)
{ var typeArray = new Array(); typeArray[0] = "photo"; typeArray[1] = "horo"; typeArray[2] = "email"; typeArray[3] = "photo"; var strType = new String(""); strType = eval("typeArray[" + type + "]"); var strQueryVars = new String(""); strQueryVars = "id=" + id + "&type=" + strType; var strPath
strPath = "../../vivah_matrimonials/introContact/confirmRequest.aspx?" + strQueryVars; var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,srollbars=no,toolbar=no,height=140,width=300,resizable=no'; var newWin = open(strPath,'confirm',mybars); newWin.focus();}
function doBookmark()
{ window.external.addFavorite("http://www.vivah.com/","Vivah.com - Your portal to matrimonial bliss");}
function openCommandCenter(whichPage,strHeight,strWidth)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=yes,toolbar=no,height=' + strHeight + ',width=' + strWidth + ',resizable=yes'; var newWin = open(whichPage,'remoteWindow',mybars); newWin.focus();}
function forgotPassword()
{ window.focus(); var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,srollbars=no,toolbar=no,height=165,width=425,resizable=no'; var newWin = open('<%=getprefix%>vivah_matrimonials/user/forgotPwd.aspx?oldEmial=','passwordHelp',mybars); newWin.focus();}
function openNewWin(whichPage,strHeight,strWidth,strResize)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,toolbar=no,height=' + strHeight + ',width=' + strWidth + ',resizable=' + strResize; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function hide()
{ if (document.getElementById)
{ if(document.getElementById("Panel3").style.display == 'block')
{ document.getElementById("Panel3").style.display = 'none'; document.getElementById("options").innerHTML = "<a href='javascript:hide()'><font color='003399'>More details? Click here &raquo;</font></a>";}
else
{ document.getElementById("Panel3").style.display = 'block'; document.getElementById("options").innerHTML = "<a href='javascript:hide()'><font color='003399'>Less details? Click here &raquo;</font></a>";}
}
else
{ if (document.layers)
{ if(document.Panel3.display == 'block')
{ document.Panel3.display = 'none'; document.options.innerHTML = "<a href='javascript:hide()'><font color='003399'>More details? Click here &raquo;</font></a>";}
else
{ document.Panel3.display = 'block'; document.options.innerHTML = "<a href='javascript:hide()'><font color='003399'>Less details? Click here &raquo;</font></a>";}
}
else
{ if(document.all.Panel3.style.display == 'block')
{ document.all.Panel3.style.display = 'none'; document.all.options.innerHTML = "<a href='javascript:hide()'><font color='003399'>More details? Click here &raquo;</font></a>";}
else
{ document.all.Panel3.style.display = 'block'; document.all.options.innerHTML = "<a href='javascript:hide()'><font color='003399'>Less details? Click here &raquo;</font></a>";}
}
}
}
function sendMyProfile(intToUserID)
{ var strDivContent; strDivContent = document.getElementById("divSendMyProfile").innerHTML; document.getElementById("divSendMyProfile").innerHTML = "<font color=red>Sending your profile, please wait...</font>"; loadContent("sendMyprofile.aspx?intToUserID=" + intToUserID, "divSendMyProfile"); setTimeout('document.getElementById("divSendMyProfile").innerHTML = "<font color=red>Profile successfully sent...</font>"',3000);}
function returnfunction(returnvalue)
{ document.getElementById("txtSMS").value=returnvalue;}
function ClearText()
{ var text1= document.getElementById("txtSMS"); var img1 = document.getElementById("ImgOKbutton"); var img2 = document.getElementById("CancelButton"); text1.value = "Enter text here"; text1.rows="1"; text1.style.height="30px"; img1.style.visibility='visible'; img2.src = "../../smspics/cancel.gif"; img2.width="54px"; alertMsgLength();}
function sendMyProfileConfirm(intToUserID)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,height=149,width=200,toolbar=no,resizable=no'; var newWin = open('SendConfirm.aspx?UserId='+intToUserID,'newWindow',mybars); newWin.focus();}
function openverification(whichPage,strHeight,strWidth)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,height='+strHeight+',width='+strWidth+',toolbar=no,resizable=yes'; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function openverification11(whichPage,strHeight,strWidth)
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,fullscreen=yes,scrollbars=yes,toolbar=no,resizable=yes'; var newWin = open(whichPage,'newWindow',mybars); newWin.focus();}
function fncHideRply()
{ trRow=document.getElementById('trReply')
if (confirm('Do you want to cancle reply ?'))
{ trRow.style.display='none'
}
return false;}
function fncSubmitRply()
{ document.Frm7.submit();}
function fncCheckBlnk()
{ txt= document.getElementById('txtReply')
hdnVal=document.getElementById('hdn')
if(txt.value=='')
{ var mybars = 'directories=no,location=no,menubar=no,status=no,titlebar=no,scrollbars=no,height=160,width=260,toolbar=no,resizable=no'; window.open("msgConfirm.aspx?for=reply",'newWindow',mybars); window.focus(); txt.focus(); return false ;}
else
{ hdnVal.value="sent"; document.Frm7.submit(); return true;}
}
function test(id2,p)
{ var text= document.getElementById("textfield33").value; var text1= document.getElementById("txtSMS"); text1.value = text; return false;}
function test5()
{ plzLogin(); return false;}
function FitToContent(id, maxHeight){ var text = id && id.style ? id : document.getElementById(id); if ( !text ) return; var adjustedHeight = text.clientHeight; if ( !maxHeight || maxHeight > adjustedHeight ) { adjustedHeight = Math.max(text.scrollHeight, adjustedHeight); if ( maxHeight ) adjustedHeight = Math.min(maxHeight, adjustedHeight); if ( adjustedHeight > text.clientHeight ) text.style.height = adjustedHeight + "px";}}window.onload = function() { document.getElementById("txtsms").onkeyup = function() { FitToContent( this, 500 ) };}
var offsetfromcursorX=12
var offsetfromcursorY=10
var offsetdivfrompointerX=10
var offsetdivfrompointerY=14
document.write('<div id="dhtmltooltip"></div>')
document.write('<img id="dhtmlpointer" src="arrow2.gif">')
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""
function ietruebody(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(thetext, thewidth, thecolor){ if (ns6||ie){ if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}
function positiontip(e){ if (enabletip){ var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000
if (rightedge<tipobj.offsetWidth){ tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{ tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}
if (bottomedge<tipobj.offsetHeight){ tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{ tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}
function changeimage()
        {
            if (document.getElementById)
	        { // DOM3 = IE5, NS6
		        document.getElementById("Image5").src="../../pics/forpaid_upgradeOver.png";
		    }
		    else 
		    {
		        if (document.layers)
		        { // Netscape 4
	                document.Image5.src="../../pics/forpaid_upgradeOver.png";
		        }
		        else
		        {
		            document.all.Image5.src="../../pics/forpaid_upgradeOver.png";
		        }
	        }
	    }

        function changeimageOut()
        {
            if (document.getElementById)
	        { // DOM3 = IE5, NS6
		        document.getElementById("Image5").src="../../pics/forpaid_upgrade.png";
		    }
		    else 
		    {
		        if (document.layers)
		        { // Netscape 4
	                document.Image5.src="../../pics/forpaid_upgrade.png";
		        }
		        else
		        {
		            document.all.Image5.src="../../pics/forpaid_upgrade.png";
		        }
	        }
	    }
	    function PaidDetailsDelay(idusername,p,pid)
{
    setTimeout('PaidDetails("' + idusername + '","' + p + '")',500);
    setTimeout("TagToTip('T2TBalloon', ABOVE, true, TEXTALIGN, 'justify', FOLLOWMOUSE, false, 'EXCLUSIVE', true, FIX, ['" + pid + "', -100, -5])",500);
}
function PaidDetailsSMS(idusername,p,pid)
{
    setTimeout('PaidDetails("' + idusername + '","' + p + '")',500);
    setTimeout("TagToTip('T2TBalloon', ABOVE, true, TEXTALIGN, 'justify', FOLLOWMOUSE, false, 'EXCLUSIVE', true, FIX, ['" + pid + "', -35, -5])",500);
}
function PaidDetailsPhoto(idusername,p,pid)
{
            var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

            if (browser == "Netscape")
	        { // DOM3 = IE5, NS6
		        setTimeout('PaidDetails("' + idusername + '","' + p + '")',500);
                setTimeout("TagToTip('T2TBalloon', ABOVE, true, TEXTALIGN, 'justify', FOLLOWMOUSE, false, 'EXCLUSIVE', true, FIX, ['" + pid + "', 70, 50])",500);
                //alert(browser)
		    }
		    else 
		    {
		        setTimeout('PaidDetails("' + idusername + '","' + p + '")',500);
                setTimeout("TagToTip('T2TBalloon', ABOVE, true, TEXTALIGN, 'justify', FOLLOWMOUSE, false, 'EXCLUSIVE', true, FIX, ['" + pid + "', 70, 90])",500);
                //alert(browser)
	        }
}
function PaidDetails(idusername,p)
{
    if (p=="photo")
    {
        document.getElementById("LblPuname").innerHTML = "<b>" + idusername + "</b>";
    }
    else
    {
        document.getElementById("LblPuname").innerHTML = "<b>Contact " + idusername + "</b>";
    }
    if(p=="SMS" || p=="vivahmail")
    {
        document.getElementById("LblPunameDetails").innerHTML = "To send " + p + " to " + idusername + ", you <br />need to become a premium member";    
    }
    else
    {
        document.getElementById("LblPunameDetails").innerHTML = "To view " + idusername + "'s " + p + ', you <br />need to become a premium member';
    }
    return true;
}
function hideddrivetip(){ if (ns6||ie){ enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip

