var ddsmoothmenu={arrowimages:{down:['downarrowclass','/files_layout/down.gif',23],right:['rightarrowclass','/files_layout/right.gif']},transition:{overtime:300,outtime:300},shadow:{enable:true,offsetx:5,offsety:5},showhidedelay:{showdelay:100,hidedelay:200},detectwebkit:navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1,detectie6:document.all&&!window.XMLHttpRequest,getajaxmenu:function($,setting){var $menucontainer=$('#'+setting.contentsource[0])
$menucontainer.html("Loading Menu...")
$.ajax({url:setting.contentsource[1],async:true,error:function(ajaxrequest){$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)},success:function(content){$menucontainer.html(content)
ddsmoothmenu.buildmenu($,setting)}})},buildmenu:function($,setting){var smoothmenu=ddsmoothmenu
var $mainmenu=$("#"+setting.mainmenuid+">ul")
$mainmenu.parent().get(0).className=setting.classname||"ddsmoothmenu"
var $headers=$mainmenu.find("ul").parent()
$headers.hover(function(e){$(this).children('a:eq(0)').addClass('selected')},function(e){$(this).children('a:eq(0)').removeClass('selected')})
$headers.each(function(i){var $curobj=$(this).css({zIndex:100-i})
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
$subul.data('timers',{})
this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:$subul.outerWidth(),subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1?true:false
$subul.css({top:this.istopheader&&setting.orientation!='v'?this._dimensions.h+"px":0})
$curobj.children("a:eq(0)").css(this.istopheader?{paddingRight:smoothmenu.arrowimages.down[2]}:{}).append('<img src="'+(this.istopheader&&setting.orientation!='v'?smoothmenu.arrowimages.down[1]:smoothmenu.arrowimages.right[1])
+'" class="'+(this.istopheader&&setting.orientation!='v'?smoothmenu.arrowimages.down[0]:smoothmenu.arrowimages.right[0])
+'" style="border:0;" />')
if(smoothmenu.shadow.enable){this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx:this._dimensions.w),y:(this.istopheader?$subul.offset().top+smoothmenu.shadow.offsety:$curobj.position().top)}
if(this.istopheader)
$parentshadow=$(document.body)
else{var $parentLi=$curobj.parents("li:eq(0)")
$parentshadow=$parentLi.get(0).$shadow}
this.$shadow=$('<div class="ddshadow'+(this.istopheader?' toplevelshadow':'')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px',top:this._shadowoffset.y+'px'})}
$curobj.hover(function(e){var $targetul=$subul
var header=$curobj.get(0)
clearTimeout($targetul.data('timers').hidetimer)
$targetul.data('timers').showtimer=setTimeout(function(){header._offsets={left:$curobj.offset().left,top:$curobj.offset().top}
var menuleft=header.istopheader&&setting.orientation!='v'?0:header._dimensions.w
menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())?(header.istopheader&&setting.orientation!='v'?-header._dimensions.subulw+header._dimensions.w:-header._dimensions.w):menuleft
if($targetul.queue().length<=1){$targetul.css({left:menuleft+"px",width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'},ddsmoothmenu.transition.overtime)
if(smoothmenu.shadow.enable){var shadowleft=header.istopheader?$targetul.offset().left+ddsmoothmenu.shadow.offsetx:menuleft
var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety:header._shadowoffset.y
if(!header.istopheader&&ddsmoothmenu.detectwebkit){header.$shadow.css({opacity:1})}
header.$shadow.css({overflow:'',width:header._dimensions.subulw+'px',left:shadowleft+'px',top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'},ddsmoothmenu.transition.overtime)}}},ddsmoothmenu.showhidedelay.showdelay)},function(e){var $targetul=$subul
var header=$curobj.get(0)
clearTimeout($targetul.data('timers').showtimer)
$targetul.data('timers').hidetimer=setTimeout(function(){$targetul.animate({height:'hide',opacity:'hide'},ddsmoothmenu.transition.outtime)
if(smoothmenu.shadow.enable){if(ddsmoothmenu.detectwebkit){header.$shadow.children('div:eq(0)').css({opacity:0})}
header.$shadow.css({overflow:'hidden'}).animate({height:0},ddsmoothmenu.transition.outtime)}},ddsmoothmenu.showhidedelay.hidedelay)})})
$mainmenu.find("ul").css({display:'none',visibility:'visible'})},init:function(setting){if(typeof setting.customtheme=="object"&&setting.customtheme.length==2){var mainmenuid='#'+setting.mainmenuid
var mainselector=(setting.orientation=="v")?mainmenuid:mainmenuid+', '+mainmenuid
document.write('<style type="text/css">\n'
+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
+'</style>')}
this.shadow.enable=(document.all&&!window.XMLHttpRequest)?false:this.shadow.enable
jQuery(document).ready(function($){if(typeof setting.contentsource=="object"){ddsmoothmenu.getajaxmenu($,setting)}
else{ddsmoothmenu.buildmenu($,setting)}})}}
$(document).ready(function(){$('div.id_related').hide();$('div.id_related:first').show();$('.related_list li img:first').attr("src","/files_layout/minus_16x16_graywhite.png");$('.related_list li img').click(function(){var id=$(this).attr('id');if($('#id_related'+id).is(':hidden')||$('#id_related'+id).is(':none')){$('.id_related div').parent().slideUp();$('.related_list li img').attr("src","/files_layout/plus_16x16_green.png");$('#id_related'+id).slideDown();$(this).attr("src","/files_layout/minus_16x16_graywhite.png");}
return false;});});$(document).ready(function(){$('#slideShowItems div').hide().css({position:'absolute',width:'480px'});var currentSlide=-1;var prevSlide=null;var slides=$('#slideShowItems div');var interval=null;var FADE_SPEED=500;var DELAY_SPEED=6000;var html='<ul id="slideShowCount">'
for(var i=slides.length-1;i>=0;i--){html+='<li id="slide'+i+'" class="slide"><span>'+(i+1)+'</span></li>';}
html+='</ul>';$('#SlideShow').after(html);for(var i=slides.length-1;i>=0;i--){$('#slide'+i).bind("click",{index:i},function(event){currentSlide=event.data.index;gotoSlide(event.data.index);});};if(slides.length<=1){$('.slide').hide();}
nextSlide();function nextSlide(){if(currentSlide>=slides.length-1){currentSlide=0;}else{currentSlide++}
gotoSlide(currentSlide);}
function gotoSlide(slideNum){if(slideNum!=prevSlide){if(prevSlide!=null){$(slides[prevSlide]).stop().hide();$('#slide'+prevSlide).removeClass('selectedTab');}
$('#slide'+currentSlide).addClass('selectedTab');$('#slide'+slideNum).addClass('selectedTab');$('#slide'+prevSlide).removeClass('selectedTab');$(slides[slideNum]).stop().slideDown(FADE_SPEED,function(){$(this).css({opacity:1});if(jQuery.browser.msie){this.style.removeAttribute('filter');}});prevSlide=currentSlide;if(interval!=null){clearInterval(interval);}
interval=setInterval(nextSlide,DELAY_SPEED);}}});$(document).ready(function(){$('div.center_games_text').hide();$('#hideh0').click(function(){$('div.center_games_text').hide();});$('#showh0').click(function(){$('div.center_games_text').show();});$('#toggleh0').click(function(){$('div.center_games_text').toggle();});$('#hideh1').click(function(){var id=$(this).attr('id');$('#center_games_text'+id).slideDown('slow');});$('#showh1').click(function(){var id=$(this).attr('id');$('#center_games_text'+id).slideUp('fast');});$('input.center_games_toggle').click(function(){var id=$(this).attr('id');$('#center_games_text'+id).slideToggle(400);});});function FeedMenu(sLinkSelector,sClass){var jqoFeedMenu=$('<span class="feed_menu"><select></select></span>');var jqoSelect=jqoFeedMenu.find('select');if(sClass){jqoFeedMenu.addClass(sClass);}
var defaults={links:sLinkSelector||'link[type*=rss],link[type*=atom]'};this.build=function(mFeedLinks){mFeedLinks=mFeedLinks||defaults.links;var oAtom=$('<optgroup label="Atom Feeds"></optgroup>');var oRSS=$('<optgroup label="RSS Feeds"></optgroup>');var oAll=[];$(mFeedLinks).each(function(){var sFeedType=$(this).is('link[type*=rss]')?"rss":$(this).is('link[type*=atom]')?"atom":null;var sFeedTitle=$(this).is('link')?"RSS '"+$(this).attr('title')+"'":$(this).attr('title');var oOption=$('<option></option>')
.html(sFeedTitle)
.attr('value',$(this).attr('href'))
.click(function(){document.location.href=$(this).attr('value');jqoFeedMenu.removeClass('feed_menu_focused');});if(sFeedType=='rss'){oRSS.append(oOption);}else if(sFeedType=='atom'){oAtom.append(oOption);}
oAll.push(oOption);});if(oRSS.find('option').length>1){if($.browser.opera){jqoSelect.append(oRSS.find('option'));}else{jqoSelect.append(oRSS);}}
if(oAtom.find('option').length>1){if($.browser.opera){jqoSelect.append(oAtom.find('option'));}else{jqoSelect.append(oAtom);}}else{for(opt in oAll){jqoSelect.append(oAll[opt]);}}
jqoSelect
.blur(function(){if($.browser.msie||$.browser.safari||$.browser.opera){this.selectedIndex=-1;}
jqoFeedMenu.removeClass('open');})
.focus(function(){if($.browser.msie||$.browser.safari||$.browser.opera){this.selectedIndex=-1;}
jqoFeedMenu.addClass('open');})
.change(function(){if($.browser.msie||$.browser.safari||$.browser.opera){var i=this.selectedIndex;this.selectedIndex=-1;if(i>-1){var o=this.options[i];this.selectedIndex=-1;document.location.href=$(o).attr('value');}}})
.get(0).selectedIndex=-1;}
this.write=function(mTarget){mTarget=mTarget||'body';this.build();$(mTarget).append(jqoFeedMenu);}}
var aa=null;var ww=650;var hh=500;var ll=Math.floor((screen.width-ww)/2);var tt=Math.floor((screen.height-hh)/2);function window_popup(url)
{aa=window.open(url,'aa',"scrollbars=yes,resizable=no,width="+ww+",height="+hh+",top="+tt+",left="+ll)
aa.focus();}
function inviaform(){window.open('','popupname','scrollbars=yes,width=650,height=450');document.getElementById('dati').submit();}
function ConfermaOperazione(dati){var email=document.dati.mail.value;var email_reg_exp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;if((dati.mail.value==""))
{var msg=window.alert("Please, insert your email address.");dati.mail.select();return false;}
else if(!email_reg_exp.test(email)){alert("Please, check your email address.");dati.mail.select();return false;}
else
return richiesta;}
function ConfermaFooter(dati_footer){var email=document.dati_footer.mail.value;var email_reg_exp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;if((dati_footer.mail.value==""))
{var msg=window.alert("Please, insert your email address.");dati_footer.mail.select();return false;}
else if(!email_reg_exp.test(email)){alert("Please, check your email address.");dati_footer.mail.select();return false;}
else
return richiesta;}
function campotesto(){if(document.ricerca.title_search.value=="All")
document.ricerca.title_search.value="";}
function campotesto2(){if(document.ricerca.software_search.value=="All")
document.ricerca.software_search.value="";}
function ConfirmForm(contattaci){var email=document.contattaci.mail.value;var email_reg_exp=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;var utente=document.contattaci.nome_utente.value;var utente_reg_exp=/^([a-zA-Z0-9,\.\;\:\?\!\_\-\ ])+$/;if((contattaci.nome_utente.value==""))
{var msg=window.alert("Please, insert your name or a nick name.");contattaci.nome_utente.select();return false;}
else if(!utente_reg_exp.test(utente)){alert("Please, use only a-z chars.");contattaci.nome_utente.select();return false;}
if((contattaci.mail.value==""))
{var msg=window.alert("Please, type your e-mail address.");contattaci.mail.select();return false;}
else if((contattaci.mail.value=="Inserire un indirizzo valido"))
{var msg=window.alert("Please, check e-mail address.");contattaci.mail.select();return false;}
else if(!email_reg_exp.test(email)){alert("Please, check e-mail address.");contattaci.mail.select();return false;}
else if((contattaci.destinatario.value=="(Options)"))
{var msg=window.alert("Please, select an option.");return false;}
else if((contattaci.commento.value==""))
{var msg=window.alert("Write a message.");return false;}
if((contattaci.codice_sessione.value==""))
{var msg=window.alert("Type the same code showed on the left.");contattaci.codice_sessione.select();return false;}
else
var richiesta=window.confirm("Your message will be send. Click OK to continue.");return richiesta;}
