/**
 * function  popUpWindow - opens a new pop up window
 *
 * Order: The function opens a new pop up window with the given size.
 * According to the OS and the browser, it returns HTML code
 *
 * @param   adresse : page uri to display in the window;
 * @param   nom : name of the window
 * @param   largeur : width of the window
 * @param   hauteur : height of the window
 * @param   redim : "yes" to set the window resizable, "no" to set the window not resizable
 * @param   scrollin : "yes" to force scrolling, "no" to disable scrolling, "auto" to enable scrolling
 */
function popUpWindow(adresse, nom, largeur, hauteur, redim, scrolling) {
	win = window.open(adresse, nom, 'toolbar=no,location=no,status=no,menubar=no,width='+largeur+',height='+hauteur+',resizable='+redim+',scrollbars='+scrolling);
	win.focus();
}


function openVideo(doi) {
	// Ouvre une fenetre video
	popUpWindow("/videos/viewer.php?doi="+ doi, "WS_Video"+ doi, 1000, 700, 'yes', 'no');
}

function openInterviews(doi) {
	// Ouvre une fenetre  avis d'expert
	popUpWindow("/interviews/viewer.php?doi="+ doi, "WS_Interview"+ doi, 1000, 700, 'yes', 'no');
}



function popUpDebate(debate) {
	// Ouvre une fenetre debates
	popUpWindow("/experts/debates.php?doi=" + debate + "&redim=1", "WS_Debate", 800, 520, 'yes', 'no');
}


function popUpExpertOpinion(adresse) {
	// Ouvre une fenetre  avis d'expert
	popUpVideo(adresse);
}

function popUpLecture(lt) {
	// Ouvre une fenetre lectures (Flash)
	popUpWindow("/lectures/viewer.php?doi=" + lt + "&redim=1", "WS_Lecture"+ lt, 1024, 768, 'yes', 'no');
}

function popUpLectureHTML(lt) {
	// Ouvre une fenetre lectures en ancienne version (HTML)
	popUpWindow("/lectures/viewer_html.php?doi=" + lt + "&redim=1", "WS_Lecture"+ lt, 800, 600, 'yes', 'no');
}



function popUpTechnique(adresse) {
	// Ouvre une fenetre Operative Technique
	popUpWindow(adresse, "WS_Technique", 760, 500, 'yes', 'no');
}

function popUpStorz(adresse) {
	// Ouvre une fenetre KarlStorz Wings
	popUpWindow(adresse, "WS_Karlstorz", 760, 425, 'yes', 'no');
}
