function update_code()
{
    var ob = document.getElementById("code_url");
    var disp = document.getElementById("display_code");
	
    disp.innerHTML = gen_code(ob.value);
}

function gen_code(text)
{
	str = "";
	label = document.getElementById("code_url");		
	
	str += "<textarea name='text_code' cols=40 rows=3 style='border-style:dashed' onclick='this.select()'>";
	
	str += "<style type='text/css'>.contactTable {width:300px !important; height:150px !important; padding:0px !important;background-image:url('" + label.value + "');background-attachment:scroll; background-position:center center;background-repeat:no-repeat; background-color:transparent;}.contactTable table, table.contactTable td { padding:0px !important;border:0px; background-color:transparent; background-image:none;}.contactTable a img {visibility:hidden; border:0px !important;}.contactTable a {display:block; height:28px; width:115px;}.contactTable .text {font-size:1px !important;}.contactTable .text, .contactTable a, .contactTable img {filter:none !important;}</style>";
	
	str += "<div style='position: absolute; left:0px; top:0px; width:100px; height:60px; z-index:9;'><a href='http://www.christianmyspacecodes.com' title='Myspace Layouts'><img src='http://www.christianmyspacecodes.com/images/myspace_layout.gif' alt='Christian Myspace Layouts' border='0' /></a></div>I edited my profile at <a href='http://www.christianmyspacecodes.com/' title='Christian Myspace Codes' target='_blank'>http://www.christianmyspacecodes.com</a><br /><a href='http://www.dittytalk.com/' title='Christian Myspace' target='_blank'>Christian Myspace</a>";
	str += "</textarea>";

    return str;
}