/*  Entry Point  */
/*window.addEvent('domready', function()
{
	
	var Tips1 = new Tips($$('.Tips1'));
	 
	var Tips2 = new Tips($$('.Tips2'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	 
	var Tips3 = new Tips($$('.Tips3'), {
		showDelay: 400,
		hideDelay: 400,
		fixed: true
	});
	 
	var Tips4 = new Tips($$('.Tips4'), {
		className: 'custom'
	});
});
*/

function showPictureHint(posx, posy, obj1) {
	var obj = document.getElementById("map-hint");
 	obj.setStyle('top', posy);
 	obj.setStyle('left', posx);
 	obj.setStyle('display', 'block');
}

function hidePictureHint() {
	var obj = document.getElementById("map-hint");
 	obj.setStyle('display', 'none');
}

window.addEvent('domready', function(){
	if (!$('map-hint')) return;
	$('map-hint').setStyle('opacity', 0);
	$('map-hint').setStyle('display', 'block');
	$('map-hint').setStyle('top', -100);
	
	$('immap').addEvent('mouseleave', function(e){
			e = new Event(e);
			var hint = $('map-hint');
			if(parseInt(hint.getStyle('opacity')) > 0){
				new Fx.Style(hint, 'opacity', {duration: 500, transition: Fx.Transitions.linear}).start(1, 0);
			}
			e.stop();		
	});
	
	$$('area').each(function(el, i){
		el.addEvent('mouseenter', function(e){
			e = new Event(e);
			
			var startPos = this.className.split(',');
			var x = parseInt(startPos[0]);
			var y = parseInt(startPos[1]);
			var hint = $('map-hint');
			if(hint){
				hint.innerHTML = "<p>" + this.alt + "</p>";
				
				if(hint.getStyle('opacity') != 1){
					new Fx.Style(hint, 'opacity', {duration: 500, transition: Fx.Transitions.linear}).start(0, 1);
					hint.setStyle('left', x);
					hint.setStyle('top', y);
				} else {
					new Fx.Style(hint, 'left', {duration: 400, transition: Fx.Transitions.linear}).start(parseInt(hint.getStyle('left')), x);
					new Fx.Style(hint, 'top', {duration: 400, transition: Fx.Transitions.linear}).start(parseInt(hint.getStyle('top')), y);
				} 
			}					
						
			e.stop();
		});
	});

	/*

	$('area1').addEvent('mouseenter', function(e){
			e = new Event(e);
			$('map-hint').setStyle('display', 'block');
			//showHideModalLayer(true);
			e.stop();
		});
	$('area1').addEvent('mouseleave', function(e){
			e = new Event(e);
			$('map-hint').setStyle('display', 'none');
			//showHideModalLayer(false);
			e.stop();
		});
		*/
});


