function cWindowShow(windowCall,winTitle,contentWidth,contentHeight,winType){joms.jQuery("#cWindow").remove();var cWindow=joms.jQuery(decodeURIComponent("%3Cdiv%20id%3D%22cWindow%22%20class%3D%22dialog%22%3E%0A%09%3Cdiv%20id%3D%22cwin_tl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_ml%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cWindowContentOuter%22%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentTop%22%3E%0A%09%09%09%3Ca%20href%3D%22javascript%3Avoid(0)%3B%22%20onclick%3D%22cWindowHide()%3B%22%20id%3D%22cwin_close_btn%22%3EClose%3C%2Fa%3E%0A%09%09%09%3Cdiv%20id%3D%22cwin_logo%22%3E%3C%2Fdiv%3E%0A%09%09%09%3Cdiv%20class%3D%22clr%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentWrap%22%3E%0A%09%09%09%3Cdiv%20id%3D%22cWindowContent%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_mr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_bl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_bm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_br%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E"));var cWindowSize={contentWrapHeight:function(){return +contentHeight},contentOuterWidth:function(){return +contentWidth},contentOuterHeight:function(){return +contentHeight+30},width:function(){return this.contentOuterWidth()+40},height:function(){return this.contentOuterHeight()+40},left:function(){return(joms.jQuery(window).width()-this.width())/2},top:function(){return joms.jQuery(document).scrollTop()+((joms.jQuery(window).height()-this.height())/2)},zIndex:function(){return cGetZIndexMax()+1}};cWindow.find("#cwin_logo").html(winTitle);cWindow.find("#cWindowContentWrap").css({height:cWindowSize.contentWrapHeight()});cWindow.find("#cWindowContentOuter, #cwin_tm, #cwin_bm").css({width:cWindowSize.contentOuterWidth()});cWindow.find("#cWindowContentOuter, #cwin_ml, #cwin_mr").css({height:cWindowSize.contentOuterHeight()});cWindow.attr({"class":winType}).css({width:cWindowSize.width(),height:cWindowSize.height(),top:cWindowSize.top(),left:cWindowSize.left(),zIndex:cWindowSize.zIndex()}).prependTo("body");jax.loadingFunction=function(){joms.jQuery("#cWindowContentWrap").addClass("loading").css("overflow","hidden")};jax.doneLoadingFunction=function(){joms.jQuery("#cWindowContentWrap").removeClass("loading").css("overflow","auto")};if(windowCall!=undefined&&typeof(windowCall)=="string"){eval(windowCall)}if(typeof(windowCall)=="function"){windowCall()}if(joms.jQuery.browser.msie&&joms.jQuery.browser.version.substr(0,1)<7&&typeof(jomsIE6)!="undefined"&&jomsIE6==true){joms.jQuery("#cwin_tm, #cwin_bm, #cwin_ml, #cwin_mr").each(function(){joms.jQuery(this)[0].filters(0).sizingMethod="crop"})}joms.jQuery("#community-wrap iframe").css("visibility","hidden")}function cWindowHide(){var a=joms.jQuery("#cWindow");a.find("#cWindowAction").add("<div>").animate({bottom:"-30px"},"fast",function(){a.fadeOut("fast",function(){a.remove();joms.jQuery("#community-wrap iframe").css("visibility","visible")})})}function cWindowAddContent(f,c){var d=(c)?30:0;var b=joms.jQuery("#cWindowContentWrap").height();var i=joms.jQuery("#cWindow").position().top;var g=joms.jQuery("#cWindow");var a=g.find("#cWindowContent").html(f);var e=a.outerHeight();var j=joms.jQuery(window).height()*0.7;if(e>j){e=j}g.find("#cWindowContentWrap").animate({height:"+="+(e-b)+"px"});g.find("#cWindowContentOuter, #cwin_ml, #cwin_mr").animate({height:"+="+((e-b)+(d))+"px"});g.animate({height:"+="+((e-b)+(d))+"px",top:"-="+(e-b)/2+"px"},function(){if(c){joms.jQuery('<div id="cWindowAction">').html(c).css("bottom","-30px").appendTo("#cWindowContentOuter").animate({bottom:"0px"})}})}function cWindowResize(c){var e=joms.jQuery("#cWindowActions");var d=(e.length>0)?30:0;var b=joms.jQuery("#cWindowContentWrap").height();var a=joms.jQuery("#cWindow").position().top;c=parseInt(c);var f=joms.jQuery("#cWindow");f.find("#cWindowContentWrap").animate({height:"+="+(c-b)+"px"});f.find("#cWindowContentOuter, #cwin_ml, #cwin_mr").animate({height:"+="+((c-b)+(d))+"px"});f.animate({height:"+="+((c-b)+(d))+"px",top:"-="+(c-b)/2+"px"})}function cWindowActions(d){var f=joms.jQuery("#cWindowActions");var e=(f)?30:0;joms.jQuery("#cWindowAction").remove();var b=joms.jQuery("#cWindowContentWrap").height();var a=joms.jQuery("#cWindow").position().top;var g=joms.jQuery("#cWindow");var c=joms.jQuery("#cWindowContent").outerHeight();g.find("#cWindowContentWrap").animate({height:"+="+(c-b)+"px"});g.find("#cWindowContentOuter, #cwin_ml, #cwin_mr").animate({height:"+="+((c-b)+(e))+"px"});g.animate({height:"+="+((c-b)+(e))+"px",top:"-="+(c-b)/2+"px"},function(){if(f){joms.jQuery('<div id="cWindowAction">').html(d).css("bottom","-30px").appendTo("#cWindowContentOuter").animate({bottom:"0px"})}});jax.loadingFunction=function(){joms.jQuery("#cWindowAction").addClass("loading");joms.jQuery("#cWindowContent").find("input, textarea, button").attr("disabled",true)};jax.doneLoadingFunction=function(){joms.jQuery("#cWindowAction").removeClass("loading");joms.jQuery("#cWindowContent").find("input, textarea, button").attr("disabled",false)}}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};
