var lightBox;
var swap=new Object();
var tagResize;
var tagDrag;

document.observe('dom:loaded', function () {  lightBox = new Lightbox(); });

function uploadLogoThumbnail(){
	lightBox.start('../imageProcessor.php', 'Upload Main Image', ['450', '440'], ['action=loadLogoUploadForm']);
}

function joinEmailList() {
	var email = document.getElementById('email').value;
	var path = document.getElementById('app_path').value;
	document.getElementById('email').value = '';
	var pars = 'email='+encodeURIComponent(email)+'&action=joinemail';
	new Ajax.Updater('emailJoin',path+'save_handler.php', {method: 'post', evalScripts:true, parameters: pars});
	
}

function updateHotNews(position){
	pars = '';
	if(position == ''){
		position = 1;
	}
	pars = 'position='+position+'&action=updateHotNews';
	new Ajax.Updater('homePageHotNewsContent','save_handler.php', {method: 'post', evalScripts:true, parameters: pars  });	
}

function showHeaderContents(){
	new Effect.Appear($('logo'), {duration: 1.0, from:0.0, to:0.75 });
	//$('logo').show();
	new Effect.Appear($('headerRight'), {duration: 1.0, from:0.0, to:0.75 });
	//$('headerRight').show();	
	window.setTimeout('showCamera()', 2000);
}

function showCamera(){
	new Effect.Appear($('camera'), {duration: 1.0, from:0.0, to:0.75 });
	//$('camera').show();
}

function showCaption(){
	$('logo').hide();
	$('menu').hide();
	$('caption').show();	
}

function hideCaption(){
	$('caption').hide();
	$('logo').show();
	$('menu').show();
}