function openImage(I, W, H) {
	window.open (I, 'newwindow', config='height='+(H+50)+', width='+(W+50)+', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
}

function sendfaq() {
	document.faqform.submit();
}

function sendts() {
	document.tsform.submit();
}

function sendnews() {
	document.newsform.submit();
}

function deleteproductartwork(Value, PID) {
	document.productartworkform.action = 'index.php?site_id=5&action=delete&cobject=' + Value + '&productid=' + PID;
	document.productartworkform.submit();
}

function deletejob(Value) {
	if(confirm('Are You Sure You Want To Delete This Job?')) {
		document.jobform.action = 'index.php?site_id=7&action=delete&job_id=' + Value;
		alert(document.jobform.action);
		document.jobform.submit();
	}
}

function sendproducts(Action, ID, IDT) {
	if(Action == 'delete_technical_data')  {
		document.productsform.action = 'index.php?site_id=3&action=delete&tdtype=' + ID + '&addtype=td&productid=' + IDT;
		if(confirm('Are You Sure You Want To Delete This Information?')) {
			document.productsform.submit();
		}
	} else if(Action == 'delete_reference_and_resources')  {
		document.productsform.action = 'index.php?site_id=3&action=delete&rrtype=' + ID + '&addtype=rr&productid=' + IDT;
		if(confirm('Are You Sure You Want To Delete This Information?')) {
			document.productsform.submit();
		}
	} else if(Action == 'addtd') {
		if(document.productsform.td_name.value == '' || document.productsform.td_file.value == '')
			alert('Please Fill In All Fields');
		else {
			document.productsform.action = 'index.php?site_id=3&action=insert&addtype=td&productid=' + IDT;
			document.productsform.submit();
		}
	} else if(Action == 'edittd') {
		if(document.productsform.ed_name.value == '')
			alert('Please Fill In Required Fields');
		else {
			document.productsform.action = 'index.php?site_id=3&action=update&addtype=tdedit&productid=' + IDT + '&csection=' + ID;
			document.productsform.submit();
		}
	} else if(Action == 'addrr') {
		if(document.productsform.rr_name.value == '' || document.productsform.rr_file.value == '')
			alert('Please Fill In All Fields');
		else {
			document.productsform.action = 'index.php?site_id=3&action=insert&addtype=rr&productid=' + IDT;
			document.productsform.submit();
		}
	} else if(Action == 'editrr') {
		if(document.productsform.ed_name.value == '')
			alert('Please Fill In Required Fields');
		else {
			document.productsform.action = 'index.php?site_id=3&action=update&addtype=rredit&productid=' + IDT + '&csection=' + ID;
			document.productsform.submit();
		}
	} else if(Action == 'addpccs') {
		document.productsform.action = 'index.php?site_id=3&action=insert&addtype=pccs&productid=' + ID;
		document.productsform.submit();
	} else if(Action == 'editpccs') {
		document.productsform.action = 'index.php?site_id=3&action=update&addtype=pccs&productid=' + IDT + '&csection=' + ID;
		document.productsform.submit();
	} else if(Action == 'send') {
		document.productsform.action = 'index.php?site_id=3&action=update&addtype=send&productid=' + ID;
		document.productsform.submit();
	} else
		document.productsform.submit();
}

function DisplayAnswer() {

	var Hours = document.jsform.ElectricianCount.value * ( Number(document.jsform.TearDownTime.value) + Number(document.jsform.SetupTime.value) ) / 60;

	var Legacy_Cost = Hours * document.jsform.HourlyWage.value;

	var Alert = "Labor overhead, per pull, using current techniques and tools: $ " + Math.round(Legacy_Cost, 2);

	var Cost = 4 * document.jsform.WSPrice.value;

	Alert += "\nRetail cost of four Wire Snagger (tm) Model " + Tool[document.jsform.selectWire.value - 1] + "'s: $ " + Math.round(Cost, 2);

	var cost = 4 * document.jsform.WSPrice.value;

	var hours = document.jsform.ElectricianCount.value * ( Number(document.jsform.TearDownTime.value) + Number(document.jsform.SetupTime.value) ) / 60;

	var legacy_cost = hours * document.jsform.HourlyWage.value;

	var count = cost / legacy_cost;

	alert(Alert + "\nNumber of pulls to Break Even: " + Math.round(count, 0) + " pulls");

}
var Tool = new Array();

Tool[Tool.length] = "875";

Tool[Tool.length] = "875";

Tool[Tool.length] = "1000";

Tool[Tool.length] = "1000";

Tool[Tool.length] = "1375";

Tool[Tool.length] = "1375";

Tool[Tool.length] = "1375";

Tool[Tool.length] = "1625";

Tool[Tool.length] = "1625";

Tool[Tool.length] = "1875";

Tool[Tool.length] = "1875";



var Cost = new Array();

Cost[Cost.length] = "249";

Cost[Cost.length] = "249";

Cost[Cost.length] = "279";

Cost[Cost.length] = "279";

Cost[Cost.length] = "319";

Cost[Cost.length] = "319";

Cost[Cost.length] = "319";

Cost[Cost.length] = "389";

Cost[Cost.length] = "389";

Cost[Cost.length] = "429";

Cost[Cost.length] = "429";