						function myReplace(haystack, needle, replace)
						{
							var result = haystack;

							while(result.indexOf(needle) > -1)
							{
								result = result.replace(needle, replace);
							}

							return result;
						}

						function executeSearch(searchText, engineIndex)
						{
							var searchString = encodeURI(myReplace(searchText, " ", "+"));

							switch(engineIndex)
							{

							case 0:
								searchString = "http://www.google.com/search?hl=en&lr=en&q=" + searchString;
								break;

							case 1:
								searchString = "http://search.yahoo.com/search?p=" + searchString;
								break;
							

							case 2:
								searchString = "http://www.altavista.com/web/results?q=" + searchString;
								break;
							

							case 3:
								searchString = "http://msxml.excite.com/info.xcite/search/web/" + searchString;
								break;
								
							case 4:
								searchString = "http://hotbot.com/index.php?query=" + searchString;
								break;

							case 5:
								searchString = "http://search.aol.com/aolcom/search?invocationType=topsearchbox.webhome&query=" + searchString;
								break;

							
							}

							window.open(searchString, "searchEngineWindow");
						}

						function myPrintDate()
						{
						var myDayArray = new Array ("Dom", "Lun", "Mar", "Mier", "Jue", "Vier", "Sab");
						var myMonthArray = new Array(
							"Enero", "Febrero", "Marzo",
							"Abril", "Mayo", "Junio",
							"Julio", "Agosto", "Septiembre",
							"Octubre", "Noviembre", "Diciembre");
						var myDate = new Date();

						document.write(myDayArray[myDate.getDay()] + ", " + myMonthArray[myDate.getMonth()] + " " +
							myDate.getDate() + ", " + myDate.getFullYear());
						}

						function myRandomPicture(setIndex)
						{
							var myPictures;

							switch(setIndex)
							{
							case 0:
								myPictures = new Array(
							new Array("http://www.americanpostbox.com/suite.html", "http://www.americanpostbox.com/adsapb/oficina.jpg"),
							new Array("http://www.americanpostbox.com/thebox.html", "http://www.americanpostbox.com/adsapb/4millas.gif"),
							new Array("", "http://www.americanpostbox.com/adsapb/bienvenidos.gif"));
							break;
							}


						var myNumber = Math.round(Math.random() * (myPictures.length - 1));

						if(document.cookie)
						{
							if(myNumber == document.cookie)
							{
								if(myNumber < myPictures.length - 1)
									myNumber++;
								else
									myNumber = 0;
							}
						}

						document.write("<a href='" + myPictures[myNumber][0] + "' target='_blank'><img src='" + myPictures[myNumber][1] + "' border='0' width='468', height='60' /></a>");

						document.cookie = myNumber;
						}
