            function getIndexFromLabel(label){
                for (i = 0; i < pageIdList.length; i++) {
                    if (pageIdList[i].label == label) 
                        return i;
                }
                return null;
            }
            
            function lunchCollectionPage(e){
                var index = getIndexFromLabel(dijit.byId(this.id).label);
                if (index == null) {
                    console.debug("Count not get pageid for fishlist");
                    return;
                }
                
                location.href = getPageUrl(pageIdList[index].pageId, pageIdList[index].ownerId);
            }
            
            function getPageUrl(pageId, ownerId){
                return "collectionPage.html?pageId=" + pageId + "&ownerId=" + ownerId;
                
            }
            
            var pageIdList = [];
            function pageData(pageId, ownerId, label){
                this.pageId = pageId;
                this.ownerId = ownerId;
                this.label = label;
            }
            
            function displayFisheye(data){
                /*  var pane=new dojox.widget.FisheyeList( dojo.byId("featuredCollWidget"));
                 pane.itemWidth=75;
                 pane.itemHeight=75;
                 pane.itemMaxWidth=150 ;
                 pane.itemMaxHeight=150;
                 pane.orientation="horizontal";
                 pane.effectUnits=1;
                 pane.itemPadding=5;
                 pane.attachEdge="top";
                 pane.labelEdge="top";
                 //  dojo.byId("featuredCollectionDiv").appendChild(pane) ;
                 pane.postCreate();
                 */
                var pane = dijit.byId("featuredCollWidget");
                var contrib = data.getElementsByTagName("collection");
                for (var c = 0; c < contrib.length && c < 9; c++) {
                    var cInfo = contrib[c];
                    
                    var childWidget = new dojox.widget.FisheyeListItem();
                    
                    childWidget.label = cInfo.getAttribute("name");
                    childWidget.iconSrc = cInfo.getAttribute("thumbnail");
                    childWidget.onClick = lunchCollectionPage;//"lunchCollectionPage("+ cInfo.getAttribute("id")+");";//dojo onClick cannot take arguments
                    childWidget.postCreate();
                    
                    
                    pageIdList.push(new pageData(cInfo.getAttribute("id"), cInfo.getAttribute("owner_id"), cInfo.getAttribute("name")));
                    
                    pane.addChild(childWidget);
                    pane.startup();
                    childWidget.startup();
                    
                }
                
                
            }
            
            function displaySimple(data){
                var pane = document.getElementById("featuredCollectionDiv");
                var contrib = data.getElementsByTagName("collection");
                var cInfo = null;
                var label = "", iconSrc = "";
                var htmlStr = "";
                for (var c = 0; c < contrib.length && c < 11; c++) {
                    cInfo = contrib[c];
                    label = cInfo.getAttribute("name");
                    iconSrc = cInfo.getAttribute("thumbnail");
                    htmlStr += " <div style='float:left;'><div><a href='" + getPageUrl(cInfo.getAttribute("id"), cInfo.getAttribute("owner_id")) + "'><img style='width:60px;height:60px' src='" + iconSrc + "' alt='' title='" + label + "'/></a></div><!--<div style='width:100px'><a href='#' style='text-decoration:none;')>" + label + "</a></div>--></div>";
                }
                pane.innerHTML = htmlStr;
            }
            
            function initFeaturedCollection(){
                dojo.xhrGet({
                    url: "service?action=getRelatedCollections&LimitResults=12",
                    load: function(data, evt){
						
					 /*var rnd=Math.random()*100%4;
				        if (rnd > 2) {
							displayFisheye(data);
						}else{
							displaySimple(data);
						} */
						 displaySimple(data);
						
                        
                        
                    },
                    handleAs: "xml"
                });
            }
            
            
