<!-- Begin
var arrDestinos = new Array();
arrDestinos[0] = 'marketing@swassociatesint.com';
arrDestinos[1] = 'marketing@swassociatesint.com';
arrDestinos[2] = 'marketing@swassociatesint.com';
arrDestinos[3] = 'marketing@swassociatesint.com';
arrDestinos[4] = 'marketing@swassociatesint.com';
arrDestinos[5] = 'marketing@swassociatesint.com';
arrDestinos[6] = 'marketing@swassociatesint.com';
arrDestinos[7] = 'marketing@swassociatesint.com';

function getCookie(name)
{
	var cname = name + "=";               
	var dc = document.cookie;             
	if (dc.length > 0) 
	{              
		begin = dc.indexOf(cname);       
		if (begin != -1) 
		{           
			begin += cname.length;       
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return unescape(dc.substring(begin, end));
		} 
	}
	return "";
}

function setCookie(name, value, expires) 
{
	document.cookie = name + "=" + escape(value) + 
	((expires != null) ? "; expires=" + expires.toGMTString() : "")
	+ "; path=/";
}

function checkSent() 
{
	if (getCookie("emailsent") == 'true') return true;
	else return false;
}

function process() 
{	
	setCookie("emailsent", "true");
	with (document.contact) 
	{				
		action = "mailto:"+ arrDestinos[Departamento.selectedIndex];				
		action += "?subject="+Asunto.value;
		action += "&body="+Comentario.value;				
	}
}
function formCheck() 
{
	var passed = false;
	with (document.contact) 
	{
		if (Nombre.value == "") 
		{
			alert("Please type your name.");
			Nombre.focus();
		}
		else if (Email.value == "") 
		{
			alert("Please type your email.");
			Email.focus();
		}
		else if (Departamento.selectedIndex == 0) 
		{
			alert("Please select dept. destiny.");
			Departamento.focus();
		}
		else if (Asunto.value == "")
		{
			alert("Please type email subject.");
			Asunto.focus();
		}
		else if (Comentario.value == "")
		{
			alert("Please type your message.");
			Comentario.focus();
		}
		else if (checkSent()) 
		{
			if (confirm("You send a email, Do you want to send another message?")) 
			{
				process();
				passed = true;
			}
		}
		else 
		{
			process();
			passed = true;
		}
	}
	return passed;
}
// End -->