/** publicfriendpage - Tue 05/25/2010 18:19:07.23 */
$(document).ready(function(){$(".DEL").click(function(){$iFriendAccountUnq=iVAU;$.ajax({type:"POST",dataType:"xml",url:"/ap/removefriend.php",data:"sAction=R&sFormName=FriendControlPanel&sPage=MyPage&iFriendAccountUnq="+$iFriendAccountUnq,success:function(xml){},complete:function(xml){$("#RemoveFriend"+$iFriendAccountUnq).hide();$("#RemoveFriend"+$iFriendAccountUnq+"b").show()}})}).confirm({dialogShow:"fadeIn",dialogSpeed:"slow",msg:"Are&nbsp;you sure? ",buttons:{cancel:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[No]</span>',ok:'<span style="font: 9px/11px verdana, geneva, arial;color: #bb0101;text-decoration: none;">[Yes]</span>',separator:"&nbsp;"}});$(".showSendMsg").click(function(){$("#SendMsgDIV").toggle("slow")});$("#SendMsg").click(function(){var $sData="iFriendAccountUnq="+iVAU+"&sMessage="+encodeURIComponent($("#sSMMessageF").val());$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/sendmessage.php",data:$sData,success:function(xml){},beforeSend:function(xml){$("#SendMsg").html("<img src='/images/stat.gif' border=0 align=absmiddle style='padding-right:10px;'>Sending...")},complete:function(xml){$("#SendMsg").html("");$("#SendMsgDIV").hide("slow");$(".showSendMsg").hide("slow");$("#SendMsgDIV2").show().html("<img src='/images/tick.gif' border=0 align=absmiddle>");$("#SendMsgDIV3").show().html("<span style='font: bold 11px/14px verdana, geneva, arial;color: #218ecd;text-decoration: none;'>Message Sent!</span>")}})});if(bIsFriend==1){wordCount(document.SendMsgForm.sSMMessage,document.SendMsgForm.bodywordsSM,200)}$sAction="0";$(".modalLOAN").cluetip({activation:"click",showTitle:false,cursor:"pointer",width:"500px",arrows:true,closePosition:"top",sticky:true,ajaxCache:false,closeText:'<img src="/images/blank.gif" />',onShow:function(ct,c){$(".saveandclose").click(function(){$("#cluetip-close").click()});$("#loanApprove").click(function(){$("#loanDecline").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> decline");$("#loanDelete").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> delete quietly");$(this).html("<img src='/images/checkOn.png' width=17 height=17 valign=absmiddle> approve");$("#loanD").hide("slow");$("#loanAP").show("slow");$sAction="b"});$("#loanDecline").click(function(){$("#loanApprove").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> approve");$("#loanDelete").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> delete quietly");$(this).html("<img src='/images/checkOn.png' width=17 height=17 valign=absmiddle> decline");$("#loanD").show("slow");$("#loanAP").hide("slow");$sAction="c"});$("#loanDelete").click(function(){$("#loanDecline").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> decline");$("#loanApprove").html("<img src='/images/checkOff.png' width=17 height=17 valign=absmiddle> approve");$(this).html("<img src='/images/checkOn.png' width=17 height=17 valign=absmiddle> delete quietly");$("#loanD").show("slow");$("#loanAP").hide("slow");$sAction="d"});$("#loanD").hide("slow");$("#loanAP").show("slow");$sAction="b";$(".sendandclose").click(function(){$iAlertUnq=$("#iLAlertUnq").val();$sStipulations=$("#sStipulationsF").val();$sDDDay=$("#sDDDay").val();$sDDMonth=$("#sDDMonth").val();$sDDYear=$("#sDDYear").val();$("#dateError").hide();switch(isDate()){case 1:$("#dateError").html("Month must be between 1 and 12.");$("#dateError").show("slow");break;case 2:$("#dateError").html("Day must be between 1 and 31.");$("#dateError").show("slow");break;case 3:$("#dateError").html("Please select a valid date.");$("#dateError").show("slow");break;case 4:$("#dateError").html("February "+$sDDYear+" doesn't have "+$sDDDay+" days.");$("#dateError").show("slow");break;case 5:$("#dateError").html("Not a valid Date");$("#dateError").show("slow");break;case 6:if($iAlertUnq!=""){$.ajax({type:"POST",dataType:"xml",url:"/ap/userarea/lists/borrowed/loan.php",data:"sAction="+$sAction+"&iAlertUnq="+$iAlertUnq+"&sDDDay="+$sDDDay+"&sDDMonth="+$sDDMonth+"&sDDYear="+$sDDYear+"&sStipulations="+encodeURIComponent($sStipulations),success:function(xml){$("response>sData>datanode",xml).each(function(){$("#BorrowMsg_"+$iAlertUnq).hide();$("#BorrowMsg_"+$iAlertUnq+$("value",this).text()).show()});$("#cluetip-close").click()},beforeSend:function(xml){$("#LStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#LStat").attr({src:"/images/blank.gif"})}})}$("#cluetip-close").click();break}})}});if(iTM){$("#todAdmin").click(function(){$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/adminalerttipofday.php",success:function(html){$("#tipspanel").hide()}})})}else{$("#todNext").click(function(){$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/gettipofday.php",success:function(html){$("#todBody").html("<li>"+html+"</li>")},beforeSend:function(xml){$("#todStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#todStat").attr({src:"/images/blank.gif"})}})})}$("#todCheck").click(function(){$.ajax({type:"POST",dataType:"html",url:"/ap/userarea/disabletipofday.php",success:function(html){$("#cluetip-close").click()},beforeSend:function(xml){$("#todStat").attr({src:"/images/stat.gif"})}})});$("#closeTip").click(function(){$("#tipspanel").hide();iposTip=0});$("#MFOpen, #MFOpen2").click(function(){$.ajax({type:"GET",dataType:"html",url:"/userarea/lists/myfilters.php?bMP=1",success:function(html){$("#MFDIV").html(html).toggle("slow")},beforeSend:function(xml){$("#MFStat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#MFStat").attr({src:"/images/blank.gif"})}})});$("#MFPin").live("click",function(){$.ajax({type:"GET",dataType:"json",url:"/ap/pin.php",complete:function(jsonArray){$("#MFPin").hide();$("#MFPinned").show()}})});$("#MFPinned").live("click",function(){$.ajax({type:"GET",dataType:"json",url:"/ap/pinned.php",complete:function(jsonArray){$("#MFPinned").hide();$("#MFPin").show()}})});jQuery.fn.oAW=function(iAE){$("#iAE"+iAE).attr({rel:"/userarea/modalaward.php?iAE="+iAE});$("#iAE"+iAE).bgiframe().cluetip({activation:"focus",showTitle:false,width:"440px",dropShadow:false,leftOffset:"100px"});if($.browser.msie){document.getElementById("iAE"+iAE).focus()}else{$("#iAE"+iAE).focus()}};jQuery.fn.AWo=function(iAE){$("#iAE"+iAE).blur()};if(bShowOnLoad!=true){$.ajax({type:"GET",dataType:"json",url:"/ap/pfp5.php",success:function(json){$.each(json.results,function(k,iAU){if(iAU!="0"){jQuery.noticeAdd({iAU:iAU})}})}})}$.ajax({type:"GET",dataType:"html",url:"/ap/pfp1.php",data:"iVAU="+iVAU,success:function(html){$("#pfp1").html(html);$("a.UIP").cluetip({showTitle:false,cursor:"pointer",width:"240px",arrows:true,clickThrough:true});$(".trustedRevIcon, .trustedRevoff").cluetip({showTitle:false,local:true,cursor:"pointer",width:"200px",clickThrough:true})},beforeSend:function(xml){$("#pfp1Stat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#pfp1Stat").attr({src:"/images/blank.gif"})}});$.ajax({type:"GET",dataType:"html",url:"/ap/pfp2.php",data:"iVAU="+iVAU,success:function(html){$("#pfp2").html(html)},beforeSend:function(xml){$("#pfp2Stat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#pfp2Stat").attr({src:"/images/blank.gif"})}});$.ajax({type:"GET",dataType:"html",url:"/ap/pfp3.php",data:"iVAU="+iVAU+"&iCLD="+iCLD,success:function(html){$("#pfp3").html(html)},beforeSend:function(xml){$("#pfp3Stat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#pfp3Stat").attr({src:"/images/blank.gif"})}});$.ajax({type:"GET",dataType:"html",url:"/ap/pfp4.php",data:"iVAU="+iVAU,success:function(html){$("#pfp4").html(html)},beforeSend:function(xml){$("#pfp4Stat").attr({src:"/images/stat.gif"})},complete:function(xml){$("#pfp4Stat").attr({src:"/images/blank.gif"})}});$(".ALERTMSG").cluetip({showTitle:false,cursor:"pointer",width:"300px",arrows:true,clickThrough:true})});var iPicksFade=1;jQuery.fn.PicksFade=function(jsonArray){$.ajax({type:"GET",dataType:"json",url:"/ap/picksfade.php",data:"iVAU="+iVAU,cache:false,success:function(jsonArray){$sHTML=jsonArray.results;if($sHTML!=""){$("#PicksFade"+iPicksFade).fadeOut("slow");if(iPicksFade==1){iPicksFade=2}else{iPicksFade=1}$("#PicksFade"+iPicksFade).fadeIn("slow").html($sHTML)}setTimeout($(document).PicksFade,4000)},beforeSend:function(xml){},complete:function(xml){}})};$(document).PicksFade();function isDate(){$sDDDay=$("#sDDDay").val();$sDDMonth=$("#sDDMonth").val();$sDDYear=$("#sDDYear").val();var dDate=new Date($sDDMonth+"/"+$sDDDay+"/"+$sDDYear);if($sDDMonth<1||$sDDMonth>12){return 1}if($sDDDay<1||$sDDDay>31){return 2}if(($sDDMonth==4||$sDDMonth==6||$sDDMonth==9||$sDDMonth==11)&&$sDDDay==31){return 3}if($sDDMonth==2){var isleap=($sDDYear%4==0&&($sDDYear%100!=0||$sDDYear%400==0));if($sDDDay>29||($sDDDay==29&&!isleap)){return 4}}if(dDate.toString()=="NaN"||dDate.toString()=="Invalid Date"){return 5}else{return 6}};