// ########## FUNCIO ESCRIU DATA
function posalidata()
   {
   var nombres_dias = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
   var nombres_meses = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
   var fecha_actual = new Date()
   dia_mes = fecha_actual.getDate()		
   dia_semana = fecha_actual.getDay()		
   mes = fecha_actual.getMonth() + 1
   anio = fecha_actual.getYear()
   if (anio < 100)				
      anio = '19' + anio
   else {
      var cadena_anio = new String(anio)
      anio = '20' + cadena_anio.substring(2,4)	  	
   }
   document.write(nombres_dias[dia_semana] + ", " + dia_mes + " " + nombres_meses[mes - 1] + " of " + anio)
   }


// ########## FUNCIO ESCRIU DATA 2
//per portada, quan no hi ha dades, necessitem pintar només el dia
function posalidata2()
   {
   var nombres_dias = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
   var fecha_actual = new Date()
   dia_mes = fecha_actual.getDate()		
   dia_semana = fecha_actual.getDay()		
   anio = fecha_actual.getYear()
   if (anio < 100)				
      anio = '19' + anio
   else {
      var cadena_anio = new String(anio)
      anio = '20' + cadena_anio.substring(2,4)
   }
   document.write(nombres_dias[dia_semana]) 
   }
   
   
   
   
// ########## FUNCIO RANDOM
function Randomitzar(min,max) {
	return Math.floor(Math.random()*(max+1))+min
} 
   
   
   
// ########## FUNCIO BANNER
function banner_dalt()
{
text = new Array();
//text[1] = '<img src=\"../media/gif_en/banners/banner1.gif\" width=\"565\" height=\"67\" alt=\"Give blood and make a difference\">';
//text[2] = '<img src=\"../media/gif_en/banners/banner2.gif\" width=\"565\" height=\"67\" alt=\"Giving blood makes a difference\">';
//text[3] = '<img src=\"../media/gif_en/banners/banner3.gif\" width=\"565\" height=\"67\" alt=\"The most precious natural resource: blood Give a little bit\">';
//text[4] = '<img src=\"../media/gif_en/banners/banner4.gif\" width=\"565\" height=\"67\" alt=\"Share life: give blood\">';
//text[5] = '<img src=\"../media/gif_en/banners/banner5.gif\" width=\"565\" height=\"67\" alt=\"We need blood every day\">';
//text[6] = '<img src=\"../media/gif_en/banners/banner6.gif\" width=\"565\" height=\"67\" alt=\"You\'ve got what we need. Give blood.\">';
//text[7] = '<img src=\"../media/gif_en/banners/banner7.gif\" width=\"565\" height=\"67\" alt=\"Once is not enough Come and give blood\">';

//text[1] = '<img src=\"../media/gif_ca/banners/banner8.gif\" width=\"565\" height=\"67\" alt=\"Amb una vegada no n\'hi ha prou. Vine a donar sang.\" >';
//text[2] = '<img src=\"../media/gif_ca/banners/banner9.gif\" width=\"565\" height=\"67\" alt=\"Amb una vegada no n\'hi ha prou. Vine a donar sang.\" >';
//text[3] = '<img src=\"../media/gif_es/banners/banner8.gif\" width=\"565\" height=\"67\" alt=\"Con una vez no basta. Ven a dar sangre.\" >';
//text[4] = '<img src=\"../media/gif_es/banners/banner9.gif\" width=\"565\" height=\"67\" alt=\"Con una vez no basta. Ven a dar sangre.\" >';

//text[1] = '<img src=\"../media/gif_en/banners/banner10.gif\" width=\"565\" height=\"67\" alt=\"Are you group 0- or A-? Did you know you can help many patients? Come and donate blood!\" >';
//text[2] = '<img src=\"../media/gif_en/banners/banner10.gif\" width=\"565\" height=\"67\" alt=\"Are you group 0- or A-? Did you know you can help many patients? Come and donate blood!\" >';

text[1] = '<img src=\"../media/gif_en/banners/banner12.gif\" width=\"565\" height=\"67\" alt=\"Every 3 seconds, somebody in Catalonia needs blood | Once isn\'t enough | Give blood\" >';
text[2] = '<img src=\"../media/gif_en/banners/banner12.gif\" width=\"565\" height=\"67\" alt=\"Every 3 seconds, somebody in Catalonia needs blood | Once isn\'t enough | Give blood\" >';


alipetit = Randomitzar(1,1);
document.write(text[alipetit]);
}


// ########## FUNCIO SABIA
function sabia()
{
text = new Array();

text[1] = 'The Banc de Sang i Teixits needs more than <b>1,000 blood transfusions a day</b> to ensure the supply to Catalonia\'s hospitals and clinics.';
text[2] = 'A donation of blood could help up to 3 different patients';
text[3] = '<b>Blood can\'t be made</b>. In just a few minutes, you can give blood without any problems.';
text[4] = 'If we\'re to have high-quality healthcare, Banc de Sang i Teixitss have to have enough blood.';
text[5] = 'The population is steadily increasing and our blood needs are too.';
text[6] = '<b>Blood can\'t be made</b> and no substitute is currently available. Donations are the only way to ensure blood is available.';
text[7] = 'Giving blood is a quick, simple process which is overseen by experienced healthcare professionals throughout.';
text[8] = '<b>Blood and blood components have a limited shelf life</b>. For red blood cell concentrates, the shelf life is 40 days; for platelets, only 5 days. As a result, we need blood donations every day.';
text[9] = 'If you only breathed once, you couldn\'t live. Sick people who need transfusions couldn\'t live if we only gave blood just once either.';
text[10] = 'Thanks to your donations, it is possible to carry out <strong>surgical operations, oncological treatments, organ transplants</strong>...';
text[11] = '<strong>8 plasma units</strong> are needed for a liver transplant and <strong>6</strong> for a child\'s heart surgery.';
text[12] = 'For a lung transplant, <strong>6 platelet concentrates are needed</strong> and <strong>1</strong> is needed for adult heart surgery.';
text[13] = 'For a spinal column operation, <strong>5 erythrocyte concentrates</strong> are needed and for a child\'s bone marrow this can be between <strong>1 and over 50</strong>.';
text[14] = 'After giving blood...<br>&nbsp;&nbsp;- drink plenty of liquids to recover the volume of blood<br>&nbsp;&nbsp;- don\'t drink alcoholic drinks or smoke<br>&nbsp;&nbsp;- don\'t make any effort with the arm where the needle was placed';
text[15] = 'We supply more than 1000 blood components every day.';
text[16] = 'We take care of the transfusion in more than 15 sanitary centers of all Catalonia.';
text[17] = 'The price of our blood products only covers the expenses of extracting, processing and storing the blood.';
text[18] = 'The Ministry of Health sets a maximum price for all blood products to ensure blood donation is always a voluntary and free action.';
text[19] = 'Every 3 seconds, someone needs blood in Catalonia.';
text[20] = '1 in every 10 people who enter a hospital needs blood.';
text[21] = 'If you donate blood in Autumn, in Winter, in Spring and in Summer, you will have helped to save 12 lives.';
text[22] = 'If you give blood four times a year, you will have helped 12 different patients';
text[23] = 'People who have suffered from burns may need up 20 units of red cell concentrate during their treatment.';
text[24] = 'Children receiving cancer treatment, premature babies and those that have to undergo heart surgery need red blood cells and platelets of all blood groups.';
text[25] = 'On average, every bone marrow transplant needs 120 platelet concentrate units and approximately 20 red cell concentrate units.';
text[26] = 'Cancer, traumatology and transplant patients, as well as those undergoing open-heart surgery, need platelet transfusions to survive.';
text[27] = 'Experts forecast that in the next 10 years the demand for blood in Catalonia will increase significantly.';
text[28] = 'If everyone who could donate blood did so 2 to 4 times a year, we could avoid situations of lack of blood.';
text[29] = 'We have 7,920 cord blood units suitable for transplants.';
text[30] = 'We have transplanted 371 cord blood units.';
text[31] = 'We have 27 maternity wards in Catalonia associated with the Programme and 16 in another four autonomous communities.';
text[32] = 'Blood plasma can be the source of up to 20 different types of medicine. ';
text[33] = 'Each blood product has its own therapeutic application. ';
text[34] = 'Thanks to blood products, thousands of patients in Catalonia can continue to lead a normal life. ';
text[35] = 'Apheresis provides 140% more plasma than a conventional blood donation. ';
text[36] = 'All blood groups can be used. All that’s needed is the willingness to help. ';
text[37] = 'Catalonia is one of the five Spanish Autonomous Regions that exceeds 40 donations per thousand inhabitants per year ';
text[38] = '41,579 Catalan men and women gave blood for the first time in 2008 ';
text[39] = 'The WHO has established an optimum threshold of between 43 and 45 donations per thousand inhabitants per year ';
text[40] = 'The WHO uses "Once is not Enough" to promote blood donation all over the world ';
text[41] = 'We have made it possible for 98% of the total population of Catalonia to give blood ';
text[42] = 'Blood donations have increased 5.5% compared with 2007 ';
text[43] = 'We organise some 60 blood donor marathons each year ';
text[44] = 'The project "Give Blood and Educate the Citizen" brings children and young immigrants into the blood donation programme ';
text[45] = 'During 2008, we supplied 4.3% more red blood cell concentrates, 15.2% more platelet concentrates and 1.1% more plasma. ';
text[46] = 'During 2008, we transfused 3.5% more red blood cell concentrates than last year ';
text[47] = 'During 2008, we organised 5,456 blood donation campaigns using mobile teams ';
text[48] = '45.4% of respondents donated blood out of a sense of altruism and solidarity, while 19.8% did so because a relative or friend needed it ';
text[49] = 'Blood donors give great importance to the post-donation blood analysis, technical proficiency, hygiene and equipment safety ';
text[50] = '99.9% of donors plan to continue giving blood in the future ';
text[51] = 'Donors see blood donation as a civic act of solidarity, good for society and a duty ';
text[52] = 'Donors rated their satisfaction with the act of donation as 9 and gave the work of the Banc de Sang a rating of 9.4.';

alipetit = Randomitzar(1,51);
document.write(text[alipetit]);
}


// ########## FUNCIO COPYRIGHT
function copyright()
{
document.write("&copy; 2008 Banc de Sang i Teixits - <a href=\"javascript:obrir('http://www.bancsang.net/en/notalegal.html',500,500);\">Legal Disclaimer</a></font>");
}

function copyright2()
{
document.write("&nbsp;&nbsp;&nbsp;(c) 2007 Banc de Sang i Teixits");
}



// ########## FUNCIO AMAGA ELS E-MAILS ANTI SPAM I TAL 

function vinclecorreu(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='gris2c10b' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}


// ########## FUNCIO AMAGA ELS E-MAILS ANTI SPAM I TAL, CORREU BLAU 

function vinclecorreublau(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='blau11b' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}


function vinclecorreublau10(usuari,hostname,hostext,text)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='blau10b' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'>" + text + "</A>";

        document.write(AnchorHREF);
}

// ########## FUNCIO AMAGA ELS E-MAILS ANTI SPAM I TAL AMB IMATGE 

function vinclecorreu_imatge(usuari,hostname,hostext,imatge,alt_imatge)
{

	    // Constants per "amagar" les paraules clau

        c1="mai";
        c2="lto";

        if (text == "")
        {
                text = usuari + "@" + hostname + "." + hostext;
        }

        AnchorHREF = "<A class='gris2c10b' HREF='" + c1 + c2 + ":" + usuari + "@" + hostname + "."  + hostext + "'><img src='" + imatge + "' alt='"+alt_imatge+"' border='0'></A>";

        document.write(AnchorHREF);
}

//########## FUNCIO PER ENVIAR DES D'UN <SELECT>

function enviar(){
	document.llista.submit();
}