// JavaScript Document

/*  INSTRUCTIONS FOR USE

Most functions here are used to write text to the main page (index.htm)

To write content you send html within javascript to the mainContent id, example:
	document.getElementById('mainContent').innerHTML = 'your html goes here';

everything after the "=" sign must be enclosed by single quotes and followed by a semi-colon
no breaks are allowed in javascript, all must be on one line, example:
	
	not allowed:
		var p1 = 'blah blah blah
			blah blah';
	allowed:
		var p1 = 'blah blah blah blah blah';

<p></p> tags denote paragraphs, there will be spacing before and after automatically
<br> tag denotes a single line break, no spacing before or after

Certain characters must be escaped within javascript such as single quotes.  Use a "\" to precede and apostrophe for example:
	Trison\'s  will display as Trison's
	
If you do not escape the quote or make a mistake in coding, the entire page will freeze.  Simply undo your work or commment 
out your new code to check your work.  Samples of code commenting are illustrated here and within the page.


*/



function ShowHome() 
{
	//sample comment - for single line use only.  Precede line with double slashes.
	document.getElementById('mainContent').innerHTML = '<img src="img/mainbg.jpg" class="fltr" />';
}

function ShowServices()
{
	var hdr = '<h2>Services</h2>';
	var p1 = '<p>Trisons Production Services Ltd provides portable high/low pressure sand separators and personnel to meet all kinds of testing needs.</p><img src="img/flare_short.jpg" class="fltr" />';
	p1 = p1 + '<p>All personnel are certified and trained to safely operate in the most practical and efficient manner, while adhering to the petroleum industry\'s guiding principals and industry recommended practices. Our personnel have extensive experience in deep sour, single/multi-point testing, in-line/A.O.F. testing and sand frac recovery.</p>';
	p1 = p1 + '<p>Data is processed using Fekete field notes software. A Systech flow meter analyzer can store up to 16,000 records which is downloadable in CSV or spreadsheet format. Such records include static pressure, wellhead pressure, meter temperature and instant flow rate.  The logging of data can be in increments as low as 6 seconds and as high as 30 minutes.</p>';
	p1 = p1 + '<p>Final data submissions are verified with the EUB in-house and are submitted to the oil company in PAS format.  Data files can be submitted in other formats on request.</p>';

	document.getElementById('mainContent').innerHTML =  hdr + p1;
}


function ShowAbout() 
{
	var hdr = '<div style="background-image: url(img/vented_bkg.jpg);background-repeat:no-repeat;background-position:center right;"><br><h2>About Us</h2>';
	var p1 = '<p>Established in 2002 to meet the growing challenges and needs of today\'s petroleum companies. ';
	p1 = p1 + 'Our goal is to ensure complete customer satisfaction by providing:';
	p1 = p1 + '<table border="0" cellspacing="8" cellpadding="2">';
	p1 = p1 + '<tr><td>1.</td><td>Individual attention to each customer</td></tr>';
	p1 = p1 + '<tr><td>2.</td><td> Experienced, certified and well trained personnel</td></tr>';
	p1 = p1 + '<tr><td>3.</td><td>Quality, specialized equipment</td></tr>';
	p1 = p1 + '<tr><td>4.</td><td>Accurate data and well reporting on a timely basis</td></tr>';
	p1 = p1 + '<tr><td style="vertical-align:top;">5.</td><td>A commitment to Health, Safety and the Environment.</td></tr></table>';
	p1 = p1 + '<br>On-going training and testing of personnel</p><br><br></div>';
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}


function ShowContact()
{
	var hdr = '<h2>Contact</h2>';
	var p1 = '<p>If you have any questions, concerns or inquires, please contact us any time.</p><br>';
	p1 = p1 + '<img src="img/trisonslogo.gif" class="fltr" />';
	p1 = p1 + '<p>Office:  (403) 851-0976</p>';
	p1 = p1 + '<p>Cellular:  (403) 816-8770</p>';
	p1 = p1 + '<p>Fax:  (403) 851-0971</p>';
	p1 = p1 + '<p>Email:  <a href="mailto:inquire@trisonsproduction.com" style="color:#7F0000; font-size:16px;">inquire@trisonsproduction.com</a></p>';
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}

function ShowCerts(cert)
{
	var hdr = '';
	var p1 = '';
	if (cert == 'safety') {
		hdr = '<h2><a href="javascript:GoCerts(\'safety\')"><img src="img/cor_small.gif" class="fltr" /></a>';
		p1 = 'Safety Certification</h2>';
	}
	else if (cert == 'hse') {
		hdr = '<h2><a href="javascript:GoCerts(\'hse\')"><img src="img/hse_small.gif" class="fltr" /></a>';
		p1 = 'Health Safety & Environment Policy</h2>';
	}
	else if (cert == 'irp') {
		hdr = '<h2><a href="javascript:GoCerts(\'irp\')"><img src="img/irp_small.gif" class="fltr" /></a>';
		p1 = 'IRP Registration</h2>';
	}
	p1 = p1 + '<p style="margin-top:195pt;color:gray;text-align:right;"><i>click image to enlarge/print</i></p><br>';
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}


function GoCerts(cert)
{
	newwin = window.open("","");
	newwin.location.href = 'certpage.html?' + cert;
}


function ShowLogin()
{
	var hdr = '<h2>Client Login</h2>';
	var p1 = '<p>Please select your company name to access the secure server,<br> valid password is required.</p>';
	p1 = p1 + '<form name="loginform" action="" method="post">';
	p1 = p1 + '<select name="company" onselect="javascript=">';
	p1 = p1 + '<option value=""><i>please select<i>';
	p1 = p1 + '<option value="TrisonsProduction">Trisons Production';
	p1 = p1 + '<option value="CNRL">CNRL';
	p1 = p1 + '<option value="ConocoPhillips">Conoco Phillips';
        p1 = p1 + '<option value="Zargon">Zargon';
	p1 = p1 + '<option value="ComptonPetroleum">Compton Petroleum';
	p1 = p1 + '</select>&nbsp;&nbsp;&nbsp;<input type="button" name="gobut" value="GO" onclick="javascript:GoLogin()">';
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}


function GoLogin()
{
	var gopath = "https://www.trisonsproduction.com/clientarea/" + document.loginform.company.value;
	if(gopath == 'TrisonsProduction')
	{
		var newwin = window.open("https://www.trisonsproduction.com/clientarea/");
	}
	else
	{
		var newwin = window.open(gopath);
	}
}


function ShowEquip(equip)
{
	if (equip == 0)
	{
		var hdr = '<h2>Equipment Overview</h2>';
		var p1 = '<img src="img/all_handrails.jpg" class="fltr" />';
		p1 = p1 + '<p>Trisons fleet consists of top quality, trailer mounted, sour-service, low temperature vessels.</p>';
		p1 = p1 + '<p>Our equipment includes ';
		p1 = p1 + '4 primary <a href="javascript:ShowEquip(1);">Test Vessels</a>, ';
		p1 = p1 + 'a skid mounted 2.5 million BTU <a href="javascript:ShowEquip(2);">Line Heater</a>, ';
		p1 = p1 + 'and various <a href="javascript:ShowEquip(3);">Flare Stacks</a>. ';
		p1 = p1 + 'Contract equipment is also available upon request.</p>';
		p1 = p1 + '<img src="img/all_inlet.jpg" class="fltl" />';
		p1 = p1 + '<p>Trisons units are equipped with pilot-operated safety relief valves, instrumentation, regulators and dual chemical injection pumps. Instruments and regulators are vented to eliminate the possibility of explosive mixtures inside the building.  Vessel spooling and piping is welded.  High and low pressure line safety slings are certified. High pressure lines are welded and rated for 35 MPa.  Low pressure lines are welded and rated for 13800 kPa.<img src="img/all_dual_inj_pumps.jpg" class="fltr" style="margin: 2pt 0 8pt 2pt;" /></p>';
		p1 = p1 + '<p>Field office trailers are equipped with computers, SCBA units, first aid stations, LEL monitors, 2-way radios, cellular and satellite communication.</p><br>';
	}
	
	else if (equip == 1)
	{
		var hdr = '<h2><div class="flta"><a href="javascript:ShowEquip(0);">Equipment Overview</a></div>';
		hdr = hdr + 'Test Vessels<div style="font-size:14px">Sour Service, Low Temperature</div></h2>';
		var p1 = '<p><img src="img/vessels.jpg" class="fltr" />';
		p1 = p1 + '<img src="img/arrow_r.gif" />(1) 11m<sup>3</sup> x 6895 kPa working pressure<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />(3) 17m<sup>3</sup> x 3450 kPa working pressure<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Dual chemical injection pumps<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Tank mounted on 35 Ton tridem trailer<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />50.8mm steam coil<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Pilot operated P.S.V.<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Welded High Pressure 50.8mm by 35 MPa pipe<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Welded Low Pressure 76.2mm by 1380 kPa pipe<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />All vessels are pipeline ready (no need for additional valves or equipment)<br>';
		p1 = p1 + '</p>';
		p1 = p1 + '<p style="margin-top:0pt;">Units 1, 2 and 4 are identical in spooling and operation and are retro-fitted to be pipeline ready. Unit 3 has dual-vortex meters:  76.2mm and 25.4mm.  It also has a 25.4mm turbine for accurate measurements of flow-through to pipeline/storage facility.';
		p1 = p1 + '<div style=text-align:right;font-style:italic;margin-top:8pt;"><a href="javascript:goVessels();">View our complete line of Test Vessels with capacity ratings</a></div></p>';
	}
	else if (equip == 2)
	{
		var hdr = '<h2><div class="flta"><a href="javascript:ShowEquip(0);">Equipment Overview</a></div>';
		hdr = hdr + 'Line Heater</h2>';
		var p1 = '<img src="img/line_heater2.jpg" class="fltr" /><img src="img/arrow_r.gif" />Skid mounted<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Sour/Low temperature service<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />2.5MM BTU x 35MPa<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />9m<sup>3</sup> water capacity<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Insulated for greater energy savings<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />76mm bundle rated 35MPa working pressure<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Gear operated 76mm plug valve on inlet, outlet and by-pass<br>';
		p1 = p1 + '<img src="img/line_heater.jpg" class="fltl" style="margin-top:10pt;" />';
		p1 = p1 + '<img src="img/arrow_r.gif" />Circulating pump circulates bath water to steam-coil in pressure vessel<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />12 volt winch system to lift stack, eliminating need for a crane<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Electronic ignition with emergency shutdown and manual by-pass operation<br>';
	}

	else if (equip == 3)
	{
		var hdr = '<h2><div class="flta"><a href="javascript:ShowEquip(0);">Equipment Overview</a></div>';
		hdr = hdr + 'Flare Stacks</h2>';
		p1 = '<table align="center"><tr>';
		p1 = p1 + '<td style="vertical-align:top; padding-right:50pt;"><img src="img/flare_p.jpg" /><br><i>Portable</i><br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />18.3m with pipe rack<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />152mm main, 101.6mm vent<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />50.8mm shooter tube, 19.05mm pilot<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Fire-ball ignition<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Outriggers for stability<br>';
		p1 = p1 + '</td>';
		p1 = p1 + '<td style="vertical-align:top;"><img src="img/flare_f.jpg" /><br><i>Crane Assisted</i><br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />31m and 46m configurations<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />203mm main, (2) 76mm vents<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />50.8mm shooter tube, 25.4mm pilot<br>';
		p1 = p1 + '<img src="img/arrow_r.gif" />Fire-ball ignition<br>';
		p1 = p1 + '</td></tr></table>';
	}
	else if (equip == 4)
	{
		var hdr = '<h2><div class="flta"><a href="javascript:ShowEquip(0);">Equipment Overview</a></div>';
		hdr = hdr + 'blank</h2>';
		var p1 = '<p>';
		p1 = p1 + '';
		p1 = p1 + '';
		p1 = p1 + '';
		p1 = p1 + '';
		p1 = p1 + '</p>';

	}
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}

function goVessels() 
{	
	newwin = window.open("","");
	newwin.location.href = 'vessels.html';
}

function ShowBlank()
{
	var hdr = '<h2>Blank</h2>';
	var p1 = '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	p1 = p1 + '<p></p>';
	
	document.getElementById('mainContent').innerHTML =  hdr + p1;
}
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    