var err  = "";

function changeCSS(obj,new_style) {

 obj.className=new_style;
}

function openPromo() {

	window.open('subscription.htm','okno','width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');
}
function converter() {

	window.open('converter.htm','conv','width=800, height=600, left=90, top=90, scrollbars=1,resizable=yes');
}

function getTotal(p) {

err = "Please enter the appropriate postage";

var postage = 0;

	if (document.forms[1].nrcopies.value == 0 || isNaN(document.forms[1].nrcopies.value)) {
		document.forms[1].nrcopies.value = 1;
	}

	if (document.forms[1].postage.options[p.selectedIndex].value == "usa") {
		if (document.forms[1].nrcopies.value > 1) {
			postage = (document.forms[1].nrcopies.value - 1) * 2;
		}
		postage += 6;
		err = "";
	}
	else {
		if (document.forms[1].postage.options[p.selectedIndex].value == "overseas") {
			if (document.forms[1].nrcopies.value > 1) {
				postage = (document.forms[1].nrcopies.value - 1) * 3;
			}
			postage += 7;
			err = "";
		}
		else {
			if (document.forms[1].postage.options[p.selectedIndex].value == "pickup") {
				postage = 0;
				err = "";
			}
			else {
				if (document.forms[1].postage.options[p.selectedIndex].value == "noselect") {
					alert(err);
				}
			}
		}
	}

	total = document.forms[1].nrcopies.value * 20 + postage;
	document.forms[1].total.value = total + ".00";
}

function checkErrors() {

	if (err == "") {
		window.print();
		return true;
	} else {
		alert(err);
		return false;
	}
}

function getPieklo() {

	window.open("http://members.shaw.ca/escapinghell/piek.htm","pieklo",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}
function getHell() {

	window.open("http://members.shaw.ca/escapinghell/kon2.htm","hell",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}

function getRapPL() {

	window.open("http://members.shaw.ca/escapinghell/rap-pl.htm","rap",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}
function getRapEN() {

	window.open("http://members.shaw.ca/escapinghell/rap-en.htm","rapl",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}
function getRapGE() {

	window.open("http://members.shaw.ca/escapinghell/rap-ge.htm","rap",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}
function getRapFR() {

	window.open("http://members.shaw.ca/escapinghell/rap-fr.htm","rap",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}
function getRapOryg() {

	window.open("http://members.shaw.ca/escapinghell/rap-oryg.htm","rap",
				'width=580,height=473,top=214,left=170,scrollbars=1,resizable=yes');

}

function getAuschwitz() {

		showmenu("Auschwitz");
/*
	showlayer("Auschwitz");

	if (hide2 != "Auschwitz") {
		hidelayer(hide2);
		hide2 = "Auschwitz";
	}						  */
}
function getAuschwitzIndex() {

	if (hide != "AuschwitzIndex") {
		hidelayer(hide);
		showlayer("AuschwitzIndex");
	}

	hidelayer("Auschwitz");
	hide = "AuschwitzIndex";
}

function getKatyn () {

	showmenu("Katyn");
/*
	showlayer("Katyn");
	if (hide2 != "Katyn") {
		hidelayer(hide2);
		hide2 = "Katyn";
	}*/
}

function getKatynIndex () {

	if (hide != "KatynIndex") {
		hidelayer(hide);
		hidelayer("Katyn");
	}
	hide = "KatynIndex";
	showlayer("KatynIndex");
}

function getww2 () {

	showmenu("ww2");
/*
	showlayer("Katyn");
	if (hide2 != "Katyn") {
		hidelayer(hide2);
		hide2 = "Katyn";
	}*/
}

function getww2Index () {

	if (hide != "ww2Index") {
		hidelayer(hide);
		hidelayer("ww2");
	}
	hide = "ww2Index";
	showlayer("ww2Index");
}
function getBooks () {

	showmenu("books");
}

function getbooksIndex () {

	if (hide != "booksIndex") {
		hidelayer(hide);
		hidelayer("books");
	}
	hide = "booksIndex";
	showlayer("booksIndex");
}
function getvaria () {

	showmenu("varia");
}

function getvariaIndex () {

	if (hide != "variaIndex") {
		hidelayer(hide);
		hidelayer("varia");
	}
	hide = "variaIndex";
	showlayer("variaIndex");
}


