//Menu a Sinistra
var mnuLeft = new Array();
//Parametri ... (Titolo, Link , Target, Immagine, Immagine Selezionata)
mnuLeft[mnuLeft.length] = new Array('Home Page','main.htm','_self','immagini/mnuHomePage.gif','immagini/mnuHomePageS.gif');
mnuLeft[mnuLeft.length] = new Array('Istruzioni','dollmakerHome.htm','_self','immagini/mnuIstruzioni.gif','immagini/mnuIstruzioniS.gif');
mnuLeft[mnuLeft.length] = new Array('I Miei Dollmaker','','_self','immagini/mnuIlMioDollmaker.gif','immagini/mnuIlMioDollmakerS.gif');

var myMakers = new Array();
myMakers[myMakers.length] = new Array('Unique','dollmakerUnique.htm','_self');
myMakers[myMakers.length] = new Array('Candy','dollmakerCandy.htm','_self');
myMakers[myMakers.length] = new Array('MiniCandy','dollmakerMiniCandy.htm','_self');
myMakers[myMakers.length] = new Array('Bonitas','dollmakerBonitas.htm','_self');
myMakers[myMakers.length] = new Array('Hello Kitty','dollmakerHelloKitty.htm','_self');
myMakers[myMakers.length] = new Array('Dolls\' House','dollmakerDollsHouse.htm','_self');

var imgPreload = '';
for (var i=0; i<mnuLeft.length; i++) {
	imgPreload = new Image();
	imgPreload.src = mnuLeft[i][4];
}

function showIMG(obj, img) {
	obj.src = img;
}

function showTXT(txt) {
	//document.getElementById('desButton').innerHTML = txt;
}

function terminateSwitch(newImg) {
	document.getElementById("clockImage").src = newImg;
	document.getElementById("clockImage").style.visibility = 'visible';
	document.getElementById("clockImageBack").style.background = "";
}

function fade(newImg) {
	var ver=navigator.appVersion;
	var agent=navigator.userAgent;
	var dom=document.getElementById?1:0;
	var opera5=agent.indexOf("Opera 5")>-1;
	var ie5=(ver.indexOf("MSIE 5")>-1 && dom && !opera5)?1:0;
	var ie6=(ver.indexOf("MSIE 6")>-1 && dom && !opera5)?1:0;
	var ie4=(document.all && !dom && !opera5)?1:0;
	var ie=ie4||ie5||ie6;
	var mac=agent.indexOf("Mac")>-1;
	var ns6=(dom && parseInt(ver) >= 5) ?1:0; 
	var ns4=(document.layers && !dom)?1:0;
	var bw=(ie6 || ie5 || ie4 || ns4 || ns6 || opera5);
	//
	if (ie5||ie6&&!mac) {
		document.getElementById("clockImageBack").style.background="url(" + newImg + ")";
		document.getElementById("clockImage").style.visibility = 'visible';
		document.getElementById("clockImage").style.filter = 'blendTrans(duration=0.9)';
		document.getElementById("clockImage").style.width = '80px';
		document.getElementById("clockImage").filters.blendTrans.apply();
		document.getElementById("clockImage").onfilterchange = "";
		document.getElementById("clockImage").style.visibility = 'hidden';
		document.getElementById("clockImage").onfilterchange = function(){ terminateSwitch(newImg); };
		document.getElementById("clockImage").filters.blendTrans.play();
	} else {
		document.getElementById("clockImage").src = newImg;
	}
}

function showTime() {
	var time = new Date();
	var hours = time.getHours();
	if (hours<10) hours='0'+hours;
	var minutes = time.getMinutes();
	if (minutes<10) minutes='0'+minutes;
	var seconds = time.getSeconds();
	if (seconds<10) seconds='0'+seconds;
	var imgHour = 'immagini/clock/buonanotte.gif';
	if ((parseInt(hours)>=6)&&(parseInt(hours)<12)) imgHour = 'immagini/clock/buongiorno.gif';
	if ((parseInt(hours)>=12)&&(parseInt(hours)<14)) imgHour = 'immagini/clock/orapranzo.gif';
	if ((parseInt(hours)>=14)&&(parseInt(hours)<19)) imgHour = 'immagini/clock/buonpomeriggio.gif';
	if ((parseInt(hours)>=19)&&(parseInt(hours)<21)) imgHour = 'immagini/clock/oracena.gif';
	if ((parseInt(hours)>=21)&&(parseInt(hours)<23)) imgHour = 'immagini/clock/buonasera.gif';
	if (document.getElementById('clockImage').src.indexOf(imgHour) < 0) fade(imgHour);
	document.getElementById('clockTime').innerHTML = hours + ':' + minutes + ':' + seconds;
}

function showDate() {
	var time = new Date();
	var day = time.getDate();
	if (day<10) day='0'+day;
	var month = time.getMonth()+1;
	if (month<10) month='0'+month;
	var year = time.getFullYear();
	document.getElementById('clockDate').innerHTML = day + '/' + month + '/' + year;
}

function showDateTime() {
	showDate();
	showTime();
	window.setTimeout('showDateTime();', 1000);
}

function showClock() {
	document.write('<div id="clock" name="clock" style="width: 80px; background: #ccaadd;">');
	document.write('<div class="text" id="clockDate" name="clockDate" style="text-align: center; width: 80px; border-top: 1px solid #702787; border-left: 1px solid #702787; border-right: 1px solid #702787;"></div>');
	document.write('<div id="clockImageBack" name="clockImageBack" style="width: 80px; border: 1px solid #702787;"><img id="clockImage" name="clockImage" src="immagini/spaziatore.gif" width="78" height="60"></div>');
	document.write('<div class="text" id="clockTime" name="clockTime" style="text-align: center; width: 80px; border-bottom: 1px solid #702787; border-left: 1px solid #702787; border-right: 1px solid #702787;"></div>');
	document.write('</div>');
	showDateTime();
}

var d = document;
d.write('<table id="screentable" summary="main table" border="0" cellspacing="0" cellpadding="0">');
d.write('<tbody>');
d.write('<tr>');
	d.write('<td style="text-align: center;">');
		d.write('<table id="websitetable" summary="website table" border="0" cellspacing="0" cellpadding="0">');
		d.write('<tbody>');
		d.write('<tr>');
			d.write('<td><img src="immagini/spaziatore.gif" alt="" title="" width="1" heigth="1"></td>');
			d.write('<td>');
				d.write('<table summary="website table" border="0" cellspacing="0" cellpadding="0">');
				d.write('<tbody>');
				d.write('<tr>');
					d.write('<td><img src="immagini/logoTop.gif" alt="LF" title="Fantasy by Lucy"></td>');
					d.write('<td><img src="immagini/title.gif" alt="Fantasy by Lucy" title="Fantasy by Lucy"></td>');
					d.write('<td><img src="immagini/stars.gif" alt="" title="Fantasy by Lucy"></td>');
					d.write('<td style="background: url(immagini/finalTop.gif); width: 342px; text-align: right; vertical-align: top; padding-top: 8px;">');
						d.write('<span id="desButton" class="textwhite" style="margin-right: 10px;"></span>');
						d.write('<span style="border: 0px; margin-right: 5px;"><a href="links.htm" title="Links" target="_self"><img border="0" src="immagini/btnLinks.gif" alt="Links" title="Links" onmouseover="showIMG(this,\'immagini/btnLinksS.gif\');showTXT(\'Links\');" onmouseout="showIMG(this, \'immagini/btnLinks.gif\');showTXT(\'\');"></a></span>');
						d.write('<span style="border: 0px; margin-right: 5px;"><a href="mailto:luciadolls@yahoo.it" title="luciadolls@yahoo.it" target="_blank"><img border="0" src="immagini/btnContacts.gif" alt="Contatti" title="Contatti" onmouseover="showIMG(this,\'immagini/btnContactsS.gif\');showTXT(\'Contatti\');" onmouseout="showIMG(this, \'immagini/btnContacts.gif\');showTXT(\'\');"></a></span>');
					d.write('</td>');
				d.write('</tr>');
				d.write('</tbody>');
				d.write('</table>');
				//
				d.write('<table id="maintable" summary="main table" border="0" cellspacing="0" cellpadding="0">');
				d.write('<tbody>');
				d.write('<tr>');
					d.write('<td style="vertical-align: top;">');
						d.write('<img src="immagini/menuTop.gif" alt="" title="">');
						d.write('<table id="menutable" summary="menu table" border="0" cellspacing="0" cellpadding="0">');
						d.write('<tbody>');
						d.write('<tr>');
							d.write('<td><img src="immagini/menuLeft.gif" alt="" title=""></td>');
							d.write('<td style="vertical-align: top; background-image: url(immagini/menuBackground.jpg);">');
								//Menu SX
								d.write('<div id="menusx">');
									for (var i=0; i<mnuLeft.length; i++) {
										if (i==2) {
											d.write('<img border="0" src="' + mnuLeft[i][3] + '" alt="' + mnuLeft[i][0] + '" title="' + mnuLeft[i][0] + '"><br>');
											for (var k=0; k<myMakers.length; k++) {
												d.write('<a class="linkMenu" style="margin-left: 90px;" href="' + myMakers[k][1] + '" title="' + myMakers[k][0] + '" target="' + myMakers[k][2] + '">' + myMakers[k][0] + '</a><br>');
											}
										} else {
											d.write('<a href="' + mnuLeft[i][1] + '" title="' + mnuLeft[i][0] + '" target="' + mnuLeft[i][2] + '"><img border="0" src="' + mnuLeft[i][3] + '" alt="' + mnuLeft[i][0] + '" title="' + mnuLeft[i][0] + '" onmouseover="showIMG(this,\'' + mnuLeft[i][4] + '\');" onmouseout="showIMG(this,\'' + mnuLeft[i][3] + '\');"></a><br>');
										}
									}
								d.write('</div>');
							d.write('</td>');
							d.write('<td><img src="immagini/menuRight.gif" alt="" title=""></td>');
						d.write('</tr>');
						d.write('</tbody>');
						d.write('<tfoot>');
						d.write('<tr>');
							d.write('<td colspan="3"><img src="immagini/menuBottom.gif" alt="" title=""></td>');
						d.write('</tr>');
						d.write('</tfoot>');
						d.write('</table>');
						
						d.write('<table id="copyrightstable" summary="copyrights table" border="0" cellspacing="0" cellpadding="0">');
						d.write('<tbody>');
						d.write('<tr>');						
							d.write('<td><img src="immagini/spaziatore.gif" width="25" height="35" alt="" title=""></td>');
							d.write('<td style="background-image: url(immagini/bannerBox.gif);"><a href="http://www.enryfantasy.too.it" title="Final Fantasy by Enry" target="_blank"><img class="imgLink" border="0" src="immagini/bannerEnry.jpg" alt="Final Fantasy by Enry" title="Final Fantasy by Enry"></a></td>');
							d.write('<td><img src="immagini/copyrights.gif" alt="" title=""></td>');
						d.write('</tr>');
						d.write('</tbody>');
						d.write('<tfoot>');
							d.write('<tr>');
								d.write('<td colspan="3" style="text-align: right; padding-top: 8px; padding-right: 14px;">');
								showClock();
								d.write('</td>');
							d.write('</tr>');
						if (location.href.toLowerCase().indexOf('main.htm')>0) {
							d.write('<tr>');
								d.write('<td colspan="3" style="text-align: right; padding-top: 8px; padding-right: 14px;"><img style="border: 1px solid #fbbbe8;" src="http://cgi-serv.digiland.it/Count.cgi?df=lucyfantasy&dd=E&ft=0" alt="" title=""></td>');
							d.write('</tr>');
						}
						d.write('<tr>');
							d.write('<td colspan="3"><img src="immagini/linksBottom.gif" alt="" title=""></td>');
						d.write('</tr>');
						d.write('<tr>');
							d.write('<td id="colcategorie" colspan="3" style="background: #ccaadd; text-align: left; padding-top: 8px; padding-left: 14px;">');
							showCategories();
							d.write('</td>');
						d.write('</tr>');
						d.write('</tfoot>');
						d.write('</table>');
					d.write('</td>');
					d.write('<td id="maintd">');
