//function fs(n,min,max){
function fs(){
var f=[
"fotos/cabreia_rio_mau_1995.jpg",
"fotos/DSC_0034_h425.jpg",
"fotos/pnblsx_ls_fchs_2002.jpg",
"fotos/pnpg_r_h.jpg",
"fotos/pnsacv_plt_verm_46.jpg",
"fotos/pnsacv_umbelif_15.jpg",
"fotos/pnsc_abfl1.jpg",
"fotos/pnsc_heligrt.jpg",
"fotos/pnsc_mag8_rflxs_79det2007.jpg",
"fotos/pnsc_mg8_120.jpg",
"fotos/pnsc_mg8_areia_16_2007.jpg",
"fotos/pnsc_mg8_ond_rch_08.jpg",
"fotos/pnsc_mg8_rch_veios_68_2007.jpg",
"fotos/pnsc_mg8_rch_veios_70_2007.jpg",
"fotos/pnsc_tunel_1574_2011.jpg",
"fotos/pnsc_urs_anoitcr_2001.jpg",
"fotos/pnsc_urs_ocs_lua.jpg",
"fotos/pnt_roberts_flrs_brancas_52.jpg",
"fotos/ppafcc_arnts_79.jpg",
"fotos/ppafcc_pinus_pds_71.jpg",
"fotos/vl_frd_lua_0005.jpg",
"fotos/pnpg_lm_mr_1995.jpg",
"fotos/pnpg_amnhc_lm_mr_1-B_1995.jpg",
"fotos/pnsc_mg8_veios_36.jpg",
"fotos/pnsc_mg8_04.jpg",
"fotos/pnsc_grtond.jpg",
"fotos/pnsc_sj1.jpg",
"fotos/pnsc_sj2.jpg",
"fotos/pnt_roberts_fetos_borb_12.jpg",
"fotos/pnsacv_odcx_anmns_6_2009.jpg",
"fotos/eclipse_total_sol_11_Ag_1999.jpg",
"fotos/pnpg_r_hmm_1-B_1995.jpg",
"fotos/pnsc_grt_rflx_2002-out-26.jpg",
"fotos/ppafcc_rosm_181.jpg",
"fotos/ppafcc_flrs_brancas_118.jpg",
"fotos/pnpg_larix_decidua_1995.jpg",
"fotos/ppafcc_algds_134.jpg",
"fotos/pnsc_plt_trnc_heli_2002.jpg",
"fotos/pnpg_sr_pnd.jpg",
"fotos/onp_marymere_51.jpg",
"fotos/onp_hurr_ridge_tronco_0037.jpg",
"fotos/pnsacv_rch_odc_26.jpg",
"fotos/algarve_mnhs_rch_1995.jpg",
"fotos/pnpg_r_conho_2001.jpg",
"fotos/pnsacv_helicrysium_srd_25.jpg",
"fotos/pnsacv_ondas_srd_28.jpg",
"fotos/pnsacv_plt_bord_21.jpg",
"fotos/pnsacv_plt_bord_24.jpg",
"fotos/pnsc_adraga_1994.jpg",
"fotos/pnsc_gigperf.jpg",
"fotos/pnsc_liquen.jpg",
"fotos/pnsc_mag8_rch_87det2007.jpg",
"fotos/pnsc_mag8_rflxs_90_det_2007.jpg",
"fotos/pnsc_mg8_0039.jpg",
"fotos/pnsc_mg8_0047.jpg",
"fotos/pnsc_mg8_0075.jpg",
"fotos/pnsc_mg8_areia_17_2007.jpg",
"fotos/pnsc_mg8_areia_18_2007.jpg",
"fotos/pnsc_mg8_coracao_15fev2005.jpg",
"fotos/pnsc_mg8_escrrs_124_2008.jpg",
"fotos/pnsc_mg8_gruta_27_2011.jpg",
"fotos/pnsc_mg8_rch_areia_45_2007.jpg",
"fotos/ppafcc_eclipse_total_lua_41.jpg",
"fotos/coi_otn_1533_2011.jpg",
"fotos/coi_otn_1518_2011.jpg",
"fotos/coi_otn_1534_2011.jpg",
"fotos/pnsacv_lps_19_2009.jpg",
"fotos/ppafcc_venus_145_2012.jpg",
"fotos/pnsacv_rch_veios_21_2009.jpg"
];
var n=21;
var min=1;
var max=69;
var values = [], i = max;
while(i >= min) values.push(i--);
var results = [];
var maxIndex = max;
for(i=1; i <= n; i++){
maxIndex--;
//var index = Math.floor(maxIndex*Math.random())+1;
var index = Math.floor(Math.random()*(maxIndex)+1);
results.push(values[index]);
values[index] = values[maxIndex];
}
document.foto.src=f[results[0]];
document.foto1.src=f[results[0]];
document.foto2.src=f[results[1]];
document.foto3.src=f[results[2]];
document.foto4.src=f[results[3]];
document.foto5.src=f[results[4]];
document.foto6.src=f[results[5]];
document.foto7.src=f[results[6]];
document.foto8.src=f[results[7]];
document.foto9.src=f[results[8]];
document.foto10.src=f[results[9]];
document.foto11.src=f[results[10]];
document.foto12.src=f[results[11]];
document.foto13.src=f[results[12]];
document.foto14.src=f[results[13]];
document.foto15.src=f[results[14]];
document.foto16.src=f[results[15]];
document.foto17.src=f[results[16]];
document.foto18.src=f[results[17]];
document.foto19.src=f[results[18]];
document.foto20.src=f[results[19]];
document.foto21.src=f[results[20]];
return results;
}
function noSel(){
	document.onselectstart = new Function('return false');
	function ds(e){
		return false;
	}
	function ra(){
		return true;
	}
	document.onmousedown = ds;
	document.onclick = ra;
}
function noDrag() { return false }
function stopDrag() {
  for (i=0;i<document.links.length;i++) document.links[i].onmousedown=noDrag;
}
function setClipBoardData(){
	setInterval("window.clipboardData.setData('text','')",20);
	}
	function blockError(){
	window.location.reload(true);
	return true;
	}
	function init(){
	stopDrag();
	noSel();
	// setClipBoardData();
	}
	function ini(){
	stopDrag();
	noSel();
	// setClipBoardData();
	}
function checkTxt(form) {
if (form.message.value=='' || form.nome.value=='' || form.subject.value=='') {
alert("Todos os campos são de preenchimento obrigatório.\n\nAll fields must be filled in.");
if (form.nome.value=='') {form.nome.focus();form.nome.select();}
else
if (form.subject.value=='') {form.subject.focus();form.subject.select();}
else
if (form.message.value=='') {form.message.focus();form.message.select();}
return false;
}
return true;
}
function checkMail(form) {
var field = form.em;
var str = field.value;
var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;
var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
if (!reg1.test(str) && reg2.test(str)) {return true;}
alert("E-Mail inválido.\n\nInvalid E-Mail.");
field.focus();
field.select();
return false;
}
function valida(msg) {
if (checkTxt(msg) && checkMail(msg))
{return true;}
return false;
}
function ano(){
	var currentDate = new Date();
	var year = currentDate.getFullYear();
	document.write(year);
}
