var createdHMenus = new Array();

//pausing
function pauseForMillis() {
	setTimeout("doNothing()", MilliSecondsBeforeVisible);
}
function doNothing() {
	return false;
}

// create HM for Blog Type choose
function createBlogTypeMenu(obj){
	
	var curleft = 0;
	var curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}

	var menuId = 'blogTypeMenu';
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
		{MenuID:menuId,
			TopMenuX:curleft,
			TopMenuY:curtop+17,
			FontColor:"#000000",
			FontColorOver:"#FFFFFF",
			FontColorSelected:"#DDDDDD",
			BGColor:"#DDDDDD",
			BGColorOver:"#222222",
			BGColorSelected:"#222222",
			ShowLinkCursor:1,
			FontSize:"9pt",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0
		}
	);
	
	HM_f_SetItems(
			{MenuID:menuId,
				DisplayText:hmBlogLabel2,
				LinkURL:"javascript:changeBlogType('shout');submitForm(document.forms.blogForm);if(document.forms.blogForm.blogContent.value != ''){document.forms.blogForm.submit();}"},
			{MenuID:menuId,
				DisplayText:hmBlogLabel3,
				LinkURL:"javascript:changeBlogType('whisper');submitForm(document.forms.blogForm);if(document.forms.blogForm.blogContent.value != ''){document.forms.blogForm.submit();}"},
			{MenuID:menuId,
				DisplayText:hmBlogLabel4,
				LinkURL:"javascript:changeBlogType('think');submitForm(document.forms.blogForm);if(document.forms.blogForm.blogContent.value != ''){document.forms.blogForm.submit();}"}
	);
}

//creating HM for single person
function createHMenu(hmType, hmId, title, displayname, photopath, lastOnline, contactType, 
					isChatable, jid, photoId, groupManagedId, groupManagedName, blockedOnChating
					, blockedOnInviting, blockedOnSendingSms,  blockedOnSendingMessage
					, blockedOnViewingStatus){
	var menuId = hmType + hmId;
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
		{MenuID:menuId,
			TopMenuX:"HM_default_x_position-60",
			TopMenuY:"HM_default_y_position+20",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0,
			IsPermanent:false,
//			TopUponDisplay:(window.HM_IE55)?null:
//			   "HM_f_ToggleElementList(false,['select'],'tag')",
//			   // if browser is not IE5.5 or 6
//			   // hide all selects when this menu is displayed
//			TopUponHide:(window.HM_IE55)?null:
//			   "HM_f_ToggleElementList(true,['select'],'tag')",
//			   // if browser is not IE5.5 or 6
//			   // show all selects when this menu is displayed
// 			//the following 3 menu event registrations appear to work in IE and 
//			// firefox, the above element-hiding registrations are unnecessary for firefox 
			HM_OnMove:HM_f_IEMaskMove,
			HM_OnVisibilityToggle:HM_f_IEMaskToggle,
			HM_OnMenuCreated:HM_f_IEMaskCreate
		}
	);

	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:title,
			BGColor:"#BBBBBB",BGColorOver:"#BBBBBB",BGColorSelected:"#BBBBBB",
			FontColor:"#000000",FontColorOver:"#000000",FontColorSelected:"#000000",
			TextAlign:"center",IsPermHilite:1,IsRollover:0
		}
	);
	if ((photoId!="") && (typeof(photoId)!='undefined')) {
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText:HM_im10+"HM_Img10_10' id='HM_Img10_10' /> " + hmLabel11 + " ",
				LinkURL:"javascript:openWindowCentered('viewPhoto.do?imageId="+photoId+"','Photo',640,640,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"},
			{MenuID:menuId,
				DisplayText:HM_im10+"HM_Img10_10' id='HM_Img10_10' /> " + hmLabel18 + " ",
				LinkURL:"javascript:openWindowCentered('viewSlideShow.do?targetPersonId=" + hmId + "&targetGalleryId=&targetSparcFolderId=&password=','Slideshow',700,700,'location=no,status=no,toolbar=no,menubar=no')"}
		);
	}
	if (contactType!=1 && contactType!=10 && blockedOnInviting  == 'false') { //only for non-contacts
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText:HM_im5+"HM_Img5_5' id='HM_Img5_5' /> " + hmLabel1 + " ",
				LinkURL:"javascript:openWindowCentered('preSendInvitation.do?targetPersonId="+hmId+"','Invitation',300,300,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"}
		);
	}
	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im4+"HM_Img4_4' id='HM_Img4_4' /> " + hmLabel12 + " ",
			LinkURL:"javascript:openWindowCentered('createGroupInvitation.do?targetPersonId="+hmId+"','GroupInvitation',700,500,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"}
	);
	
		HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im4+"HM_Img4_4' id='HM_Img4_4' /> " + hmLabel23 + " ",
			LinkURL:"javascript:openWindowCentered('introduceContact.do?targetPersonId="+hmId+"&person.displayname="+displayname+"&list_of_values_type=multiple&lov_service_name=contactsService&lov_after_action=introduceContact.do&list_of_values_type=multiple','',470,470,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
		);

	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im11+"HM_Img11_11' id='HM_Img11_11' /> " + hmLabel13 + " ",
			LinkURL:"javascript:openWindowCentered('createBusinessInvitation.do?targetPersonId="+hmId+"','BusinessInvitation',550,600,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"}
	);
		HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im22+"HM_Img22_22' id='HM_Img22_22' /> " + hmLabel24 + " ",
			LinkURL:"javascript:openWindowCentered('sendPresent.do?targetPersonId="+hmId+"&person.displayname="+displayname+"','',470,470,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
		);
	if (blockedOnSendingSms == 'false') { 
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText:HM_im1+"HM_Img1_1' id='HM_Img1_1' /> " + hmLabel14 + " ",
				LinkURL:"javascript:openWindowCentered('createSmsMessage.do?targetPersonId="+hmId+"&person.displayname="+displayname+"&person.image="+photopath+"','newSMSMessage',250,350,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
		);
	}
	if (blockedOnSendingMessage == 'false') { 

	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im1+"HM_Img1_1' id='HM_Img1_1' /> " + hmLabel2 + " ",
			LinkURL:"javascript:openWindowCentered('createMessage.do?targetPersonId="+hmId+"&person.displayname="+displayname+"&person.image="+photopath+"','newMessage',525,630,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
	);


	}
	HM_f_SetItems(	
		{MenuID:menuId,
			DisplayText:HM_im6+"HM_Img6_6' id='HM_Img6_6' /> " + hmLabel3 + " ",
			LinkURL:"javascript:openWindowCentered('favourite.do?targetId="+hmId+"&type=person','Favorite',300,300,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"},
		{MenuID:menuId,
			DisplayText:HM_im2+"HM_Img2_2' id='HM_Img2_2' /> " + hmLabel4 + " ",
			LinkURL:"javascript:executeAction('viewProfile.do', '', 'targetPersonId', '"+hmId+"')"},
		{MenuID:menuId,
			DisplayText:HM_im3+"HM_Img3_3' id='HM_Img3_3' /> " + hmLabel5 + " ",
			LinkURL:"javascript:executeAction('listPhotos.do', '', 'targetPersonId', '"+hmId+"')"},
		{MenuID:menuId,
			DisplayText:HM_im7+"HM_Img7_7' id='HM_Img7_7' /> " + hmLabel10 + " ",
			LinkURL:"javascript:executeAction('correspondence.do', '', 'targetPersonId', '"+hmId+"')"},
		{MenuID:menuId,
			DisplayText:HM_im15+"HM_Img15_15' id='HM_Img15_15' /> " + hmLabel15 + " ",
			LinkURL:"javascript:openWindowCentered('tag.do?targetId="+hmId+"&type=person','Tag',300,200,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
	);
	
//	if (groupManagedId!="" && groupManagedId!="null") {
//		HM_f_SetItems(
//		{MenuID:menuId,
//			DisplayText:HM_im16+"HM_Img16_16' id='HM_Img16_16' /> " + hmLabel16 + " " + groupManagedName + " ",
//			LinkURL:"javascript:executeAction('banGroupMember.do', '', 'targetPersonId', '"+hmId+"', 'groupId','"+groupManagedId+"')"},
//		{MenuID:menuId,
//			DisplayText:HM_im17+"HM_Img17_17' id='HM_Img17_17' /> " + hmLabel17 + " " + groupManagedName + " ",
//			LinkURL:"javascript:executeAction('kickGroupMember.do', '', 'targetPersonId', '"+hmId+"', 'groupId','"+groupManagedId+"')"}
//	);
//	}

	
	
	if (contactType==1) { //only for direct contacts
		HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im8+"HM_Img8_8' id='HM_Img8_8' /> " + hmLabel6 + " ",
			LinkURL:"javascript:executeAction('changeContactType.do', '', 'targetPersonId', '"+hmId+"')"}
		);
		HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im9+"HM_Img9_9' id='HM_Img9_9' /> " + hmLabel8 + " ",
			LinkURL:"javascript:openWindowCentered('contactDeleteConfirmation.do?targetPersonId="+hmId+"&person.displayname="+displayname+"&person.image="+photopath+"','Delete',300,300,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"}
		);
	}
	if (canAddChatMenus(contactType, isChatable, blockedOnChating)) {
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText:HM_im12+"HM_Img12_12' id='HM_Img12_12' /> " + hmLabel9 + " ",
				LinkURL:"javascript:startChatWithUser('"+jid+"')"}
		);
	}
	if (blockedOnViewingStatus == 'false'){
		if (lastOnline!="") {
			HM_f_SetItems(
				{MenuID:menuId,
					DisplayText:hmLabel7+" "+lastOnline,
					BGColor:"#bbbbbb",BGColorOver:"#bbbbbb",BGColorSelected:"#bbbbbb",
					FontColor:"#000000",FontColorOver:"#000000",FontColorSelected:"#000000",
					TextAlign:"center",IsPermHilite:1,IsRollover:0
				}
			);
		}
	}


}

//existence of HM for single person
function is_HMenuCreated(menuId){
	for(var i = 0; i<createdHMenus.length; i++){
		if(createdHMenus[i]==menuId){
			return true;
		}
	}
	return false;
}

//possibility to add chat menus
function canAddChatMenus(contactType, isChatable, blockedOnChating){
/*
	if ((top.imframe) && (isChatable) && blockedOnChating  == 'false') {
		if (top.imframe.statusLed && top.imframe.unavailableLed) {
			if (!(top.imframe.statusLed.src == top.imframe.unavailableLed.src)) {
				if (!top.imframe.isUnsupportedBrowser()) {
					return true;
				}
			}
		}
	}
	return false;
*/
//	return true;
	if ((top.imframe) && (isChatable) && blockedOnChating  == 'false') {
		return true;
	} else {
		return false;
	}

}

// chat contact menu
function createChatContactMenu(jid) {
	var menuId = jid;
	createdHMenus[createdHMenus.length] = jid;
	HM_f_SetMenus(
		{MenuID:menuId,
			TopMenuX:"HM_default_x_position-60",
			TopMenuY:"HM_default_y_position+25"
		}
	);

	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:HM_im12+"HM_Img12_12' id='HM_Img12_12' /> " + hmLabel9 + " ",
			LinkURL:"javascript:startChatWithUser('"+jid+"')"}
	);

}

// create HM for Sparc Files
function createSparcFilesMenu(itemId, fileOrFolder, fileName, favoriteText, tagText, shareFileText, moveFileText, downloadText, renameText, deleteText, convertText, addToGalleryText, idsList, parentFolderId, pageToNavigate, filterMode, namesList, sortColumnName, sortDirection, convertFile){
	var menuId = 'sparcFile' + itemId;
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
		{MenuID:menuId,
			IsPermanent:false,
			TopMenuX:"HM_default_x_position+20",
			TopMenuY:"HM_default_y_position-10",
			FontColor:"#FFFFFF",
			FontColorOver:"#000000",
			FontColorSelected:"#DDDDDD",
			BGColor:"#666666",
			BGColorOver:"#DDDDDD",
			BGColorSelected:"#222222",
			ShowLinkCursor:1,
			FontSize:"9pt",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0
		}
	);
	
	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText:fileName,
			BGColor:"#bbbbbb",BGColorOver:"#bbbbbb",BGColorSelected:"#bbbbbb",
			FontColor:"#000000",FontColorOver:"#000000",FontColorSelected:"#000000",
			TextAlign:"left",IsPermHilite:1,IsRollover:0
		}
	);
	
	if (fileOrFolder == 'file'){
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: shareFileText,
				LinkURL:"javascript:openWindowCentered('lov.do?lov_service_name=contactsService&lov_after_action=shareSparcFile.do&lovSourceId=" + itemId + "&title=" + fileName + "&list_of_values_type=multiple&lov_additional_params=objtype:people','',550,500,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"},
			/* doesn't work in IE */
			{MenuID:menuId,
				DisplayText: downloadText,
				LinkURL:"javascript:executeAction('downloadSparcFile.do', '', 'sparc_file_id'," + itemId + ")"},
			{MenuID:menuId,
				DisplayText: renameText,
				LinkURL:"javascript:paging = {idsList:'"+idsList+"',parentFolderId:"+parentFolderId+",pageToNavigate:1,filterMode :"+filterMode+",namesList: '"+namesList+"',messageType: 'sparcFilesActionRename',sortColumnName: '"+sortColumnName+"',sortDirection:"+sortDirection+"};modify_sparc_file("+itemId+",'"+fileName+"')"},
			{MenuID:menuId,
				DisplayText: deleteText,
				LinkURL:"javascript:paging = {idsList:'"+idsList+"',parentFolderId:"+parentFolderId+",pageToNavigate:1,filterMode :"+filterMode+",namesList: '"+namesList+"',messageType: 'sparcFilesActionDelete',sortColumnName: '"+sortColumnName+"',sortDirection:"+sortDirection+"};modify_sparc_file("+itemId+", null)"},
			{MenuID:menuId,
				DisplayText: favoriteText,
				LinkURL:"javascript:openWindowCentered('favourite.do?targetId=" + itemId + "&type=file','"+itemId+"',300,300,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no')"},
			{MenuID:menuId,
				DisplayText: addToGalleryText,
				LinkURL:"javascript:openWindowCentered('galleriesPickupList.do?targetId=" + itemId + "&type=file','"+itemId+"',300,300,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"}
		);
		
		if (convertFile==1) { 
			//only for convertable files
			HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: convertText,
				LinkURL:"javascript:SparcFiles.performFileConvertation(" + itemId + ");"}
			);
			};
		
	} else if (fileOrFolder == 'folder'){
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: renameText,
				LinkURL:"javascript:paging = {idsList:'"+idsList+"',parentFolderId:"+parentFolderId+",pageToNavigate:1,filterMode :"+filterMode+",namesList: '"+namesList+"',messageType: 'sparcFilesActionRenameDir',sortColumnName: '"+sortColumnName+"',sortDirection:"+sortDirection+"};modify_sparc_folder("+itemId+",'"+fileName+"')"},
			{MenuID:menuId,
				DisplayText: deleteText,
				LinkURL:"javascript:paging = {idsList:'"+idsList+"',parentFolderId:"+parentFolderId+",pageToNavigate:1,filterMode :"+filterMode+",namesList: '"+namesList+"',messageType: 'sparcFilesActionRemDir',sortColumnName: '"+sortColumnName+"',sortDirection:"+sortDirection+"};modify_sparc_folder("+itemId+", null)"}
		);
	}
}



// create HM for Images in gallery
function createImageMenu(imageId, galleryId, isDefault, setDefaultText, shareInGroupText, openOriginalText, editPhotoText, deleteText,
				favoriteText, greetingPhotosText, setGalleryDefaultText, viewsText, originalPath){
	var menuId = 'image' + imageId;
	//alert('createImageMenu for' + imageId);
	
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
		{MenuID:menuId,
			IsPermanent:false,
			TopMenuX:"HM_default_x_position+20",
			TopMenuY:"HM_default_y_position-10",
			FontColor:"#FFFFFF",
			FontColorOver:"#000000",
			FontColorSelected:"#DDDDDD",
			BGColor:"#666666",
			BGColorOver:"#DDDDDD",
			BGColorSelected:"#222222",
			ShowLinkCursor:1,
			FontSize:"9pt",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0
		}
	);
	
	if(!isDefault){
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: setDefaultText,
				LinkURL:"javascript:executeAction('setDefaultPhoto.do', '', 'photoId', '"+imageId+"', 'galleryId', '"+galleryId+"')"}
		);
	}
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: shareInGroupText,
				LinkURL:"javascript:openWindowCentered('addPhotoToGroup.do?photoId="+imageId+"','',550,600,'location=no,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes')"},
			{MenuID:menuId,
				DisplayText: openOriginalText,
				LinkURL:"javascript:openWindowCentered('"+originalPath+"','',0,0,'location=no,status=no,toolbar=no,menubar=no,scrollbars=yes')"},
			{MenuID:menuId,
				DisplayText: editPhotoText,
				LinkURL:"javascript:executeAction('editPhoto.do', '', 'photoId', '"+imageId+"', 'galleryId', '"+galleryId+"')"},
			{MenuID:menuId,
				DisplayText: deleteText,
				LinkURL:"javascript: if(window.confirm('" + photoConfirmDelete + "')){executeAction('deletePhoto.do', '', 'photoId', '"+imageId+"', 'galleryId', '"+galleryId+"')}"},
			{MenuID:menuId,
				DisplayText: greetingPhotosText,
				LinkURL:"javascript:openWindowCentered('greetingphotomanage.do?imageId="+imageId+"','',400,250,'location=no,status=no,toolbar=no,menubar=no')"}
		);
	if(galleryId != null && galleryId != ''){
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: setGalleryDefaultText,
				LinkURL:"javascript:executeAction('setDefaultPhoto.do', '', 'photoId', '"+imageId+"', 'targetGalleryId', '"+galleryId+"')"}
		);
	}
	HM_f_SetItems(
		{MenuID:menuId,
			DisplayText: viewsText,
			BGColor:"#bbbbbb",BGColorOver:"#bbbbbb",BGColorSelected:"#bbbbbb",
			FontColor:"#000000",FontColorOver:"#000000",FontColorSelected:"#000000",
			TextAlign:"left",IsPermHilite:1,IsRollover:0
		}
	);
}



// create HM for image Galleries
function createImageGalleryMenu(galleryId, galleryType, personId, editDetailsText, deleteText){
	var menuId = 'imageGallery' + galleryId;
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
		{MenuID:menuId,
			IsPermanent:false,
			TopMenuX:"HM_default_x_position+20",
			TopMenuY:"HM_default_y_position-10",
			FontColor:"#FFFFFF",
			FontColorOver:"#000000",
			FontColorSelected:"#DDDDDD",
			BGColor:"#666666",
			BGColorOver:"#DDDDDD",
			BGColorSelected:"#222222",
			ShowLinkCursor:1,
			FontSize:"9pt",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0
		}
	);
	
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: hmGalleryLabel[galleryType],
				BGColor:"#bbbbbb",BGColorOver:"#bbbbbb",BGColorSelected:"#bbbbbb",
				FontColor:"#000000",FontColorOver:"#000000",FontColorSelected:"#000000",
				TextAlign:"left",IsPermHilite:1,IsRollover:0
			}
		);
		HM_f_SetItems(
			{MenuID:menuId,
				DisplayText: editDetailsText,
				LinkURL:"javascript:executeAction('editGallery.do', '', 'galleryId', '"+galleryId+"', 'person.id', '"+personId+"', 'editGallery', 'true')"},
			{MenuID:menuId,
				DisplayText: deleteText,
				LinkURL:"javascript:if(window.confirm('" + galleryConfirmDelete + "')){executeAction('deleteGallery.do', '', 'galleryId', '"+galleryId+"', 'person.id', '"+personId+"')}"}
		);
}










function updateArrowImage(hover){
	if(hover){
		returnObjById('blogfilter_arrowImg').setAttribute('src','<%=Constants.IMAGES_PATH+"statm_arrow_hov.gif"%>');	
	}else{
		returnObjById('blogfilter_arrowImg').setAttribute('src','<%=Constants.IMAGES_PATH+"statm_arrow.gif"%>');
	}
}

function returnObjById( id ){
    if (document.getElementById)
        var returnVar = document.getElementById(id);
    else if (document.all)
        var returnVar = document.all[id];
    else if (document.layers)
        var returnVar = document.layers[id];
    return returnVar;
}

function changeBlogFilter(filter, imagesPath) {
	try {
		//Blogs.changeBlogFilter(filter);
		executeAction('start.do', '', 'blogFilterMenu', filter)
	} catch(err){
		alert(err);
	}
}

//create menu for status
function createBlogFilterMenu(obj, imagesPath){
	var menuId = 'blogFilterMenu';
	createdHMenus[createdHMenus.length] = menuId;
	HM_f_SetMenus(
	
	
		{MenuID:menuId,
			IsPermanent:false,
			TopMenuX:"HM_f_GetElementXY('" + obj.id + "','x')+1",
			TopMenuY:"HM_f_GetElementXY('" + obj.id + "','y')+23",
			FontColor:"#FFFFFF",
			FontColorOver:"#000000",
			FontColorSelected:"#DDDDDD",
			BGColor:"#666666",
			BGColorOver:"#DDDDDD",
			BGColorSelected:"#222222",
			ShowLinkCursor:1,
			FontSize:"9pt",
			ChildKeepInWindowX:0,
			ChildKeepInWindowY:0,
			TopKeepInWindowX:0,
			TopKeepInWindowY:0,
			BorderTopWidth:0
		}
	);

	HM_f_SetItems(
		{MenuID:menuId,
		DisplayText:hmLabelBlogFilterUs	+ " ",
		LinkURL:"javascript:changeBlogFilter('usa', imagesPath)"},
		
		{MenuID:menuId,
		DisplayText:hmLabelBlogFilterGr + " ",
		LinkURL:"javascript:changeBlogFilter('gre', imagesPath)"},
		
		{MenuID:menuId,
		DisplayText:hmLabelBlogFilterFr + " ",
		LinkURL:"javascript:changeBlogFilter('fra', imagesPath)"},
		
		{MenuID:menuId,
		DisplayText:hmLabelBlogFilterSp + " ",
		LinkURL:"javascript:changeBlogFilter('spa', imagesPath)"},

		{MenuID:menuId,
		DisplayText:hmLabelBlogFilterRu	+ " ",
		LinkURL:"javascript:changeBlogFilter('rus', imagesPath)"}
	);

}
