﻿var modalBack=null;var img=null;function FindPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}return[curleft,curtop];}function GridView_getHiddenFieldContents(arg){SetDisabled(this.panelElement);return arg+"|"+this.stateField.value;}function GridView_OnCallback(result,context){if(modalBack!=null){modalBack.parentNode.removeChild(modalBack);img.parentNode.removeChild(img);}var value=new String(result);var valsArray=value.split("|");var innerHtml=valsArray[4];for(var i=5;i<valsArray.length;i++){innerHtml+="|"+valsArray[i];}context.panelElement.innerHTML=innerHtml;context.stateField.value=createPropertyStringFromValues_GridView(valsArray[0],valsArray[1],valsArray[2],valsArray[3]);}function SetDisabled(gvSrc){var height=gvSrc.scrollHeight;var width=gvSrc.scrollWidth;var pos=FindPos(gvSrc);modalBack=document.createElement("div");img=document.createElement("img");img.src="/common/images/loading.gif";img.style.position='absolute';img.style.zIndex=10001;img.style.left=(pos[0]+width/2-60)+"px";img.style.top=(pos[1]+height/2-6)+"px";img.style.width="120px";img.style.height="13px";modalBack.style.display='';modalBack.style.position='absolute';modalBack.style.zIndex=10000;modalBack.style.width=width+"px";modalBack.style.height=height+"px";modalBack.style.left=pos[0]+"px";modalBack.style.top=pos[1]+"px";modalBack.style.backgroundColor="Gray";modalBack.style.filter="alpha(opacity=30)";modalBack.style.opacity="0.3";gvSrc.parentNode.appendChild(modalBack);gvSrc.parentNode.appendChild(img);}