function cWindowDraw(){jQuery("#cWindow").remove();var a="";a+='<div id="cWindow">';a+="	<!-- top section -->";a+='	<div id="cwin_tl"></div>';a+='	<div id="cwin_tm"></div>';a+='	<div id="cwin_tr"></div>';a+='	<div style="clear: both;"></div>';a+="	<!-- middle section -->";a+='	<div id="cwin_ml"></div>';a+='	<div id="cWindowContentOuter">';a+='		<div id="cWindowContentTop">';a+='			<a href="javascript:void(0);" onclick="cWindowHide();" id="cwin_close_btn">Close</a>';a+='			<div id="cwin_logo"></div>';a+='           <div class="clr"></div>';a+="		</div>";a+='		<div id="cWindowContentWrap"><div id="cWindowContent">';a+="		</div></div>";a+="	</div>";a+='	<div id="cwin_mr"></div>';a+='	<div style="clear: both;"></div>';a+="	<!-- bottom section -->";a+='	<div id="cwin_bl"></div>';a+='	<div id="cwin_bm"></div>';a+='	<div id="cwin_br"></div>';a+='	<div style="clear: both;"></div>';a+="</div>";var b=jQuery(a).addClass("new").prependTo("body");return b}function cWindowShow(d,e,b,a,c){var g=jQuery("#cWindow");if(g.length<1){g=cWindowDraw()}c=(c==""||c==null)?"dialog":c;b=parseInt(b);a=parseInt(a);if(g.hasClass("new")){var f=cWindowGetSize(b,a);cWindowResizeAddTask("#cWindow",{width:f.width(),height:f.height(),left:f.left(),"margin-top":f.top(),"z-index":cGetZIndexMax()+1},{animate:false});cWindowResizeAddTask("#cWindowContentOuter, #cwin_tm, #cwin_bm",{width:f.contentOuterWidth()},{animate:false});cWindowResizeAddTask("#cWindowContentOuter, #cwin_ml, #cwin_mr",{height:f.contentOuterHeight()},{animate:false});cWindowResizeAddTask("#cWindowContentWrap",{height:f.contentWrapHeight()},{animate:false});cWindowResizeExecuteTask(function(){g.removeClass("new")})}jQuery("#cWindow").removeClass("dialog").removeClass("error").removeClass("warning");jQuery("#cWindow").addClass(c);jQuery("#cwin_logo").html(e);jQuery("#cWindowContent").empty();jQuery("#cWindowAction").remove();jax.loadingFunction=function(){jQuery("#cWindowContentWrap").addClass("loading")};jax.doneLoadingFunction=function(){jQuery("#cWindowContentWrap").removeClass("loading")};if(jQuery.browser.msie&&jQuery.browser.version.substr(0,1)<7&&typeof(jomsIE6)!="undefined"&&jomsIE6==true){jQuery("#cwin_tm, #cwin_bm, #cwin_ml, #cwin_mr").each(function(){jQuery(this)[0].filters(0).sizingMethod="crop"})}cWindowResize2(b,a,d)}function cWindowHide(){jQuery("#cWindow").fadeOut("fast",function(){jQuery(this).addClass("new")})}function cWindowGetSize(b,a){var c={contentWrapHeight:function(){return a},contentOuterWidth:function(){return b},contentOuterHeight:function(){return a+30},width:function(){return this.contentOuterWidth()+40},height:function(){return this.contentOuterHeight()+40},left:function(){return(jQuery(window).width()-this.width())/2},top:function(){return jQuery(document).scrollTop()+(document.documentElement.clientHeight-this.height())/2}};return c}function cWindowResize(a,c,b){a=parseInt(a);cWindowResize2(jQuery("#cWindowContentOuter").width(),a,c);if(b!=undefined){cWindowActions(b)}}function cWindowResize2(b,a,e){var d=cWindowGetSize(b,a);var c={animate:(jQuery("#cWindow").width()==d.width())};cWindowResizeAddTask("#cWindow",{width:d.width(),height:d.height(),left:d.left(),marginTop:d.top()},c);cWindowResizeAddTask("#cWindowContentOuter, #cwin_tm, #cwin_bm",{width:d.contentOuterWidth()},c);cWindowResizeAddTask("#cWindowContentOuter, #cwin_ml, #cwin_mr",{height:d.contentOuterHeight()},c);cWindowResizeAddTask("#cWindowContentWrap",{height:d.contentWrapHeight()},c);if(jQuery("#cWindow").width()>d.width()||jQuery("#cWindow").height()>d.height()){cWindowResizeTask.reverse()}cWindowResizeExecuteTask(e)}var cWindowResizeTask=new Array();function cWindowResizeAddTask(d,c,b){var e={};jQuery.extend(e,c);var a={animate:true,queue:false,duration:400,easing:"swing",complete:function(){jQuery(this).removeClass("resizing")}};jQuery.extend(a,b);if(a.animate){cWindowResizeTask.push(function(){jQuery(d).addClass("resizing").animate(e,a)})}else{cWindowResizeTask.push(function(){jQuery(d).css(e)})}}function cWindowResizeExecuteTask(callback){do{cWindowResizeTask[0]();cWindowResizeTask.splice(0,1)}while(cWindowResizeTask.length>0);if(callback!=undefined&&typeof(callback)=="string"){eval(callback)}if(typeof(callback)=="function"){callback()}}var cWindowActionsPoll;function cWindowActions(a){clearInterval(cWindowActionsPoll);setTimeout(function(){clearInterval(cWindowActionsPoll);cWindowActionsPoll=setInterval(function(){var b=jQuery(".resizing").length;if(b<1){_cWindowActions(a);clearInterval(cWindowActionsPoll)}},200)},200)}function _cWindowActions(a){jQuery("#cWindowAction").remove();cWindowAction=jQuery("<div>").attr("id","cWindowAction").html(a).appendTo("#cWindowContentOuter");cWindowResizeAddTask("#cWindow",{height:"+=30px"},{duration:250});cWindowResizeAddTask("#cWindowContentOuter, #cwin_mr, #cwin_ml",{height:"+=30px"},{duration:250});cWindowResizeExecuteTask();jax.loadingFunction=function(){jQuery("#cWindowAction").addClass("loading");jQuery("#cWindowContent").find("input, textarea, button").attr("disabled",true)};jax.doneLoadingFunction=function(){jQuery("#cWindowAction").removeClass("loading");jQuery("#cWindowContent").find("input, textarea, button").attr("disabled",true)}}function cGetZIndexMax(){var d=document.getElementsByTagName?document.getElementsByTagName("*"):document.all;var c=0;for(var b=0;b<d.length;b++){var f=d[b];var a=null;if(f.currentStyle){a=f.currentStyle}else{if(document.defaultView&&document.defaultView.getComputedStyle){a=document.defaultView.getComputedStyle(f,"")}}var e;if(a){e=Number(a.zIndex)}else{e=Number(f.style.zIndex)}if(!isNaN(e)){c=Math.max(c,e)}}return c};