function getHTML(id, url, pars, onComplete) {
	if(!onComplete) onComplete = function() {}
	new Ajax.Updater( 
		id, 
		url+'.php', 
		{ 	method: 'get',
			evalScripts: true,
			parameters: pars,
			//Send html headers so IE refreshes on each load
			requestHeaders: ['Expires', 'Thu, 17 May 2001 10:17:17 GMT',
							 'Cache-Control', 'no-cache, must-revalidate',
							 'Pragma', 'no-cache'],
			onComplete: onComplete() } 
	);
}

function show_item(item,amount) {
	//Effect.toggle('item'+item, 'appear', { duration: .8 } );
	//Effect.toggle('item_long'+item, 'blind', { duration: .8});
	Effect.Appear('item_long'+item);
	$('newsread'+item).hide();
	$('item'+item).hide();
	Effect.Appear('newsread_close'+item);
	//$('newsread'+item).innerHTML = 'Sluiten';
}

function hide_item(item) {
	//Effect.toggle('item'+item, 'appear', { duration: .8 } );
	//Effect.toggle('item_long'+item, 'blind', { duration: .8});
	$('item_long'+item).hide();
	Effect.Appear('item'+item);
	$('newsread_close'+item).hide();
	Effect.Appear('newsread'+item);
}

function show_text() {
	Effect.toggle('text', 'blind', { duration: .8 });
	Effect.toggle('text_long', 'blind', { duration: 1.0 });
}

function showId(id,cname) {
	window.location='index.php?p=detail&id='+ id +'&cname='+ cname;
}

function show_picture(picture, lbpicture) {
	//alert('picture '+picture+'\n'+'lbpicture '+lbpicture);
	//$('large').style.display = '';
	
	
	$('i_movie').hide();
	$('i_img').show();
	
	$('i_img').src = picture;
	$('a_img').href = lbpicture;
	
	//$('i_img').innerHTML = "<area href='"+ lbpicture + "' rel='lightbox'><img src='"+ picture +"' style='height: 450px; vertical-align: middle' alt='click to enlarge' title='click to enlarge' /></area>";
	//Effect.SlideDown('large', {duration: 1.0});
	
	myLightbox.updateImageList();
}

function show_movie(movie) {
	getHTML('i_movie', 'site/movie_html', 'movie='+ movie);
	$('i_movie').show();
	$('i_img').hide();
}

function setLang(lang) {
	window.location.href = "primo_exposures.html?language="+ lang +"";
	//window.location.reload();
	//later2();
}

function changeText(id) {
	var p = document.getElementById("pid");
	p.style.color = "blue";
}

function changeStyle(name,id) {
	if(!$(name+'_'+id)) return;
	$(name+"_"+id).style.background="#ffd801";
	$(name+'tabel_titel'+id).style.color="#000000";
	$(name+'tabel_arrow'+id).style.color="#000000";
	
}

function changeStyleBack(name,id) {
	if(!$(name+'_'+id)) return;
	$(name+"_"+id).style.background="#1f1d1e";
	$(name+'tabel_titel'+id).style.color="#c7c7c7";
	$(name+'tabel_arrow'+id).style.color="#ffff00";
}




