function createArray(page) {
	whichPage = page;
	whichImage = readCookie('whichImage'+whichPage);
	if (whichImage == null) {
		createCookie('whichImage'+whichPage,'0',0);
		whichImage = 0;
	}
	theImages = new Array()
	switch(page) {
		case 'home':
			theImages[0] = 'homepage_01.jpg'
			theImages[1] = 'homepage_02.jpg'
			theImages[2] = 'homepage_03.jpg'
			theImages[3] = 'homepage_04.jpg'
			theImages[4] = 'homepage_05.jpg'
			theImages[5] = 'homepage_06.jpg'
			theImages[6] = 'homepage_07.jpg'
			theImages[7] = 'homepage_08.jpg'
			theImages[8] = 'homepage_09.jpg'
			theImages[9] = 'homepage_10.jpg'
			theImages[10] = 'homepage_11.jpg'
			break;
		case 'chisiamo':
			theImages[0] = 'chisiamo_01.jpg'
			theImages[1] = 'chisiamo_02.jpg'
			theImages[2] = 'chisiamo_03.jpg'
			theImages[3] = 'chisiamo_04.jpg'
			theImages[4] = 'chisiamo_05.jpg'
			theImages[5] = 'chisiamo_06.jpg'
			theImages[6] = 'chisiamo_07.jpg'
			theImages[7] = 'chisiamo_08.jpg'
			theImages[8] = 'chisiamo_09.jpg'
			theImages[9] = 'chisiamo_10.jpg'
			theImages[10] = 'chisiamo_11.jpg'
			theImages[11] = 'chisiamo_12.jpg'
			theImages[12] = 'chisiamo_13.jpg'
			theImages[13] = 'chisiamo_14.jpg'
			theImages[14] = 'chisiamo_15.jpg'
			break;
		case 'aiuto':
			theImages[0] = 'aiuto_01.jpg'
			theImages[1] = 'aiuto_02.jpg'
			theImages[2] = 'aiuto_03.jpg'
			theImages[3] = 'aiuto_04.jpg'
			theImages[4] = 'aiuto_05.jpg'
			theImages[5] = 'aiuto_06.jpg'
			theImages[6] = 'aiuto_07.jpg'
			theImages[7] = 'aiuto_08.jpg'
			theImages[8] = 'aiuto_09.jpg'
			theImages[9] = 'aiuto_10.jpg'
			theImages[10] = 'aiuto_11.jpg'
			theImages[11] = 'aiuto_12.jpg'
			theImages[12] = 'aiuto_13.jpg'
			theImages[13] = 'aiuto_14.jpg'
			theImages[14] = 'aiuto_15.jpg'
			break;
		case 'non_solo':
			theImages[0] = 'non_solo_01.jpg'
			theImages[1] = 'non_solo_02.jpg'
			theImages[2] = 'non_solo_03.jpg'
			theImages[3] = 'non_solo_04.jpg'
			theImages[4] = 'non_solo_05.jpg'
			theImages[5] = 'non_solo_06.jpg'
			theImages[6] = 'non_solo_07.jpg'
			theImages[7] = 'non_solo_08.jpg'
			theImages[8] = 'non_solo_09.jpg'
			theImages[9] = 'non_solo_10.jpg'
			theImages[10] = 'non_solo_11.jpg'
			theImages[11] = 'non_solo_12.jpg'
			theImages[12] = 'non_solo_13.jpg'
			theImages[13] = 'non_solo_14.jpg'
			theImages[14] = 'non_solo_15.jpg'
			theImages[15] = 'non_solo_16.jpg'
			theImages[16] = 'non_solo_17.jpg'
			break;
	}
	p = theImages.length;
	var preBuffer = new Array()
	for (i = 0; i < p; i++){
	   preBuffer[i] = new Image()
	   preBuffer[i].src = theImages[i]
	}
}

//http://www.quirksmode.org/js/cookies.html
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function showImage(page){
	var height = 280;
/*	if (page == 'home') {
		document.write('<img src="../SITE/IMGS/'+theImages[whichImage]+'" alt="" width="689" height="368" />');
	} else {
		document.write('<img src="../SITE/IMGS/'+theImages[whichImage]+'" alt="" width="689" height="280" />');
	}
*/	
	if (page == 'home') {
		height=368;
		document.write('<img src="SITE/IMGS/'+theImages[whichImage]+'" alt="" width="689" height="'+height+'" />');
	} else {
		document.write('<img src="IMGS/'+theImages[whichImage]+'" alt="" width="689" height="'+height+'" />');		
	}
	whichImage = whichImage * 1 + 1;
	if (whichImage == p) whichImage = 0;
	createCookie('whichImage'+whichPage,whichImage,0);
}

function setSubMenu(submenu){
	var x=document.getElementById(submenu);
	x.className='box_menu dark_gray_box b_white_bottom';
}

function mail(){
	var x="function f(x){var i,o=\"\",l=x.length;for(i=l-1;i>=0;i--) {try{o+=x.c" +
	"harAt(i);}catch(e){}}return o;}f(\")\\\"function f(x,y){var i,o=\\\"\\\\\\\""+
	"\\\\,l=x.length;for(i=0;i<l;i++){y%=127;o+=String.fromCharCode(x.charCodeAt" +
	"(i)^(y++));}return o;}f(\\\"\\\\BHK\\\\\\\\\\\\\\\\GNBY\\\\\\\\000XBXFVX[\\" +
	"\\\\\\036\\\\\\\\025\\\\\\\\004X\\\\\\\\032SNXX\\\\\\\\002\\\\\\\\034c/\\\\" +
	"\\\\\\\"\\\\-)2(r $-#\\\\\\\\r> \\\\\\\\\\\"\\\\%=5&4847w5);\\\\\\\\001|a\\" +
	"\\\\\\t\\\\\\\\017\\\\\\\\004\\\\\\\\014$\\\\\\\\025\\\\\\\\t\\\\\\\\025\\\\"+
	"\\\\034\\\\\\\\006\\\\\\\\014\\\\\\\\031\\\\\\\\r\\\\\\\\003\\\\\\\\r\\\\\\" +
	"\\000^\\\\\\\\036\\\\\\\\000\\\\\\\\024HZ\\\\\\\\027IZPAKG\\\"\\\\,38)\\\"(" +
	"f};)lo,0(rtsbus.o nruter};)i(tArahc.x=+o{)--i;0=>i;1-l=i(rof}}{)e(hctac};l=" +
	"+l;x=+x{yrt{)84=!)31/l(tAedoCrahc.x(elihw;lo=l,htgnel.x=lo,\\\"\\\"=o,i rav" +
	"{)x(f noitcnuf\")"                                                           ;
	while(x=eval(x));
}

