function ULSjYp(){var o=new Object;o.ULSTeamName="Microsoft SharePoint Foundation";o.ULSFileName="imglib.js";return o;}
var fImglibJssLoaded=true,fImglibDefautlView=false,L_DeleteSingleItem_Text="Are you sure you want to delete this item?",L_RecycleSingleItem_Text="Are you sure you want to send this item to the site Recycle Bin?",L_DeleteMultipleItems_Text="Are you sure you want to delete these items?",L_RecycleMultipleItems_Text="Are you sure you want to send these items to the site Recycle Bin?",L_ListStyle_Text=" Details",L_ThumbnailStyle_Text=" Thumbnails",L_FilmstripStyle_Text=" Filmstrip",L_FileName_Text="Name",L_Title_Text="Title",L_Description_Text="Description",L_ImageSize_Text="Picture Size",L_ImageCreateDate_Text="Date Picture Taken",L_ImgAlt_Text="Picture",L_DocumentAlt_Text="Document",L_FolderAlt_Text="Folder",L_AltViewProperty_Text="Click here to view the picture properties.",L_GotoFolder_Text="Click here to go to the folder.",L_Picture_Of_Text="Picture {0} of {1}",L_NoImageSelected_Text="There are no pictures selected. Select one or more pictures and try again.",L_IEOnlyFeature_Text="This feature requires Internet Explorer version 5.5 or greater for Windows to work.",L_NotAvailableOnWebPart_Text="This operation cannot be completed from a web part. Please go to the Picture Library and try again.",L_NoPreview_Text="No Preview Available",L_OpenItem_Text="Open item",L_SelectAll_Text="Select|Unselect all",L_PreviousPicture_Text="Previous picture",L_NextPicture_Text="Next picture",L_SelectedViewError_Text="Selected Images View requires Internet Explorer 7.0 or greater for Windows.",L_ExceedSelectionLimit_Text="You have selected the maximum number of items.  Switch to the Selected Pictures view to review your selections.",L_SlideShowPlayButton_Text="Play",L_SlideShowPauseButton_Text="Pause",L_SlideShowStopButton_Text="Stop",L_SlideShowPrevButton_Text="Previous",L_SlideShowNextButton_Text="Next",items=[],firstId=-1,fSelectFieldAppeared=false,previewedId=0,currentRecursiveViewStyle="",currentRootFolder="",ids=[],fAllSelected=false,selectedIdsStr="",filterIdsStr="",fSelectedView=false,currentViewGuid="",fInitSelection=false,detailStyleText="",currentViewStyle="",selectedViewLink=null,vCurrentListID="",vCurrentListUrlAsHTML="",vCurrentWebUrl="",urlCmdForDisplay="",fNewItem=false,fInit=false,tbImg=null,tbTitle=null,tbPreview=null,hilitedRow=null,previewTimer=-1,timedItem=-1,currentPicture=0,currentStrip=0,stripSize=5,listDirection="ltr",lastMenuId="",firstIdWithCheckbox=-1,fInitAttempted=false,fRecursive=false,fRTL=false,fEmptyView=false,fWebFldrView=false,fFilterOn=false,fInitViewStyle=false,fNextImageLoaded=false,fNeedReload=false,fEditingInProcess=false,listInfo=null,fIsInGroupByView=false,picturePreviewAlt=null,unverifiedSelectionIdsCount=0,verifiedSelectionIdsCount=0,selectionLimit=200;function ShowPic(a){ULSjYp:;var b=a.index,c=0;if(a.index!=a.pictureArray.length-1)c=a.index+1;var d=a.pictureArray.length-1;if(a.index!=0)d=a.index-1;a.image.src=a.pictureArray[b];a.image.height=a.heightArray[b];a.image.width=a.widthArray[b];a.image.alt=a.descriptionArray[b];a.link.href=a.linkArray[b];if(a.title!=null)a.title.innerHTML=a.titleArray[b];if(a.description!=null)a.description.innerHTML=a.descriptionArray[b];a.imageNext.src=a.pictureArray[c];a.imagePrev.src=a.pictureArray[d]}function ShowOnePic(a){ULSjYp:;if(a.text!=null){a.text.style.filter="alpha(opacity=100)";a.text.style.opacity=1}a.image.src=a.pictureArray[0];a.image.height=a.heightArray[0];a.image.width=a.widthArray[0];a.image.alt=a.descriptionArray[0];a.link.href=a.linkArray[0];a.image.style.filter="alpha(opacity=100)";a.image.opacity=1;if(a.title!=null)a.title.innerHTML=a.titleArray[0];if(a.description!=null)a.description.innerHTML=a.descriptionArray[0]}function ChangePic(a){ULSjYp:;if(a.index==-1){a.index++;ShowPic(a);if(a.filters&&a.filters.length>0){a.image.style.filter="alpha(opacity=100)";a.image.opacity=1;if(a.text!=null){a.text.style.filter="alpha(opacity=100)";a.text.opacity=1}a.timeout=setTimeout(function(){ULSjYp:;ChangePic(a)},a.speed*1e3)}else a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,1)},1);return}if(a.filters&&a.filters.length>0){if(!a.imageNext.complete){a.timeout=setTimeout(function(){ULSjYp:;ChangePic(a)},10);return}a.cell.style.filter=a.transition;if(a.text!=null)a.text.style.filter=a.transition;a.cell.filters[0].Apply();a.text!=null&&a.text.filters[0].Apply();if(++a.index==a.pictureArray.length)a.index=0;ShowPic(a);a.cell.filters[0].Play();a.text!=null&&a.text.filters[0].Play();a.timeout=setTimeout(function(){ULSjYp:;ChangePic(a)},(a.speed+a.transitionTime)*1e3)}else{a.image.style.filter="alpha(opacity=0)";a.image.style.opacity=0;if(a.text!=null){a.text.style.filter="alpha(opacity=0)";a.text.style.opacity=0}if(++a.index==a.pictureArray.length)a.index=0;ShowPic(a);a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,1)},1)}}function SSFade(a,b){ULSjYp:;if(a.opacity>0&&b==-1||a.opacity<1&&b==1){a.image.style.filter="alpha(opacity="+100*a.opacity+")";a.image.style.opacity=a.opacity;if(a.text!=null){a.text.style.filter="alpha(opacity="+100*a.opacity+")";a.text.style.opacity=a.opacity}a.opacity+=b*.01;a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,b)},1)}else if(b==1)a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,-1)},a.speed*1e3);else if(b==-1)a.timeout=setTimeout(function(){ULSjYp:;ChangePic(a)},1)}function NextPrevious(a,b){ULSjYp:;clearTimeout(a.timeout);if(a.index==-1)a.index++;if(b){if(!a.filters||a.cell.filters&&(a.cell.filters.length==0||a.cell.filters[0].status==0))if(++a.index>=a.pictureArray.length)a.index=0}else if(--a.index<=-1)a.index=a.pictureArray.length-1;if(a.filters&&a.filters.length>0){ShowPic(a);if(a.cell.filters.length>0){a.cell.filters[0].enabled=false;if(a.text!=null)a.text.filters[0].enabled=false}if(!a.paused)a.timeout=setTimeout(function(){ULSjYp:;ChangePic(a)},a.speed*1e3)}else{ShowPic(a);a.image.style.filter="alpha(opacity=100)";a.image.style.opacity=1;if(a.text!=null){a.text.style.filter="alpha(opacity=100)";a.text.style.opacity=1}if(!a.paused)a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,-1)},a.speed*1e3)}}function PlayPause(a){ULSjYp:;var b="/_layouts/images/";if(!a.paused){clearTimeout(a.timeout);a.paused=true;if(a.filters&&a.filters.length>0){if(a.cell.filters&&a.cell.filters.length>0&&a.cell.filters[0].status!=0)if(--a.index<0)a.index=a.pictureArray.length-1;ShowPic(a);if(a.cell.filters.length>0){a.cell.filters[0].enabled=false;if(a.text!=null)a.text.filters[0].enabled=false}}else{a.image.style.filter="alpha(opacity=100)";a.image.style.opacity=1;if(a.text!=null){a.text.style.filter="alpha(opacity=100)";a.text.style.opacity=1}}if(!fRTL)a.playpause.src=b+"plplay1.gif";else a.playpause.src=b+"plplayr1.gif";a.playpause.alt=L_SlideShowPlayButton_Text;a.playpausePreload.src=b+"plpause1.bmp"}else{a.paused=false;a.playpause.src=b+"plpause1.gif";a.playpause.alt=L_SlideShowPauseButton_Text;if(!fRTL)a.playpausePreload.src=b+"plplay1.gif";else a.playpausePreload.src=b+"plplayr1.gif";if(a.filters&&a.filters.length>0)ChangePic(a);else a.timeout=setTimeout(function(){ULSjYp:;SSFade(a,-1)},a.speed*1e3)}}function SlideshowObject(a,d,h,f,c,e,g,i,b,j){ULSjYp:;this.text=document.getElementById(a+"text");this.cell=document.getElementById(a+"cell");this.image=document.getElementById(a+"curr");this.link=document.getElementById(a+"link");this.imageNext=document.getElementById(a+"next");this.imagePrev=document.getElementById(a+"prev");this.title=document.getElementById(a+"title");this.description=document.getElementById(a+"desc");this.pictureArray=d;this.linkArray=h;this.titleArray=f;this.descriptionArray=c;this.heightArray=e;this.widthArray=g;this.index=-1;this.opacity=0;this.speed=i;this.mode=j;this.timeout=null;this.paused=false;this.playpause=document.getElementById(a+"playpause");this.playpausePreload=document.getElementById(a+"pp");this.transitionTime=b;this.transition="progid:DXImageTransform.Microsoft.Fade(duration="+b+");";if(this.image.filters)this.filters=true;else this.filters=false}function CListInfo(c,b,a){ULSjYp:;if(c>=160&&c<1280)this.webImageWidth=c;else this.webImageWidth=640;if(b>=160&&b<1280)this.webImageHeight=b;else this.webImageHeight=640;if(a>=20&&a<=this.webImageWidth&&a<=this.webImageHeight)this.thumbnailSize=a;else this.thumbnailSize=160}function CreateDerivedImageUrl(b,c){ULSjYp:;var a=b.replace(/\.([^\.]+)$/,"_$1");a=a+".jpg";a=a.replace(/\/([^\/]+)$/,c+"$1");return a}function EncodedThumbnailImage(a){ULSjYp:;if(a==null||items[a]==null)return;if(items[a].objType==1)return items[a].thumbnail;else if(items[a].fUnknownImageType==true)return items[a].thumbnail;else{var b=CreateDerivedImageUrl(items[a].originalImg,"/_t/");return b}}function GetAltText(a){ULSjYp:;if(a==null||items[a]==null)return;return items[a].alt}function EncodedWebImage(a){ULSjYp:;if(a==null||items[a]==null)return;if(items[a].objType==1)return items[a].webimage;else if(items[a].fUnknownImageType==true)return items[a].webimage;else{var b=CreateDerivedImageUrl(items[a].originalImg,"/_w/");return b}}function ViewEmptyScript(c,a,b){ULSjYp:;listInfo=new CListInfo(c,a,b);fEmptyView=true;InitViewUrls();InitItems();AddSelectAllCheckbox();return}function WebFolderViewInit(a){ULSjYp:;if(browseris.ie5up&&browseris.win){fWebFldrView=true;InitViewUrls();vCurrentListID=a;InitSelection()}}function GotoInfoPage(b){ULSjYp:;if(b==null||b=="")return;var a=GetLayoutUrl()+"infopage.aspx?List="+vCurrentListID;a+="&reason="+b;var c=GetUrlKeyValue("RootFolder",true);if(c!="")a+="&RootFolder="+c;if(window.frameElement!=null&&window.frameElement.commitPopup!=null)a+="&IsDlg=1";window.location.href=a}function MakeFullUrl(b,c){ULSjYp:;var a=unescapeProperly(b);if(0==a.indexOf("http://")||0==a.indexOf("https://"))return a;else return c+a}function StartOIS(c){ULSjYp:;var b=false;try{var a=new ActiveXObject("OISCTRL.OISClientLauncher");if(a){b=true;a.LaunchOIS(c)}}catch(d){}return b}function PLMultipleUploadView(){ULSjYp:;if(vCurrentListUrlAsHTML=="")return false;var h=vCurrentListUrlAsHTML.substring(0,vCurrentListUrlAsHTML.length-1),i=h.lastIndexOf("/");if(i==-1)return false;var c=h.substring(0,i),f=c.indexOf("://");if(f==-1)return false;var e=c,g=c.indexOf("/",f+3);if(g!=-1)e=c.substring(0,g);var a,d="";if(document.getElementById("destination")!=null)a=document.getElementById("destination").value;if(a==null||a=="")d=GetUrlKeyValue("RootFolder",true);var b=false;if(a!="")b=StartOIS('ois.exe /upload "'+MakeFullUrl(a,e)+'"');else if(d!="")b=StartOIS('ois.exe /upload "'+MakeFullUrl(d,e)+'"');else b=StartOIS('ois.exe /upload "'+vCurrentListUrlAsHTML+'"');if(!b)return false;GotoInfoPage("uploading");return true}function _EditSelectedImages(){ULSjYp:;if(!browseris.ie||!browseris.win){alert(L_IEOnlyFeature_Text);return}if(!fImglibDefautlView){alert(L_NotOurView_Text);return}if(tbPreview==null){alert(L_NotAvailableOnWebPart_Text);return}var a=MakeSelectionStr();a=a.replace(/\;/g," ");if(a==""){alert(L_NoImageSelected_Text);return}if(vCurrentListUrlAsHTML=="")return;var b="ois.exe /editSP ";b+='"'+vCurrentListUrlAsHTML+'" '+a;if(StartOIS(b)){fEditingInProcess=true;SaveSelection();GotoInfoPage("editing")}else GotoInfoPage("noclient")}function EditSingleImage(b){ULSjYp:;if(!browseris.ie||!browseris.win){alert(L_IEOnlyFeature_Text);return}if(b=="")return;if(vCurrentListUrlAsHTML=="")return;var a="ois.exe /editSP ";a+='"'+vCurrentListUrlAsHTML+'" '+b;if(StartOIS(a)){fEditingInProcess=true;SaveSelection();GotoInfoPage("editing")}else GotoInfoPage("noclient")}function SendImagesCore(a,b){ULSjYp:;if(!browseris.ie||!browseris.win){alert(L_IEOnlyFeature_Text);return true}if(a==""){alert(L_NoImageSelected_Text);return true}var c='ois.exe /sendto "'+b+'" '+a;return StartOIS(c)}function _SendImages(){ULSjYp:;if(!browseris.ie||!browseris.win){alert(L_IEOnlyFeature_Text);return}if(!fImglibDefautlView){alert(L_NotOurView_Text);return}if(tbPreview==null){alert(L_NotAvailableOnWebPart_Text);return}var a=MakeSelectionStr();if(a==""){alert(L_NoImageSelected_Text);return}if(vCurrentListUrlAsHTML=="")return;!SendImagesCore(a,vCurrentListUrlAsHTML)&&GotoInfoPage("noclient")}function _DownloadImages(){ULSjYp:;if(!browseris.ie||!browseris.win){alert(L_IEOnlyFeature_Text);return}if(!fImglibDefautlView){alert(L_NotOurView_Text);return}if(tbPreview==null){alert(L_NotAvailableOnWebPart_Text);return}var b=MakeSelectionStr();if(b==""){alert(L_NoImageSelected_Text);return}var a=GetLayoutUrl()+"Dladvopt.aspx?List="+vCurrentListID+"&SelectedIds="+b+"&ViewUI=1",c=GetUrlKeyValue("RootFolder",true);if(c!="")a+="&RootFolder="+c;window.location.href=a}function GetLayoutUrl(){ULSjYp:;if(vCurrentWebUrl!="")return vCurrentWebUrl+"/_layouts/";return "../../_layouts/"}function DownloadOriginalImage(a){ULSjYp:;if(tbPreview==null){alert(L_NotAvailableOnWebPart_Text);return}if(a==null||items[a]==null||items[a].objType!=0)return;var b=GetLayoutUrl()+"download.aspx?List="+vCurrentListID+"&ItemId="+a+"&Version=0";window.location.href=b}function GetLinks(a){ULSjYp:;if(browseris.ie)return document.getElementById(a);else return document.links[a]}function InitImglibView(a){ULSjYp:;vCurrentListID=a}function RedirectToCorrectSelectView(){ULSjYp:;fRecursive=true;fSelectedView=false;InitSelection();LoadSelection();var a=window.location.href,c=a.indexOf("?"),e="",b="";if(c!=-1){e=a.substring(c+1,a.length);b=a.substring(0,c)}else b=a;sortField=/SortField=[^&]*/i;sortDir=/SortDir=[^&]*/i;var f=e.match(sortField),g=e.match(sortDir),d=MakeSelectionStr();if(d=="")d="none";b+="?View="+currentViewGuid+"&FilterName=ID&FilterMultiValue="+d;if(f!=null&&g!=null)b+="&"+f+"&"+g;window.open(b,"_self","",true)}function InitViewUrls(){ULSjYp:;var a=window.location.href,c=a.indexOf("?"),b="",d="";if(c!=-1){b=a.substring(c+1,a.length);d=a.substring(0,c)}else d=a;if(!browseris.ie5up||!browseris.win)if(fSelectedView){alert(L_SelectedViewError_Text);var h=d.replace(/\/forms\/[^\/]*$/i,"/");window.location.href=h;return}currentRootFolder=b.match(/RootFolder=[^&]*/);var f=b.split("&"),g=b.match(/View=([^&]*)&FilterName=ID&FilterMultiValue=([^&]*)/),i=false;if(fSelectedView)if(g!=null)filterIdsStr=g[1];else RedirectToCorrectSelectView();b="";for(var e=0;e<f.length;e++)if(f[e].match(/Filter=1/))fFilterOn=true}function SwitchViewStyle(a){ULSjYp:;if(a==currentViewStyle||fEmptyView)return;if(tbPreview!=null){if(a=="filmstrip"){document.getElementById("contentfilmstrip").style.display="block";document.getElementById("contentthumbnail").style.display="none";document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.style.display="none";if(stripSize>0){var b=document.getElementById("fstb0");b!=null&&b.focus()}}else if(a=="thumbnail"){document.getElementById("contentfilmstrip").style.display="none";document.getElementById("contentthumbnail").style.display="block";document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.style.display="none"}else{document.getElementById("contentfilmstrip").style.display="none";document.getElementById("contentthumbnail").style.display="none";document.getElementById("selectionCacheMgr").parentNode.parentNode.style.display="block";document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.style.display="block"}currentViewStyle=a;if(currentViewStyle=="list")tbPreview.style.display="block";else tbPreview.style.display="none"}InitSelection()}function NextSelectionOverLimit(a){ULSjYp:;if(unverifiedSelectionIdsCount+verifiedSelectionIdsCount+a>selectionLimit)return true;return false}function ToggleSelection(a){ULSjYp:;if(tbPreview==null)return;if(a<0||items[a]==null)return;if(items[a].fSelected==false)if(NextSelectionOverLimit(1)){UIChange(a,false);alert(L_ExceedSelectionLimit_Text);return false}else{items[a].fSelected=true;verifiedSelectionIdsCount++;UIChange(a,true)}else{items[a].fSelected=false;verifiedSelectionIdsCount--;UIChange(a,false)}SaveSelection();ConstructSelectionHref()}function ToggleSelectionAll(){ULSjYp:;if(tbPreview==null)return;for(var c=!fAllSelected,b=0,a=0;a<ids.length;a++)if(items[ids[a]].objType!=1&&items[ids[a]].fSelected!=c)b++;if(c){if(NextSelectionOverLimit(b)){alert(L_ExceedSelectionLimit_Text);return}verifiedSelectionIdsCount=verifiedSelectionIdsCount+b}else verifiedSelectionIdsCount=verifiedSelectionIdsCount-b;for(a=0;a<ids.length;a++)if(items[ids[a]].objType!=1){items[ids[a]].fSelected=c;UIChange(ids[a],c)}SaveSelection();ConstructSelectionHref()}function ConstructSelectionHref(){ULSjYp:;var b=MakeSelectionStr();if(b=="")b="none";var a=document.getElementById("cbxSelectAll");if(a!=null)if(fAllSelected)a.src=ctx.imagesPath+"checkall.gif";else a.src=ctx.imagesPath+"unchecka.gif"}function LoadSelection(){ULSjYp:;if(!fInitSelection)if(window.ActiveXObject)try{selectionCacheMgr.load("OISSelectionStore")}catch(i){return}else return;selectedIdsStr="";var f=false;if(selectionCacheMgr.getAttribute("listGuid")&&vCurrentListID!=""){savedListGuid=selectionCacheMgr.getAttribute("listGuid");if(savedListGuid!=vCurrentListID)f=true}if(selectionCacheMgr.getAttribute("cachedValue")&&!f){selectedIdsStr=selectionCacheMgr.getAttribute("cachedValue");selectionCacheMgr.innerText=selectedIdsStr;var c=selectedIdsStr.split(";"),h=c.length;selectedIdsStr="";unverifiedSelectionIdsCount=0;verifiedSelectionIdsCount=0;for(var a=0;a<h;a++){var d=parseInt(c[a]),e=false,b;if(isNaN(d))continue;for(b=0;b<ids.length;b++)if(ids[b]==d){if(!NextSelectionOverLimit(1)){items[ids[b]].fSelected=true;verifiedSelectionIdsCount++;UIChange(d,true)}e=true;break}if(!e&&!fSelectedView)if(!NextSelectionOverLimit(1)){if(selectedIdsStr=="")selectedIdsStr=c[a];else selectedIdsStr+=";"+c[a];unverifiedSelectionIdsCount++}}}var g=selectionCacheMgr.getAttribute("Reload");if(g=="1")fNeedReload=true}function InitSelection(){ULSjYp:;if(window.ActiveXObject)try{selectionCacheMgr.load("OISSelectionStore")}catch(c){if(!fInitAttempted){fInitAttempted=true;setTimeout("InitSelection()",500)}return}else return;fInitSelection=true;if(!fInitViewStyle){fInitViewStyle=true;var a="thumbnail";if(selectionCacheMgr.getAttribute("viewStyle")){var a=selectionCacheMgr.getAttribute("viewStyle");if(a!="list"&&a!="filmstrip")a="thumbnail";if(fFilterOn||fIsInGroupByView)a="list"}if(!fWebFldrView)if(!fRecursive){SwitchViewStyle(a);a=="filmstrip"&&ClickFrame(currentPicture)}else currentViewStyle=a;else currentViewStyle=a}LoadSelection();var b=fNeedReload;fNeedReload=false;SaveSelection();b&&window.location.reload(true);ConstructSelectionHref();return}function ClearSelections(){ULSjYp:;if(!fInitSelection)return;selectedIdsStr="";for(var a=0;a<ids.length;a++){items[ids[a]].fSelected=false;UIChange(ids[a],false)}SaveSelection();ConstructSelectionHref()}function GetSelectionCount(){ULSjYp:;for(var b=0,a=0;a<ids.length;a++)if(items[ids[a]].fSelected==true)b++;return b}function MakeSelectionStr(){ULSjYp:;var b=selectedIdsStr,a;fAllSelected=true;for(a=0;a<ids.length;a++)if(items[ids[a]].fSelected==true)if(b=="")b=""+ids[a];else b+=";"+ids[a];else if(items[ids[a]].objType==0)fAllSelected=false;return b}var expirationInMilSeconds=6.048e8;function SaveSelection(){ULSjYp:;if(browseris.ie5up&&browseris.win&&fInitSelection){selectionCacheMgr.setAttribute("cachedValue",MakeSelectionStr());selectionCacheMgr.setAttribute("viewStyle",currentViewStyle);selectionCacheMgr.setAttribute("listGuid",vCurrentListID);if(fEditingInProcess)selectionCacheMgr.setAttribute("Reload","1");else selectionCacheMgr.setAttribute("Reload","0");var a=new Date;a.setTime(a.getTime()+expirationInMilSeconds);var b=a.toUTCString();selectionCacheMgr.expires=b;selectionCacheMgr.save("OISSelectionStore")}return}function RemoveQueryParameterFromUrl(a,c){ULSjYp:;var d=new RegExp("[&?]"+c+"=[^&]*","");a=a.replace(d,"");if(a.indexOf("?")==-1){var b=a.indexOf("&");if(b!=-1)a=a.substring(0,b)+"?"+a.substring(b+1)}return a}function CreateRootFolderHref(b){ULSjYp:;if(b==null||items[b]==null)return "";if(items[b].objType!=1)return "";var a=window.location.href;if(!ctx.recursiveView){var c="RootFolder="+escapeProperly(unescapeProperly(items[b].originalImg));if(-1==a.indexOf("?"))a=a+"?"+c;else if(a.match(/RootFolder=/))a=a.replace(/RootFolder=[^&]*/,c);else a=a+"&"+c}a=a.replace(/&p_\w+=[^&]*/g,"");a=a.replace(/&PageFirstRow=[^&]*/,"");a=RemoveQueryParameterFromUrl(a,"View");a=a.replace(/\?Paged=TRUE&/,"?");if(-1==a.indexOf("?"))return a+"?View="+currentViewGuid;else return a+"&View="+currentViewGuid}function DisplayItemUrl(b){ULSjYp:;if(b==null||items[b]==null)return "";if(items[b].objType==1)return CreateRootFolderHref(b);else if(items[b].fUnknownImageType==true)return items[b].originalImg;else{var c="";if(urlCmdForDisplay==null)return;c=urlCmdForDisplay+"&ID="+b;c+="&Source="+GetSource();var d=document.getElementById("title"+b);if(d!=null){var a=GetAttributeFromItemTable(d.parentNode.parentNode,"DRef","FileDirRef");if(a!=null&&a!=""){if(a.charAt(0)!="/")a="/"+a;a=escapeProperly(a);c=c.replace(/RootFolder=[^&]*&/,"");c=c+"&RootFolder="+a}}return c}}function CallDisplayItem(a){ULSjYp:;if(a==null||items[a]==null)return;window.location.href=DisplayItemUrl(a)}function DisplayItemOnFileRef(a){ULSjYp:;if(!browseris.ie5up||!browseris.win){CallDisplayItem(a);return false}event.cancelBubble=true;if(browseris.ie55up){CallDisplayItem(a);return false}else{CallDisplayItem(a);return true}}function CallEditItem(e){ULSjYp:;var b="";if(urlCmdForDisplay==null)return;b=urlCmdForDisplay+"&ID="+e;b+="&Source="+GetSource();var d=document.getElementById("title"+e);if(d!=null){var a=GetAttributeFromItemTable(d.parentNode.parentNode,"DRef","FileDirRef");if(a!=null&&a!=""){if(a.charAt(0)!="/")a="/"+a;a=escapeProperly(a);b=b.replace(/RootFolder=[^&]*&/,"");b=b+"&RootFolder="+a}}var c=b.replace(/dispform\.aspx/i,"EditForm.aspx");if(c!="")window.location.href=c}function _DeleteImages(){ULSjYp:;if(tbPreview==null){alert(L_NotAvailableOnWebPart_Text);return}if(!fImglibDefautlView){alert(L_NotOurView_Text);return}var d=MakeSelectionStr();if(d==""){alert(L_NoImageSelected_Text);return}if(GetLayoutUrl()=="")return;var b=false;if(GetSelectionCount()>1){if(confirm(ctx.RecycleBinEnabled?L_RecycleMultipleItems_Text:L_DeleteMultipleItems_Text))b=true}else if(confirm(ctx.RecycleBinEnabled?L_RecycleSingleItem_Text:L_DeleteSingleItem_Text))b=true;if(b){var c=GetLayoutUrl()+"DeleteMu.aspx";c+="?List="+vCurrentListID+"&SelectedIds="+MakeSelectionStr()+"&Source="+GetSource();var a=document.forms[MSOWebPartPageFormName];if(null!=a){ClearSelections();a.action=c;a.method="POST";a.submit()}}}function GetUint(b){ULSjYp:;var a=parseInt(b.replace(/,/g,""));if(a>0)return a;return 0}function GetScaleRatio(g,f,e,d){ULSjYp:;var b=e*1/g,c=d*1/f,a=b>c?c:b;if(a>1)a=1;return a}function GetHeight(d,a,e,c){ULSjYp:;if(d==0||a==0)return c;var b=a*GetScaleRatio(d,a,e,c);if(b<1)return 1;else return b}function GetWidth(a,d,e,c){ULSjYp:;if(a==0||d==0)return c;var b=a*GetScaleRatio(a,d,e,c);if(b<1)return 1;else return b}function UIChangeList(a,c){ULSjYp:;if(a<0||items[a]==null)return;if(items[a].objType!=0)return;var d=document.getElementById("cbx_"+a);if(d!=null)d.checked=c;if(!browseris.ie5up||!browseris.win)return;var b=document.getElementById("row"+a);if(b!=null)if(c==true)b.className="ms-imglibselectedrow s4-itm-selected";else b.className=""}function MouseOverRow(a){ULSjYp:;if(tbPreview==null)return;if(FILIsMenuShown()==1)return;if(timedItem!=a){previewTimer>=0&&clearTimeout(previewTimer);previewTimer=setTimeout("HiLiteRow("+a+")",200);timedItem=a}}function MouseOutRow(a){ULSjYp:;if(tbPreview==null)return;if(FILIsMenuShown()==1)return;if(previewTimer>=0&&timedItem==a){clearTimeout(previewTimer);previewTimer=-1;timedItem=-1}}function HiLiteRow(a){ULSjYp:;if(!fImglibDefautlView)return;if(fInit==false){InitItems();fInit=true}if(a<0||items[a]==null)return;if(tbPreview==null)return;previewedId=a;if(tbImg){tbImg.src=EncodedThumbnailImage(a);if(items[a].alt==null||items[a].alt=="")tbImg.alt=picturePreviewAlt;else tbImg.alt=items[a].alt;tbImg.width=GetWidth(items[a].imgWidth,items[a].imgHeight,120,90);tbImg.height=GetHeight(items[a].imgWidth,items[a].imgHeight,120,90)}if(tbTitle)tbTitle.innerHTML=items[a].caption;if(!browseris.ie5up||!browseris.win)return;var b=document.getElementById("title"+a);if(b!=null){if(hilitedRow==b)return;else if(hilitedRow!=null){hilitedRow.children[1].style.visibility="hidden";hilitedRow.parentNode.parentNode.className="ms-unselectedtitle"}hilitedRow=b;b.children[1].className="ms-menuimagecell";b.children[1].style.visibility="visible";b.parentNode.parentNode.className="ms-selectedtitle"}}function ClickRow(a){ULSjYp:;if(!fImglibDefautlView)return;if(tbPreview==null)return;if(a<0||items[a]==null)return;if(browseris.ie){if(event==null)event=window.event;if(event!=null)event.cancelBubble=true}HiLiteRow(a);ILShowMenu(a)}function ContextMenuOnRow(a){ULSjYp:;if(!browseris.ie55up||!browseris.win)return true;if(event.srcElement.tagName=="A")return true;ClickRow(a);return false}function FILIsMenuShown(){ULSjYp:;if(!browseris.ie5up||!browseris.win)return false;if(lastMenuId=="")return 0;var b=document.getElementById(lastMenuId);if(b!=null){var a=false;if(window.ActiveXObject)try{a=b.isOpen()}catch(c){}if(!a)lastMenuId="";return a}return 0}function ILShowMenu(a){ULSjYp:;if(!browseris.ie5up||!browseris.win)return;if(!browseris.ie55up){CallEditItem(a);return}var d="plmenu_"+a,b=document.getElementById(d);if(b==null)b=CMenu(d);else b.innerHTML="";currentItemID=a.toString();currentItemFileUrl=items[a].originalImg;currentItemFSObjType=items[a].objType;currentItemPermMaskH=null;itemId=a;var c=document.getElementById("title"+a);if(c!=null){currentItemCheckedOutUserId=c.COUId;itemTable=c.parentNode.parentNode;if(items[a].fUnknownImageType==false)itemTable.IsImage="1";else if(items[a].objType!=1)itemTable.IsImage=""}ctx.isWebEditorPreview=0;AddDocLibMenuItems(b,ctx);lastMenuId=d;if(c!=null)OMenu(b,c.parentNode.parentNode);else OMenu(b,window.event.srcElement.parentNode)}function InitItems(){ULSjYp:;tbImg=document.getElementById("ImgPreviewThumbnail");if(tbImg!=null)picturePreviewAlt=tbImg.alt;if(browseris.ie){tbPreview=document.getElementById("ImgPreviewTable");tbTitle=document.getElementById("lnkPreviewTitle")}else{if(browseris.nav6up){tbPreview=document.getElementById("ImgPreviewTable");if(tbPreview!=null)tbPreview.style.display="block"}tbTitle=document.anchors["lnkPreviewTitle"]}}function AddSelectAllCheckbox(){ULSjYp:;var a=document.getElementById("diidHeaderImageSelectedFlag");if(a==null)return;var b=null;if(browseris.nav6up)b=a.parentNode;else b=a.parentNode;if(b==null||b.tagName.toLowerCase()!="th")return;if(firstIdWithCheckbox==-1)b.innerHTML="";else{b.innerHTML="<a href='Javascript:ToggleSelectionAll()' onclick='ToggleSelectionAll();return false;'><img style='border:0' src='"+ctx.imagesPath+"unchecka.gif' id='cbxSelectAll' alt='"+L_SelectAll_Text+"' /></a>";var c=document.getElementsByName("selectionCheckBox");if(c==null)return;for(i=0;i<c.length;i++){var a=c[i];if(a!=null){a.disabled=false;a.style.visibility="visible";if(browseris.ie){a.parentNode.width=30;a.style.height=18}}}}}function ClickPreview(){ULSjYp:;CallDisplayItem(previewedId)}function ClickThumbnail(a){ULSjYp:;CallDisplayItem(a)}function UIChangeThumbnail(a,b){ULSjYp:;if(items[a]==null||items[a].objType!=0)return;var d=document.getElementById("tb_"+a);if(null==d)return;var c=document.getElementById("cbxTB_"+a);if(c!=null)c.checked=b;var e=d.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;if(b)CoreInvoke("AddCssClassToElement",e,"ms-imglibthumbnail-selected");else CoreInvoke("RemoveCssClassFromElement",e,"ms-imglibthumbnail-selected")}function CreateTile(b){ULSjYp:;var c=listInfo.thumbnailSize+10,a="";if(!browseris.ie)return;else{if(FV4UI())a+="<div class='thumbnail'>";else a+="<span class='thumbnail'>";a+="<table style='display:inline;'><tr height='"+(2+c)+"'><td  width='"+c+"' class='ms-imglibthumbnail' align='center'>";a+="<table border='0' cellspacing='2' cellpadding='0' class='ms-imglibthumbnail'><tr height='"+(listInfo.thumbnailSize+4)+"'><td width='"+(listInfo.thumbnailSize+4)+"' align='center' verticalAlign='middle'>";a+="<a href='#' onclick='ClickThumbnail("+b+")'><img class='thumbnail' height='"+GetHeight(items[b].imgWidth,items[b].imgHeight,listInfo.thumbnailSize,listInfo.thumbnailSize)+"' id='tb_"+b+"' src='"+items[b].thumbnail+"' style='border:0' alt='";if(items[b].alt!="")a+=STSHtmlEncode(items[b].alt);else if(items[b].objType!=0)a+=L_FolderAlt_Text;else if(items[b].fUnknownImageType==true)a+=L_DocumentAlt_Text;else a+=L_ImgAlt_Text;a+="'></img></a>";a+="</td></tr></table>";a+="</td></tr><tr height='0'><td valign='top' nowrap='nowrap'";if(browseris.ie55up)a+=">";else a+=" dir="+listDirection+">";if(items[b].objType!=1)a+="<input type='checkbox' id='cbxTB_"+b+"' onclick='ToggleSelection("+b+")'>";else a+="&nbsp";a+="<span style='width:"+(listInfo.thumbnailSize-20)+"px;display:inline-block;text-wrapping:nowrap;overflow:hidden;text-overflow:ellipsis'><label for='cbxTB_"+b+"'>"+items[b].caption+"</label></span>";a+="</td></tr></table>";if(FV4UI())a+="</div>";else a+="</span>";a+="\n";document.write(a)}}function UIChangeFilmstrip(d,c){ULSjYp:;for(var a=currentPicture;a<currentPicture+stripSize;a++)if(ids[a]==d)break;if(a>=currentPicture+stripSize)return;var b=document.getElementById("cbxFS_"+(a-currentPicture));if(b!=null&&b.tagName.toLowerCase()=="input")b.checked=c}function LoadNextPicture(h){ULSjYp:;event.cancelBubble=true;if(ids.length<=stripSize)return;var a=null;if(currentStrip>=0&&currentStrip<stripSize){a=document.getElementById("fstb"+currentStrip);if(a!=null)a.parentNode.className="ms-imglibthumbnail"}if(h==1){if(currentPicture+stripSize>=ids.length)return;currentPicture=currentPicture+1;currentStrip=currentStrip-1}else{if(currentPicture<=0)return;currentPicture=currentPicture-1;currentStrip=currentStrip+1}for(var d=0;d<stripSize;d++){var b=ids[currentPicture+d],a=document.getElementById("fstb"+d);if(a!=null){a.src=EncodedThumbnailImage(b);a.height=GetHeight(items[b].imgWidth,items[b].imgHeight,96,96);a.width=GetWidth(items[b].imgWidth,items[b].imgHeight,96,96);if(items[b].alt!="")a.alt=items[b].alt;else if(items[b].objType!=0)a.alt=L_FolderAlt_Text;else if(items[b].fUnknownImageType==true)a.alt=L_DocumentAlt_Text;else a.alt=L_ImgAlt_Text}var c=document.getElementById("cbxFS_"+d);if(c!=null&&c.tagName.toLowerCase()=="input")if(items[b].objType!=0){c.style.display="none";c.checked=false}else{c.style.display="inline";c.checked=items[b].fSelected}var f=document.getElementById("title_"+d);if(f!=null)f.innerHTML=items[b].caption}var g,e;if(fRTL){g=ctx.imagesPath+"plslforw.gif";e=ctx.imagesPath+"plslback.gif"}else{g=ctx.imagesPath+"plslback.gif";e=ctx.imagesPath+"plslforw.gif"}if(currentPicture==0)document.getElementById("backgif").parentNode.parentNode.style.display="none";else document.getElementById("backgif").parentNode.parentNode.style.display="block";if(currentPicture+stripSize>=ids.length)document.getElementById("forwardgif").parentNode.parentNode.style.display="none";else document.getElementById("forwardgif").parentNode.parentNode.style.display="block";if(currentStrip>=0&&currentStrip<stripSize){a=document.getElementById("fstb"+currentStrip);if(a!=null)a.parentNode.className="ms-imglibthumbnail-selected"}return false}function ClickFrame(e){ULSjYp:;if(e<0||e>=stripSize)return false;var a=ids[currentPicture+e];previewedId=a;var c=null;if(currentStrip>=0&&currentStrip<stripSize){c=document.getElementById("fstb"+currentStrip);if(c!=null)c.parentNode.className="ms-imglibthumbnail"}currentStrip=e;c=document.getElementById("fstb"+currentStrip);if(c!=null){c.parentNode.className="ms-imglibthumbnail ms-imglibthumbnail-selected";c.focus()}var b=document.getElementById("CurrentPic");if(b!=null){var i=0;b.style.visibility="hidden";if(browseris.ie55up&&browseris.win&&items[a].objType!=1&&!items[a].fUnknownImageType){var f=document.getElementById("webImageSyncer");if(f!=null&&f.imagedata!=null){f.imagedata.src=EncodedWebImage(a);i=1}}if(i==0){b.src=EncodedWebImage(a);b.alt=GetAltText(a)}else window.setTimeout("document.getElementById('CurrentPic').src=EncodedWebImage("+a+"); document.getElementById('CurrentPic').alt=GetAltText("+a+");",500);b.height=GetHeight(items[a].imgWidth,items[a].imgHeight,448,448);b.width=GetWidth(items[a].imgWidth,items[a].imgHeight,448,448)}var d=GetLinks("OriginalPicLink"),g=GetLinks("OpenItemLink");if(d!=null){if(items[a].objType==1){var h=CreateRootFolderHref(a);if(h!="")d.href=h;document.getElementById("descrRow").style.visibility="hidden";b.alt=L_GotoFolder_Text}else{d.href=items[a].originalImg;document.getElementById("descrRow").style.visibility="visible";if(items[a].alt!="")b.alt=items[a].alt;else b.alt=L_AltViewProperty_Text}d.href=DisplayItemUrl(a)}if(g!=null)g.href=DisplayItemUrl(a);document.getElementById("titleSpan").innerHTML=items[a].caption;document.getElementById("descrSpan").innerHTML=items[a].description;if(items[a].fUnknownImageType&&items[a].objType==0){b.style.display="none";document.getElementById("noPreviewSpan").style.display="block"}else{b.style.display="block";document.getElementById("noPreviewSpan").style.display="none"}return false}function ToggleSelectedItem(a){ULSjYp:;if(a<0||a>=stripSize)return;currentPicture+a<ids.length&&ToggleSelection(ids[currentPicture+a])}function FilmstripTbKeyPressed(a){ULSjYp:;if(event.keyCode!=13)return true;event.cancelBubble=true;ClickFrame(a);return false}function FilmstripKeyPressed(){ULSjYp:;var a;if(event.keyCode==37)if(fRTL)a=1;else a=-1;else if(event.keyCode==39)if(fRTL)a=-1;else a=1;else return;if(currentStrip<0||currentStrip>=stripSize){if(a>0)ClickFrame(stripSize-1);else ClickFrame(0);return}var b=currentStrip+a;(b<0||b>=stripSize)&&LoadNextPicture(a==1);b=currentStrip+a;if(b<0||b>=stripSize){if(a>0)ClickFrame(stripSize-1);else ClickFrame(0);return}ClickFrame(b)}function CreateStrip(){ULSjYp:;var c,h=")' onkeydown='Javascript:FilmstripTbKeyPressed(",e=');\'><table style=\'cursor:hand\' width="108" border="0" cellspacing="0" cellpadding="0"><tr height="108"><td',f=' width="108" align="center" class="ms-imglibthumbnail"><img onclick=\'Javascript:ClickFrame(',l="); return false;'",g=" galleryimg='false' border=\"0\" alt='",i="' height=",j=" tabindex='0' id=fstb",m=" src='",n='\'></td><tr><td nowrap="nowrap"><input style=\'width:16\' type="checkbox" id=cbxFS_',o="><span style='overflow:hidden;text-overflow:ellipsis; width:90' id=title_",p="><label for=cbxFS_",k=">",q="</label></span></td></tr></table><td>",b,d=" style='display:none'";if(browseris.ie5up&&browseris.win)c="<td valign='top' onclick='ClickFrame(";else c="<td width='108' onclick='ClickFrame(";if(stripSize>ids.length)stripSize=ids.length;document.write("<table><tr>");for(var a=0;a<stripSize;a++){b=c+a+h+a+e;if(a==currentStrip)b+=" class='ms-imglibthumbnail-selected'";b+=f+a+l+a+g;if(items[ids[a]].alt!="")b+=STSHtmlEncode(items[ids[a]].alt);else if(items[ids[a]].objType==1)b+=L_FolderAlt_Text;else if(items[ids[a]].fUnknownImageType==true)b+=L_DocumentAlt_Text;else b+=L_ImgAlt_Text;b+=i+GetHeight(items[ids[a]].imgWidth,items[ids[a]].imgHeight,96,96)+j+a+m+items[ids[a]].thumbnail+n+a;b+=" onclick=ToggleSelectedItem("+a+")";if(items[ids[a]].objType==1)b+=d;b+=o+a+p+a+k+items[ids[a]].caption+q;document.write(b)}document.write("</tr></table>")}function UIChange(b,a){ULSjYp:;if(browseris.ie&&tbPreview!=null){UIChangeThumbnail(b,a);UIChangeFilmstrip(b,a)}UIChangeList(b,a)}function GenerateFooterContent(f,g){ULSjYp:;if(f=="thumbnail"){if(browseris.ie){var c='<table id="contentthumbnail"';if(!g)c+=" style='display:none;'";c+=' border="0" cellspacing="0" cellpadding="3" width=\'100%\'><tr><td';if(browseris.ie55up)c+=" dir="+listDirection+">";else c+=" dir=ltr>";document.write(c);for(j=0;j<ids.length;j++)CreateTile(ids[j]);document.write("</td></tr></table>")}}else if(f=="filmstrip"){if(currentPicture+stripSize>ids.length)currentPicture=ids.length-stripSize;if(currentPicture<0)currentPicture=0;currentStrip=0;var b=ids[currentPicture+currentStrip];previewedId=b;var a="<table id='contentfilmstrip' dir="+listDirection+" border='0' cellspacing='0' cellpadding='3' width='100%' onkeydown='Javascript:FilmstripKeyPressed()'";if(!g)a+="style='display:none'";a+="><tr>";var e,d,h="/blank.gif";if(fRTL){e="/forward.gif";d="/back.gif"}else{e="/back.gif";d="/forward.gif"}a+='<td valign="center" class="ms-imglibmenuarea" style=\'cursor:hand';if(currentPicture==0)a+="; display:none";a+="' onclick='Javascript:LoadNextPicture(0);'><a href='Javascript:LoadNextPicture(0)' onclick='Javascript:LoadNextPicture(0); return false;'><img id=\"backgif\" src='"+ctx.imagesPath+e+'\' border="0" alt="'+L_PreviousPicture_Text+'" /></a></td>';a+='<td nowrap="nowrap" align="center" width="100%">';document.write(a);CreateStrip();a='</td><td valign="center" class="ms-imglibmenuarea" style=\'cursor:hand';if(currentPicture+stripSize>=ids.length)a+="; display:none";a+="' onclick='Javascript:LoadNextPicture(1);'><a href='Javascript:LoadNextPicture(1)' onclick='Javascript:LoadNextPicture(1); return false;'><img id=\"forwardgif\" src='"+ctx.imagesPath+d+'\' border="0" alt="'+L_NextPicture_Text+'" /></a></td><tr>';a+='<tr><td align="center" colspan="3"><hr>';document.write(a);a='<table class="ms-descriptiontext"><tr height="336"><td valign="middle" align="center" width="448"><a id=\'OriginalPicLink\' name=\'OriginalPicLink\' href=\''+DisplayItemUrl(b)+"'>";a=a+"<img  onload='CurrentPic.style.visibility=\"visible\";' border=\"0\" tabindex='2' galleryimg='false' id='CurrentPic' name='CurrentPic' height="+GetHeight(items[b].imgWidth,items[b].imgHeight,448,448);a=a+" src='"+items[b].webimage+"'";if(items[b].alt!="")a=a+"alt='"+STSHtmlEncode(items[b].alt)+"'";else if(items[b].objType==1)a=a+"alt='"+L_GotoFolder_Text+"'";else a=a+"alt='"+L_AltViewProperty_Text+"'";a=a+'align="center" border="2"/></a>';a=a+"<span id=\"noPreviewSpan\" style='display:none;font-size:150%'>"+L_NoPreview_Text+"<br /><a id='OpenItemLink' name='OpenItemLink' href='"+DisplayItemUrl(b)+"'>"+L_OpenItem_Text+"</a></span>";a=a+'</td></tr><tr><td><table><tr><td valign="top">'+L_FileName_Text+': </td><td>&nbsp;</td><td width="300">';a=a+'<span id="titleSpan">'+items[b].caption+'</td></tr><tr id="descrRow"><td valign="top">';a=a+L_Description_Text+': </td><td>&nbsp;</td><td width="300"><span id="descrSpan">'+items[b].description+"</span></td></tr></table></td></tr></table></td></tr></table>";document.write(a)}}function ViewHeaderScript(a,d,b,c){ULSjYp:;if(a=="list"||a=="filmstrip")currentViewStyle=a;else currentViewStyle="thumbnail";listInfo=new CListInfo(d,b,c);InitViewUrls()}function ViewFooterScript(){ULSjYp:;InitItems();if(!browseris.ie5up||!browseris.win){if(firstId!=-1){var b="HiLiteRow("+firstId+")";window.setTimeout(b,200)}if(fSelectFieldAppeared)tbPreview!=null&&AddSelectAllCheckbox();return}fInit=true;if(tbPreview!=null){listDirection=document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.currentStyle.direction;if(listDirection!="rtl"&&listDirection!="RTL")listDirection="ltr";else{fRTL=true;var a=GetLinks("lnkPreviewTitle");if(a!=null)a.style.direction="RTL"}if(currentViewStyle=="thumbnail"){GenerateFooterContent("thumbnail",true);GenerateFooterContent("filmstrip",false);document.getElementById("selectionCacheMgr").parentNode.parentNode.style.display="none";document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.style.display="none"}else if(currentViewStyle=="filmstrip"){GenerateFooterContent("thumbnail",false);GenerateFooterContent("filmstrip",true);document.getElementById("selectionCacheMgr").parentNode.parentNode.style.display="none";document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.style.display="none"}else{GenerateFooterContent("thumbnail",false);GenerateFooterContent("filmstrip",false)}}if(firstId!=-1){HiLiteRow(firstId);if(tbPreview!=null)if(currentViewStyle=="list")tbPreview.style.display="block";else tbPreview.style.display="none";if(fSelectFieldAppeared)tbPreview!=null&&AddSelectAllCheckbox()}if(tbPreview!=null)if(browseris.verIEFull>=5.5&&browseris.iever<6&&browseris.win)setTimeout("InitSelection()",500);else browseris.ie5up&&browseris.win&&InitSelection()}function ViewPreBodyScript(a){ULSjYp:;document.write("<tr id='row"+a+"'>")}function ViewPostBodyScript(){ULSjYp:;document.write("</tr>")}var bTranState=0,slideshowInterval=5e3,slideshowIncremental=500,timerId=-1,fAutoRun=false,fRepeat=false,fRetry=0,fRetryLimit=2;function LoadNextSlide(){ULSjYp:;if(fNextImageLoaded==false&&fRetry<fRetryLimit){fRetry++;return}fRetry=0;if(currentPicture>=ids.length)if(!fRepeat)return;else currentPicture=0;pic1=document.getElementById("thisPic");if(browseris.ie5up&&browseris.win)pic1.style.visibility="hidden";pic1.src=EncodedWebImage(ids[currentPicture]);pic1.alt=GetAltText(ids[currentPicture]);pic1.height=GetHeight(items[ids[currentPicture]].imgWidth,items[ids[currentPicture]].imgHeight,listInfo.webImageWidth,listInfo.webImageHeight);pic1.width=GetWidth(items[ids[currentPicture]].imgWidth,items[ids[currentPicture]].imgHeight,listInfo.webImageWidth,listInfo.webImageHeight);document.getElementById("tdCaption").innerHTML=items[ids[currentPicture]].caption+"<br />";document.getElementById("tdDesc").innerHTML=items[ids[currentPicture]].description+"<br />";document.getElementById("tdImgDate").innerHTML=items[ids[currentPicture]].createdDate+"<br />";currentPicture++;document.getElementById("currentCount").innerHTML=""+currentPicture;if(currentPicture+1<ids.length){if(browseris.ie5up&&browseris.win)fNextImageLoaded=false;pic2=document.getElementById("nextPic");pic2.src=EncodedWebImage(ids[currentPicture+1])}}function AutoRun(){ULSjYp:;if(fAutoRun){LoadNextSlide();timerId=setTimeout("AutoRun()",slideshowInterval)}}function StartSlideShow(){ULSjYp:;if(fAutoRun)return;fAutoRun=true;timerId=setTimeout("AutoRun()",slideshowInterval)}function StopSlideShow(){ULSjYp:;PauseSlideShow();currentPicture=0;LoadNextSlide()}function PauseSlideShow(){ULSjYp:;if(fAutoRun){if(timerId!=-1){clearTimeout(timerId);timerId=-1}fAutoRun=false}}function ToggleRepeat(){ULSjYp:;fRepeat=!fRepeat}function NextSlide(){ULSjYp:;if(browseris.ie)event.bubble=false;PauseSlideShow();if(currentPicture<ids.length)if(currentPicture>=0){fRetry=fRetryLimit;LoadNextSlide()}}function PreviousSlide(){ULSjYp:;if(browseris.ie)event.bubble=false;PauseSlideShow();if(currentPicture>1){currentPicture--;currentPicture--;fRetry=fRetryLimit;LoadNextSlide()}}function HiliteButton(){ULSjYp:;if(!browseris.ie)return;var b=event.srcElement,a=b.src;a=a.replace(/1.gif$/g,"2.gif");b.src=a}function DemoteButton(){ULSjYp:;if(!browseris.ie)return;var b=event.srcElement,a=b.src;a=a.replace(/2.gif$/g,"1.gif");b.src=a}function ShowSlidePic(){ULSjYp:;if(browseris.ie5up&&browseris.win){var a=document.getElementById("thisPic");if(a!=null)a.style.visibility="visible"}}function SortIds(){ULSjYp:;var b=window.location.href,e=b.indexOf("?"),c="";if(e!=-1)c=b.substring(e+1,b.length);else return;var h=c.split("&"),f=c.match(/InstanceID=all&FilterName=ID&FilterMultiValue=([^&]*)/);if(f!=null)filterIdsStr=f[1];if(filterIdsStr==""||filterIdsStr==null)return;var a=[],g=filterIdsStr.split(";");for(i=0,j=0;i<g.length;i++){var d=parseInt(g[i]);if(d>=0&&items[d]!=null)a[a.length]=d}ids=a;a=null}function SlideShowContent(){ULSjYp:;if(ids.length==0)return;SortIds();if(currentPicture<0)currentPicture=0;if(currentPicture>=ids.length)currentPicture=ids.length-1;var a='<table cellspacing="0" cellpadding="0" valign="middle" align="center" width="100%" dir='+listDirection+' height="100%">';a+="<tr height="+listInfo.webImageHeight+">";a+='<td width="15">&nbsp;</td>';a+='<td id="cellImage" align="center" valign="middle" width='+listInfo.webImageWidth+">";a+="<img onload='ShowSlidePic();' id=\"thisPic\" galleryimg='false' src='"+items[ids[currentPicture]].webimage+"' alt='"+STSHtmlEncode(items[ids[currentPicture]].alt)+"' width="+GetWidth(items[ids[currentPicture]].imgWidth,items[ids[currentPicture]].imgHeight,listInfo.webImageWidth,listInfo.webImageHeight)+" height="+GetHeight(items[ids[currentPicture]].imgWidth,items[ids[currentPicture]].imgHeight,listInfo.webImageWidth,listInfo.webImageHeight)+">";var c="<img id=nextPic style='position:absolute;visibility:hidden' width=10 height=10";if(currentPicture+1<ids.length){c+=" src='"+items[ids[currentPicture+1]].webimage+"'";c+=" onload='fNextImageLoaded=true;'"}c+=" >";a+=c;a+="</td>";a+='<td width="15">&nbsp;</td><td valign="top"><table class="ms-formdescription" cellspacing="2">';a+='<tr height="40"><td>'+L_Picture_Of_Text.replace(/{(0)}/,'<a id="currentCount">1</a>').replace(/{(1)}/,ids.length.toString())+"</td></tr>";a+='<tr id="controlRow"><td>';var f="",d="",e="";if(fRTL){f="plnext1.gif";d="plprev1.gif";e="plplayr1.gif"}else{f="plprev1.gif";d="plnext1.gif";e="plplay1.gif"}var b="<img border=0 height=23 style='position:relative;cursor:hand' onmouseover='HiliteButton()' onmouseout='DemoteButton()' src='"+ctx.imagesPath,i="<a onclick='StartSlideShow(); return false;' href='javascript:StartSlideShow()'>"+b+e+"' id=playButton alt='"+L_SlideShowPlayButton_Text+"'></a> ",g="<a onclick='PauseSlideShow(); return false;' href='javascript:StartSlideShow()'>"+b+"plpause1.gif' alt='"+L_SlideShowPauseButton_Text+"'></a> ",k="<a onclick='StopSlideShow(); return false;' href='javascript:StopSlideShow()'>"+b+"plstop1.gif' id=stopButton alt='"+L_SlideShowStopButton_Text+"'></a> ",j="<a onclick='PreviousSlide(); return false;' href='javascript:PreviousSlide()'>"+b+f+"' alt='"+L_SlideShowPrevButton_Text+"'></a> ",h="<a onclick='NextSlide(); return false;' href='javascript:NextSlide()'>"+b+d+"' alt='"+L_SlideShowNextButton_Text+"'></a>";if(fRTL)a+=j+h+k+g+i;else a+=i+g+k+j+h;a+="<hr /></td></tr>";a+="<tr><td><b>"+L_FileName_Text+':&nbsp;</b></td></tr><tr><td id="tdCaption" width="75%">'+items[ids[currentPicture]].caption+"<br /></td></tr>";a+="<tr><td><b>"+L_ImageCreateDate_Text+':&nbsp;</b></td></tr><tr><td id="tdImgDate">'+items[ids[currentPicture]].createdDate+"<br /></td></tr>";a+="<tr><td><b>"+L_Description_Text+':&nbsp;</b></td></tr><tr><td id="tdDesc">'+items[ids[currentPicture]].description+"<br /></td></tr>";if(ids.length>1)currentPicture++;a+="</table></td>";a+="</tr></table>";document.write(a)}function RecursiveViewHeaderScript(a,d,b,c){ULSjYp:;fRecursive=true;listInfo=new CListInfo(d,b,c);if(a=="details"){currentRecursiveViewStyle=a;document.write("<table style='display:none'>")}else{currentRecursiveViewStyle="slideshow";document.write("<table>")}}function RecursiveViewFooterScript(){ULSjYp:;if(!browseris.ie5up||!browseris.win)return;listDirection=document.getElementById("selectionCacheMgr").parentNode.parentNode.parentNode.currentStyle.direction;if(listDirection!="rtl"&&listDirection!="RTL")listDirection="ltr";else fRTL=true;if(browseris.verIEFull>=5.5&&browseris.iever<6&&browseris.win)setTimeout("InitSelection()",500);else browseris.ie5up&&browseris.win&&InitSelection()}function CItem(b,m,a,d,j,i,l,f,h,e,k){ULSjYp:;this.baseName=a;this.title=l;this.originalImg=b;this.imgWidth=GetUint(j);this.imgHeight=GetUint(i);this.id=m;this.fSelected=false;this.fNewItem=k;this.description=STSHtmlEncode(f);this.description=this.description.replace(/\r?\n/g,"<br>\n");this.alt=f;this.objType=h;this.fUnknownImageType=true;this.iconUrl=e;this.caption=a;if(h==1){if(""!=d)this.caption+="."+d;this.thumbnail=this.webimage=ctx.imagesPath+"/fldrnew.gif";this.imgWidth=this.imgHeight=37;return}if(b=="")return;var g=b.lastIndexOf("/");if(g<=0)return;var c=b.substring(0,g+1);c=escapeProperlyCore(c,true);if(this.imgWidth>0&&this.imgHeight>0){a=escapeProperly(a);this.thumbnail=c+"_t/"+a+"_"+d+".jpg";this.webimage=c+"_w/"+a+"_"+d+".jpg";this.fUnknownImageType=false}else{this.thumbnail=this.webimage=e.indexOf("/")==0?e:ctx.imagesPath+"/"+e;this.imgWidth=this.imgHeight=32}}function InsertItem(b,a,h,g,e,d,j,c,f,k,i){ULSjYp:;if(b=="")return;items[a]=new CItem(b,a,h,g,e,d,j,c,f,k,i);if(firstId==-1)firstId=a;ids[ids.length]=a}function TryLaunchPictureLibrary(c,a,d){ULSjYp:;vCurrentListID=c;vCurrentListUrlAsHTML=a;vCurrentWebUrl=d;var b=StartOIS('ois.exe /upload "'+a+'"');if(!b)return false;GotoInfoPage("uploading");return true}function ViewSlideShow(h,e,d){ULSjYp:;var a=h+"slidshow.aspx?ViewStyle=slideshow",b=GetUrlKeyValue("RootFolder",true);if(b!="")a+="&RootFolder="+b;var g=240+e,f=160+d,c=window.open(a,"slideshow","height="+f+",width="+g+",toolbar=no,menubar=no,scrollbars=no");c!=null&&c.focus()}typeof Sys!="undefined"&&Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded();typeof NotifyScriptLoadedAndExecuteWaitingJobs=="function"&&NotifyScriptLoadedAndExecuteWaitingJobs("imglib.js")