

function show(){
	var obj=document.getElementById("aa");	
	var obj2=document.getElementById("bb");
	obj.style.display="block"
	obj2.style.display="block"
	if(obj.style.display=="block"){
		ui();
	}
}

function closeW(){
	var obj=document.getElementById("aa");	
	var obj2=document.getElementById("bb");
	obj.style.display="none"
	obj2.style.display="none"
}

function ui(){
	var obj=document.getElementById("aa");
	var objWidth=obj.offsetWidth;
	var bodyWidth=document.documentElement.clientWidth;
	leftW=(bodyWidth-objWidth)/2;
	obj.style.left=leftW;
	var obj2=document.getElementById("bb");
	obj2.style.height=document.documentElement.scrollHeight;
	obj2.style.width=document.documentElement.clientWidth;
}

	function dragDiv(selecter,handler){
		if($(selecter).jqDrag){
			handler=handler?handler:'';
			$.each($(selecter),function(I,It){
				$(It).jqDrag($(It).find(handler));
			});
		}
	}
	
	function scrollDiv(selecter){
		if($(selecter).size()>0)return false;
		$(window).scroll(function(){
			 $.each($(selecter),function(Index,Item){
			 	$(Item).css({top:document.documentElement.scrollTop+$(this).postion().top})
			 });
		});	
	}
	
	function createTipWin(path){
		if($(".TipWindow").size()==0){
			$("<div class=\"TipWindow handle\"></div>").appendTo($(document.body));
			scrollDiv(".TipWindow");
		}
		var my=$(".TipWindow");
		my.empty().html("<img src='/public/adminimg/lightbox-ico-loading.gif' />");
		my.css({top:document.documentElement.scrollTop+80,left:$(window).width()/2-my.width()/2}).show();//position:absolute
		$.get(path,{r:Math.random()},function(data){
			if(data.status==200){
				my.html(data.info);
				$("span:first",my).click(function(){ $(this).parents("div:first").hide();});
				dragDiv(my);
			}
		},'json');
	}