﻿ieMenu = function(list) {
	if (document.all && document.getElementById) {
		var navRoot = document.getElementById(list);
		if(navRoot) {
			navRoot.onmouseover = function() {
				ieSelectBug(true);
			}
			navRoot.onmouseout = function() {
				ieSelectBug(false);
			}
		}
	}
}

ieSelectBug = function(active) {
	var selectBugOuterDiv = document.getElementById("selectBugOuterDiv");
	var selectBugInnerDiv = document.getElementById("selectBugInnerDiv");

	if (!selectBugOuterDiv || !selectBugInnerDiv)
		return;

	if (active) {
		selectBugOuterDiv.style.height = selectBugOuterDiv.offsetHeight;
		selectBugOuterDiv.filters["revealTrans"].apply();
		selectBugInnerDiv.style.display = "none";
	}
	else {
		selectBugInnerDiv.style.display = "block";
		selectBugOuterDiv.filters["revealTrans"].play();
	}
}

function PrintPage(page){
	var printWindow = window.open(page).print();
}


function show_object(strObjectId) {
	var objDiv = document.getElementById(strObjectId);
	if (objDiv.style.visibility == "hidden") {
		objDiv.style.visibility = "visible";
	} else {
		objDiv.style.visibility = "hidden";
	}
}

function change_image(nome, url) {
	if(document.images[nome]) {
		document.images[nome].src=url;
	}
}

function set_PageTracker(objectID)
{
	var checkBox = document.getElementById(objectID);
	if(checkBox) {
		//pageTracker._link('http://prodottidiborsa.vola.it/FE/rispondi_page.php?numPagina=1&fine=');
	}
}

/*
* track the registration
*/
function TrackRegistration(orderID) {
	fn77TTransaction('Registration', 'orderid=' + orderID);
	var pageTracker = _gat._getTracker("UA-5929208-1");
	pageTracker._trackPageview('/Registration/');
}

function Disclaimer(documentUrl) {
	window.open('/IT/download.aspx?document=' + documentUrl,'','height=750, width=800'); 
	return false;
}


$(document).ready(function() {
    /*$("#accordion").accordion({ 
        active: false,
        animated: 'slide',
        header: 'h2',
        fillSpace: false,
        clearStyle:true
      }
    );
    */
    $('#accordion h2').click(function() {
		$(this).next().slideToggle('slow');
		return false;
	}).next().hide();


	$('.image-gallery-1, .image-gallery-2, .image-gallery-3, .image-gallery-4, .image-gallery-5').click(function() {
	alert($(this).attr('class'));
		var src0 = $('.image-gallery-1').attr("src");
		var src1 = $(this).attr("src");
    $('.image-gallery-1').animate({opacity: 0.0}, 500, function(){
            $('.image-gallery-1').attr("src",src1);
            $('.image-gallery-1').animate({opacity: 1.0}, 500, function() {
							$(this).attr("src",src0);
            }); 
            
    } );
	});
});

