/* fonction pour l'impression des images */

function printColor(imgChoix) {
var width;
var height;
var url;
	switch (imgChoix) {
		case "1":
			width  = '562';
			height = '654';
			url    = 'coloriage/coloriage01.html';
			break;
		case "2":
			width  = '702';
			height = '540';
			url    = 'coloriage/coloriage02.html';
			break;
		case "3":
			width  = '699';
			height = '622';
			url    = 'coloriage/coloriage03.html';
			break;
		case "4":
			width  = '1121';
			height = '654';
			url    = 'coloriage/coloriage04.html';
			break;
		case "5":
			width  = '671';
			height = '654';
			url    = 'coloriage/coloriage05.html';
			break;
		case "6":
			width  = '966';
			height = '654';
			url    = 'coloriage/coloriage06.html';
			break;
		case "7":
			width  = '901';
			height = '654';
			url    = 'coloriage/coloriage07.html';
			break;
		case "8":
			width  = '2100';
			height = '1437';
			url    = 'coloriage/coloriage08.html';
			break;
		case "9":
			width  = '1055';
			height = '522';
			url    = 'coloriage/coloriage09.html';
			break;
		case "10":
			width  = '538';
			height = '404';
			url    = 'coloriage/coloriage10.html';
			break;
		case "11":
			width  = '764';
			height = '710';
			url    = 'coloriage/coloriage11.html';
			break;
		case "12":
			width  = '824';
			height = '424';
			url    = 'coloriage/coloriage12.html';
			break;
		case "13":
			width  = '728';
			height = '556';
			url    = 'coloriage/coloriage13.html';
			break;
		case "14":
			width  = '1369';
			height = '656';
			url    = 'coloriage/coloriage14.html';
			break;
		case "15":
			width  = '630';
			height = '646';
			url    = 'coloriage/coloriage15.html';
			break;
		case "16":
			width  = '2706';
			height = '1540';
			url    = 'coloriage/coloriage16.html';
			break;
	}

	var window_style = "left=100,top=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=" + width + ",height=" + height;
	var win = window.open(url, 'coloriage', window_style);


}

var clique = 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1); 

function impressionImg() {
	if (mac) {
		alert("Désolé, cette option ne fontionne pas sur mac. Fais pomme-p pour imprimer.");
	} else {
		if (clique == 0) {
			window.print();
			clique++;
		} else {
			window.close();
		}
	}
}
