function leftnav() {

document.write('        <div id="title"><img border="0" src="images/ts_service.gif" width="220" height="30" alt="Our Services"></div>');
document.write('        <div id="leftnav">   ');
document.write('        <ul><li> <a href="services_program_management.html">Program Management</a><BR>');
document.write('	<li> <a href="services_logistic_management.html">Logistic Management</a><BR>');
document.write('	</ul></div>');
document.write('        <div id="title"><img border="0" src="images/ts_software.gif" width="220" height="30" alt="Our Software"></div>');
document.write('        <div id="leftnav">');
document.write('        <ul><li> <a href="software_data_integration.html">Data Integration &amp; Reporting</a><BR>');
document.write('	<li> <a href="software_custom_solution.html">Custom Software Solution</a><BR>');
document.write('	</ul></div> ');
document.write('        <div id="title"><img border="0" src="images/ts_mstools.gif" width="220" height="30" alt="MS Project Tools"></div>');
document.write('        <div id="leftnav">');
document.write('        <ul><li> <a href="msp_critical_path.html">Critical Path Tool</a><br>');
document.write('        <li> <a href="msp_task_review.html">Task Review Tool</a><BR>');
document.write('        <li> <a href="msp_traceback.html">Traceback Tool</a><BR>');
document.write('        </ul></div>  ');

}

function footer() {

document.write('        <div style="float:right; text-align:right">');
document.write('        700 Boulevard South Suite 202, Huntsville, AL 35802 <BR>');
document.write('	Phone: 256/881-1038 Fax: 256/881-4791 </div>');
document.write('        <div style="float:left; padding-top:7px">');
document.write('        &copy; 2008 OPDEC Inc. - All Rights Reserved </div> ');

}

function randomString(file) {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 16;
	var randomstring = '';
	for (var i=0; i<string_length; i++) {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	}
	
	return randomstring;
}

function popUpInfo(fName) {
	URL = 'get_user_info.php?file=' + fName;
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=425,height=235,left = 550,top = 450');");
}

function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;

    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
    c_name = document.getElementById('c_name').value;
    c_company = document.getElementById('c_company').value;
    c_title = document.getElementById('c_title').value;
    c_phone = document.getElementById('c_phone').value;
    c_comments = document.getElementById('c_comments').value;
    c_file = document.getElementById('c_file').value;

    qstr = 'n=' + escape(c_name);
	qstr += '&c=' + escape(c_company);
	qstr += '&t=' + escape(c_title);
	qstr += '&p=' + escape(c_phone);
	qstr += '&co=' + escape(c_comments);
	qstr += '&f=' + escape(c_file);


    return qstr;
}

function updatepage(str){
	var file_name = document.getElementById('c_file').value;
	document.location.href = 'get_file.php?file=' + file_name + '&r=' + randomString();
	setTimeout("window.close()",10000);
}