function LoadBodyEvent(a){var b=window.onload;if(typeof window.onload=="function"){window.onload=function(){if(b){b()}a()}}else{window.onload=a}}function addmoutclass(a,b){$("#"+a).removeClass(" "+b+" ")}function addmoverclass(a,b){$("#"+a).addClass(" "+b+" ")}function BuildSelectedImages(a,b,c,d,e){obj=document.getElementById(c);if(obj.selectedIndex==0){BuildLightBoxAlbums(a,b,d,e)}else{BuildLightBoxAlbums(a,b,obj.options[obj.selectedIndex].value,d,e)}}function checkall(a,b){var c="";switch(b){case 1:c="DNNInfo_AlbumPanel";break;case 2:c="DNNInfo_ImagePanel";break}var d=document.getElementById(c);if(d){chks=document.getElementByTagsName;if(a.checked){for(i=0;i"});return a.replace(/<\/?[^>]+(>|$)/g,"")}function loadDITImageInfo(a,b,c,d,e){if(currentDIT==e||currentDIT==0){$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/DITHandler.ashx?mode="+a+"&mid="+b+"&pid="+c+"&aid="+d+"&imgid="+e,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(a){if(ClearHTMLTags(a)!=""){$("#DNNInfo_ImageGallery_DITImageLoaderInfo"+b).html(a);$("#DNNInfo_ImageGallery_ImageLoaderInfo"+b).hide();$("#DNNInfo_ImageGallery_DITImageLoaderInfo"+b).slideDown(1500)}if($("#DNNInfo_ImageGallery_DITImg"+b).attr("complete")){$("#DNNInfo_ImageGallery_DITLoadingBar"+b).removeClass("DNNInfo_LoadingBar")}}})}}function loadDITImage(a,b,c,d,e,f,g){if(currentDIT!=e){$("#DNNInfo_ImageGallery_DITImageLoaderInfo"+a).hide();$("#DNNInfo_ImageGallery_DITLoadingBar"+a).addClass("DNNInfo_LoadingBar");$("#DNNInfo_ImageGallery_DITImageLoader"+a).animate({opacity:.75},100);$("#DNNInfo_ImageGallery_DITImg"+a).animate({opacity:1},1e3);$("#DNNInfo_ImageGallery_DITImg"+a).removeAttr("width");$("#DNNInfo_ImageGallery_DITImg"+a).removeAttr("height");if(f>0){$("#DNNInfo_ImageGallery_DITImg"+a).attr("width",f)}if(g>0){$("#DNNInfo_ImageGallery_DITImg"+a).attr("height",g)}if(d==$("#DNNInfo_ImageGallery_DITImg"+a).attr("src")){$("#DNNInfo_ImageGallery_DITImageLoader"+a).animate({opacity:1},1);$("#DNNInfo_ImageGallery_DITLoadingBar"+a).removeClass("DNNInfo_LoadingBar");loadDITImageInfo(3,a,b,c,e)}else{$("#DNNInfo_ImageGallery_DITImg"+a).attr("src",d);$("#DNNInfo_ImageGallery_DITImg"+a).load(function(){$("#DNNInfo_ImageGallery_DITImageLoader"+a).animate({opacity:1},1);$("#DNNInfo_ImageGallery_DITLoadingBar"+a).removeClass("DNNInfo_LoadingBar");loadDITImageInfo(3,a,b,c,e)})}currentDIT=e}}function initiateDIT(){$(document).ready(function(){$("#DNNInfo_LoadingIcon"+mid).addClass("DNNInfo_AjaxLoading");$(".DNNInfo_ImageGallery_DITImageThumb").each(function(a){$("#"+this.id).animate({opacity:.75},1e3);$("#"+this.id).hover(function(){$("#"+this.id).animate({opacity:1},1e3)});$("#"+this.id).mouseout(function(){$("#"+this.id).animate({opacity:.75},1e3)})});$(".DNNInfo_ImageGallery_DITAlbumThumb").each(function(a){$("#"+this.id).animate({opacity:.75},1e3);$("#"+this.id).hover(function(){$("#"+this.id).animate({opacity:1},1e3)});$("#"+this.id).mouseout(function(){$("#"+this.id).animate({opacity:.75},1e3)})})})}function BuildDITImages(a,b,c,d,e,f,g){$("#DNNInfo_LoadingIcon"+e).addClass("DNNInfo_AjaxLoading");$("#DNNInfo_ImageGallery_DITRightPane"+e).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/DITHandler.ashx?mode="+a+"&id="+b+"&p="+c+"&pimg="+d+"&mid="+e+"&pid="+f+"&aid="+g,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(a){$("#DNNInfo_ImageGallery_DITRightPane"+e).fadeTo("slow",1);$("#DNNInfo_ImageGallery_DITRightPane"+e).html(a);$("#DNNInfo_LoadingIcon"+e).removeClass("DNNInfo_AjaxLoading")}})}function BuildDITAlbums(a,b,c,d,e,f){$("#DNNInfo_LoadingIcon"+e).addClass("DNNInfo_AjaxLoading");$("#DNNInfo_ImageGallery_DITAlbumList"+e).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/DITHandler.ashx?mode="+a+"&id="+b+"&p="+c+"&pimg="+d+"&mid="+e+"&pid="+f,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(a){$("#DNNInfo_ImageGallery_DITAlbumList"+e).fadeTo("slow",1);$("#DNNInfo_ImageGallery_DITAlbumList"+e).html(a);$("#DNNInfo_LoadingIcon"+e).removeClass("DNNInfo_AjaxLoading")}})}function BuildDITGallery(a,b,c,d,e,f){$("#DNNInfo_LoadingIcon"+e).addClass("DNNInfo_AjaxLoading");$("#"+b).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/DITHandler.ashx?mode="+a+"&id="+b+"&p="+c+"&pimg="+d+"&mid="+e+"&pid="+f,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(a){$("#"+b).fadeTo("slow",1);$("#"+b).html(a);$("#DNNInfo_ImageGallery_ImageLoaderInfo"+e).hide();$("#DNNInfo_ImageGallery_ImageLoaderInfo"+e).slideDown(1500);$("#DNNInfo_LoadingIcon"+e).removeClass("DNNInfo_AjaxLoading")}})}function BuildPrettyPhotoImages(a,b,c,d,e,f){$("#DNNInfo_LoadingIcon"+e).addClass("DNNInfo_AjaxLoading");$("#"+a).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/PrettyPhotoImageHandler.ashx?id="+a+"&p="+b+"&pi="+c+"&aid="+d+"&mid="+e+"&pid="+f,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){alert(a.responseText)},success:function(b){$("#"+a).fadeTo("slow",1);$("#"+a).html(b);InitiatePrettyPhoto();$("#DNNInfo_LoadingIcon"+e).removeClass("DNNInfo_AjaxLoading")}})}function BuildPrettyPhotoAlbums(a,b,c,d,e){$("#DNNInfo_LoadingIcon"+d).addClass("DNNInfo_AjaxLoading");$("#"+a).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/PrettyPhotoAlbumHandler.ashx?id="+a+"&p="+b+"&pi="+c+"&mid="+d+"&pid="+e,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(b){$("#"+a).fadeTo("slow",1);$("#"+a).html(b);$("#DNNInfo_LoadingIcon"+d).removeClass("DNNInfo_AjaxLoading")}})}function InitiatePrettyPhoto(){$(document).ready(function(){if(!$(".pp_pic_holder").html()){$(" a[rel^='prettyPhoto']").prettyPhoto({theme:prettyPhotoTheme,animation_speed:prettyPhotoAnimationSpeed,slideshow:prettyPhotoSlideShowSpeed,overlay_gallery:prettyPhotoSmallGallery,social_tools:""})}else{$(" a[rel^='prettyPhoto']").prettyPhoto({})}})}function BuildLightBoxImages(a,b,c,d,e,f){$("#DNNInfo_LoadingIcon"+e).addClass("DNNInfo_AjaxLoading");$("#"+a).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/LightBoxImageHandler.ashx?id="+a+"&p="+b+"&pi="+c+"&aid="+d+"&mid="+e+"&pid="+f,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(b){$("#"+a).fadeTo("slow",1);$("#"+a).html(b);$("#DNNInfo_LoadingIcon"+e).removeClass("DNNInfo_AjaxLoading")}})}function BuildLightBoxAlbums(a,b,c,d,e){$("#DNNInfo_LoadingIcon"+d).addClass("DNNInfo_AjaxLoading");$("#"+a).fadeTo("slow",.5);$.ajax({cache:false,url:spath+"/DesktopModules/DNNInfo_ImageGallery/GalleryHandler/LightBoxAlbumHandler.ashx?id="+a+"&p="+b+"&pi="+c+"&mid="+d+"&pid="+e,data:"{}",contentType:"text/html; charset=utf-8",dataType:"html",error:function(a,b,c){},success:function(b){$("#"+a).fadeTo("slow",1);$("#"+a).html(b);$("#DNNInfo_LoadingIcon"+d).removeClass("DNNInfo_AjaxLoading")}})}var currentDIT=0