﻿//file per funzioni Javascript custom

function showSinopsy(idShow){
    //alert(idShow);
    document.location.href= '/showDetail.athx?idShow=' + idShow;
}

function checkCalendar(){
    var cal =querySt('idControl');
    if(cal == 'ArenaCalendar2') 
    {
        $('cal1Body').style.display = 'none';
        $('cal2Body').style.display = 'block';
    }
}

function querySt(ji) {
    hu = window.location.search.substring(1);
    gy = hu.split("&");
    for (i=0;i<gy.length;i++) {
        ft = gy[i].split("=");
        if (ft[0] == ji) {
        return ft[1];
        }
    }
}
function homeRearrange(){
	jQuery(document).ready(function(){
		var partner = jQuery('.partnerLogo').html();
		jQuery('#boxColum > .boxContainer:eq(0)').after('<div class="boxContainer"><div class="box" style="padding-left: 35px;padding-top: 15px;">' + partner + '</div></div>');
		jQuery('.partnerLogo').hide();
		var news = jQuery('#boxColum > .boxContainer:eq(0)');
		jQuery('#boxCallCenter').after('<div class="boxContainer" style="margin-top:10px;">' + news.html() + '</div>');
		jQuery('#leftMenu .boxContainer span').css('padding','0px');
		jQuery('#leftMenu .box').css('padding','5px 10px');
		news.hide();
		
		var teatro = jQuery('#boxColum > .boxContainer:eq(2)').css('margin-top','10px');
		jQuery('#boxCallCenter').after(teatro);
		var showList = jQuery('.showList');
		jQuery('#boxCallCenter').before(showList);
		
		var socialBox = jQuery('#boxFlash').html();
		jQuery('#boxFlash').remove();
		var socialBox1 = jQuery('#boxFlash1').html();
		jQuery('#boxFlash1').remove();
		jQuery('#boxCallCenter').after(socialBox1);
		jQuery('#boxCallCenter').after(socialBox);
		jQuery('#boxCallCenter').css('margin-bottom','10px');
		
	});
}
// carico il contenuto con ajax
function fillIt(month){
    //if (month.startsWith('month') && ($(month).innerHTML == 'toLoad...')){
        //alert('fillIt :' + month);
        new Ajax.Updater(month, '/layout/www1/custom/PerformanceArchive.aspx' ,{ 
            method: 'get', 
            parameters: { month: month}
//            ,onLoading: function(){
//                $(month).setStyle({display: 'none'});
//                alert('Alert...');
//                $(month).setStyle({display: 'block'});
//                }
        });
    //}

}

function toggleArticle(idblock){
    $('article_' + idblock).toggle();
    $('articleLabelOn_' + idblock).toggle();
    $('articleLabelOff_' + idblock).toggle();
}

