<!--
function TargetBlank() {
  $$('a.target_blank').each(
  	function(obj){
  		obj.target = "_blank";
  	}
  );
}

//////////////////////////// disable right click //////////////////////////////
function clickIE4() {
	if(event.button==2)
		return false;
}

function clickNS4(e){
	if(document.layers||document.getElementById&&!document.all) {
		if(e.which==2||e.which==3)
			return false;	
	}
}

function disableRightClick() {
	if(document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById) {
		document.onmousedown=clickIE4;
	}
	document.oncontextmenu=function() {
		return false;
	}
}
///////////////////////////////////////////////////////////////////////////////

function welcomeEffects() {
	new Effect.Morph('bodybgimage', {style:'filter:alpha(opacity=100);-moz-opacity:0.99;opacity:0.99;',duration: 0.5});
	new PeriodicalExecuter(function(pe) {showMenu(); pe.stop();}, 1.7);	
}

function showMenu() {
	var prlFirstElement='mainMenu';
	var prlSecondElement=$('pageContent') ? 'pageContent' : 'thumbnailsViewport';
	var prlThirdElement='footer';
	
	new Effect.Parallel([
         	new Effect.BlindDown(prlFirstElement, {sync: true , delay:5}),
         	// new Effect.BlindDown(prlSecondElement, {sync: true , delay:5}),
         	new Effect.BlindDown(prlThirdElement, {sync: true , delay:5})
         ], {duration: 1}	
	);
	
	var allMenuItems=$$('#mainMenu a');
	var mItemsCounter=0;	
	new PeriodicalExecuter(function(pe) {	
		if(mItemsCounter<allMenuItems.length)
			new Effect.Morph(allMenuItems[mItemsCounter].id, {style:'top: 0px; filter:alpha(opacity=100);-moz-opacity:0.99;opacity:0.99;',duration: 0.6});		
		mItemsCounter++;		
		if(mItemsCounter==allMenuItems.length) {
			pe.stop();
			var logoGrowingTimes=0;		 
			new PeriodicalExecuter(function(pe2) {		
				new Effect.Grow('logo', {duration: 0.6});				
				logoGrowingTimes++;
				if(logoGrowingTimes==1) pe2.stop();	
			}, 0.6);		 
		}
	}, 0.7);
}

function resizeContents() {
	$$('html').each(function(obj) {obj.setStyle({ overflow: 'hidden'});});	
	var hV=document.viewport.getHeight();
	if($('pageContent')) {	
		var mT=($('pageContent').style.marginTop).replace("px","");		
		var nH=hV-mT-50;
		$('pageContent').setStyle({ height: nH+'px'});
	}
	if($('thumbnailsViewport')) {
		var mT=(205+(((hV-230)-210)/2)).round();					
		$('thumbnailsViewport').setStyle({ marginTop: mT+'px'});
	}	
}

function init() {
	disableRightClick();
	TargetBlank();
	resizeContents();	
	welcomeEffects();
}

document.observe("dom:loaded", init);
//-->