


// function open new window

function openWindow(url, target, windowWidth, windowheight, scroll) {

	if(screen){
		leftPos = screen.width / 2 - (windowWidth / 2)
		topPos = screen.height / 2 - (windowheight / 2)
	}

	var new_win = window.open(url, target, "width="+windowWidth+",height="+windowheight+",resizable=no,top="+topPos+", left="+leftPos+",scrollbars="+scroll+",menubar=no,toolbar=no,directories=no,location=no,status=no");
	if(window.focus)new_win.focus();
}

function openWindow_webcast(url, target, windowWidth, windowheight) {

	if(screen){
		leftPos = screen.width / 2 - (windowWidth / 2)
		topPos = screen.height / 2 - (windowheight / 2)
	}

	var new_win = window.open(url, target, "width="+windowWidth+",height="+windowheight+",resizable=no,top="+topPos+", left="+leftPos+",scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no");
	if(window.focus)new_win.focus();
}
		


// this script redirect to the page from the drop down menu

function dropdownMenu(form){
	parent.location.href=form.lista.options[form.lista.selectedIndex].value;
}


// Rollover script rollover, (dostepny na cala strone)
function change(Name,Image,No,Msg) {

        if (document.images) {
                document [Name].src = eval(Image + No + ".src");
        }
        if (Msg) self.status = eval(Image + "2");

        return true
}

// ************************************************************************
// *               GESTION OUVERTURE POPUP SEND TO A FRIEND 
// ************************************************************************
function tellafriend(langID)
{
	urlString = "/inter_" + langID + "/SendToFriend/index.asp?page_url=" + parent.location;
	openWindow(urlString,"sendtofriend", "450", "420", "no");
}




// ************************************************************************
// *   
// *   print script
// *   
// ************************************************************************
function printArticle() {
	
	var agt=navigator.userAgent.toLowerCase();
	if (window.print) {
		setTimeout('window.print();',200);
	}
	else if (agt.indexOf("mac") != -1) {
		alert("Press 'Cmd+p' on your keyboard to print article.");
	}
	else {
		alert("Press 'Ctrl+p' on your keyboard to print article.")
	}
}

/**************************************************
	LANCEUR DE POPUP
		- v = langue (fr, en, us, ...)
		- u = page (educa-bic, bic-university, ...)
*************************************************/
function lancePopup(u,v) {
	window.open("../popups/"+v+"/"+u+".html","Popup","width=619,height=530,left=320,top=320,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}