﻿function yy_sgv_get(id){return document.getElementById(id);}function yy_sgv_changeCssClass(_2,_3){if(typeof (_2)=="object"){_2.className=_3;}else{if(typeof (_2)=="string"){yy_sgv_get(_2).className=_3;}}}String.prototype.yy_sgv_endsWith=function(s){var _5=new RegExp(s+"$");return _5.test(this);};String.prototype.yy_sgv_startsWith=function(s){var _7=new RegExp("^"+s);return _7.test(this);};function yy_sgv_addEvent(_8,_9,fn){if(_8.addEventListener){_8.addEventListener(_9,fn,true);return true;}else{if(_8.attachEvent){var r=_8.attachEvent("on"+_9,fn);return r;}else{return false;}}}var yy_sgv_originalCssClassName="";function yy_sgv_changeMouseOverCssClass(_c,_d){if(arguments.length==1){yy_sgv_changeCssClass(_c,yy_sgv_originalCssClassName);yy_sgv_originalCssClassName="";}else{yy_sgv_originalCssClassName=_c.className;yy_sgv_changeCssClass(_c,_d);}}var yy_sgv_ccGridView_pre=new Array();var yy_sgv_ccAll_post=new Array();var yy_sgv_ccItem_post=new Array();function yy_sgv_ccCheck(e){var _f=e||window.event;var obj=_f.target||_f.srcElement;var _11=-1;for(var i=0;i<yy_sgv_ccGridView_pre.length;i++){if(obj.id.yy_sgv_startsWith(yy_sgv_ccGridView_pre[i])){_11=i;break;}}if(_11!=-1){if(obj.id.yy_sgv_endsWith(yy_sgv_ccAll_post[i])){yy_sgv_ccCheckAll(_11,obj.checked);}else{if(obj.id.yy_sgv_endsWith(yy_sgv_ccItem_post[i])){yy_sgv_ccCheckItem(_11);}}}}function yy_sgv_ccCheckAll(_13,_14){var _15=document.getElementsByTagName("INPUT");for(i=0;i<_15.length;i++){if(_15[i].type=="checkbox"&&_15[i].id.yy_sgv_startsWith(yy_sgv_ccGridView_pre[_13])&&_15[i].id.yy_sgv_endsWith(yy_sgv_ccItem_post[_13])){_15[i].checked=_14;if(yy_sgv_crClassName!=""){yy_sgv_changeCheckedRowCssClass(_15[i],yy_sgv_crClassName,false);}}}}function yy_sgv_ccCheckItem(_16){var _17=document.getElementsByTagName("INPUT");var _18=0;var _19=0;for(i=0;i<_17.length;i++){if(_17[i].type=="checkbox"&&_17[i].id.yy_sgv_startsWith(yy_sgv_ccGridView_pre[_16])&&_17[i].id.yy_sgv_endsWith(yy_sgv_ccItem_post[_16])){if(_17[i].checked){_18++;}else{_19++;}}}if(_19==0){yy_sgv_ccCheckCheckbox(yy_sgv_ccGridView_pre[_16],yy_sgv_ccAll_post[_16],true);}else{yy_sgv_ccCheckCheckbox(yy_sgv_ccGridView_pre[_16],yy_sgv_ccAll_post[_16],false);}}function yy_sgv_ccCheckCheckbox(pre,_1b,_1c){var _1d=document.getElementsByTagName("INPUT");for(i=0;i<_1d.length;i++){if(_1d[i].type=="checkbox"&&_1d[i].id.yy_sgv_startsWith(pre)&&_1d[i].id.yy_sgv_endsWith(_1b)){_1d[i].checked=_1c;break;}}}function yy_sgv_ccListener(){var _1e=document.getElementsByTagName("INPUT");for(i=0;i<_1e.length;i++){if(_1e[i].type=="checkbox"){for(j=0;j<yy_sgv_ccGridView_pre.length;j++){if(_1e[i].id.yy_sgv_startsWith(yy_sgv_ccGridView_pre[j])&&(_1e[i].id.yy_sgv_endsWith(yy_sgv_ccAll_post[j])||_1e[i].id.yy_sgv_endsWith(yy_sgv_ccItem_post[j]))){yy_sgv_addEvent(_1e[i],"click",yy_sgv_ccCheck);break;}}}}}if(document.all){window.attachEvent("onload",yy_sgv_ccListener);}else{window.addEventListener("load",yy_sgv_ccListener,false);}var yy_sgv_crGridView_pre=new Array();var yy_sgv_crCheckbox_post=new Array();var yy_sgv_crClassName="";var yy_sgv_crChecbox=new Array();var yy_sgv_crCssClass=new Array();function yy_sgv_changeCheckedRowCssClass(obj,_20,_21){if(yy_sgv_crClassName==""){return;}var _22=obj;var _23=obj;do{_23=_23.parentNode;}while(_23.tagName!="TR");if(_22.checked){yy_sgv_crChecbox.push(_22.id);if(yy_sgv_originalCssClassName!=""&&_21){yy_sgv_crCssClass.push(yy_sgv_originalCssClassName);}else{yy_sgv_crCssClass.push(_23.className);}_23.className=_20;if(_21){yy_sgv_originalCssClassName=_20;}}else{for(var i=0;i<yy_sgv_crChecbox.length;i++){if(yy_sgv_crChecbox[i]==_22.id){_23.className=yy_sgv_originalCssClassName=yy_sgv_crCssClass[i];yy_sgv_crChecbox.splice(i,1);yy_sgv_crCssClass.splice(i,1);break;}}}}function yy_sgv_crCheck(e){var evt=e||window.event;var obj=evt.target||evt.srcElement;yy_sgv_changeCheckedRowCssClass(obj,yy_sgv_crClassName,true);}function yy_sgv_crListener(){var _28=document.getElementsByTagName("INPUT");for(i=0;i<_28.length;i++){if(_28[i].type=="checkbox"){for(j=0;j<yy_sgv_crGridView_pre.length;j++){if(_28[i].id.yy_sgv_startsWith(yy_sgv_crGridView_pre[j])&&_28[i].id.yy_sgv_endsWith(yy_sgv_crCheckbox_post[j])){yy_sgv_addEvent(_28[i],"click",yy_sgv_crCheck);break;}}}}}if(document.all){window.attachEvent("onload",yy_sgv_crListener);}else{window.addEventListener("load",yy_sgv_crListener,false);}yy_sgv_rightMenu=function(){this._menu=null;this._menuItem=null;this._handle=null;this._target=null;this._cssClass=null;};yy_sgv_rightMenu.prototype={get_menu:function(){return this._menu;},set_menu:function(_29){this._menu=_29;},get_handle:function(){return this._handle;},set_handle:function(_2a){this._handle=_2a;},get_target:function(){return this._target;},set_target:function(_2b){this._target=_2b;},get_cssClass:function(){return this._cssClass;},set_cssClass:function(_2c){this._cssClass=_2c;},get_menuItem:function(){return this._menuItem;},set_menuItem:function(_2d){this._menuItem=_2d;},show:function(e){if(this.get_menuItem()==null){this.hidden();return true;}var _2f=this.get_menu();if(_2f==null){_2f=document.createElement("div");}var _30="";var _31=this.get_menuItem();var _32=this.get_handle();var _33=this.get_target();_2f.className="yy_sgv_rightMenuBase";if(this.get_cssClass()==null||this.get_cssClass()==""){_2f.className+=" "+"yy_sgv_rightMenu";}else{_2f.className+=" "+this.get_cssClass();}_30+="<ul>";for(var i in _31){if(_31[i].indexOf("<hr")!=-1){_30+=_31[i];}else{if(_33[i]==""){_33[i]="_self";}_30+="<li><a href=\""+_32[i]+"\" target=\""+_33[i]+"\">";_30+=_31[i];_30+="</a></li>";}}_30+="</ul>";_2f.innerHTML=_30;_2f.style.visibility="visible";_2f.onmousedown=function(e){e=e||window.event;document.all?e.cancelBubble=true:e.stopPropagation();};_2f.onselectstart=function(){return false;};document.body.appendChild(_2f);this.set_menu(_2f);e=e||window.event;var _36=document.documentElement;var x=_36.scrollLeft+e.clientX;var y=_36.scrollTop+e.clientY;if(this.get_menu().clientWidth+e.clientX>_36.clientWidth){x=x-this.get_menu().clientWidth;}if(this.get_menu().clientHeight+e.clientY>_36.clientHeight){y=y-this.get_menu().clientHeight;}this.get_menu().style.left=x+"px";this.get_menu().style.top=y+"px";this.get_menu().style.visibility="visible";this.set_handle(null);this.set_menuItem(null);this.set_target(null);return false;},hidden:function(){if(this.get_menu()!=null){this.get_menu().style.visibility="hidden";}}};if(document.all){window.attachEvent("onload",yy_sgv_rightMenu=new yy_sgv_rightMenu());}else{window.addEventListener("load",yy_sgv_rightMenu=new yy_sgv_rightMenu(),false);}function yy_sgv_setRightMenu(_39,_3a,_3b,_3c){yy_sgv_rightMenu.set_handle(_39);yy_sgv_rightMenu.set_menuItem(_3a);yy_sgv_rightMenu.set_target(_3b);yy_sgv_rightMenu.set_cssClass(_3c);}