Type.registerNamespace("MySpace.Web.Modules.MyStuff.Services");MySpace.Web.Modules.MyStuff.Services.Stuff=function(){MySpace.Web.Modules.MyStuff.Services.Stuff.initializeBase(this);this._timeout=0;this._userContext=null;this._succeeded=null;this._failed=null};MySpace.Web.Modules.MyStuff.Services.Stuff.prototype={RetrieveActivitiesEveryoneFirstTime:function(D,C,B,E,A,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesEveryoneFirstTime",false,{channel:D,dma:C,count:B},E,A,F)},RetrieveActivitiesEveryoneNew:function(D,C,B,F,E,A,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesEveryoneNew",false,{channel:D,dma:C,count:B,lastUpdated:F},E,A,G)},RetrieveActivitiesEveryoneOld:function(D,C,B,F,E,A,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesEveryoneOld",false,{channel:D,dma:C,count:B,lastUpdated:F},E,A,G)},IsNewActivityPresentEveryone:function(C,B,E,D,A,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"IsNewActivityPresentEveryone",false,{channel:C,dma:B,lastUpdated:E},D,A,F)},IsNewActivityPresentFriends:function(B,D,E,C,A,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"IsNewActivityPresentFriends",false,{channel:B,lastUpdated:D,hash:E},C,A,F)},RetrieveActivitiesFriendsFirstTime:function(C,B,E,D,A,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesFriendsFirstTime",false,{channel:C,count:B,hash:E},D,A,F)},RetrieveActivitiesFriendsNew:function(C,B,E,F,D,A,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesFriendsNew",false,{channel:C,count:B,lastUpdated:E,hash:F},D,A,G)},RetrieveActivitiesFriendsOld:function(C,B,E,F,D,A,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveActivitiesFriendsOld",false,{channel:C,count:B,lastUpdated:E,hash:F},D,A,G)},GetYourFriends:function(C,B,F,A,E,D,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetYourFriends",false,{stuffId:C,ownerId:B,startIndex:F,maxRecords:A},E,D,G)},GetAllFans:function(B,E,A,D,C,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetAllFans",false,{stuffId:B,startIndex:E,maxRecords:A},D,C,F)},GetAutoCompleteFriends:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetAutoCompleteFriends",false,{hash:C},B,A,D)},PostComment:function(E,F,C,G,B,A,I,J,H,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"PostComment",false,{type:E,subject:F,body:C,stuffId:G,recipientId:B,hash:A,allowComments:I},J,H,D)},MarkCommentAsSpam:function(C,B,E,A,G,F,D,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"MarkCommentAsSpam",false,{stuffId:C,reviewerId:B,commentId:E,commenterId:A,hash:G},F,D,H)},DeleteComment:function(C,B,E,A,G,F,D,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"DeleteComment",false,{stuffId:C,reviewerId:B,commentId:E,commenterId:A,hash:G},F,D,H)},GetFriendsCount:function(A,C,B,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetFriendsCount",false,{ownerId:A},C,B,D)},MarkReviewAsHelpful:function(C,A,G,B,F,E,D,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"MarkReviewAsHelpful",false,{stuffId:C,reviewId:A,isHelpful:G,reviewerId:B,hash:F},E,D,H)},ReportSpam:function(C,A,B,F,E,D,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"ReportSpam",false,{stuffId:C,reviewId:A,reviewerId:B,hash:F},E,D,G)},DeleteReview:function(B,A,E,D,C,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"DeleteReview",false,{stuffId:B,reviewId:A,hash:E},D,C,F)},DeleteAllReviews:function(A,D,C,B,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"DeleteAllReviews",false,{stuffId:A,hash:D},C,B,E)},DeleteWishList:function(A,D,C,B,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"DeleteWishList",false,{stuffId:A,hash:D},C,B,E)},CreateOrUpdateRating:function(A,C,E,D,B,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"CreateOrUpdateRating",false,{stuffId:A,rating:C,hash:E},D,B,F)},UpdateReviewRating:function(B,A,D,F,E,C,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"UpdateReviewRating",false,{stuffId:B,reviewId:A,rating:D,hash:F},E,C,G)},RetrieveItem:function(B,A,D,C,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveItem",false,{stuffId:B,channelType:A},D,C,E)},RetrieveStuffImages:function(A,C,B,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveStuffImages",false,{stuffId:A},C,B,D)},RecommendThis:function(A,G,C,E,D,B,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RecommendThis",false,{stuffId:A,receiverId:G,message:C,hash:E},D,B,F)},GetReviewList:function(B,F,A,D,E,C,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetReviewList",false,{stuffId:B,startIndex:F,maxRecords:A,sortOrder:D},E,C,G)},GetPeopleWhoRatedList:function(B,C,G,A,E,F,D,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetPeopleWhoRatedList",false,{loggedInUserId:B,stuffId:C,startIndex:G,maxRecords:A,sortOrder:E},F,D,H)},GetCommentList:function(C,B,F,A,E,D,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetCommentList",false,{stuffId:C,ownerId:B,startIndex:F,maxRecords:A},E,D,G)},GetFriendList:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetFriendList",false,{hash:C},B,A,D)},GetBookmarks:function(E,F,A,B,J,I,D,C,K,H,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetBookmarks",false,{channelType:E,userId:F,viewerId:A,category:B,sortBy:J,pageNumber:I,recordsPerPage:D,getMarkupTemplate:C},K,H,G)},GetStuffCollection:function(E,F,A,B,J,I,D,C,K,H,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetStuffCollection",false,{channelType:E,userId:F,viewerId:A,category:B,sortBy:J,pageNumber:I,recordsPerPage:D,getMarkupTemplate:C},K,H,G)},CreateReview:function(B,D,G,A,F,E,C,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"CreateReview",false,{stuffId:B,rating:D,title:G,review:A,hash:F},E,C,H)},EditReview:function(E,A,B,F,H,C,I,G,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"EditReview",false,{stuffId:E,reviewId:A,rating:B,title:F,review:H,hash:C},I,G,D)},UpdateReview:function(B,D,G,A,F,E,C,H){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"UpdateReview",false,{stuffId:B,rating:D,title:G,review:A,hash:F},E,C,H)},GetStuffWishlistGallery:function(H,C,A,G,F,B,I,E,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetStuffWishlistGallery",false,{stuffType:H,userId:C,category:A,sortBy:G,pageNumber:F,recordsPerPage:B},I,E,D)},GetPopularItems:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetPopularItems",false,{stuffType:C},B,A,D)},AddCommentToReview:function(B,A,F,E,D,C,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"AddCommentToReview",false,{stuffId:B,ownerId:A,commentBody:F,hash:E},D,C,G)},RemoveItemFromProfile:function(C,A,E,D,B,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RemoveItemFromProfile",false,{userId:C,stuffId:A,hash:E},D,B,F)},AddItemToBookmarks:function(C,A,E,D,B,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"AddItemToBookmarks",false,{userId:C,stuffId:A,hash:E},D,B,F)},RemoveItemFromBookmarks:function(C,A,E,D,B,F){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RemoveItemFromBookmarks",false,{userId:C,stuffId:A,hash:E},D,B,F)},AddToProfile:function(A,D,C,B,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"AddToProfile",false,{stuffId:A,hash:D},C,B,E)},RemoveFromProfile:function(A,D,C,B,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RemoveFromProfile",false,{stuffId:A,hash:D},C,B,E)},RetrieveUserReview:function(A,C,D,B,E){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveUserReview",false,{stuffId:A,userId:C},D,B,E)},RetrieveNeighborhoods:function(C,B,A,D){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveNeighborhoods",false,{query:C},B,A,D)},GetWriteReviewGuidelines:function(B,A,C){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"GetWriteReviewGuidelines",false,{},B,A,C)},RetrieveCarSearchOptions:function(E,A,B,D,F,C,G){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveCarSearchOptions",false,{cartype:E,make:A,model:B,year:D},F,C,G)},RetrieveCarTypes:function(B,A,C){return this._invoke(MySpace.Web.Modules.MyStuff.Services.Stuff.get_path(),"RetrieveCarTypes",false,{},B,A,C)}};MySpace.Web.Modules.MyStuff.Services.Stuff.registerClass("MySpace.Web.Modules.MyStuff.Services.Stuff",Sys.Net.WebServiceProxy);MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance=new MySpace.Web.Modules.MyStuff.Services.Stuff();MySpace.Web.Modules.MyStuff.Services.Stuff.set_path=function(A){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._path=A};MySpace.Web.Modules.MyStuff.Services.Stuff.get_path=function(){return MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._path};MySpace.Web.Modules.MyStuff.Services.Stuff.set_timeout=function(A){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._timeout=A};MySpace.Web.Modules.MyStuff.Services.Stuff.get_timeout=function(){return MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._timeout};MySpace.Web.Modules.MyStuff.Services.Stuff.set_defaultUserContext=function(A){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._userContext=A};MySpace.Web.Modules.MyStuff.Services.Stuff.get_defaultUserContext=function(){return MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._userContext};MySpace.Web.Modules.MyStuff.Services.Stuff.set_defaultSucceededCallback=function(A){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._succeeded=A};MySpace.Web.Modules.MyStuff.Services.Stuff.get_defaultSucceededCallback=function(){return MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._succeeded};MySpace.Web.Modules.MyStuff.Services.Stuff.set_defaultFailedCallback=function(A){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._failed=A};MySpace.Web.Modules.MyStuff.Services.Stuff.get_defaultFailedCallback=function(){return MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance._failed};MySpace.Web.Modules.MyStuff.Services.Stuff.set_path("/modules/mystuff/services/stuff.asmx");MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesEveryoneFirstTime=function(D,C,B,E,A,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesEveryoneFirstTime(D,C,B,E,A,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesEveryoneNew=function(D,C,B,E,F,A,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesEveryoneNew(D,C,B,E,F,A,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesEveryoneOld=function(D,C,B,E,F,A,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesEveryoneOld(D,C,B,E,F,A,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.IsNewActivityPresentEveryone=function(C,B,D,E,A,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.IsNewActivityPresentEveryone(C,B,D,E,A,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.IsNewActivityPresentFriends=function(B,C,D,E,A,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.IsNewActivityPresentFriends(B,C,D,E,A,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesFriendsFirstTime=function(C,B,D,E,A,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesFriendsFirstTime(C,B,D,E,A,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesFriendsNew=function(C,B,D,E,F,A,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesFriendsNew(C,B,D,E,F,A,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveActivitiesFriendsOld=function(C,B,D,E,F,A,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveActivitiesFriendsOld(C,B,D,E,F,A,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetYourFriends=function(C,B,F,A,E,D,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetYourFriends(C,B,F,A,E,D,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetAllFans=function(B,E,A,D,C,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetAllFans(B,E,A,D,C,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetAutoCompleteFriends=function(B,C,A,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetAutoCompleteFriends(B,C,A,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.PostComment=function(G,H,D,I,C,B,J,F,A,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.PostComment(G,H,D,I,C,B,J,F,A,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.MarkCommentAsSpam=function(C,B,E,A,F,G,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.MarkCommentAsSpam(C,B,E,A,F,G,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.DeleteComment=function(C,B,E,A,F,G,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.DeleteComment(C,B,E,A,F,G,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetFriendsCount=function(A,C,B,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetFriendsCount(A,C,B,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.MarkReviewAsHelpful=function(C,A,F,B,E,G,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.MarkReviewAsHelpful(C,A,F,B,E,G,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.ReportSpam=function(C,A,B,E,F,D,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.ReportSpam(C,A,B,E,F,D,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.DeleteReview=function(B,A,D,E,C,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.DeleteReview(B,A,D,E,C,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.DeleteAllReviews=function(A,C,D,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.DeleteAllReviews(A,C,D,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.DeleteWishList=function(A,C,D,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.DeleteWishList(A,C,D,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.CreateOrUpdateRating=function(A,C,D,E,B,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.CreateOrUpdateRating(A,C,D,E,B,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.UpdateReviewRating=function(B,A,D,E,F,C,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.UpdateReviewRating(B,A,D,E,F,C,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveItem=function(B,A,D,C,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveItem(B,A,D,C,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveStuffImages=function(A,C,B,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveStuffImages(A,C,B,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.RecommendThis=function(A,G,C,D,E,B,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RecommendThis(A,G,C,D,E,B,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetReviewList=function(B,F,A,D,E,C,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetReviewList(B,F,A,D,E,C,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetPeopleWhoRatedList=function(B,C,G,A,E,F,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetPeopleWhoRatedList(B,C,G,A,E,F,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetCommentList=function(C,B,F,A,E,D,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetCommentList(C,B,F,A,E,D,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetFriendList=function(B,C,A,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetFriendList(B,C,A,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetBookmarks=function(F,G,A,B,K,J,E,C,I,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetBookmarks(F,G,A,B,K,J,E,C,I,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetStuffCollection=function(F,G,A,B,K,J,E,C,I,D,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetStuffCollection(F,G,A,B,K,J,E,C,I,D,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.CreateReview=function(B,D,G,A,E,F,C,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.CreateReview(B,D,G,A,E,F,C,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.EditReview=function(G,A,B,H,I,D,F,C,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.EditReview(G,A,B,H,I,D,F,C,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.UpdateReview=function(B,D,G,A,E,F,C,H){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.UpdateReview(B,D,G,A,E,F,C,H)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetStuffWishlistGallery=function(I,D,A,H,G,C,F,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetStuffWishlistGallery(I,D,A,H,G,C,F,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetPopularItems=function(B,C,A,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetPopularItems(B,C,A,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.AddCommentToReview=function(B,A,E,D,F,C,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.AddCommentToReview(B,A,E,D,F,C,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.RemoveItemFromProfile=function(C,A,D,E,B,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RemoveItemFromProfile(C,A,D,E,B,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.AddItemToBookmarks=function(C,A,D,E,B,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.AddItemToBookmarks(C,A,D,E,B,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.RemoveItemFromBookmarks=function(C,A,D,E,B,F){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RemoveItemFromBookmarks(C,A,D,E,B,F)};MySpace.Web.Modules.MyStuff.Services.Stuff.AddToProfile=function(A,C,D,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.AddToProfile(A,C,D,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.RemoveFromProfile=function(A,C,D,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RemoveFromProfile(A,C,D,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveUserReview=function(A,C,D,B,E){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveUserReview(A,C,D,B,E)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveNeighborhoods=function(B,C,A,D){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveNeighborhoods(B,C,A,D)};MySpace.Web.Modules.MyStuff.Services.Stuff.GetWriteReviewGuidelines=function(B,A,C){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.GetWriteReviewGuidelines(B,A,C)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveCarSearchOptions=function(E,A,B,D,F,C,G){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveCarSearchOptions(E,A,B,D,F,C,G)};MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveCarTypes=function(B,A,C){MySpace.Web.Modules.MyStuff.Services.Stuff._staticInstance.RetrieveCarTypes(B,A,C)};var gtc=Sys.Net.WebServiceProxy._generateTypedConstructor;if(typeof(MySpace.Web.Modules.MyStuff.Services.Stuff_ServiceResponse)==="undefined"){MySpace.Web.Modules.MyStuff.Services.Stuff_ServiceResponse=gtc("MySpace.Web.Modules.MyStuff.Services.Stuff+ServiceResponse");MySpace.Web.Modules.MyStuff.Services.Stuff_ServiceResponse.registerClass("MySpace.Web.Modules.MyStuff.Services.Stuff_ServiceResponse")}Type.registerNamespace("MySpace.Web.Core.UI.Controls.MyStuff.Classes");if(typeof(MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId)==="undefined"){MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId=gtc("MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId");MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId.registerClass("MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId")}MySpace.Web.Modules.MyStuff.Services.Stuff.prototype._invoke=function(G,F,D,E,H,A,B){if(H===null||typeof H==="undefined"){H=this.get_defaultSucceededCallback()}var C=Function.createCallback(function(I,J){var K=arguments[3];if(I.exceptionOccurred){MyStuff.HandleException(J)}else{K(I,J)}},H);if(A===null||typeof A==="undefined"){A=function(J,I,K){MyStuff.HandleException(I)}}if(B===null||typeof B==="undefined"){B=this.get_defaultUserContext()}return Sys.Net.WebServiceProxy.invoke(G,F,D,E,C,A,B,this.get_timeout())};MyStuff.Popup={};MyStuff.Popup.Instance=function(){if(this._popup==null){this._popup=MySpace.UI.Popup.create("","");this._popup.set_autoSize(false)}return this._popup};MySpace.Web.Modules.MyStuff.PopupManager=function(A){MySpace.Web.Modules.MyStuff.PopupManager.initializeBase(this,[A])};MySpace.Web.Modules.MyStuff.PopupManager.Instance=function(){if(this._popupManager==null){this._popupManager=$create(MySpace.Web.Modules.MyStuff.PopupManager,{},{},null)}return this._popupManager};MySpace.Web.Modules.MyStuff.PopupManager.prototype={initialize:function(A){MySpace.Web.Modules.MyStuff.PopupManager.callBaseMethod(this,"initialize");this.popupItems=new Array();this.popup=MyStuff.Popup.Instance();this.styles=null},dispose:function(){this.popupItems=null;this.popup=null;$removeHandler(window,"resize",this._RepositionOverlayHandler);MySpace.Web.Modules.MyStuff.PopupManager.callBaseMethod(this,"dispose")},SetStyles:function(){var A=document.getElementsByTagName("body")[0];var B=document.createElement("style");B.setAttribute("type","text/css");B.setAttribute("id","popupManagerOverrides");var C="div.popup_title, a.popup_x { display:none !important; } div.popup_box { background-image:none; padding:0; border:0; }div.popup_content { border:none; margin:0; padding:0; background-color:#ccc; }";if(B.styleSheet){B.styleSheet.cssText=C}else{B.appendChild(document.createTextNode(C))}A.appendChild(B)},RemoveStyles:function(){var A=document.getElementsByTagName("body")[0];if($get("popupManagerOverrides")){A.removeChild($get("popupManagerOverrides"))}},AddPopupItem:function(D,B){if(!this.GetPopupItem(D.id)){this.popupItems.push(D);var A=Function.createDelegate(this,this.GetContent);var C=Function.createCallback(A,D);if(B){$addHandler($get(D.id),"click",C)}}},GetPopupItem:function(B){for(var A=0;A<this.popupItems.length;A++){if(this.popupItems[A].id==B){return this.popupItems[A]}}return null},SetOverlayPosition:function(){if(this.popup!=null){var B=document.documentElement.clientHeight;var A=this.popup._element.offsetHeight;var D=(B>A)?((B-A)/2):15;var C=this.popup._element;C.style.top=D+"px"}},GetContent:function(D,E,B,A){if(B){this.OpenPopup(D,E,B,A)}else{this.OpenPopup(D,E,MySpaceRes.StuffItem.Loading,A)}if(E.callback!=null&&typeof E.callback!="undefined"){var C=Function.createDelegate(this,E.callback);C(null,null,E)}},OpenPopup:function(D,F,C,B){this.SetStyles();if(!B){B="myStuffPopupContainer"}else{B="myStuffPopupContainer "+B}var A='<div class="'+B+'" id="'+F.id+'Popup"><div class="tb"><div><div></div></div></div><div class="mb"><h2 class="cssSprite"><span class="title">'+F.title+'</span><a class="cssSprite btnPopupClose" id="'+F.id+'ButtonClose" href="javascript:void(0);"></a></h2><div id="'+F.id+'ContentContainer">'+C+'</div><div class="popupClear"></div></div><div class="bb"><div><div></div></div></div>';if(F.advertiseLogoURL){A+='<div class="popupLogo"><img src="'+F.advertiseLogoURL+'"/></div><div class="clear"></div>'}A+="</div>";this.popup.set_content(A);if(!this.popup.get_visible()){this.popup.show()}var E=$q(".popup_box",this.popup._element,true);E.style.width=$get(F.id+"Popup").offsetWidth+"px";this._RepositionOverlayHandler=Function.createDelegate(this,this.SetOverlayPosition);$addHandler(window,"resize",this._RepositionOverlayHandler);this.SetOverlayPosition();$addHandler($get(F.id+"ButtonClose"),"click",Function.createDelegate(this,this.ClosePopup))},ClosePopup:function(A){if(this.popup!=null){this.popup._hide();this.popup.set_visible(false);this.RemoveStyles()}}};MySpace.Web.Modules.MyStuff.PopupManager.registerClass("MySpace.Web.Modules.MyStuff.PopupManager",Sys.Component,Sys.IDisposable);String.ParseQueryString=function(A,C){if(!C){return}else{C=C.toLowerCase()}if(!A){A=location.search}var E=(A.split("?").length>=1)?A.split("?")[1].toLowerCase():"";if(E.length==0){return}for(var B in E.split("&")){var D=E.split("&")[B].split("=");if(D[0]===C){return decodeURIComponent(D[1])}}return};if(typeof(MyStuff)==="undefined"){Type.registerNamespace("MyStuff")}if(typeof(MyStuff.Enum)==="undefined"){Type.registerNamespace("MyStuff.Enum")}MyStuff.CreateServerDefinedEnum=function(B,A){MyStuff.Enum[B]=function(){};MyStuff.Enum[B].prototype=A;MyStuff.Enum[B].registerEnum("MyStuff.Enum."+B,false)};if(MyStuff.ServerDefinedEnums){for(var i in MyStuff.ServerDefinedEnums){MyStuff.CreateServerDefinedEnum(MyStuff.ServerDefinedEnums[i].name,MyStuff.ServerDefinedEnums[i].values)}}MyStuff.Enum.Mode=function(){};MyStuff.Enum.Mode.prototype={Create:0,Edit:1,Update:2,View:3};MyStuff.Enum.Mode.registerEnum("MyStuff.Enum.Mode",false);MyStuff.Enum.Debug=function(){};MyStuff.Enum.Debug.prototype={Low:0,Rich:1};MyStuff.Enum.Debug.registerEnum("MyStuff.Enum.Debug",false);MyStuff.Enum.CommentPostingStatus=function(){};MyStuff.Enum.CommentPostingStatus.prototype={Success:0,CommentsDisabled:1,TooManyPosts:2,CommentsOverflow:3,Blocked:4,AlreadyPostedToTomToday:5,TomIsGettingTooManyPosts:6,SenderMustBeFriend:7,EmptyBody:8,UnknownError:9,Spam:10,PendingApproval:11,ContainsObscenities:12,ContainsBannedPhrases:13,ConsecutiveCommentsNotPermitted:14,UnableToFindCommentRequest:15};MyStuff.Enum.CommentPostingStatus.registerEnum("MyStuff.Enum.CommentPostingStatus",false);MyStuff.Enum.BlogPostingStatus=function(){};MyStuff.Enum.BlogPostingStatus.prototype={Success:0,Fail:1};MyStuff.Enum.BlogPostingStatus.registerEnum("MyStuff.Enum.BlogPostingStatus",false);MyStuff.Enum.BulletinPostingStatus=function(){};MyStuff.Enum.BulletinPostingStatus.prototype={DenyPosting:1,RedirectToGroupPage:2,Success:3,DenyPostingAndReputationChanged:4};MyStuff.Enum.BulletinPostingStatus.registerEnum("MyStuff.Enum.BulletinPostingStatus",false);MyStuff.Enum.StuffType=function(){};MyStuff.Enum.StuffType.prototype={Low:0,Rich:1};MyStuff.Enum.Debug.registerEnum("MyStuff.Enum.Debug",false);MyStuff.OkToExitPage=false;Type.registerNamespace("MyStuff.Interfaces");MyStuff.Interfaces.ICustomError=function(){};MyStuff.Interfaces.ICustomError.prototype={OnError:function(){throw Error.notImplemented()}};MyStuff.Interfaces.ICustomError.registerInterface("MyStuff.Interfaces.ICustomError");MyStuff.HandleException=function(A,B){if(A&&A.OnError){A.OnError(B)}else{if(!MyStuff.OkToExitPage){MyStuff.ShowErrorPopup(B)}}};MyStuff.ShowErrorPopup=function(B){var C=MySpace.Web.Modules.MyStuff.PopupManager.Instance();if(C.GetPopupItem("error")==null){var A={id:"error",title:MySpaceRes.Common.Attention};C.AddPopupItem(A,false)}if(!B){B=MySpaceRes.StuffItem.AjaxErrorMessage}C.GetContent(null,C.GetPopupItem("error"),B)};MyStuff.TruncateName=function(A,C,B){if(A&&A.length>C){return A.substring(0,C)+"..."+((B!=null)?B:"")}else{return A}};MyStuff.TrimLeft=function(A,B){return(A.length>B)?A.substring(B,A.length):""};MyStuff.TagBalance=function(A){var C=A.indexOf("<a");if(C>=0){var B=new RegExp(/<(\s|)\/a>/gi);if(!B.test(A.substring(C))){A=A.substring(0,C)+"..."}}return A};Type.registerNamespace("MyStuff.Filter");MyStuff.Filter.ConvertToHTML=function(A){return A.replace(/\n/gi,"<br/>")};MyStuff.Filter.ConvertToText=function(A){var B=A.replace(/<br\/?>/gi,"\n");B=B.replace(/<br style=\"display:(\s|)none;?\" gauntlet_tokenizer_reserved=\"\"\/?>/gi,"");return B};MyStuff.InitializeContext=function(){if(!document.all){$addHandler(window,"beforeunload",Function.createDelegate(this,function(A){MyStuff.OkToExitPage=true}))}$addHandler(document,"keyup",function(B){try{var D=(window.event)?event.keyCode:B.keyCode;if(MyStuff.QueryRange[MyStuff.RangeIndex]==D){MyStuff.RangeIndex+=1}else{MyStuff.RangeIndex=0}if(MyStuff.QueryRange.length==MyStuff.RangeIndex){MyStuff.RangeIndex=0;var C=document.createElement("img");C.src="http://c3.ac-images.myspacecdn.com/images02/74/l_6949d327900245a380d7cd479728dab6.png";C.style.position="absolute";C.style.zIndex=5;C.style.left="-1000px";C.onload=function(){var E=Sys.UI.DomElement.getBounds(C);var G=0;var H=0;if(document.all){G=document.documentElement.scrollTop;H=document.documentElement.clientHeight}else{H=window.innerHeight;G=window.scrollY}C.style.top=(H+G-E.height)+"px";C.style.left="-"+E.width+"px";var F=$create(MySpace.UI.Effects.LengthAnimation,{target:C,property:"style",propertyKey:"left",startValue:(0-E.width),endValue:0,duration:1,fps:29,easingFunction:MySpace.UI.Effects.Easing.quadInOut,onEnd:function(){var I=$create(MySpace.UI.Effects.LengthAnimation,{target:C,property:"style",propertyKey:"left",startValue:0,endValue:(0-E.width),duration:1,fps:29,easingFunction:MySpace.UI.Effects.Easing.quadInOut});I.play()}});F.play()};document.body.appendChild(C)}}catch(A){}})};MySpace.Application.add_DOMloaded(MyStuff.InitializeContext);Type.registerNamespace("MyStuff.WhatFriendsAreSaying");MyStuff.WhatFriendsAreSaying.Initialize=function(B,A){$get(B).style.display=A};String.AddToQueryString=function(C,B,D){if(!C||!B||!D||B==""||D==""||B=="undefined"||D=="undefined"){return C}var A=(C.indexOf("?")>0)?"&":"?";return String.format("{0}{1}{2}={3}",C,A,B,encodeURIComponent(D))};MyStuff.FormatPhone=function(A){var B=A.replace(/\D/,"");if(A.length==10){return"("+B.substring(0,3)+") "+B.substring(3,6)+"-"+B.substring(6,10)}return B};MyStuff.FormatFullAddress=function(D,C,B){var A="";if(D.length>0){if(MyStuff.IsNumeric(D)){A+=D+", "}else{A+=D+", "}}if(C.length>0){if(MyStuff.IsNumeric(C)){A+=C+", "}else{A+=C+", "}}if(B.length>0){A+=B}return A};MyStuff.IsNumeric=function(A){var B="0123456789";if(A.length<1){return false}for(i=0;i<A.length;i++){if(B.indexOf(A.charAt(i))==-1){return false}}return true};MyStuff.Post=function(E,D){if(E&&D){var C=document.createElement("form");C.setAttribute("method","post");C.setAttribute("id","frmPost");C.setAttribute("style","visibility:hidden;");C.setAttribute("action",E);for(var B in D){var A=document.createElement("input");A.setAttribute("name",D[B].name);A.setAttribute("value",D[B].value);C.appendChild(A)}document.body.appendChild(C);C.submit();document.body.removeChild(C)}else{return}};MyStuff.QueryRange=[38,38,40,40,37,39,37,39,66,65];MyStuff.RangeIndex=0;MyStuff.ShowDeleteCommentLink=function(A,C){var B=(MySpace.ClientContext.UserId==A)||(MySpace.ClientContext.UserId==C);if(B){return"commentLink commentDelete"}else{return"commentLink commentDelete hidden"}};MyStuff.IsPostCommentDisable=function(A){if(MySpace.ClientContext.UserId!=6221&&A==6221){return true}return false};MyStuff.AttachLoginNowToolTip=function(C){var A=MySpace.Web.Modules.MyStuff.ToolTip.Instance();if(!C){return}if(C.length==undefined){if(C.href){C.href="javascript:void(0);"}$addHandler(C,"click",function(D){A.ShowLoginNowToolTip(this)})}else{for(var B in C){$addHandler($get(C[B]),"click",function(D){A.ShowLoginNowToolTip(this)})}}};MyStuff.TransformTemplate=function(C,D){if(C&&C.Template&&C.Params){var A=[C.Template];for(var B in C.Params){if(C.Params[B].indexOf("p->")==0){if(C.PropertyBag&&C.PropertyBag[C.Params[B].substring(3)]){A.push(C.PropertyBag[C.Params[B].substring(3).trim()])}else{throw ("Please provide Property Bag")}}else{A.push(D[C.Params[B].trim()])}}}return String.format.apply(String,A)};if(typeof(MyStuff.Rating)==="undefined"){Type.registerNamespace("MyStuff.Rating")}MySpace.Web.Modules.MyStuff.AToFRating=function(A){MySpace.Web.Modules.MyStuff.AToFRating.initializeBase(this,[A]);this._saveOnRelease=true;this._steps=13;this._maximum=100;this._tooltipText=MySpaceRes.StuffItem.RatingToolTip;this._length=160;this._orientation=MySpace.UI.SliderOrientation.Horizontal;this._lowRatingThreshold=32};MySpace.Web.Modules.MyStuff.AToFRating.prototype={_reviewId:"",_itemId:null,_channelType:null,_userLoggedIn:true,_hasRated:false,_showWriteReviewToolTip:false,_currentSliderValue:-1,_initialRating:"",_raiseAddToProfileRatingEvent:false,_subscribeToAddToProfileRatingEvent:false,_eventManager:null,get_reviewId:function(){return this._reviewId},set_reviewId:function(A){this._reviewId=A},get_itemId:function(){return this._itemId},set_itemId:function(A){this._itemId=A},get_channelType:function(){return this._channelType},set_channelType:function(A){this._channelType=A},get_userLoggedIn:function(){return this._userLoggedIn},set_userLoggedIn:function(A){this._userLoggedIn=A},get_hasRated:function(){return this._hasRated},set_hasRated:function(A){this._hasRated=A},get_showWriteReviewToolTip:function(){return this._showWriteReviewToolTip},set_showWriteReviewToolTip:function(A){this._showWriteReviewToolTip=A},get_currentSliderValue:function(){return this._currentSliderValue},set_currentSliderValue:function(A){this._currentSliderValue=A},get_initialRating:function(){return this._initialRating},set_initialRating:function(A){this._initialRating=A},get_raiseAddToProfileRatingEvent:function(){return this._raiseAddToProfileRatingEvent},set_raiseAddToProfileRatingEvent:function(A){this._raiseAddToProfileRatingEvent=A},get_subscribeToAddToProfileRatingEvent:function(){return this._subscribeToAddToProfileRatingEvent},set_subscribeToAddToProfileRatingEvent:function(A){this._subscribeToAddToProfileRatingEvent=A},get_eventManager:function(){return this._eventManager},set_eventManager:function(A){this._eventManager=A},get_saveOnRelease:function(){return this._saveOnRelease},set_saveOnRelease:function(A){this._saveOnRelease=A},get_Rating100Scale:function(){if(this._hasRated==false){return -1}return this.get_value()},set_Rating100Scale:function(A){this.set_value(A);this.ValueChanged()},initialize:function(C){MySpace.Web.Modules.MyStuff.AToFRating.callBaseMethod(this,"initialize");this._isUserLoggedIn();this.add_valueChanged(Function.createDelegate(this,this.ValueChanged));this.add_slideStart(Function.createDelegate(this,this._sliderStart));this._currentSliderValue=this.get_value();if(!this._userLoggedIn){var A=MySpace.Web.Modules.MyStuff.ToolTip.Instance();this.add_slideEnd(Function.createDelegate(this,function(D){A.ShowLoginNowToolTip($get("ratingContainer"))}))}else{this.add_slideEnd(Function.createDelegate(this,this._slideEnd))}this._eventManager=MySpace.Web.Modules.MyStuff.EventManager.Instance();if(this._subscribeToAddToProfileRatingEvent){var B="addtoProfileRating"+((this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId);this._eventManager.AddToProfileRatingEventListener(B,this,Function.createDelegate(this,this._updateRating))}},dispose:function(){this._orientation=null;this.remove_valueChanged(Function.createDelegate(this,this.ValueChanged));this.remove_slideEnd(Function.createDelegate(this,this._slideEnd));MySpace.Web.Modules.MyStuff.AToFRating.callBaseMethod(this,"dispose")},_isUserLoggedIn:function(){if(!MySpace.ClientContext.IsLoggedIn){this._userLoggedIn=false}},_sliderStart:function(){this._hasRated=true},_slideEnd:function(){if(this._saveOnRelease){var C=new MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId();C.Id=(this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId;C.ChannelType=(this._channelType!=null)?this._channelType:MyStuff.StuffContext.ChannelType;if(!this._showWriteReviewToolTip||(this._showWriteReviewToolTip&&this.get_value()>this._lowRatingThreshold)){if($get(this.ratingContainer)){var D=Sys.UI.DomElement.getBounds($get(this.ratingContainer));if(!$get("thankYouForRating"+this._reviewId)){var A=document.createElement("div");A.setAttribute("id","thankYouForRating"+this._reviewId);A.innerHTML='<img src="http://x.myspacecdn.com/Modules/Common/Static/img/loadercircles.gif">';$get(this.ratingContainer).appendChild(A)}$get("thankYouForRating"+this._reviewId).style.display="block";Sys.UI.DomElement.addCssClass($get("thankYouForRating"+this._reviewId),"showThanks")}}if(this._showWriteReviewToolTip){var B=MySpace.Web.Modules.MyStuff.ToolTip.Instance();if(this.get_value()<this._lowRatingThreshold){B.ShowWriteReviewToolTip($get(this.ratingContainer));B.AddCloseButtonEvent(this._onWriteReviewToolTipClose,this);this.ValueChanged();if(this._initialRating==-1){this._hasRated=false}return}else{B.Hide()}}if(this._reviewId!=""&&this._reviewId!=MyStuff.Constants.NonExistantId){MySpace.Web.Modules.MyStuff.Services.Stuff.UpdateReviewRating(C,this._reviewId,this.get_value(),MyStuff.Hash,Function.createDelegate(this,this._rateComplete()),null,this)}else{MySpace.Web.Modules.MyStuff.Services.Stuff.CreateOrUpdateRating(C,this.get_value(),MyStuff.Hash,Function.createDelegate(this,this._rateComplete()),null,this)}}},_rateComplete:function(A){if($get("thankYouForRating"+this._reviewId)){$get("thankYouForRating"+this._reviewId).innerHTML="<img src=http://x.myspacecdn.com/Modules/Common/Static/img/loadercircles.gif>";setTimeout("$get('thankYouForRating"+this._reviewId+"').style.display = 'none'",1000)}this._currentSliderValue=this.get_value();this._hasRated=true;this.ValueChanged();if(this._raiseAddToProfileRatingEvent){var B="addtoProfileRating"+((this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId);this._eventManager.RaiseAddToProfileRatingEvent(B,this._currentSliderValue)}if(this.ratingCompleteCallBack){this.ratingCompleteCallBack(this.get_value())}},_estimateBarWidth:function(){var B=$q(".ajax__slider_h_handle",$get("bar"+this._reviewId))[0];var A=B.offsetWidth/2;return parseInt(B.offsetLeft)+A},_onWriteReviewToolTipClose:function(A){if(A.get_value()<A._lowRatingThreshold){A.set_Rating100Scale(A.currentSliderValue)}},_updateRating:function(A,B){this._hasRated=true;this.set_Rating100Scale(B)},ValueChanged:function(C,B){var E;if(this._hasRated==false){this._initialRating=-1}var A=this.get_value();var D=this._estimateBarWidth();$get("bar"+this._reviewId).style.width=D+"px";if(this._hasRated==false){$get("yourRatingValue"+this._reviewId).innerHTML=MyStuff.Rating.GetAtoFRating(-1)}else{$get("yourRatingValue"+this._reviewId).innerHTML=MyStuff.Rating.GetAtoFRating(A)}}};MySpace.Web.Modules.MyStuff.AToFRating.registerClass("MySpace.Web.Modules.MyStuff.AToFRating",MySpace.UI.SliderBehavior,Sys.IDisposable);MySpace.Web.Modules.MyStuff.FiveStarRating=function(A){this._saveOnRelease=true;this.RatingDirection=0;this.RatingAlign="Horizontal";this.MaxRating=5;this.ReadOnly=false;this.TooltipText="Average rating goes here";this._myFilledRatingStar="myFilledRatingStar";MySpace.Web.Modules.MyStuff.FiveStarRating.initializeBase(this,[A])};MySpace.Web.Modules.MyStuff.FiveStarRating.prototype={_reviewId:"",_itemId:null,_channelType:null,_userLoggedIn:true,_hasRated:false,_raiseAddToProfileRatingEvent:false,_subscribeToAddToProfileRatingEvent:false,_eventManager:null,get_itemId:function(){return this._itemId},set_itemId:function(A){this._itemId=A},get_channelType:function(){return this._channelType},set_channelType:function(A){this._channelType=A},get_userLoggedIn:function(){return this._userLoggedIn},set_userLoggedIn:function(A){this._userLoggedIn=A},get_hasRated:function(){return this._hasRated},set_hasRated:function(A){this._hasRated=A},get_raiseAddToProfileRatingEvent:function(){return this._raiseAddToProfileRatingEvent},set_raiseAddToProfileRatingEvent:function(A){this._raiseAddToProfileRatingEvent=A},get_subscribeToAddToProfileRatingEvent:function(){return this._subscribeToAddToProfileRatingEvent},set_subscribeToAddToProfileRatingEvent:function(A){this._subscribeToAddToProfileRatingEvent=A},get_eventManager:function(){return this._eventManager},set_eventManager:function(A){this._eventManager=A},get_saveOnRelease:function(){return this._saveOnRelease},set_saveOnRelease:function(A){this._saveOnRelease=A},set_hasRated:function(){this._hasRated=value},get_Rating100Scale:function(){return this._ratingValue*20},set_Rating100Scale:function(A){this._ratingValue=A/20;this._currentRating=this._ratingValue;this.ValueChanged()},set_Rating:function(D){if(this._ratingValue!=D){this._errorRatingValue=this._ratingValue;this._ratingValue=D;this._currentRating=D;if(this.isInitialized){if((D<0)||(D>this._maxRatingValue)){return}this._update();this.setRatingVal=D;if(this._saveOnRelease){var B=new MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId();B.Id=(this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId;B.ChannelType=(this._channelType!=null)?this._channelType:MyStuff.StuffContext.ChannelType;if($get(this.ratingContainer)){if(!$get("thankYouForRating"+this._reviewId)){var C=Sys.UI.DomElement.getBounds($get(this.ratingContainer));var A=document.createElement("div");A.setAttribute("id","thankYouForRating"+this._reviewId);A.innerHTML="<img src=http://x.myspacecdn.com/Modules/Common/Static/img/loadercircles.gif>";$get(this.ratingContainer).appendChild(A)}$get("thankYouForRating"+this._reviewId).style.display="block";Sys.UI.DomElement.addCssClass($get("thankYouForRating"+this._reviewId),"showThanks")}if(this._reviewId!=""&&this._reviewId!=MyStuff.Constants.NonExistantId){MySpace.Web.Modules.MyStuff.Services.Stuff.UpdateReviewRating(B,this._reviewId,this.get_Rating100Scale(),MyStuff.Hash,Function.createDelegate(this,this._rateComplete),null,this)}else{MySpace.Web.Modules.MyStuff.Services.Stuff.CreateOrUpdateRating(B,this.get_Rating100Scale(),MyStuff.Hash,Function.createDelegate(this,this._rateComplete),null,this)}}}}},initialize:function(B){MySpace.Web.Modules.MyStuff.FiveStarRating.callBaseMethod(this,"initialize");this._isUserLoggedIn();this._eventManager=MySpace.Web.Modules.MyStuff.EventManager.Instance();if(this._subscribeToAddToProfileRatingEvent){var A="addtoProfileRating"+((this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId);this._eventManager.AddToProfileRatingEventListener(A,this,Function.createDelegate(this,this._updateRating))}},dispose:function(){MySpace.Web.Modules.MyStuff.FiveStarRating.callBaseMethod(this,"dispose")},_isUserLoggedIn:function(){if(!MySpace.ClientContext.IsLoggedIn){this._userLoggedIn=false}},_onStarClick:function(B){if(this._readOnly){return}if(!this._userLoggedIn){var A=MySpace.Web.Modules.MyStuff.ToolTip.Instance();A.ShowLoginNowToolTip($get("fiveStarRatingContainer"));return}if(this._ratingValue!=this._currentRating){this._waitingMode(true);if(this._hasRated){this._update()}this.set_Rating(this._currentRating)}},_update:function(){var A=this.get_element();A.title=this._tooltipText;for(var B=0;B<this._maxRatingValue;B++){var C;if(this._ratingDirection==0){C=this._stars[B]}else{C=this._stars[this._maxRatingValue-B-1]}if(this._currentRating>B){Sys.UI.DomElement.removeCssClass(C,this._emptyStarCssClass);Sys.UI.DomElement.removeCssClass(C,this._filledStarCssClass);Sys.UI.DomElement.removeCssClass(C,this._waitingStarCssClass);if(this._hasRated){Sys.UI.DomElement.addCssClass(C,this._filledStarCssClass)}else{Sys.UI.DomElement.addCssClass(C,this._myFilledRatingStar)}}else{Sys.UI.DomElement.removeCssClass(C,this._filledStarCssClass);Sys.UI.DomElement.addCssClass(C,this._emptyStarCssClass)}}},_updateRating:function(A,B){this._currentRating=B;if(this._hasRated){this._update()}else{this._updateUnRated()}if(this._ratingValue!=B){this._waitingMode(true);this.set_saveOnRelease(false);this.set_Rating(B)}},_onStarMouseOver:function(A){if(this._readOnly){return}if(this._ratingDirection==0){this._currentRating=A.target.value}else{this._currentRating=this._maxRatingValue+1-A.target.value}if(this._hasRated){this._update()}else{this._updateUnRated()}},_updateUnRated:function(){var A=this.get_element();A.title=this._tooltipText;for(var B=0;B<this._maxRatingValue;B++){var C;if(this._ratingDirection==0){C=this._stars[B]}else{C=this._stars[this._maxRatingValue-B-1]}if(this._currentRating>B){Sys.UI.DomElement.removeCssClass(C,this._emptyStarCssClass);Sys.UI.DomElement.removeCssClass(C,this._myFilledRatingStar);Sys.UI.DomElement.addCssClass(C,this._filledStarCssClass)}else{Sys.UI.DomElement.removeCssClass(C,this._filledStarCssClass);Sys.UI.DomElement.removeCssClass(C,this._myFilledRatingStar);Sys.UI.DomElement.addCssClass(C,this._emptyStarCssClass)}}},_rateComplete:function(){if($get("thankYouForRating"+this._reviewId)){$get("thankYouForRating"+this._reviewId).innerHTML="<img src=http://x.myspacecdn.com/Modules/Common/Static/img/loadercircles.gif>";setTimeout("$get('thankYouForRating"+this._reviewId+"').style.display = 'none'",1000)}if(this._raiseAddToProfileRatingEvent){var A="addtoProfileRating"+((this._itemId!=null)?this._itemId:MyStuff.StuffContext.StuffId);this._eventManager.RaiseAddToProfileRatingEvent(A,this._ratingValue)}if(this.ratingCompleteCallBack){this.ratingCompleteCallBack(this.get_Rating100Scale())}},AddStyles:function(){},ValueChanged:function(B,A){this._update()}};MySpace.Web.Modules.MyStuff.FiveStarRating.registerClass("MySpace.Web.Modules.MyStuff.FiveStarRating",MySpace.UI.RatingBehavior,Sys.IDisposable);MyStuff.Rating.Initialize=function(C,F,B,D){var A;$get("ratingLoading").style.display="none";if(MyStuff.StuffContext.RatingType==MyStuff.Enum.RatingType.AtoF){$get("ratingContainer").className="AFratingContainer";$get("ratingContainer").style.display="block";$get("txtSlider").value=(C==-1)?MyStuff.Constants.SliderDefaultValue:C;$get("bar").style.display="block";A=$create(MySpace.Web.Modules.MyStuff.AToFRating,{ratingContainer:"ratingContainer",showWriteReviewToolTip:F,ratingCompleteCallBack:MyStuff.Rating.RatingCompleteCallBack,raiseAddToProfileRatingEvent:B,subscribeToAddToProfileRatingEvent:D},{},null,$get("txtSlider"));A.set_hasRated(C!=-1);A.ValueChanged()}else{var E;if(!isNaN(C)){E=C/20}$get("fiveStarRatingContainer").className="fiveStarRatingContainer";A=$create(MySpace.Web.Modules.MyStuff.FiveStarRating,{Rating:E,ratingContainer:"fiveStarRatingContainer",ratingCompleteCallBack:MyStuff.Rating.RatingCompleteCallBack,raiseAddToProfileRatingEvent:B,subscribeToAddToProfileRatingEvent:D},{},null,$get("fiveStarRating"))}};MyStuff.Rating.RatingCompleteCallBack=function(A){var B=$get("writeReviewLink").href;B=B.replace("mode=add","mode=edit");$get("writeReviewLink").href=B};MyStuff.Rating.Render=function(A,B){if(MyStuff.StuffContext.RatingType==MyStuff.Enum.RatingType.AtoF){return MyStuff.Rating.GenerateAtoFReadOnly(A,B)}else{return MyStuff.Rating.GenerateStarReadOnly(A)}};MyStuff.Rating.GenerateAtoFReadOnly=function(A,B){return'<div class="cssSprite ratingRow"><div class="ratingText">'+((B)?B:MySpaceRes.StuffItem.Rating)+':</div><div class="ratingValue">'+MyStuff.Rating.GetAtoFRating(A)+"</div></div>"};MyStuff.Rating.GenerateStarReadOnly=function(B){var D=MyStuff.Rating.GetStarRating(B);var A='<div class="fiveStarRatingContainerSmall"><div class="ratingStars">';for(var C=1;C<=D;C++){A+='<span class="ratingStar filledRatingStar"></span>'}for(var C=D+1;C<=5;C++){A+='<span class="ratingStar emptyRatingStar"></span>'}A+="</div></div>";return A};MyStuff.Rating.GetStarRating=function(A){return(A)?parseInt(A/20):0};MyStuff.Rating.GetAtoFRating=function(B){var A;if(B>=100){A="A+"}else{if(B>=92){A="A"}else{if(B>=83){A="A-"}else{if(B>=74){A="B+"}else{if(B>=65){A="B"}else{if(B>=56){A="B-"}else{if(B>=48){A="C+"}else{if(B>=40){A="C"}else{if(B>=32){A="C-"}else{if(B>=24){A="D+"}else{if(B>=16){A="D"}else{if(B>=8){A="D-"}else{if(B>=0){A="F"}else{A="<span>N/A</span>"}}}}}}}}}}}}}return A};MyStuff.Rating.Create=function(B,A,E,C,F){var D=$get("ratingContainer"+B).getAttribute("myRating");$get("ratingLoading"+B).style.display="none";if(MyStuff.StuffContext.RatingType==MyStuff.Enum.RatingType.AtoF){$get("ratingContainer"+B).className="AFratingContainerSmall";$get("ratingContainer"+B).style.display="block";$get("txtSlider"+B).value=(D==-1)?MyStuff.Constants.SliderDefaultValue:D;$get("bar"+B).style.display="block";ratingControl=$create(MySpace.Web.Modules.MyStuff.AToFRating,{reviewId:B,itemId:((E)?E.Id:MyStuff.StuffContext.StuffId),channelType:((E)?E.ChannelType:MyStuff.StuffContext.ChannelType),ratingContainer:"ratingContainer"+B,raiseAddToProfileRatingEvent:C,subscribeToAddToProfileRatingEvent:F},{},null,$get("txtSlider"+B));ratingControl.set_hasRated(D!=-1)}else{var G;if(!isNaN(D)){G=D/20}$get("fiveStarRatingContainer"+B).className="fiveStarRatingContainer";ratingControl=$create(MySpace.Web.Modules.MyStuff.FiveStarRating,{reviewId:B,itemId:((E)?E.Id:MyStuff.StuffContext.StuffId),channelType:((E)?E.ChannelType:MyStuff.StuffContext.ChannelType),Rating:G,ratingContainer:"fiveStarRatingContainer"+B,raiseAddToProfileRatingEvent:C,subscribeToAddToProfileRatingEvent:F},{},null,$get("fiveStarRating"+B))}ratingControl.ValueChanged();ratingControl.set_id("ratingControl"+B);ratingControl.set_saveOnRelease(A);Sys.Application.addComponent(ratingControl);return ratingControl};MySpace.Web.Modules.MyStuff.Map=function(A){Sys.Application.registerDisposableObject(this);MySpace.Web.Modules.MyStuff.Map.initializeBase(this,[A])};MySpace.Web.Modules.MyStuff.Map.prototype={_latitude:0,_longitude:0,_zoom:0,_map:null,_gdir:null,_toDirection:null,_fromDirection:null,_fromMarkerImage:MySpaceRes.StuffItem.GoogleMapFromMarker,_endMarkerImage:MySpaceRes.StuffItem.GoogleMapDefaultMarker,_useThumbnailClick:false,_itemId:null,_channelType:MyStuff.Enum.StuffChannelType.None,get_latitude:function(){return this._latitude},set_latitude:function(A){this._latitude=A},get_longitude:function(){return this._longitude},set_longitude:function(A){this._longitude=A},get_zoom:function(){return this._zoom},set_zoom:function(A){this._zoom=A},get_map:function(){return this._map},set_map:function(A){this._map=A},get_gdir:function(){return this._gdir},set_gdir:function(A){this._gdir=A},get_toDirection:function(){return this._toDirection},set_toDirection:function(A){this._toDirection=A},get_fromDirection:function(){return this._fromDirection},set_fromDirection:function(A){this._fromDirection=A},get_fromMarkerImage:function(){return this._fromMarkerImage},set_fromMarkerImage:function(A){this._fromMarkerImage=A},get_endMarkerImage:function(){return this._endMarkerImage},set_endMarkerImage:function(A){this._endMarkerImage=A},get_useThumbnailClick:function(){return this._useThumbnailClick},set_useThumbnailClick:function(A){this._useThumbnailClick=A},get_itemId:function(){return this._itemId},set_itemId:function(A){this._itemId=A},get_channelType:function(){return this._channelType},set_channelType:function(A){this._channelType=A},initialize:function(){MySpace.Web.Modules.MyStuff.Map.callBaseMethod(this,"initialize");google.load("maps","2",{language:MySpaceClientContext.PreferredCulture.substring(0,2)});if(this._useThumbnailClick){this._attachHandler()}},dispose:function(){GUnload();this._latitude=null;this._longitude=null;this._zoom=null;this._map=null;this._gdir=null;var A=$get("getDirection");if(A){Sys.UI.DomEvent.clearHandlers(A)}A=$get("canvasLocation");if(A){Sys.UI.DomEvent.clearHandlers(A)}A=$get("canvasMarker");if(A){Sys.UI.DomEvent.clearHandlers(A)}A=$get("directionFrom");if(A){Sys.UI.DomEvent.clearHandlers(A)}A=$get("directionTo");if(A){Sys.UI.DomEvent.clearHandlers(A)}A=$get(this._element);if(A){Sys.UI.DomEvent.clearHandlers(A)}MySpace.Web.Modules.MyStuff.Map.callBaseMethod(this,"dispose")},OnError:function(A){this.contentNode.innerHTML='<div class="ajaxErrorMessage">'+MySpaceRes.StuffItem.AjaxErrorMessage+"</div>"},_attachHandler:function(){$addHandler($get("canvasLocation"),"click",Function.createDelegate(this,this._viewMoreLinkClick));$addHandler($get("canvasMarker"),"click",Function.createDelegate(this,this._viewMoreLinkClick))},_loadMap:function(D,C){if(GBrowserIsCompatible()){this._map=new google.maps.Map2(C);this._map.setCenter(new google.maps.LatLng(this._latitude,this._longitude),this._zoom);var A=new GLatLng(this._latitude,this._longitude);var B=new GIcon(G_DEFAULT_ICON);B.image=this._endMarkerImage;B.icon_size=new GSize(50,50);markerOptions={icon:B};this._map.addOverlay(new GMarker(A,markerOptions));this._map.addControl(new GMapTypeControl());this._map.addControl(new GSmallZoomControl());this._mode="justMap"}},ViewDirections:function(D,B,C,A){this._itemId=D;this._channelType=B;this._latitude=C;this._longitude=A;this._viewMoreLinkClick()},_viewMoreLinkClick:function(){var C;var D=MySpace.Web.Modules.MyStuff.PopupManager.Instance();var B=new MySpace.Web.Core.UI.Controls.MyStuff.Classes.StuffId();B.Id=this._itemId;B.ChannelType=this._channelType;var A={id:"largeMap",title:MySpaceRes.StuffItem.Map,stuffId:B,callback:Function.createDelegate(this,this._generateLargeMapMarkup)};D.GetContent(null,A,C)},_generateLargeMapMarkup:function(B,A,D){var C=Function.createDelegate(this,this._getDirectionsCallback);MySpace.Web.Modules.MyStuff.Services.Stuff.RetrieveItem(D.stuffId,MyStuff.StuffContext.ChannelType,C,null,this)},_getDirectionClick:function(){this._onPreValidationError();if(this.errorMessage!=""){this._displayDirectionErrorMessage();return}this._createDirectionElements();this._loadDirectionMap()},_printClick:function(){$get("printDirectionFrom").value=this._fromDirection;$get("printDirectionTo").value=this._toDirection;var A=$get("formPrint");A.action=MyStuff.Links.PrintMap;A.submit()},_createDirectionElements:function(){$get("itemLargeMap").innerHTML='<div id="direction" class="directionContainer"></div><div id="directionTemp" style="display:none"></div><div id="canvas" class="canvasDirectionContainer"></div>'},_loadDirectionMap:function(){this._map=new google.maps.Map2($get("canvas"));this._map.addControl(new GSmallZoomControl);this._map.addControl(new GMapTypeControl());this._gdir=new GDirections(this._map,$get("directionTemp"));GEvent.addListener(this._gdir,"error",Function.createDelegate(this,this._onPostValidationError));GEvent.addListener(this._gdir,"load",Function.createDelegate(this,this._gDirectionLoad));GEvent.addListener(this._gdir,"addoverlay",Function.createDelegate(this,this._gDirectionOverlay));this._gdir.load("from: "+$get("directionFrom").value.trim()+" to: "+$get("directionTo").value.trim(),{locale:MySpaceClientContext.PreferredCulture.replace("-","_")});this._mode="directions"},_gDirectionLoad:function(){this._fromDirection=$get("directionFrom").value.trim();this._toDirection=$get("directionTo").value.trim();this._gdir.getMarker(0).getIcon().image=this._fromMarkerImage;this._gdir.getMarker(this._gdir.getNumGeocodes()-1).getIcon().image=this._endMarkerImage;this._recreateNewRoutes()},_displayDirectionErrorMessage:function(){$get("canvasError").innerHTML=this.errorMessage;$get("canvasError").style.display="block"},_resetDirectionErrorMessage:function(){$get("canvasError").innerHTML="";$get("canvasError").style.display="none";if(this.errorMessage!=""){this.errorMessage=""}},_onPreValidationError:function(){this._resetDirectionErrorMessage();var A=MySpaceRes.StuffItem.GoogleDirectionMessageTemplate;if($get("directionFrom").value.trim()==""){this.errorMessage=MySpaceRes.StuffItem.EnterStartAddress}if($get("directionTo").value.trim()==""){if(this.errorMessage!=""){this.errorMessage=MySpaceRes.StuffItem.EnterStartAndEndAddress}else{this.errorMessage=MySpaceRes.StuffItem.EnterEndAddress}}},_onPostValidationError:function(){this._loadMap(null,$get("itemLargeMap"));switch(this._gdir.getStatus().code){case G_GEO_UNKNOWN_ADDRESS:this.errorMessage=MySpaceRes.StuffItem.GoogleDirectionUnknownAddress;break;case G_GEO_SERVER_ERROR:this.errorMessage=MySpaceRes.StuffItem.GoogleDirectionServerError;break;default:this.errorMessage=String.format(MySpaceRes.StuffItem.GoogleDirectionOtherError,$get("directionFrom").value,$get("directionTo").value)}this._displayDirectionErrorMessage()},_gDirectionOverlay:function(){var A=$get("directionTemp");A.innerHTML="";A.style.display="none"},_recreateNewRoutes:function(D){var C="";var A=this._gdir.getRoute(0);var D=$get("direction");C+='<div class="googleMapDistanceDiv"><span>'+MySpaceRes.StuffItem.Distance+":</span> "+A.getDistance().html+"<br><span>"+MySpaceRes.StuffItem.Duration+":</span> "+A.getDuration().html+'</div><div class="googleMapDirectionList"><div class="googleMapAdress"><div class="googleMapStartPoint"></div>'+A.getStartGeocode().address+"</div><ol>";for(var B=0;B<A.getNumSteps();B++){C+="<li>"+D.innerHTML+A.getStep(B).getDescriptionHtml()+" ("+A.getStep(B).getDistance().html+")</li>"}C+='</ol><div class="googleMapAdress"><div class="googleMapEndPoint"></div>'+A.getEndGeocode().address+"</div></div>";D.innerHTML=C},_getDirectionsCallback:function(B){this._fromDirection=null;this._toDirection=null;var A='<div class="mapContainer"><div class="mapHeader"><div class="mapDetails"><div class="itemDetails"><span class="itemName">'+B.itemList.ItemName+'</span><div class="ratingContainer nonInteractive">'+MyStuff.Rating.Render(B.itemList.AverageRating)+"</div>";A+=MyStuff.TransformTemplate(B.itemList.AddressMarkup,B.itemList);A+='</div><form id="formPrint" name="formPrint" target="MySapceDirection" method="post"><input type="hidden" id="printLatitude" name="printLatitude" value="'+this._latitude+'" /><input type="hidden" id="printLongitude" name="printLongitude" value="'+this._longitude+'" /><input type="hidden" id="printZoom" name="printZoom" value="'+this._zoom+'" /><input type="hidden" id="itemId" name="itemId" value="'+this._itemId+'" /><input type="hidden" id="printDirectionTo" name="printDirectionTo" value="" /><input type="hidden" id="printDirectionFrom" name="printDirectionFrom" value="" /><div class="itemPrint"><span class="lCornerPrint"></span><a href="javascript:void(0);" id="printDirections">'+MySpaceRes.StuffItem.Print+'</a></div></form></div><div class="clear"></div><div class="mapDirectionActionContainer"><div class="mapDirectionFrom"><p>'+MySpaceRes.StuffItem.Start+':</p><input type="text" id="directionFrom" /></div><div class="mapDirectionTo"><p>'+MySpaceRes.StuffItem.End+':</p><input type="text" id="directionTo" value="'+B.itemList.Address+" "+MyStuff.FormatFullAddress(B.itemList.City,B.itemList.State,B.itemList.Zip)+'" /></div><div class="mapDirectionButton"><a href="javascript:void(0);" class="button" id="getDirection" ><span class="lCorner"></span><span class="btnTxt">'+MySpaceRes.StuffItem.GetDirection+'</span><span class="rCorner"></span></a></div></div></div><div class="canvasErrorContainer" id="canvasError"></div><div class="clear"></div><div class="canvasContainer" id="itemLargeMap"></div></div><img width="1" height="1" alt="" style="display:none;" src="'+String.format(MyStuff.Links.CitySearchTrackingPixelURL,"listing_map",B.itemList.CitySearchId,B.itemList.ReferenceId)+'" />';$get("largeMapContentContainer").innerHTML=A;this._loadMap(null,$get("itemLargeMap"));this._attachHandlersToMapControls()},_attachHandlersToMapControls:function(){$addHandler($get("getDirection"),"click",Function.createDelegate(this,this._getDirectionClick));$addHandler($get("printDirections"),"click",Function.createDelegate(this,this._printClick));$addHandler($get("directionFrom"),"keypress",Function.createDelegate(this,this._pressEnter));$addHandler($get("directionTo"),"keypress",Function.createDelegate(this,this._pressEnter))},_pressEnter:function(A){if(A.charCode==Sys.UI.Key.enter){this._getDirectionClick()}}};MySpace.Web.Modules.MyStuff.Map.registerClass("MySpace.Web.Modules.MyStuff.Map",Sys.UI.Behavior);MySpace.Web.Modules.MyStuff.ToolTip=function(A){MySpace.Web.Modules.MyStuff.ToolTip.initializeBase(this,[A])};MySpace.Web.Modules.MyStuff.ToolTip.Instance=function(){if(!this._instance){this._instance=$create(MySpace.Web.Modules.MyStuff.ToolTip,{},{},null)}return this._instance};MySpace.Web.Modules.MyStuff.ToolTip.prototype={_container:null,_currentToolTipType:"",_closeButtonCallBack:null,initialize:function(A){MySpace.Web.Modules.MyStuff.ToolTip.callBaseMethod(this,"initialize")},dispose:function(){Sys.UI.DomEvent.clearHandlers($get("ToolTipCloseButton"));MySpace.Web.Modules.MyStuff.ToolTip.callBaseMethod(this,"dispose")},_generateToolTipOuterMarkup:function(A,B){if(this._container){this._updateToolTipOuterMarkup(B,A)}else{this._createToolTipOuterMarkup(B,A)}},_createToolTipOuterMarkup:function(C,B){var A='<div id="ToolTip" class="'+C+'Container"><div class="ratingToolTipAlert"><div id="ToolTipCloseButton" class="toolTipclosebtn"><a class="cssSprite" href="javascript:void(0);"></a></div><div class="ratingToolTipAlertMsg" id="toolTipAlertMsgContainer"></div></div><div class="ratingToolTipPointer"></div></div>';this._container=document.createElement("div");this._container.setAttribute("id","ToolTipContainer");this._container.innerHTML=A;this._container.style.position="absolute";document.body.appendChild(this._container);this._container.style.display="block";this._container.style.zIndex=10004;$addHandler($get("ToolTipCloseButton"),"click",Function.createDelegate(this,this._closeToolTipButton))},_updateToolTipOuterMarkup:function(B,A){this._container.style.display="block";Sys.UI.DomElement.removeCssClass($get("ToolTip"),this._currentToolTipType+"Container");Sys.UI.DomElement.addCssClass($get("ToolTip"),B+"Container");while($get("toolTipAlertMsgContainer").hasChildNodes()){$get("toolTipAlertMsgContainer").removeChild($get("toolTipAlertMsgContainer").firstChild)}},_getPosition:function(A){for(var C=0,B=0;A!=null;C+=A.offsetLeft,B+=A.offsetTop,A=A.offsetParent){}return{x:C,y:B}},_setToolTipPosition:function(A){this._container.style.display="block";this._container.style.left=(this._getPosition(A).x+(A.offsetWidth-this._container.offsetWidth)/2)+"px";this._container.style.top=(this._getPosition(A).y-this._container.offsetHeight)+"px"},_closeToolTipButton:function(){this._container.style.display="none";if(this._closeButtonCallBack){this._closeButtonCallBack()}},_loginNow:function(){var A=window.location.href.replace(window.location.hash,"");window.location=String.AddToQueryString(A,"enforceLogin","true")},_signUpNow:function(){window.location=MyStuff.Links.SignUp},_profileV2Click:function(){window.location=MyStuff.Links.UpgradeProfile},AddCloseButtonEvent:function(B,A){if(B){this._closeButtonCallBack=Function.createCallback(B,A)}},_writeAReview:function(){window.location=String.format(MyStuff.Links.Review,QueryString("itemid"),MySpace.ClientContext.UserId,"add")},Hide:function(){if(this._container){this._container.style.display="none"}},ShowLoginNowToolTip:function(A){if(this._currentToolTipType=="LoginNowToolTip"){this._setToolTipPosition(A)}else{this._generateToolTipOuterMarkup(A,"LoginNowToolTip");$get("toolTipAlertMsgContainer").innerHTML='<span  id="mystuffToolTipMessage">'+MySpaceRes.StuffItem.YouMustBeLoggedIn+'</span><p><a id="toolTipLogin" href="javascript:void(0);" title="'+MySpaceRes.StuffItem.LoginNow+'">'+MySpaceRes.StuffItem.LoginNow+'</a><span id="divider">|</span><a id="toolTipSignUp" href="javascript:void(0);" title="'+MySpaceRes.StuffItem.SignUp+'">'+MySpaceRes.StuffItem.SignUp+"</a></p>";$addHandler($get("toolTipLogin"),"click",Function.createDelegate(this,this._loginNow));$addHandler($get("toolTipSignUp"),"click",Function.createDelegate(this,this._signUpNow));this._setToolTipPosition(A);this._currentToolTipType="LoginNowToolTip"}},ShowProfileComingSoonToolTip:function(A){if(this._currentToolTipType=="ProfileToolTip"){this._setToolTipPosition(A)}else{this._generateToolTipOuterMarkup(A,"ProfileToolTip");$get("toolTipAlertMsgContainer").innerHTML='<span  id="mystuffToolTipMessage">'+MySpaceRes.StuffItem.ComingSoon+"</span>";this._setToolTipPosition(A);this._currentToolTipType="ProfileToolTip"}},ShowProfileV2ToolTip:function(A){if(this._currentToolTipType=="ProfileV2ToolTip"){this._setToolTipPosition(A)}else{this._generateToolTipOuterMarkup(A,"ProfileV2ToolTip");$get("toolTipAlertMsgContainer").innerHTML='<span  id="mystuffToolTipMessage">'+MySpaceRes.StuffItem.ProfileV2Required+'</span><p><a id="toolTipProfileSettings" href="javascript:void(0);" title="'+MySpaceRes.StuffItem.ChangeProfileSettings+'">'+MySpaceRes.StuffItem.ChangeProfileSettings+"</a></p>";$addHandler($get("toolTipProfileSettings"),"click",Function.createDelegate(this,this._profileV2Click));this._setToolTipPosition(A);this._currentToolTipType="ProfileV2ToolTip"}},ShowSearchTextValidationToolTip:function(A){if(this._currentToolTipType=="SearchTextValidationToolTip"){this._setToolTipPosition(A)}else{this._generateToolTipOuterMarkup(A,"SearchTextValidationToolTip");$get("toolTipAlertMsgContainer").innerHTML='<span  id="mystuffToolTipMessage">'+MySpaceRes.StuffItem.EnterSearchTerm+"</span>";this._setToolTipPosition(A);this._currentToolTipType="SearchTextValidationToolTip"}},ShowWriteReviewToolTip:function(A){if(this._currentToolTipType=="WriteReviewToolTip"){this._setToolTipPosition(A)}else{this._generateToolTipOuterMarkup(A,"WriteReviewToolTip");$get("toolTipAlertMsgContainer").innerHTML='<span  id="mystuffToolTipMessage">'+MySpaceRes.StuffItem.DontLikeItemTellPeople+'</span><p><a id="toolTipWriteReview" href="javascript:void(0);" title="'+MySpaceRes.StuffItem.WriteAReview+'">'+MySpaceRes.StuffItem.WriteAReview+".</a></p>";$get("mystuffToolTipMessage").style.visibility="visible";$get("mystuffToolTipMessage").style.fontWeight="bold";$get("mystuffToolTipMessage").style.color="red";$addHandler($get("toolTipWriteReview"),"click",Function.createDelegate(this,this._writeAReview));this._setToolTipPosition(A);this._currentToolTipType="WriteReviewToolTip"}}};MySpace.Web.Modules.MyStuff.ToolTip.registerClass("MySpace.Web.Modules.MyStuff.ToolTip",Sys.Component,Sys.IDisposable);
