var miniesFx = [];

function articlePictureList2(class_name, start_color, end_color){
    $$(class_name).each(function(item,i){
    miniesFx[i] = new Fx.Style(item,'border-color', {duration:400});
        item.addEvents({
            'mouseenter':function(ev){
                ev.stopPropagation();
                miniesFx[i].stop();
                miniesFx[i].start(start_color,end_color); 
            },
            'mouseleave':function(ev){
                ev.stopPropagation();
                miniesFx[i].stop();
                miniesFx[i].start(end_color,start_color);
            }
        });
    });
}

function articlePictureList(class_name){

    $$(class_name).each(function(element){ element.setStyle('opacity', 0.5) });

    $$(class_name).each(function(element,i){
		miniesFx[i] = new Fx.Styles(element, {duration:200, wait:false});

		element.addEvent('mouseenter', function(){
			miniesFx[i].start({
				'opacity': 1
			});
		});
 
		element.addEvent('mouseleave', function(){
			miniesFx[i].start({
				'opacity': 0.5
			});
		});

    });
}


function articleCatalogueList(class_name, start_color, end_color){
    $$(class_name).each(function(item,i){
    miniesFx[i] = new Fx.Style(item,'background-color', {duration:400});
        item.addEvents({
            'mouseenter':function(ev){
                ev.stopPropagation();
                miniesFx[i].stop();
                miniesFx[i].start(start_color,end_color); 
            },
            'mouseleave':function(ev){
                ev.stopPropagation();
                miniesFx[i].stop();
                miniesFx[i].start(end_color,start_color);
            }
        });
    });
}

function highRegion (region){
	document.flash.SetVariable("highregion", region);
	document.flash.TPlay("_level0.map");
}

function highRegionFlash (region){
	if( $("region"+region).className=='' ){
		
		$$('.highregion').each(function(item,i){
			item.className='';
		});
		$("region"+region).className = 'highregion';
		
	}
	else{
		$("region"+region).className = '';
	}
}

function printPage( href ){
	
	var curr_loc = location.href;
	if(curr_loc.lastIndexOf('#') > 0){
		anchor = curr_loc.substr(curr_loc.lastIndexOf('#')+1).replace(this.hashParam+'=','');
		//href = href + '#' + 'pic=' + photoArray[anchor.replace('pic=','')];
		href = href + '#' + 'pic=' + anchor.replace('pic=','');
	}
	
	openPage(href,'850','800');
}
