function init() {
	makeShadow('mainpage');
}
function makeShadow(eName, p) {
	var root = "";
	if(document.location.href.indexOf("/forum") != -1)
		root = "../";
	var el = document.getElementById(eName);
	if(el == null)
		return "";
	if(p == null)
		p = el.parentNode;

	var id = parseInt(Math.random()*10000);
	var sh = document.createElement("div");
	sh.id = "shadow_"+id;
	sh.style.position = "relative";
	sh.style.width = (el.style.width > 0 ? el.style.width : parseInt(el.clientWidth))+10;
	sh.style.top = 0;
	sh.style.overflow = "hidden";
	sh.style.backgroundImage = "url("+root+"images/default/shadow.gif)";
	sh.style.backgroundPosition = "right top";
	sh.style.backgroundRepeat = "repeat-y";
	sh.style.textAlign = "left";
	el.style.margin = "0";
	p.appendChild(sh);
	
	var st = document.createElement("div");
	st.id = "shadowt_"+id;
	st.style.position = "absolute";
	st.style.width = sh.style.width;
	st.style.height = 10;
	st.style.backgroundImage = "url("+root+"images/default/shadowt.gif)";
	st.style.backgroundPosition = "right top";
	st.style.backgroundRepeat = "no-repeat";

	sh.appendChild(st);
	sh.appendChild(el);
	
	var sb = document.createElement("div");
	sb.id = "shadowb_"+id;
	sb.style.width = sh.style.width;
	sb.style.height = 10;
	sb.style.backgroundImage = "url("+root+"images/default/shadowb.gif)";
	sb.style.backgroundPosition = "left top";
	sb.style.backgroundRepeat = "repeat-x";
	sb.style.overflow = "hidden";

	var sbl = document.createElement("div");
	sbl.id = "shadowbl_"+id;
	sbl.style.cssFloat = "left";
	sbl.style.styleFloat = "left";
	sbl.style.width = 10;
	sbl.style.height = 10;
	sbl.style.backgroundImage = "url("+root+"images/default/shadowbl.gif)";
	sbl.style.backgroundPosition = "left top";
	sbl.style.backgroundRepeat = "no-repeat";
	sb.appendChild(sbl);
	
	var sbr = document.createElement("div");
	sbr.id = "shadowbr_"+id;
	sbr.style.cssFloat = "right";
	sbr.style.styleFloat = "right";
	sbr.style.width = 10;
	sbr.style.height = 10;
	sbr.style.backgroundImage = "url("+root+"images/default/shadowbr.gif)";
	sbr.style.backgroundPosition = "right top";
	sbr.style.backgroundRepeat = "no-repeat";
	sb.appendChild(sbr);

	sh.appendChild(sb);

	return id;
}
