function in_array(needle, array)
{
	for (var id in array)
	{
	if(array[id] == needle)
	return true;
	}
	return false;
}

function in_str(needle,haystack)
{
	var tamanho = needle.length;
    for(var i=0;i<tamanho;i++)
    {
    	letra = needle.substr(i,1);
    	indexof = haystack.lastIndexOf(letra);
    	if ( indexof > -1 ){ 
    		return true;
    	}
    }
    return false;
}
