function cWindowShow(windowCall,winTitle,winWidth,winHeight,winType){var _type=(winType==""||winType==null)?"dialog":winType;var Obj=document.getElementById("cWindow");if(!Obj){Obj=document.createElement("div");var html="";html+='<div id="cWindow" class="'+_type+'" style="top: 0px; display: none;">';html+="	<!-- top section -->";html+='	<div id="cwin_tl"></div>';html+='	<div id="cwin_tm"></div>';html+='	<div id="cwin_tr"></div>';html+='	<div style="clear: both;"></div>';html+="	<!-- middle section -->";html+='	<div id="cwin_ml"></div>';html+='	<div id="cWindowContentOuter">';html+='		<div id="cWindowContentTop">';html+='			<a href="javascript:void(0);" onclick="cWindowHide();" id="cwin_close_btn">Close</a>';html+='			<div id="cwin_logo">'+winTitle+"</div>";html+="		</div>";html+='		<div id="cWindowContent">';html+="		</div>";html+="	</div>";html+='	<div id="cwin_mr"></div>';html+='	<div style="clear: both;"></div>';html+="	<!-- bottom section -->";html+='	<div id="cwin_bl"></div>';html+='	<div id="cwin_bm"></div>';html+='	<div id="cwin_br"></div>';html+='	<div style="clear: both;"></div>';html+="</div>";Obj.innerHTML=html;document.body.appendChild(Obj)}else{jQuery("#cwin_logo").html(winTitle);jQuery("#cWindowContent").empty();jQuery("#cWindowAction").remove()}jQuery("#cWindow").width(winWidth+40);jQuery("#cWindowContentOuter, #cWindowContentTop, #cWindowContent").width(winWidth);jQuery("#cwin_bm, #cwin_tm").width(winWidth);var myWidth=0,myHeight=0;myWidth=jQuery(window).width();myHeight=jQuery(window).height();var yPos=jQuery(window).height()-30;var leftPos=(myWidth-winWidth)/2;jQuery("#cWindow").css("z-index",cGetZIndexMax()+1);jax.loadingFunction=function(){jQuery("#cWindowContent").addClass("loading")};jax.doneLoadingFunction=function(){jQuery("#cWindowContent").removeClass("loading")};if(windowCall.match("jax.call")){jQuery("#cWindowContent").addClass("loading")}else{eval(windowCall)}jQuery("#cWindow").css("margin-top",(jQuery(document).scrollTop()+10+(yPos-winHeight)/2)+(20)+"px");jQuery("#cWindow").css("height",winHeight).css("left",leftPos);jQuery("#cWindowContent").css("height",(winHeight-50)).css("width",(winWidth-20));jQuery("#cWindowContentOuter").css("height",winHeight);jQuery("#cwin_tm, #cwin_bm").css("width",winWidth);jQuery("#cwin_ml, #cwin_mr").css("height",winHeight);if(jQuery.browser.msie&&jQuery.browser.version.substr(0,1)<7){if(typeof(jomsIE6)!="undefined"&&jomsIE6==true){jQuery("#cwin_tm, #cwin_bm, #cwin_ml, #cwin_mr").each(function(){jQuery(this)[0].filters(0).sizingMethod="crop"});var cWindowContentOuter=jQuery("#cWindowContentOuter");cWindowContentOuter.css({width:parseInt(cWindowContentOuter.css("width"))-2,height:parseInt(cWindowContentOuter.css("height"))-2,border:"1px solid black"})}}jQuery("#cWindow").fadeIn(function(){if(windowCall.match("jax.call")){eval(windowCall)}})}function cWindowHide(){if(jQuery("#cWindowAction").length>0){jQuery("#cWindowAction").animate({bottom:-jQuery("#cWindowAction").height()},200,function(){jQuery("#cWindow").fadeOut("fast",function(){jQuery(this).remove()})})}else{jQuery("#cWindow").fadeOut("fast",function(){jQuery(this).remove()})}}function cWindowActions(a){jQuery("#cWindowAction").remove();cWindowAction=jQuery("<div>").attr("id","cWindowAction").html(a).appendTo("#cWindowContentOuter");cWindowAction.css("bottom",-cWindowAction.height()).animate({bottom:0},200);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 cWindowResize(a,c,b){pausecomp(100);currentHeight=jQuery("#cWindowContentOuter").height();reduceHeight=(currentHeight-a)/2;jQuery("#cWindow").animate({marginTop:"+="+reduceHeight+"px"},{queue:false,duration:400,easing:"swing"});jQuery("#cwin_mr,#cwin_ml,#cWindowContentOuter").animate({height:a},{queue:false,duration:400,easing:"swing",complete:function(){if(typeof(jomsIE6)!="undefined"&&jomsIE6==true){var d=jQuery("#cWindowContentOuter");d.css({height:parseInt(d.css("height"))-1,border:"1px solid black"})}}});jQuery("#cWindowContent").animate({height:a-50+"px"},{queue:false,duration:400,easing:"swing",complete:function(){if(b!=undefined){cWindowActions(b)}}})}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}function pausecomp(c){var b=new Date();var a=null;do{a=new Date()}while(a-b<c)};
