var serverPath = "http://www.shockwavegames.us/";var favoritesLeftPos = document.getElementById("mainTable").offsetLeft+(typeof(gameDivWidth) != "undefined" ? parseInt(gameDivWidth)+164 : 732); var favoritesTopPos = (typeof(gameDivWidth) != "undefined" ? 0 : 94); var domainPath = 'http://'+(window.location.toString().indexOf("www.") > -1 ? "www." : "")+serverPath.replace("www.","").replace("http://",""); var domainImagePath = domainPath+'slike/'; var bookmarkServerPath = domainPath; var gamePath = domainPath+'game/'; function Bookmark(id,mapImageId,title,path) { this.id = id; this.title = title; this.imageId = mapImageId; this.url = (this.title == "Bela" ? "http://www." + "play" + "bela.com/game/" : bookmarkServerPath+'game/') + (this.title.substring(0,1).toLowerCase() + "/" + this.title.toLowerCase() + "/"); this.isToBeDeleted = false; } function BookmarkMenuObject(bookmarks) { this.time = "1284045910"; this.path = (window.location.toString().indexOf("game/") > -1 ? "../../" : "game/"); this.bookmarks = null; this.favoritesLeftPos = favoritesLeftPos; this.favoritesTopPos = ( typeof(favoritesTopPos) != "undefined" ? favoritesTopPos : 0 ); this.menuId = "myFavoritesDiv"; this.mouseOutEventHdlr = ' onmouseout="if(animatedcollapse.checkMouseOut(arguments[0] || window.event,'+"'"+'bookmark'+"','"+this.menuId+"'"+')) { bookmarkMenuObj.submitDeleteQueue(); }" '; this.pageSize = 5; this.playedGameId = 0; this.playedGameImageMapId = ""; this.playedGameTitle = ""; this.playedGameFavorited = false; this.deleteQueue = null if( document.getElementById("FavoritesImgDiv") != null ) { this.playedGameId = playedGameId; this.playedGameImageMapId = playedGameImageMapId; this.playedGameTitle = playedGameTitle; } this.showBookmarksMenu = function() { animatedcollapse.show(this.menuId); bookmarkMenuObj.setTimedFocus(); } this.logout = function() { SetCookie("userId","",365,"/"); this.displayLogin(); } this.displayPage = function(page) { if( document.getElementById("loginInfoDiv") != null ) { document.getElementById("loginInfoDiv").innerHTML = 'You are logged in as '+this.userId+': ' + '' + '
'; } this.page = page; this.numPages = Math.ceil(this.bookmarks.length/this.pageSize); this.displayedBookmars = new Array(); this.bookmarkHTML = '| Welcome '+this.userId+'! | ' + 'Log out |
';
for( var i=0; i



'
+ ''
+ ''
);
animatedcollapse.addDiv(this.menuId, 'fade=1,height='+(((this.pageSize+2)*19))+'px');
animatedcollapse.init();
}
var bookmarkMenuObj = new BookmarkMenuObject();
bookmarkMenuObj.userId = GetCookie("userId");
if( bookmarkMenuObj.userId != null && bookmarkMenuObj.userId.toString().length > 0 )
{
InitiateAjaxRequest(bookmarkServerPath+'bookmarkUpdate.php?action=relogin&playedgameId='+bookmarkMenuObj.playedGameId+'&userId='+encode64(bookmarkMenuObj.userId),bookmarkMenuObj.setBookmarks,null,null);
}
else
{
bookmarkMenuObj.displayLogin();
if( document.getElementById("FavoritesImgDiv") != null )
{
document.getElementById("FavoritesImgDiv").innerHTML = "



