//=======================================================================================
//Functions up are used to Get Featured Profile(Begin)
function ShowFeaturedProfile(FeaturedUserids)
{
	if(FeaturedUserids!=null&&FeaturedUserids.length>0)
	{
		var FeaturedUseridsArray=FeaturedUserids.split(" ");
		if(FeaturedUseridsArray.length>0)
		{
			var ShowFeaturedUserid=FeaturedUseridsArray[RandomUserid(1,FeaturedUseridsArray.length)-1];
			
			//Show Featured Userid now
            //make the ajax call  
            var req = new Request
            ({  
                method: 'post',  
                url: "XML_Featured_Profile.asp?action=ShowSingleUser&ShowUserid="+ShowFeaturedUserid+LoginGUIDQueryString2+"&Version="+Math.random(),  
                data: { },  
                headers: { 'If-Modified-Since':'0' },  
                onRequest: function() 
                {},  
                onSuccess: function(txt)
                {
                	  UpdateDivContent($('FeaturedProfileInnerContent'),txt);
			          var x1string="<MyScript>";
			          var x1=0;
			          var x2string="</MyScript>";
			          var x2=0;
        			  
			          while(x1>=0)
			          {
			 	          x1=txt.indexOf(x1string,x2);
			 	          x2=txt.indexOf(x2string,x1);
        			 	  
			 	          if(x1>=0&&x2>=0)
			 	          {
			 	  		        var scriptstring=txt.substring(x1+x1string.length,x2);
			 	  		        eval(scriptstring);
			 	          }
			          }
                },
                onFailure: function()
                {
                		$('FeaturedProfileDiv').setStyle('display','none');
                }
            });
                     
            req.send();
		}
	}
	else
	{
		$('FeaturedProfileDiv').setStyle('display','none');
	}
}


function BecomeAFeaturedProfile()
{
    DoPopup("becomefeatured","<img src='image/loading_image.gif'><br />Loading now, please wait...");
    var FeaturedMsgTitle="Become a Featured Profile";
    var FeaturedMsgMainContent="Becoming a featured profile will increase your chances of success by 10-20 times.<br><br><li><b>How can I become a featured profile?</b><br><div class='quote' style='margin-top:10px;margin-bottom:10px;'>Here're 3 steps to become a featured profile:<br><br><img src='image/small_direction.gif' border=0>&nbsp;<a href='pay.asp"+LoginGUIDQueryString1+"'>Become our gold member</a><br><br><img src='image/small_direction.gif' border=0>&nbsp;<a href='myphoto.asp"+LoginGUIDQueryString1+"'>Upload more attractive photos</a><br><br><img src='image/small_direction.gif' border=0>&nbsp;<a href='my_profile.asp"+LoginGUIDQueryString1+"'>Write more descriptions about you and about your match</a><br><br>After completing the 3 steps, your profile will be reviewed by our staff within 12 hours and we will set your profile as a featured profile.</div><p align='center'><a href='javascript:ClosePopup();'><img border='0' src='image/CloseWindow.gif' /></a></p>";
    var ShowBecomeFeaturedMsg="<table border='0' cellspacing='0' cellpadding='0' width='96%'><tr><td class='BigText' align='center' height='35'>"+FeaturedMsgTitle+"</td></tr><tr><td>"+FeaturedMsgMainContent+"</td></tr></table>";
    UpdateDivContent($("messageText"),ShowBecomeFeaturedMsg);
}
//Functions up are used to Get Featured Profile(End)
//=======================================================================================
