function irtoggle(id)
{
    textblock = 'text'+id;
    ablock = 'a'+id;
    if( $(textblock).style.display == 'none')
    {
        $(textblock).style.display = 'block';
        $(ablock).innerHTML = ' - ';
    }else{
        $(textblock).style.display = 'none';
        $(ablock).innerHTML = ' + ';
    }
}

function get_ajax_thomson_reuters( method, get )
{
    request_str = 'bin/webroot/ajax_thomson_reuters.php?section_method='+method+get;
    new Ajax.Updater($('thomsonreuters'), request_str, {method : 'get', onComplete: completed = function(){return 'fin';}} );
    return false;
}
//ALERT
function get_alert_xml()
{
        var baseurl = 'http://dev.6ft.com:8009/natcogroup.com/';
	form_id_str = 'Alerts';//set recieved id to global form id
	var formSerialized = Form.serialize( $(form_id_str) );//serialize data
        $(form_id_str).innerHTML = '<img src="bin/webroot/images/ajax-loader.gif">';
        //send_alert_xml( baseurl+'bin/webroot/alertsub.php?'+formSerialized );
        new Ajax.Request('bin/webroot/alertsub.php?'+formSerialized,
	{
		method: 'post',
		postBody: "",
		onComplete:  send_alert_xml
	});
}
function send_alert_xml( xml )
{
    var xml = xml.responseText;
    alert( xml );

    new Ajax.Request('http://www.corporate-ir.net/ireye/xmlsub.asp',
	{
		method: 'post',
                contentType: 'xml',
		postBody: "&xmlDoc="+xml,
                onComplete: function(transport) {
                    alert(transport.status);
                    if (200 == transport.status)
                    {
                        alert('success');
                        //respond_alert_xml(transport);
                    }
                }
	});

}

function send_request( )
{
    var serial = Form.serialize( $('InfoReq') );
    alert(serial);
    new Ajax.Request('http://phx.corporate-ir.net/phoenix.zhtml?c=115702&p=irol-infoReqSuccess&t=InfoRequestSave',
	{
		method: 'post',
		postBody: serial,
                onComplete: function(ajax_request) {
                   
                }
	});

}

function respond_alert_xml( ajax_request )
{
        alert(ajax_request.responseText);
	$('Alerts').innerHTML = ajax_request.responseText;
}

function toggleWebLink(d)
{
    $('thomsonreuters').select('div.secweblinks').invoke('hide');
    $('thomsonreuters').select('div#'+d).invoke('show');
}
function setXmlUrl(url)
{
    $('sec_doc_xmlurl').value = url;
    $('sec_xmlurl_frm').submit();
    return false;
}