function swapon(nume) {
	document.images[nume].src = "images/layout/buttons/" + nume + "_on.gif";
}
function swapoff(nume) {
	document.images[nume].src = "images/layout/buttons/" + nume + "_off.gif";
}

function validare() {
	if ((document.formular.name.value == "") || (document.formular.email.value == "") || (document.formular.subject.value == "") || (document.formular.text.value == ""))
	{
		alert("Toate câmpurile sunt obligatorii.");
		return false;
	}
	
	filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (!filter.test(document.formular.email.value))
	{
		alert("Introduceți o adresă de e-mail validă.");
		return false;
	}
	return true;
}

function scrie(titlu, text, width){
	if (!width) {width = "100%";}
	document.write("<table cellpadding=0px cellspacing=0px>");
	document.write("	<tr>");
	document.write("		<td><img src=\"images/layout/content/title_left.gif\"></td>");
	document.write("		<td class=\"layoutTitle\">" + titlu + "</td>");
	document.write("				<td><img src=\"images/layout/content/title_right.gif\"></td>");
	document.write("			</tr>");
	document.write("</table>");
	document.write("<table cellpadding=0px cellspacing=0px width=" + width + ">");
	document.write("	<tr>");
	document.write("		<td width=9px><img src='images/layout/content/box/top_left.gif'></td>");
	document.write("		<td style=\"background-image: url('images/layout/content/box/top_middle.gif');\"></td>");
	document.write("		<td width=6px><img src='images/layout/content/box/top_right.gif'></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td style=\"background-image: url('images/layout/content/box/left_middle.gif');\"></td>");
	document.write("		<td class='layoutText'>");
	document.write(text);
	document.write("		</td>");
	document.write("		<td style=\"background-image: url('images/layout/content/box/right_middle.gif');\"></td>");
	document.write("	</tr>");
	document.write("	<tr>");
	document.write("		<td><img src='images/layout/content/box/bottom_left.gif'></td>");
	document.write("		<td style=\"background-image: url('images/layout/content/box/bottom_middle.gif');\"></td>");
	document.write("		<td><img src='images/layout/content/box/bottom_right.gif'></td>");
	document.write("	</tr>");
	document.write("</table><br>");
}

