document.section_pending = 1;
document.section_completed = 1;

// LAUNCES TNT MID-SCREEN
function tnt(number) {
	var width = 820;
	var height = 600;
	var screenX = screen.width
	var screenY = screen.height

	var x = (screenX - width)/2;
	var y = (screenY - height)/3;

	// STANDARD TNT URL
	address = "http://www.tnt.com/country/en_gb.html";
	// PACKAGE SPECIFIC URL
	//address = "http://cgi.tnt.co.uk/trackntrace/conenquiry.asp?ACTION=TRACK&TYPE=C&QUERY=" + number;

	var tnt = window.open(address,"tnt","status=yes,scrollbars=yes,resizable=yes,location=yes,toolbar=yes,menubar=yes,width=" + width + ",height=" + height + ", top=" + y + ", left=" + x);
	tnt.focus();
}

// LAUNCES LIGHTMAKER MID-SCREEN
function lightmaker() {
	var width = 790;
	var height = 500;
	var screenX = screen.width
	var screenY = screen.height

	var x = (screenX - width)/2;
	var y = (screenY - height)/3;

	var lightmaker = window.open("http://www.lightmaker.com","lightmaker","status=yes,scrollbars=yes,resizable=yes,location=yes,toolbar=yes,menubar=yes,width=" + width + ",height=" + height + ", top=" + y + ", left=" + x);
	lightmaker.focus();
}

function help() {
	var width = 790;
	var height = 500;
	var screenX = screen.width
	var screenY = screen.height

	var x = (screenX - width)/2;
	var y = (screenY - height)/3;

	var lightmaker = window.open("help.cfm","help","status=yes,scrollbars=yes,resizable=yes,location=no,toolbar=no,menubar=no,width=" + width + ",height=" + height + ", top=" + y + ", left=" + x);
	lightmaker.focus();
}

// SHOWS AND HIDES SECTIONS
function showhide(section) {
	if (document["section_" + section] == 1) {
		document.getElementById(section).style.display="none";
		document.getElementById("arrow_" + section).src = "images/arrow_closed.gif";
		document.getElementById("text_" + section).innerHTML = "View";

		document["section_" + section] = 0;
	} else {
		document.getElementById(section).style.display="";
		document.getElementById("arrow_" + section).src = "images/arrow_open.gif";
		document.getElementById("text_" + section).innerHTML = "Hide";

		document["section_" + section] = 1;
	}
	
	//text_completed
}

// SHOWS AND HIDES PO DETAILS
function show_po_pending(postal_order) {
	if (document.getElementById("view_po_pending_" + postal_order).innerHTML == "Hide") {
		document.getElementById("postal_order_pending_" + postal_order).style.display="none";
		document.getElementById("arrow_view_po_pending_" + postal_order).src = "images/arrow_closed.gif";
		document.getElementById("view_po_pending_" + postal_order).innerHTML = "View";
	} else {
		document.getElementById("postal_order_pending_" + postal_order).style.display="";
		document.getElementById("arrow_view_po_pending_" + postal_order).src = "images/arrow_open.gif";
		document.getElementById("view_po_pending_" + postal_order).innerHTML = "Hide";
	}
}

function show_po_despatched(postal_order) {
	if (document.getElementById("view_despatched_po_" + postal_order).innerHTML == "Hide") {
		document.getElementById("postal_order_despatched_" + postal_order).style.display="none";
		document.getElementById("arrow_view_despatched_po_" + postal_order).src = "images/arrow_closed.gif";
		document.getElementById("view_despatched_po_" + postal_order).innerHTML = "View";
	} else {
		document.getElementById("postal_order_despatched_" + postal_order).style.display="";
		document.getElementById("arrow_view_despatched_po_" + postal_order).src = "images/arrow_open.gif";
		document.getElementById("view_despatched_po_" + postal_order).innerHTML = "Hide";
	}
}

function rollover(section) {
	//document.all["title_" + section].style.backgroundColor = "#2E2E80";
	//document.all["title1_" + section].style.backgroundColor = "#2E2E80";
	//document.all["title2_" + section].style.backgroundColor = "#2E2E80";
	//document.all["title3_" + section].style.backgroundColor = "#2E2E80";
	//document.all["text_" + section].style.backgroundColor = "#2E2E80";	
}

function rollout(section) {
	//document.all["title_" + section].style.backgroundColor = "#3E3E90";
	//document.all["title1_" + section].style.backgroundColor = "#3E3E90";
	//document.all["title2_" + section].style.backgroundColor = "#3E3E90";
	//document.all["title3_" + section].style.backgroundColor = "#3E3E90";
	//document.all["text_" + section].style.backgroundColor = "#3E3E90";
}