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("#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;if(jQuery.browser.opera&&jQuery.browser.version>"9.5"&&jQuery.fn.jquery<="1.2.6"){yPos=document.documentElement.clientHeight-30}else{yPos=jQuery(window).height()-30}var leftPos=(myWidth-winWidth)/2;jQuery("#cWindow").css("zindex",cGetZIndexMax()+1);jQuery("#cWindowContent").html('<div class="ajax-wait">&nbsp;</div>');jax.loadingFunction=function(){jQuery("#cWindowContent").addClass("winloading")};jax.doneLoadingFunction=function(){jQuery("#cWindowContent").removeClass("winloading")};eval(windowCall);jQuery("#cWindow").css("marginTop",(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){jQuery("#cwin_tm, #cwin_bm, #cwin_ml, #cwin_mr").each(function(){jQuery(this)[0].filters(0).sizingMethod="crop"})}jQuery("#cWindow").fadeIn()}function cWindowHide(){if(jQuery("#cWindowAction").get().length>0){jQuery("#cWindowAction").animate({bottom:"-40px"},200,"",function(){jQuery("#cWindow").fadeOut("fast",function(){jQuery(this).remove()})})}else{jQuery("#cWindow").fadeOut("fast",function(){jQuery(this).remove()})}}function cWindowActions(b){var a='<div id="cWindowAction">';a+="<table><tr>";a+='<td align="left"><div id="cwin-wait">&nbsp;</div></td><td  align="right" valign="middle">';a+=b;a+="</td></tr></table></div>";jax.loadingFunction=function(){jQuery("#cwin-wait").show();jQuery("#cWindowContent input").attr("disabled",true);jQuery("#cWindowContent textarea").attr("disabled",true);jQuery("#cWindowContent button").attr("disabled",true)};jax.doneLoadingFunction=function(){jQuery("#cwin-wait").hide();jQuery("#cWindowContent input").attr("disabled",false);jQuery("#cWindowContent textarea").attr("disabled",false);jQuery("#cWindowContent button").attr("disabled",false)};jQuery("#cWindowAction").remove();jQuery("#cWindowContentOuter").append(a);_height=jQuery("#cWindowContent").height();_height=_height-34;jQuery("#cWindowContent").height(_height);jQuery("#addFriendContainer").css({paddingLeft:"5px",paddingRight:"0"});jQuery("#cWindowAction").animate({bottom:"0px"},200)}function cWindowResize(a){currentHeight=jQuery("#cwin_mr").height();reduceHeight=(currentHeight-a)/2;jQuery("#cWindow").animate({marginTop:"+="+reduceHeight+"px"},200);jQuery("#cwin_mr,#cwin_ml,#cWindowContentOuter").animate({height:a+"px"},200);jQuery("#cWindowContent").animate({height:a-50+"px"},200)}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};
