<!--

function gWrap(container,width,boxType,height) {

	/* create a random number to be a semi unique id */
	var rnum=Math.floor(Math.random()*999999)

	/* wrap all the divs with the user specified class with this id */
	/* this is all done to give different function call the different widths that may be specified */
	var uIdWrap = "<div class='"+rnum+"Target'></div>";
	$('div.'+container).wrap(uIdWrap);

	/* create variables and wrapper code */
	var boxWidth = width;
	var contentWidth = boxWidth - 20;
	
	var wrapLeft = "<div class='"+boxType+"EdgeLeft' style='width:"+contentWidth+"px;'></div>";
	var wrapRight = "<div class='"+boxType+"EdgeRight' style='width:"+boxWidth+"px;'></div>";
	
	var top = "<div class='"+boxType+"'>";
	top += "<div class='"+boxType+"CornerTopLeft'><div></div></div><div class='"+boxType+"EdgeTop'><div></div></div><div class='"+boxType+"CornerTopRight'><div></div></div>";
	top += "</div>";
	top += "<div class='clear'><div></div></div>";
		
	var bottom = "<div class='clear'><div></div></div>";
	bottom += "<div class='"+boxType+"'>";
	bottom += "<div class='"+boxType+"CornerBottomLeft'><div></div></div><div class='"+boxType+"EdgeBottom'></div><div class='"+boxType+"CornerBottomRight'><div></div></div>";
	bottom += "</div>";
	
	/* do the before and after code to get the top and bottom customization */
	$('.'+rnum+'Target .'+container).before(top);
	$('.'+rnum+'Target .'+container).after(bottom);

	/* do the wrap to geth the customization on the sides */
	$('.'+rnum+'Target .'+container).wrap(wrapLeft);
	$('.'+rnum+'Target .'+container).wrap(wrapRight);
	
	/* adjust the widths and other css for customization */
	$('.'+rnum+'Target .'+container).css("width",contentWidth + "px");
	$('.'+rnum+'Target .'+boxType).css("width",boxWidth + "px");
	$('.'+rnum+'Target .'+boxType+'EdgeTop').css("width",contentWidth + "px");
	$('.'+rnum+'Target .'+boxType+'EdgeBottom').css("width",contentWidth + "px");
	$('.'+rnum+'Target .'+container).css("width",contentWidth + "px");
	
	if (height!=null) {
		$('.'+rnum+'Target .'+container).css("height",height + "px");
	}
	
	$('.'+rnum+'Target .'+container).css("margin-left","10px");
	$('.'+rnum+'Target .'+container).addClass(boxType+'Bg');


}

//-->