// quiz swapper
function get_cookie_quiz_num () {

	var allcookies = document.cookie;
	var pos = allcookies.indexOf ("six_wives_quiz_num=");
	var six_wives_quiz_num = 0;
		
	if (pos != -1) {

		var start = pos + 19;	// value of six_wives_quiz_num
		var end = allcookies.indexOf(";", start);	// end of value
		if (end == -1) end = allcookies.length;
		var value = allcookies.substring (start, end);
		six_wives_quiz_num = unescape (value);
	}
	return six_wives_quiz_num;
}

function set_cookie (quiz_num) {

	var nextyear = new Date ();
	nextyear.setFullYear (nextyear.getFullYear () + 1);
	document.cookie = "six_wives_quiz_num=" + quiz_num + "; expires=" + nextyear.toGMTString();
}

function get_quiz (quiz_num, isSafari) {

	// safari 1.0b2 has a problem refreshing this iframe with document.write
	if (isSafari == false) {

		if (quiz_num == 1) {
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question1.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question1.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q1_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question1_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question1_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne of Cleves\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question1_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine of Aragon\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question1_3_ns.html','answer', 200, 200);\"></map></iframe>";

		} else if (quiz_num == 2) {
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question2.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question2.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q2_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question2_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question2_1_ns.html','answer', 200, 200);\"> <area alt=\"Catherine of Aragon\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question2_2_ns.html','answer', 200, 200);\"><area alt=\"Anne of Cleves\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question2_3_ns.html','answer', 200, 200);\"></map></iframe>";

		} else if (quiz_num == 3) {
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question3.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question3.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q3_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question3_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Howard\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question3_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne of Cleves\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question3_2_ns.html','answer', 200, 200);\"><area alt=\"Anne Boleyn\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question3_3_ns.html','answer', 200, 200);\"></map></iframe>";

		} else if (quiz_num == 4) {
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question4.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question4.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q4_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question4_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question4_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne Boleyn\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question4_2_ns.html','answer', 200, 200);\"><area alt=\"Jane Seymour\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question4_3_ns.html','answer', 200, 200);\"></map></iframe>";

		} else if (quiz_num == 5) {
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question5.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question5.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q5_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question5_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Anne Boleyn\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question5_1_ns.html','answer', 200, 200);\"> <area alt=\"Jane Seymour\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question5_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine Howard\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question5_3_ns.html','answer', 200, 200);\"></map></iframe>";

		} else {	// no cookie or quiz num 6
			return "<iframe height=158 width=343 marginheight=0 marginwidth=0 scrolling=No frameborder=0 name=iframe src=\"iframe/question6.html\"><TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question6.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q6_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question6_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Howard\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question6_1_ns.html','answer', 200, 200);\"> <area alt=\"Catherine of Aragon\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question6_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine Parr\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question6_3_ns.html','answer', 200, 200);\"></map></iframe>";
		}
	} else {

	 	if (quiz_num == 1) {
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question1.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q1_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question1_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question1_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne of Cleves\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question1_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine of Aragon\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question1_3_ns.html','answer', 200, 200);\"></map>";

		} else if (quiz_num == 2) {
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question2.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q2_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question2_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question2_1_ns.html','answer', 200, 200);\"> <area alt=\"Catherine of Aragon\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question2_2_ns.html','answer', 200, 200);\"><area alt=\"Anne of Cleves\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question2_3_ns.html','answer', 200, 200);\"></map>";

		} else if (quiz_num == 3) {
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question3.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q3_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question3_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Howard\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question3_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne of Cleves\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question3_2_ns.html','answer', 200, 200);\"><area alt=\"Anne Boleyn\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question3_3_ns.html','answer', 200, 200);\"></map>";

		} else if (quiz_num == 4) {
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question4.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q4_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question4_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Parr\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question4_1_ns.html','answer', 200, 200);\"> <area alt=\"Anne Boleyn\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question4_2_ns.html','answer', 200, 200);\"><area alt=\"Jane Seymour\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question4_3_ns.html','answer', 200, 200);\"></map>";

		} else if (quiz_num == 5) {
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question5.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q5_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question5_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Anne Boleyn\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question5_1_ns.html','answer', 200, 200);\"> <area alt=\"Jane Seymour\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question5_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine Howard\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question5_3_ns.html','answer', 200, 200);\"></map>";

		} else {	// no cookie or quiz num 6
			return "<TABLE WIDTH=343 BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD COLSPAN=3><IMG SRC=iframe/images/title.gif WIDTH=343 HEIGHT=16 alt=\"Discover the women behind the legends. \" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/question6.gif\" WIDTH=343 HEIGHT=22 alt=\"\" border=0></TD></TR><TR><TD><img src=\"iframe/images/q6_blur_ani.gif\" width=\"70\" height=\"104\" alt=\"\" border=0></TD><TD><img src=\"iframe/images/question6_03.gif\" width=154 height=104 alt=\"\" border=0 usemap=#map></TD><TD><IMG SRC=\"iframe/images/henry.jpg\" WIDTH=119 HEIGHT=104 alt=\"\" border=0></TD></TR><TR><TD COLSPAN=3><IMG SRC=\"iframe/images/bottom.gif\" WIDTH=343 HEIGHT=9 alt=\"\" border=0></TD></TR></TABLE><map name=\"map\"><area alt=\"Catherine Howard\" coords=\"1,38,114,55\" href=\"javascript:openWindow('iframe/question6_1_ns.html','answer', 200, 200);\"> <area alt=\"Catherine of Aragon\" coords=\"1,60,114,76\" href=\"javascript:openWindow('iframe/question6_2_ns.html','answer', 200, 200);\"><area alt=\"Catherine Parr\" coords=\"1,83,137,98\" href=\"javascript:openWindow('iframe/question6_3_ns.html','answer', 200, 200);\"></map>";
		}
	}
}
// end quiz swapper