function openImgWindow(i,x,y) {
	var dimensions = "width="+"250"+",height="+"250,scrollbars=No";
	window.open('showImgFull.php?i='+i+'&x='+x+'&y='+y+'&c=TRUE','fullImg', dimensions);
}

function openChatWindow($strSessionGUID) {
		var dimensions = "width=618,height=480,scrollbars=No";
		var otherWindow = frames["I1"];
		var url = 'partychat.php'
		frames["I1"].location.href='partychat.php'
	}


function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
function openPopup(popURL){
var popLeft = (screen.width - 370) / 2;
var popTop = (screen.height - 525) / 2;
passPop=window.open(popURL,"","width=370,height=525,top="+popTop+",left="+popLeft+",")
}


function sayMSG () {
	alert ('\t\t\tADULTDATINGX :: PLEASE READ\nThis link will open a popup window from this ADULTDATINGX to our payment gateway\n If you cannot see the popup window - it may because you have pop-up blocking disabled for this site.\n\nWhen the window opens you can pay via one of two options\n - Via Credit Card (Do not forget to enter your mobile number in the international format)\n - Via SMS\n\nOnce you have completed the payment process simply click the proceed button.\n\nIf you fail to click the proceed button after youve completed the process\n log out and back into ADULTDATINGX'); 
	}
	
	function hideallrun ()
		{
			var thisLevel = document.getElementById( "tabContact" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "yourPersonalInformation" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "yourStatistics" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "yourFavourite" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "finalThoughts" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "tabMore" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "tabInterests" );
			thisLevel.style.display = "none";
			var thisLevel = document.getElementById( "optIns" );
			thisLevel.style.display = "none";
		}
	function showmenu  (tablename)
		{
			var thisLevel = document.getElementById(tablename);
			hideallrun ();
			thisLevel.style.display = "";
		}	
		
		function csEvent( strEvent, strParameter1, strParameter2 )
	{
		if( strEvent == "InstantCommunicator.StartConversation" )
		{
			var strUserID = strParameter1;
			// open up an InstantCommunicator window.  For example:
			launchIC( "<?php echo( $strSessionGUID ); ?>", strUserID );
		}
		else if( strEvent == "User.ViewProfile" )
		{
			var strUserID = strParameter1;
		}
		else if( strEvent == "User.Block" )
		{
			var strBlockedUserID = strParameter1;
			var bBlocked = strParameter2;
		}
		else if( strEvent == "User.AddFriend" )
		{
			var strFriendUserID = strParameter1;
			var bFriend = strParameter2;
		}
	}
	
	function launchIC( userID, destinationUserID )
	{
		window.open( "ic2.php?strDestinationMemberID=" + destinationUserID, "ICWindow_" + replaceAlpha(userID) + "_" + replaceAlpha(destinationUserID), "width=360,height=420,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=0" );
		parent.window.frames["updateUser"].location.href="userChecks/updateUser.php";
	}
	
	function 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;
	}