Type.registerNamespace("GetExpress");GetExpress.WindowInfo=function(){};GetExpress.WindowInfo.prototype.get_WindowX=function GetExpress$WindowInfo$get_WindowX(){if(window.screenLeft){return window.screenLeft}else{if(window.screenX){return window.screenX}else{return 0}}};GetExpress.WindowInfo.prototype.get_WindowY=function GetExpress$WindowInfo$get_WindowY(){if(window.screenTop){return window.screenTop}else{if(window.screenY){return window.screenY}else{return 0}}};GetExpress.WindowInfo.prototype.get_ViewportWidth=function GetExpress$WindowInfo$get_ViewportWidth(){if(window.innerWidth){return window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth}else{if(document.body.clientWidth){return document.body.clientWidth}}}};GetExpress.WindowInfo.prototype.get_ViewportHeight=function GetExpress$WindowInfo$get_ViewportHeight(){if(window.innerHeight){return window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}else{if(document.body.clientHeight){return document.body.clientHeight}}}};GetExpress.WindowInfo.registerClass("GetExpress.WindowInfo");GetExpress.ImageInfo=function GetExpress$ImageInfo(b){this._id=b;this._height=0;this._width=0;this._path=""};function GetExpress$ImageInfo$get_Id(){return this._id}function GetExpress$ImageInfo$get_Path(){return this._path}function GetExpress$ImageInfo$set_Path(b){var c=Function._validateParams(arguments,[{name:"value",type:String}]);if(c){throw c}this._path=b}function GetExpress$ImageInfo$get_Height(){return this._height}function GetExpress$ImageInfo$set_Height(b){var c=Function._validateParams(arguments,[{name:"value",type:Number}]);if(c){throw c}this._height=b}function GetExpress$ImageInfo$get_Width(){return this._width}function GetExpress$ImageInfo$set_Width(b){var c=Function._validateParams(arguments,[{name:"value",type:Number}]);if(c){throw c}this._width=b}GetExpress.ImageInfo.prototype={get_Id:GetExpress$ImageInfo$get_Id,get_Path:GetExpress$ImageInfo$get_Path,set_Path:GetExpress$ImageInfo$set_Path,get_Height:GetExpress$ImageInfo$get_Height,set_Height:GetExpress$ImageInfo$set_Height,get_Width:GetExpress$ImageInfo$get_Width,set_Width:GetExpress$ImageInfo$set_Width};GetExpress.ImageInfo.findInList=function(f,d){var h=Function._validateParams(arguments,[{name:"list",type:Array,elementType:GetExpress.ImageInfo},{name:"id",type:String}]);if(h){throw h}var j;for(var g=0;g<f.length;g++){if(f[g].get_Id()==d){j=f[g];break}}return j};GetExpress.ImageInfo.registerClass("GetExpress.ImageInfo");function attachImagePopupHandlers(d){for(var e=0;e<d.length;e++){var c=$get(d[e].get_Id());if(c){$addHandler(c,"click",function(a){openPreview(this);return false})}}}function showPreview(q,r){var p=GetExpress.ImageInfo.findInList(q,r.id);if(p){var o=new String(r.href);if(o.indexOf("?")>-1){p.set_Path(o.substring(0,o.indexOf("?")))}else{p.set_Path(o)}var n=extractArgsFromQueryString(o);if(n.w){p.set_Width(Number.parseInvariant(n.w))}if(n.h){p.set_Height(Number.parseInvariant(n.h))}var m=new GetExpress.WindowInfo();var l=m.get_WindowX()+((m.get_ViewportWidth()-p.get_Width())/2);var k=m.get_WindowY()+(m.get_ViewportHeight()-p.get_Height())/2;var j;if(p.get_Width()>0&&p.get_Height()>0){if(l>0&&k>0){j="height="+p.get_Height()+",width="+p.get_Width()+",left="+l+",top="+k}else{j="height="+p.get_Height()+",width="+p.get_Width()}window.open("../imageviewer.aspx?img="+p.get_Path()+"&height="+p.get_Height()+"&width="+p.get_Width(),"preview",j)}else{window.open("../imageviewer.aspx?img="+p.get_Path()+"&height="+p.get_Height()+"&width="+p.get_Width(),"preview")}}}function extractArgsFromQueryString(r){var n=Function._validateParams(arguments,[{name:"url",type:String}]);if(n){throw n}r=new String(r);var q=r.substring(r.indexOf("?")+1);var p=new Object();var o=q.split("&");for(var j=0;j<o.length;j++){var m=o[j].indexOf("=");if(m==-1){continue}var l=o[j].substring(0,m);var k=o[j].substring(m+1);k=decodeURIComponent(k);p[l]=k}return p}function initializeImages(){var d=document.getElementsByTagName("img");for(var e=0;e<d.length;e++){if(d[e].parentNode){var c=d[e].parentNode;if(c.id.startsWith("img_")){Array.add(imageList,new GetExpress.ImageInfo(c.id))}}}attachImagePopupHandlers(imageList)}function openPreview(b){showPreview(imageList,b);return false}var imageList=new Array();if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};