
/*

********************
  Missions Network  
********************

If you use this script, don't forget to let us know
so we can link back to you! 

The Missions Network: http://network.readyresponse.org 

You can change these colours if you like:
*/

var mBORDcolor = '#888888';
var mBACKcolor = '#666666';
var mFONTcolor = '#ffffff';
var cFONTcolor = '#ffff00';
var bFONTcolor = '#ffffff';
var mLINKcolor = '#0000ff';

/*
You should not need to edit below here
*/

var propmax = 3;

if ((murls != "") && (purls != ""))
{
	function missionDisplay()
	{
		var h_style = 'style="font-family:verdana,arial; font-size:8pt; color:'+mFONTcolor+';"';
		var t_style = 'style="font-family:verdana,arial; font-size:8pt; color:'+mLINKcolor+';"';
		var c_style = 'style="font-family:verdana,arial; font-size:8pt; color:'+cFONTcolor+';"';
		var b_style = 'style="font-family:verdana,arial; font-size:8pt; color:'+bFONTcolor+';"';
		var a_style = 'target="_blank" style="font-family:verdana,arial; font-size:8pt; text-decoration:none; color:'+mLINKcolor+';"';

		/* header */
		document.writeln('<table style="border-collapse: collapse; text-align: center; padding: 0pt; background-color: '+mBORDcolor+'; width: 74pt;">');
		document.writeln(' <tr style="background: '+mBACKcolor+';">');
		document.writeln('  <td style="text-align: center;">');

		var full_url = 'http://www.readyresponse.org/images/chimisnet.gif';

		document.writeln('   <table style="border-collapse: collapse; margin: 0pt; padding: 0pt;">');
		document.writeln('    <tr>');
		document.writeln('     <td style="text-align: center;">');
		document.writeln('      <span '+h_style+'>');
		document.writeln('      <a target="_blank" href="http://network.readyresponse.org/"><img alt="The Missions Network" src="'+full_url+'" style="border: 0pt;" /></a><br /><br />The Missions Network</span>');
		document.writeln('     </td>');
		document.writeln('    </tr>');

		/* output mission */

		document.writeln('    <tr>');
		document.writeln('     <td style="text-align: center;"><br /><span '+h_style+'>.: Latest Mission :.<br /><br /></span></td>');
		document.writeln('    </tr>');

		var full_url = 'http://network.readyresponse.org/'+murls[0];

		document.writeln('    <tr>');
		document.writeln('     <td style="text-align: center;"><a '+a_style+' href="'+full_url+'">'+mnumbers[0]+'</a><br /><span '+c_style+'>'+mcategories[0]+'</span><br /><span '+b_style+'>'+mtitles[0]+'</span></td>');
		document.writeln('    </tr>');

		/* output proposals */

		if ( propmax > 0 ) {

			document.writeln('    <tr>');
			document.writeln('     <td style="text-align: center;"><br /><span '+h_style+'>.: Proposals :.</span><br /><br /></td>');
			document.writeln('    </tr>');

			for ( i=0; i<propmax; i++ ) {
				
				if (purls[i])
				{
					var full_url = 'http://network.readyresponse.org/'+purls[i];

					document.writeln('    <tr>');
					document.writeln('     <td style="text-align: center;"><a '+a_style+' href="'+full_url+'">'+pnumbers[i]+'</a><br /><span '+c_style+'>'+pcategories[i]+'</span><br /><span '+b_style+'>'+ptitles[i]+'</span><br /><br /></td>');
					document.writeln('    </tr>');
				}
			}
		}

		/* footer */
		document.writeln('    <tr>');
		document.writeln('     <td align=center>');
		document.writeln('      <a target=_top '+a_style+' href="http://network.readyresponse.org/index.php?item=faqs"><span '+h_style+'>What is the Missions Network?</span></a><br /><br />');
		document.writeln('     </td>');
		document.writeln('    </tr>');
		document.writeln('   </table>');

		document.writeln('  </td>');
		document.writeln(' </tr>');
		document.writeln('</table>');
	}
	
	missionDisplay();
	
}
