IwAG.Controls={};$(document).ready(function(){var B;var A;Object.extend(IwAG.Controls,{ModalPopUp:function(G,O,F,N,E,H,M,J,C,K,L,D,I){var P;$("#"+G).SetDefaultModalPopupStyle(O,F,N,C,L,D);if(!K){P="#"+E}else{P="[id$="+E+"]"}$(P).click(function(V){if(I=="new"){if($("."+H)!=undefined&&$("."+H)!=null){$("."+H).css({visibility:"hidden"})}IwAG.Base.showModalDialog("#"+G,"#"+M,"#"+J,null,null,D==false?false:true)}else{if(I=="classic"){var U=(parseInt(O)+100);var R=(parseInt(F)+150);var Q=(screen.width)?(screen.width-U)/2:0;var W=(screen.height)?(screen.height-R)/2:0;var S=IWhost+"Empty.aspx";var T="toolbar=no,location=no,directories=no,status=no,menubar=no,left="+Q+",top="+W+",width="+U+",height="+R+",scrollbars=yes,resizable=no";A=$("#"+G).html();B=window.open(S,"",T)}}return false});$("#"+M).click(function(Q){if($("."+H)!=undefined&&$("."+H)!=null){$("."+H).css({visibility:"visible"})}})},ModalPopUpAuto:function(E,L,C,H,I,K,J,D,F){var M;if(F){$("#"+E).SetDefaultModalPopupStyle(L,C,H,D,F)}else{if(H==""&&D==""){$("#"+E).SetDefaultModalPopupStyle(L,C)}else{if(D==""){$("#"+E).SetDefaultModalPopupStyle(L,C,H)}else{if(H==""){$("#"+E).SetDefaultModalPopupStyle(L,C,null,D)}else{$("#"+E).SetDefaultModalPopupStyle(L,C,H,D)}}}}if($("."+I)!=undefined&&$("."+I)!=null){$("."+I).css({visibility:"hidden"})}var G;IwAG.Base.showModalDialog("#"+E,"#"+K,"#"+J,G,null,true);$("#"+K).click(function(N){if($("."+I)!=undefined&&$("."+I)!=null){$("."+I).css({visibility:"visible"})}})},ClassicPopUpGetContent:function(){B.focus();return A}},true)});
