function init() {
	var href = window.location.href;
	var keyValuePairs = href.substring(href.indexOf('?')+1, href.length);
	var queryString = new Querystring(keyValuePairs);
	var sel = queryString.get('sel');
	if (sel == null) 
		services();
    else { 
      	if (sel == 'iso')
      		isoCertificate();
        else if (sel == 'machining')
            machining();      		
        else if (sel == 'credit')
            creditApplication();                                     
        else
            services();
    }
}

function services() {
    var content = "";
    content += "<strong>Capabilities and Services</strong><br><br style='line-height:1'> ";
    content += "<li>Online Quoting<br><br style='line-height:.5'>";
    content += "<li>101,000 sq. feet dedicated to nickel and related alloys<br><br style='line-height:.5'>";
    content += "<li>ISO 9001:2008 certified since 1993<br><br style='line-height:.5'>";
    content += "<li>Precision Machining in house - 13 Machinists<br><br style='line-height:.5'>";
    content += "<li>Certified Welders and Automated Welders in house<br><br style='line-height:.5'>";
    content += "<li>Shearing to 3/8\" thick<br><br style='line-height:.5'>";
    content += "<li>Plasma Burning to 3\" thick<br><br style='line-height:.5'>";
    content += "<li>Waterjet Cutting<br><br style='line-height:.5'>";
    content += "<li>Plate Sawing to 5\" thick<br><br style='line-height:.5'>";
    content += "<li>Band Sawing to 20\" OD<br><br style='line-height:.5'>";
    content += "<li>Heat Treating in house<br><br style='line-height:.5'>";
    content += "<li>All manner of testing<br><br style='line-height:.5'>";
    content += "<li>\"Mill Quantity\" stock levels<br><br style='line-height:.5'>";
    content += "<li>E-mail us your quotes and drawings for faster processing<br><br style='line-height:.5'>";
    content += "<li>On-staff metallurgist available for customer support<br><br style='line-height:.5'>";    
    content += "<li>24 hour emergency service<br><br style='line-height:.5'>";
    content += "<li>19 alloys in stock<br><br style='line-height:.5'>";
    content += "<li>Plate, Sheet, Bar, Pipe, Fittings, Flanges, Tubing, Tube Fittings,<br><br style='line-height:.5'>";
    content += "<li>6B Bushings, Welding Products and Fasteners";
    DWRUtil.setValue("pageContent", content);
}

function machining() {
    var content = "";
    content += "<strong>Machining</strong><br><br style='line-height:1'> ";
    content += "The Corrosion Materials machine shop machines everything from routine components to ";
    content += "sophisticated multi-dimensional  close-tolerance components. Our machine shop has ";
    content += "the expertise and experience with high nickel alloy components. Five days a week, ";
    content += "16 hours a day, our machinists fabricate custom components using high nickel alloys.<br><br>";
    content += "Corrosion Materials specializes in providing non-standard components for the process ";
    content += "industries. Corrosion Materials can cut, burn and shear to your requirements, whether ";
    content += "you need strips, squares, rectangles, circles, rings or shapes. Corrosion Materials ";
    content += "can machine, drill, tap, turn, bore, bevel, thread and weld. Some of the many value ";
    content += "added services we provide our customers include shafts, rolled and welded pipe, small ";
    content += "spool pieces, U-bends and special fasteners.<br><br>";
    content += "With state-of-the-art CNC processing equipment, including 5 lathes and a vertical ";
    content += "machining center, we provide +/- .001\" or finer tolerances and the high quality ";
    content += "components required by the process industries. In our welding center, along ";
    content += "with our automated computer programmed welder, our welders use the latest TIG ";
    content += "techniques and consistently produce x-ray quality welds. Our processing area has ";
    content += "computer programmed waterjet, plasmas, abrasive saws, shears, automatic band saws. We ";
    content += "ultrasonically clean finished parts, sandblast, PMI, dye penetrant test, and heat ";
    content += "treat. Our highly qualified subcontractors bend, tensile test, corrosion test and ";
    content += "x-ray to uncompromising specifications such as ANSI, ASTM, and ASME.<br><br>";
    content += "<img src='images/plasmaCutter.png'/>&nbsp;<img src='images/sl_400.png'/>";
    DWRUtil.setValue("pageContent", content);
}

function isoCertificate() {
    var content = "";
    content += "<strong>ISO Certificate</strong><br><br style='line-height:1'>";
    content += "<table border='1' cellspacing='0' cellpadding='4' bgcolor='white' width='300'>";
    content += "<tr bgcolor='lightGrey' height='25'><td><b>Format</b></td><td><b>Size</b></td><td><b>Link</b></td></tr>";
    content += "<tr><td>Adobe</td><td>289 KB</td><td><img src='images/adobe.png'>&nbsp;<a href='images/ISOCertificateCM.pdf' target='_blank'>Download</a></td></tr>";
    content += "<tr><td>Image</td><td>418 KB</td><td><img src='images/image.png'>&nbsp;<a href='images/ISOCertificateCM.png' target='_blank'>Download</a></td></tr>";
    content += "</table><br style='line-height:.5'>";
    content += "<a href='http://www.adobe.com/products/acrobat/readstep2.html'><img style='border:none' src='images/adobeReader.png'/></a><br><br>"
    content += "<img src='images/ISOCertificateCM.png' width='530'/>";
    DWRUtil.setValue("pageContent", content);
}

function creditApplication() {
    var content = "";
    content += "<strong>Credit Application</strong><br><br style='line-height:1'>";
    content += "<table border='1' cellspacing='0' cellpadding='4' bgcolor='white' width='300'>";
    content += "<tr bgcolor='lightGrey' height='25'><td><b>Format</b></td><td><b>Size</b></td><td><b>Link</b></td></tr>";
    content += "<tr><td>Adobe</td><td>87 KB</td><td><img src='images/adobe.png'>&nbsp;<a href='documents/creditApplication.pdf' target='_blank'>Download</a></td></tr>";
    content += "<tr><td>MS Word 97</td><td>41 KB</td><td><img src='images/msWord.png'>&nbsp;<a href='documents/creditApplication.doc' target='_blank'>Download</a></td></tr>";
    content += "</table><br style='line-height:.5'>";
    content += "<a href='http://www.adobe.com/products/acrobat/readstep2.html'><img style='border:none' src='images/adobeReader.png'/></a>"
    DWRUtil.setValue("pageContent", content);
}
