var last_img = new Object();
function _over(img){
	img.src = (img != last_img && img.name != 'sel' ) ? img.src.replace('.gif','_over.gif') : img.src.replace('_sel.gif','_over.gif');
}

function _out(img){
	img.src = (img != last_img && img.name != 'sel' ) ? img.src.replace('_over.gif','.gif') : img.src.replace('_over.gif','_sel.gif');
}

function _home(){
	_launch('../../index.php');
}

function _workshop(){
	_launch('../../courses_general.php');
}

function _launch(URL){
	if(!window.opener){
		window.open(URL,'','');
		window.close();
	} else 	if(!window.opener.closed){
			window.opener.location = URL;
			window.opener.focus();
			window.close();
	} else {
		window.open(URL,'','');
		window.close();
		}
	}
	
function _pdf(pdf){
	var p = window.open('pdf/'+pdf.replace('.jpg','.pdf'),'pdf','left=10,top=10,width=750,height=550,status,resizable');
	p.focus();
}

function _pop(url){
	var w = 760;
	var h = 520;	
	var l = (screen.width-w)/2;
	var t = (screen.height-h)/2;	
	var win = window.open(url,'v','left='+l+',top='+t+',width='+w+',height='+h+',status');
	win.focus();

}