// JavaScript Document
function OpenDiv(_top,_left,_width,_height,_url) {
	//$("#zz").appendTo(("body"));
	//$("#zz").css({width:"100%",height:"100%","background-color":"#fff","filter":"alpha(opacity=80)", "-moz-opacity":"0.8", opacity: "0.8"});
	//$("body").css({"filter":"alpha(opacity=80)", "-moz-opacity":"0.8", opacity: "0.8"});
	$("#content",parent.document.body).attr("src","iframe.htm")
	$("#pop").css({width:10,height:10});
	$("#pop").css({ left: _left+"px" }); 
	$("#pop").css({ top: _top+"px" }); 
	$("#content").css({ height: _height+"px" });
	$("#content").css({ width: _width+"px" });
	
	$("#pop").animate({ 
		width: _width,
		height: _height
		}, 1000,function(){
			$("#close").show();
			$("#content",parent.document.body).attr("src",_url)
			});
}
function closediv(){
	//alert($("#pop").css("width"));
	$("#content",parent.document.body).attr("src","iframe.htm");
	
	$("#pop").animate({ 
	width: 0,
	height: 0
	}, 1000,function(){$("#close").hide();$("#pop").hide();});
	//$("body").css({"filter":"alpha(opacity=100)", "-moz-opacity":"1", opacity: "1"});

}
$(document).ready(function(){	
						   
	$("body").click(function(){
		if ($("#pop").css("width") != "10px" && $("#pop").css("width") != "0px")
		{
			closediv();
			
		}
	});
});

