
Lycos.use("util");Lycos.use("ui");Lycos.use("webon/modules/mediamanager");Lycos.use("webon/modules/comments");Lycos.webon.modules.photoalbum=function(instId,subInstId){this.type="photoalbum";this.lyModule=Lycos.webon.module;this.lyModule(instId,subInstId);this.jsObj="(Lycos.webon.getInstance('"+this.type+"', "+this.instId+", "+this.subInstId+"))";this.slideBinOffset=0;this.slideshowId=0;this.slideshowTimer=null;this.draggingTd=null;this.canDelSlide=null;this.isDelSlide=false;this.showspams=false;this.resizeBy=null;this.minWidth=160;this.maxWidth=600;this.hideSlideWidth=300;this.cacheDims=[];this.thumbX=558;this.thumbY=400;var tmp=this;this.addEventListener('showManage',function(e){tmp.onLightbox(e);});this.addEventListener('retrieveRemaining',function(e){tmp.onRetrieveRemaining(e);});this.addEventListener('getComments',function(e){tmp.setCommentsHTML(e);});this.addEventListener('saveRename',function(e){tmp.onSaveRename(e);});this.addEventListener('managePhotos',function(e){tmp.onManagePhotos(e);});this.addEventListener('rotatePhoto',function(e){tmp.onRotatePhoto(e);});this.addEventListener('addMediaByIds',function(e){tmp.onAddMediaByIds(e);});this.addEventListener('deletePhotos',function(e){tmp.onDeletePhotos(e);});this.addEventListener('switchPhoto',function(e){tmp.onSwitchPhoto(e);});this.getMainId=function(){return parseInt(document.getElementById("mainId"+this.instId).innerHTML);}
this.checkPhoto=function(){this.soonHideControls();var str=document.location+'';if(str.match(/\#photo/)=="#photo"){var arr=str.split("#photo");var id=arr[arr.length-1];if(id.length>0){return this.switchPhoto(id,true,true);}}
var firstId=this.getMainId();if(firstId!=0){document.getElementById("photo"+this.instId+"_"+firstId).className+=" selected ";return this.switchPhoto(firstId,true,true);}}
this.showControls=function(){this.clearControlTimer();var bg=document.getElementById("infoBarBg"+this.instId);if(bg){if(bg.style.display!="none")return;bg.style.display="";}
var p=document.getElementById("infoBarP"+this.instId);if(p){Lycos.effects.fadeIn(p,Lycos.effects.speeds.SLOW,true);p.style.display="";}}
this.soonHideControls=function(){this.controlTimer=setTimeout(this.jsObj+".hideControls()",1500);}
this.hideControls=function(){var p=document.getElementById("infoBarP"+this.instId);if(p){Lycos.effects.fadeOut(p,Lycos.effects.speeds.SLOW,true);}
var bg=document.getElementById("infoBarBg"+this.instId);if(bg){bg.style.display="none";}
this.clearControlTimer();}
this.clearControlTimer=function(){if(this.controlTimer){clearTimeout(this.controlTimer);this.controlTimer=null;}}
this.displayPopup=function(id){document.getElementById("popupImg"+this.instId).src=document.getElementById("smallurl"+this.instId+"_"+id).value;var phot=document.getElementById("photo"+this.instId+"_"+id);var abs1=Lycos.util.findAbsPosition(phot);var abs2=Lycos.util.findAbsPosition(phot.parentNode);var offsetx=abs1[0]-abs2[0]+this.slideBinOffset;var dim=Lycos.util.imageNaturalDimensions(document.getElementById("popupImg"+this.instId));var offsety=dim[1];var popup=document.getElementById("popup"+this.instId);popup.style.left=(23+offsetx)+"px";popup.style.top=(-120+(110-offsety))+"px";popup.style.display="";}
this.hidePopup=function(id){document.getElementById("popup"+this.instId).style.display="none";document.getElementById("popupImg"+this.instId).src="";}
this.getCurrentPhotoComments=function(){var curr=document.getElementById("photo"+this.instId+"_"+this.slideshowId);if(curr){var id=this.getPhotoId(curr);this.getComments(id);}}
this.getComments=function(id){this.lyAjaxObj({showspams:(this.showspams?"yes":"no"),id:id,region:this.region},"getComments");}
this.retrieveRemaining=function(postRetrieveCheck){var perslide=9;var photos=[];if(this.retrieveOffset>=this.allToRetrieve.length){return;}
for(var i=this.retrieveOffset;i<this.retrieveOffset+perslide&&i<this.allToRetrieve.length;i++){photos.push(this.allToRetrieve[i]);}
this.retrieveOffset+=perslide;var count=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML);var pages=parseInt(count/perslide);var fullCount=document.getElementById("photoBinFullCount"+this.instId);if(count%9==0&&fullCount.innerHTML==0&&photos.length>0){fullCount.innerHTML="retrieving";this.lyAjaxObj({"photos":photos,"check":(postRetrieveCheck?true:false)},"retrieveRemaining");}}
this.switchPhoto=function(id,changeLoc,switchData){this.resizeBy=null;if(!this.selectPhoto(id)){this.retrieveRemaining(true);return false;}
this.slideshowId=id;if(changeLoc)
window.location.hash="#photo"+id;document.getElementById("viewSpanNoComments"+this.instId).style.display="none";document.getElementById("viewSpan"+this.instId).style.display="none";if(switchData){this.pauseSlideshow();document.getElementById("switchingTo"+this.instId).innerHTML=id;this.lyAjaxObj({showspams:(this.showspams?"yes":"no"),id:id,region:this.region},"switchPhoto");}
else{document.getElementById("acl"+this.instId).value="N";}
document.getElementById("comments_"+this.instId).innerHTML="";return false;}
this.findSlideshowId=function(last){if(this.slideshowId==0){var bin=document.getElementById("photoBin"+this.instId);var divs=bin.getElementsByTagName("li");if(divs.length>0){if(last)
this.slideshowId=this.getPhotoId(divs[divs.length-1]);else
this.slideshowId=this.getPhotoId(divs[0]);}}
return this.slideshowId;}
this.jumpLeft=function(){this.pauseSlideshow();var curr=document.getElementById("photo"+this.instId+"_"+this.findSlideshowId());if(curr){var next=curr.previousSibling;while(next&&(next.nodeType!=1||next.tagName!="LI")){next=next.previousSibling;}
if(next)
this.switchPhoto(this.getPhotoId(next),true,true);else{this.slideshowId=0;this.switchPhoto(this.findSlideshowId(true),true,true);}}
return false;}
this.jumpRight=function(){this.pauseSlideshow();this.retrieveRemaining();var curr=document.getElementById("photo"+this.instId+"_"+this.findSlideshowId());if(curr){var next=curr.nextSibling;while(next&&(next.nodeType!=1||next.tagName!="LI")){next=next.nextSibling;}
if(next)
this.switchPhoto(this.getPhotoId(next),true,true);else{this.slideshowId=0;this.switchPhoto(this.findSlideshowId(),true,true);}}
return false;}
this.slideshow=function(){if(this.slideshowTimer==null){document.getElementById("slideshowText"+this.instId).innerHTML="pause"+(this.region=="sidebar"?"":" slideshow");if(!this.startSlideshow()){document.getElementById("slideshowText"+this.instId).innerHTML="play"+(this.region=="sidebar"?"":" slideshow");}}
else{this.pauseSlideshow();this.switchPhoto(this.slideshowId,true,true);}
return false;}
this.startSlideshow=function(){if(this.slideshowId==0){var bin=document.getElementById("photoBin"+this.instId);var divs=bin.getElementsByTagName("li");if(divs.length==0)return false;this.switchPhoto(this.getPhotoId(divs[0]),false,false);this.slideshowTimer=setTimeout(this.jsObj+".runSlideshow()",3000);}
else{this.runSlideshow();}
return true;}
this.pauseSlideshow=function(){document.getElementById("slideshowText"+this.instId).innerHTML="play"+(this.region=="sidebar"?"":" slideshow");clearTimeout(this.slideshowTimer);this.slideshowTimer=null;}
this.runSlideshow=function(){if(this.slideshowId==0)return;var curr=document.getElementById("photo"+this.instId+"_"+this.slideshowId);var next=curr.nextSibling;while(next&&(next.nodeType!=1||next.tagName!="LI")){next=next.nextSibling;}
if(!next){var bin=document.getElementById("photoBin"+this.instId);var divs=bin.getElementsByTagName("li");if(divs.length==0){this.pauseSlideshow();return;}
next=divs[0];}
this.switchPhoto(this.getPhotoId(next),false,false);this.slideshowTimer=setTimeout(this.jsObj+".runSlideshow()",3000);if(this.toRetrieve){this.retrieveRemaining();this.toRetrieve=false;}
else{this.toRetrieve=true;}}
this.slidePhotos=function(pageoffset){if(!this.perslide)
this.recalculatePerSlide(document.getElementById("albumOuterDiv"+this.instId).offsetWidth+2);var count=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML);var pages=(-1)*count/this.perslide;var curroffset=parseInt(document.getElementById("photoBinOffset"+this.instId).innerHTML);var newoffset=curroffset+pageoffset;if(newoffset>0||newoffset<=pages){return false;}
this.retrieveRemaining();this.perslide=8;this.slideBinOffset=(newoffset*((this.perslide)*54));this.slideBinOffset+=(newoffset*8*(this.perslide-1));this.slideBinOver((new Date()).getTime());document.getElementById("photoBinOffset"+this.instId).innerHTML=newoffset;return false;}
this.slideBinOver=function(time){var bin=document.getElementById("photoBin"+this.instId);Lycos.ui.slideHorizontal(time,bin,this.slideBinOffset,this.jsObj+".slideBinOver");}
this.selectPhoto=function(id){document.getElementById("switchingTo"+this.instId).innerHTML=0;var oldId=this.getMainId();if(oldId!=id&&document.getElementById("photo"+this.instId+"_"+id)){var offClass=document.getElementById("photo"+this.instId+"_"+id).className;var oldDiv=document.getElementById("photo"+this.instId+"_"+oldId);if(oldDiv!=undefined)
oldDiv.className=offClass;document.getElementById("photo"+this.instId+"_"+id).className=" selected "+offClass;}
document.getElementById("comments_"+this.instId).innerHTML="";if(document.getElementById("url"+this.instId+"_"+id)){document.getElementById("mainId"+this.instId).innerHTML=id;var url=document.getElementById("url"+this.instId+"_"+id).value;var desc=document.getElementById("desc"+this.instId+"_"+id).value;var ind=document.getElementById("index"+this.instId+"_"+id).value;var img=document.getElementById("mainImg"+this.instId);var tmp=this;img.onload=function(){tmp.setImageSize(this);};img.style.visibility="hidden";img.src=url;document.getElementById("mainDesc"+this.instId).innerHTML=desc;document.getElementById("mainIndex"+this.instId).innerHTML=ind;}
if(oldId==id||document.getElementById("photo"+this.instId+"_"+id))
return oldId;else
return 0;}
this.setImageSize=function(img,newWidth,newHeight){if(!img){img=document.getElementById("mainImg"+this.instId);}
if(!newWidth){newWidth=parseInt(img.parentNode.offsetWidth);}
if(!newHeight){newHeight=parseInt(img.parentNode.offsetHeight);}
var dims=Lycos.util.imageNaturalDimensions(img);if(dims[0]==0||dims[1]==0){setTimeout(this.jsObj+".setImageSize()",400);return;}
if(!((dims[0]<newWidth)&&(dims[1]<newHeight))){var imgW;var imgH;if(dims[0]>dims[1]){imgW=(newWidth-10)+"px";imgH="auto";}
else{imgH=(newHeight-10)+"px";imgW="auto";}
img.style.width=imgW;img.style.height=imgH;}
else{img.style.width=dims[0]+"px";img.style.height=dims[1]+"px";}
img.style.visibility='visible';}
this.showAdd=function(){var instID=this.instId;setTimeout(function(){Lycos.ui.mediapicker.pick("callerid="+instID,null,'image',true);},true);}
this.showManage=function(){Lycos.ui.lightbox.show();this.lyAjaxObj({},"showManage");return false;}
this.deletePhoto=function(){var id=this.getMainId();if(id!=0){resp=confirm("Would you like to remove this photo from the album?");if(resp){this.lyAjaxObj({photos:{id:id}},"deletePhotos");}}
return false;}
this.getPhotoId=function(elem){if(!elem)return 0;var loc=elem.id.indexOf("_");return elem.id.substr(loc+1);}
this.startRenamePhoto=function(){if(this.getMainId()==0)
return;this.pauseSlideshow();var desc=document.getElementById("mainDesc"+this.instId);var tmp=this;var f=desc.ownerDocument.createElement("form");f.id="mainDescEditForm"+this.instId;f.onsubmit=function(event){tmp.saveRename();};var i=desc.ownerDocument.createElement("input");i.id="mainDescEdit"+this.instId;i.value=desc.innerHTML;i.onblur=function(event){tmp.saveRename();};desc.style.display="none";desc.parentNode.insertBefore(f,desc);f.appendChild(i);i.focus();i.select();}
this.rotatePhoto=function(id){var id=this.getMainId();if(id!=0){var img=document.getElementById("mainImg"+this.instId);img.src="/adm/media/ajax-loader.gif";img.style.width="auto";img.style.height="auto";document.getElementById("photo"+this.instId+"_"+id).style.backgroundImage="";this.resizeBy=null;this.cacheDims[id+"_"]=null;this.lyAjaxObj({id:id},"rotatePhoto");}
return false;}
this.saveRename=function(){var desc=document.getElementById("mainDesc"+this.instId);var newValue=document.getElementById("mainDescEdit"+this.instId).value;var frm=document.getElementById("mainDescEditForm"+this.instId);if(frm)frm.parentNode.removeChild(frm);document.getElementById("mainDesc"+this.instId).style.display="";if(newValue!=desc.innerHTML){desc.innerHTML="...";this.lyAjaxObj({id:this.getMainId(),newDescription:newValue},"saveRename");}
return false;}
this.lyHandleEvents=function(data){if(data.action=="addMediaByArray"){Lycos.ui.lightbox.show();var newids=[];for(var i=0;i<data.items.length;i++){newids.push(data.items[i].id);}
this.lyAjaxObj({ids:newids,tag:data.tag},"addMediaByIds");}
else if(data.action=="done")
Lycos.ui.lightbox.hide();return;}
this.handleAddMedia=function(photos,noIncrement){if(photos==null)
return 0;var addCount=0;var currCount=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML)+1;var bin=document.getElementById("photoBin"+this.instId);for(i=0;i<photos.length;i++){bin.innerHTML+="<li id=\"photo"+this.instId+"_"+photos[i].id+"\" class=\"addOnBorder\" onMouseOver=\""+this.jsObj+".displayPopup("+photos[i].id+")\" onMouseOut=\""+this.jsObj+".hidePopup()\" onClick=\"return "+this.jsObj+".switchPhoto("+photos[i].id+", true, true);\"><span class=\"pad\"><img src=\""+photos[i].thumbURL+"\" /></span><input type=\"hidden\" id=\"index"+this.instId+"_"+photos[i].id+"\" value=\""+(currCount++)+"\" /><input type=\"hidden\" id=\"url"+this.instId+"_"+photos[i].id+"\" value=\""+photos[i].largeURL+"\" /><input type=\"hidden\" id=\"smallurl"+this.instId+"_"+photos[i].id+"\" value=\""+photos[i].thumbURL+"\" /><input type=\"hidden\" id=\"desc"+this.instId+"_"+photos[i].id+"\" value=\""+photos[i].caption+"\" />";addCount++;}
document.getElementById("photoBinCount"+this.instId).innerHTML=currCount-1;if(!noIncrement){var newCount=parseInt(document.getElementById("mainCount"+this.instId).innerHTML)+addCount;document.getElementById("mainCount"+this.instId).innerHTML=newCount;document.getElementById("photoBg"+this.instId).className=document.getElementById("photoBg"+this.instId).className.replace(/ gray/,'')+(newCount>0?"":" gray");}
return addCount;}
this.slideToFirst=function(noSwitch){var curroffset=parseInt(document.getElementById("photoBinOffset"+this.instId).innerHTML);var bin=document.getElementById("photoBin"+this.instId);var divs=bin.getElementsByTagName("li");if(divs.length>0){if(!noSwitch){var firstId=this.getPhotoId(divs[0]);this.switchPhoto(firstId,true,true);}
this.slidePhotos(-1*(curroffset));}
else{document.getElementById("mainId"+this.instId).innerHTML=0;document.getElementById("comments_"+this.instId).innerHTML="";document.getElementById("mainImg"+this.instId).src="";document.getElementById("mainImg"+this.instId).style.visibility="hidden";document.getElementById("mainIndex"+this.instId).innerHTML="0";document.getElementById("mainDesc"+this.instId).innerHTML="This album has no photos";document.getElementById("acl"+this.instId).value="N";this.slideshowId=0;}
document.getElementById("mainCount"+this.instId).innerHTML=divs.length;document.getElementById("photoBg"+this.instId).className=document.getElementById("photoBg"+this.instId).className.replace(/ gray/,'')+(divs.length>0?"":" gray");}
this.emptyAlbum
this.onAddComment=function(evt){if(evt.lyResponse.isedit=="yes")return;if(typeof(evt.lyResponse.error)=='undefined'){commentCount=parseInt(document.getElementById("numComments"+this.instId).innerHTML)+1;document.getElementById("numComments"+this.instId).innerHTML=commentCount;document.getElementById("viewSpanNoComments"+this.instId).style.display="none";document.getElementById("viewSpan"+this.instId).style.display="inline";}}
this.onDeleteComment=function(evt){commentCount=parseInt(document.getElementById("numComments"+this.instId).innerHTML)-1;if(commentCount<=0){commentCount=0;document.getElementById("viewSpanNoComments"+this.instId).style.display="inline";document.getElementById("viewSpan"+this.instId).style.display="none";}
document.getElementById("numComments"+this.instId).innerHTML=commentCount;}
this.onMarkCommentAsSpam=function(evt){objNumSpams=document.getElementById("numSpams"+this.instId);spamCount=parseInt(objNumSpams.innerHTML)+1;document.getElementById("viewSpam"+this.instId).style.display="inline";objNumSpams.innerHTML=spamCount;this.onDeleteComment(evt);}
this.onUnmarkCommentAsSpam=function(evt){objNumSpams=document.getElementById("numSpams"+this.instId);spamCount=parseInt(objNumSpams.innerHTML)-1;if(spamCount<=0){spamCount=0;document.getElementById("viewSpam"+this.instId).style.display="none";}
objNumSpams.innerHTML=spamCount;this.onAddComment(evt);}
this.setShowSpams=function(b){this.showspams=b;}
this.toggleShowSpams=function(){this.showspams=!this.showspams;this.getCurrentPhotoComments();}
this.setCommentsHTML=function(data){if(data.commentCount>0){document.getElementById("viewSpanNoComments"+this.instId).style.display="none";document.getElementById("viewSpan"+this.instId).style.display="inline";}
else{document.getElementById("viewSpan"+this.instId).style.display="none";document.getElementById("viewSpanNoComments"+this.instId).style.display="inline";}
try{if(data.spamCount>0){document.getElementById("viewSpam"+this.instId).style.display="inline";}
else{document.getElementById("viewSpam"+this.instId).style.display="none";}
document.getElementById("numSpams"+this.instId).innerHTML=data.spamCount;document.getElementById("showSpamsLink"+this.instId).innerHTML=this.showspams?"hide":"show";}
catch(e){}
document.getElementById("numComments"+this.instId).innerHTML=data.commentCount;document.getElementById("comments_"+this.instId).innerHTML=data.commentsHTML;}
this.onLightbox=function(evt){var data=evt.lyResponse;Lycos.ui.lightbox.show();Lycos.ui.lightbox.populate(data.html);if(data.onshow)eval(data.onshow);}
this.onRetrieveRemaining=function(evt){document.getElementById("photoBinFullCount"+this.instId).innerHTML=0;if(evt.lyResponse.photos.length>0){this.handleAddMedia(evt.lyResponse.photos,true);}
else{document.getElementById("photoBinFullCount"+this.instId).innerHTML=1;}
if(evt.lyResponse.check){this.checkPhoto();}}
this.onSwitchPhoto=function(evt){var data=evt.lyResponse;if((data.subinstance+"")!=(document.getElementById("switchingTo"+this.instId).innerHTML+"")){return;}
if(this.getMainId()!=data.subinstance)
this.selectPhoto(data.subinstance);document.getElementById("acl"+this.instId).value=data.acl;if(data.commentsId>0){this.setCommentsHTML(data);document.getElementById("comments_"+this.instId).style.display="";instance=Lycos.webon.getInstance('comments',data.commentsId,data.subinstance);if(!instance["init_cb_"+this.instId]){instance["init_cb_"+this.instId]=true;var tmp=this;instance.addEventListener("editComment",function(e){tmp.onAddComment(e);});instance.addEventListener("approve",function(e){tmp.onAddComment(e);});instance.addEventListener("delete",function(e){tmp.onDeleteComment(e);});instance.addEventListener("markSpam",function(e){tmp.onMarkCommentAsSpam(e);});instance.addEventListener("unmarkSpam",function(e){tmp.onUnmarkCommentAsSpam(e);});}
instance.jsWindow=this.jsWindow;if(this.jsWindow.initTinyMCE)
this.jsWindow.initTinyMCE();}}
this.onSaveRename=function(evt){var data=evt.lyResponse;document.getElementById("mainDesc"+this.instId).innerHTML=data.newDescription;document.getElementById("desc"+this.instId+"_"+data.id).value=data.newDescription;;}
this.onManagePhotos=function(evt){Lycos.ui.lightbox.hide();document.getElementById("photoCover"+this.instId).innerHTML=evt.lyResponse.html;this.slideToFirst();}
this.onRotatePhoto=function(evt){var data=evt.lyResponse;var mudge="?z="+(new Date()).getTime();document.getElementById("url"+this.instId+"_"+data.id).value=data.largeThumb+mudge;document.getElementById("smallurl"+this.instId+"_"+data.id).value=data.smallThumb+mudge;var img=document.getElementById("mainImg"+this.instId);var tmp=this;img.onload=function(){tmp.setImageSize(this);};img.src=data.largeThumb+mudge;img.style.width="auto";img.style.height="auto";document.getElementById("photo"+this.instId+"_"+data.id).style.backgroundImage="url("+data.smallThumb+mudge+")";}
this.onAddMediaByIds=function(evt){var photos=evt.lyResponse.photos;Lycos.ui.lightbox.hide();var curroffset=parseInt(document.getElementById("photoBinOffset"+this.instId).innerHTML);var count=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML);var pages=parseInt((count)/this.perslide);if(this.handleAddMedia(photos)>0){this.switchPhoto(photos[0].id,false,true);this.slidePhotos((curroffset-pages));}}
this.onDeletePhotos=function(evt){var data=evt.lyResponse;Lycos.ui.lightbox.hide();var curr=this.getMainId();var delCount=0;for(i=0;i<data.photos.length;i++){if(data.photos[i].id==curr)
curr=0;var x=document.getElementById("photo"+this.instId+"_"+data.photos[i].id);x.parentNode.removeChild(x);delCount++;}
document.getElementById("photoBinCount"+this.instId).innerHTML=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML)-delCount;var newCount=parseInt(document.getElementById("mainCount"+this.instId).innerHTML)-delCount;document.getElementById("mainCount"+this.instId).innerHTML=newCount;document.getElementById("photoBg"+this.instId).className=document.getElementById("photoBg"+this.instId).className.replace(/ gray/,'')+(newCount>0?"":" gray");this.reindexPhotoSlide();var curroffset=parseInt(document.getElementById("photoBinOffset"+this.instId).innerHTML);var count=parseInt(document.getElementById("photoBinCount"+this.instId).innerHTML);var pages=parseInt((-1*count)/this.perslide);this.slidePhotos(-1*(curroffset-pages));if(curr==0){this.slideToFirst();}}
this.reindexPhotoSlide=function(){var bin=document.getElementById("photoBin"+this.instId);var photos=bin.getElementsByTagName("li");for(var i=0;i<photos.length;i++){var id=photos[i].id.replace(/photo/,"index");document.getElementById(id).value=i+1;}}
this.recalculatePerSlide=function(newWidth){newWidth=newWidth-84;var newPerSlide=parseInt(newWidth/55);if(newPerSlide>2&&newPerSlide<15)
this.perslide=newPerSlide;}
this.lyOnResizing=function(newWidth,newHeight){Lycos.ui.regionCtrl.startResizePos.minWidth=Math.max(this.minWidth,Lycos.ui.regionCtrl.startResizePos.minWidth);Lycos.ui.regionCtrl.startResizePos.maxWidth=Math.min(this.maxWidth,Lycos.ui.regionCtrl.startResizePos.maxWidth);newWidth=Math.max(this.minWidth,newWidth);newWidth=Math.min(this.maxWidth,newWidth);if(newWidth>=this.hideSlideWidth){document.getElementById("photoCover"+this.instId).style.display="";document.getElementById("slideshowText"+this.instId).style.display="";}
else{document.getElementById("photoCover"+this.instId).style.display="none";document.getElementById("slideshowText"+this.instId).style.display="none";}
document.getElementById("albumOuterDiv"+this.instId).style.width=newWidth+"px";newHeight=parseInt(newWidth*this.thumbY/this.thumbX);document.getElementById("photoOwner"+this.instId).style.width=newWidth+"px";document.getElementById("photoBg"+this.instId).style.width=newWidth+"px";document.getElementById("photoBg"+this.instId).style.height=newHeight+"px";document.getElementById("photoCover"+this.instId).style.width=(newWidth-84)+"px";newWidth-=30;newHeight=parseInt(newWidth*this.thumbY/this.thumbX);var img=document.getElementById("mainImg"+this.instId);img.parentNode.style.width=newWidth+"px"
img.parentNode.style.height=newHeight+"px";this.cacheDims=[];this.setImageSize(img);}
this.lyOnResize=function(newWidth,newHeight){this.slideToFirst(true);this.recalculatePerSlide(newWidth);}}